Page 1 of 1
					
				making a monster question
				Posted: Fri Jun 04, 2010 12:29 am
				by Jaorin
				Is it possible to make a monster that is unaffected by ranged skills? Not just immune, but the attack would go right through them?
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 2:35 am
				by FACM
				Possible? Yes.
How you'd implement such a thing would vary, though. Are you working on the ToME module, or your own game from scratch?
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 2:31 pm
				by Jaorin
				I'm playing around with the ToME module as a template.
Edit: I'm trying to make a WoW-like hunter class and need to be able to shoot through my pet.
Edit: Maybe a better way would be to make a shot that didn't hit a friendly.
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 4:57 pm
				by Shoob
				there is a friendly fire tag you could use for the talent (friendly_fire=false, I think, I (or you) would need to look at some talents in t4 to confirm this)
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 5:07 pm
				by Jaorin
				Thanks Shoob.
I've set that to true but that only prevents you from targeting them (and yourself for that matter). It still hits them if I aim through them. I'll keep looking.
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 5:40 pm
				by Shoob
				what happens if you make the talent a beam?  I suspect that that flag has to do with ball spells, but I am not sure.
another option you have is to make a special damage, and then give the AC immunity to that 

 
			 
			
					
				Re: making a monster question
				Posted: Fri Jun 04, 2010 5:44 pm
				by Jaorin
				I was thinking about the beam/immunity thing. That would make the shots unresistable by everything else and beams can be very powerful.
			 
			
					
				Re: making a monster question
				Posted: Sat Jun 05, 2010 11:40 am
				by Antagonist
				I had a quick look at the source code.
I ASSUME that what you want is for bolts to pass by friendlies, and to hit enemies.  In the code however, the way bolts work is that they stop at the first square that is considered move blocking.  Actors, all actors, by default are this.
There are 3 ways to get around this.  First is just making your spell use "hit" targetting instead.  This means it will damage your enemy past your pet, but unfortunately also means that you can damage enemies past other enemies.
Secondly define a custom damagetype or defaultprojector that your pet is immune to.  This will make it resist beams, but the bolts will still hit it instead of passing by.  Actually, friendlyfire flag will have it resist beams anyway I think.
Thirdly, you can override the ActorProject:project() method to respect friendlyfire tag for bolts.  If I read it correctly its just a modification to line 64 of /class/interface/ActorProject.lua.  bolts work by being set stop_block.  I would actually advise that DarkGod perhaps make this change to the base engine, IF I am reading this correctly.  I havn't really tested this yet.