mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -14,12 +14,12 @@
|
||||
aspect = ASPECT_TELE
|
||||
|
||||
/obj/item/spell/abjuration/on_ranged_cast(atom/hit_atom, mob/user)
|
||||
if(istype(hit_atom, /mob/living) && pay_energy(500) && within_range(hit_atom))
|
||||
if(isliving(hit_atom) && pay_energy(500) && within_range(hit_atom))
|
||||
var/mob/living/L = hit_atom
|
||||
var/mob/living/simple_mob/SM = null
|
||||
|
||||
//Bit of a roundabout typecheck, in order to test for two variables from two different mob types in one line.
|
||||
if(istype(L, /mob/living/simple_mob))
|
||||
if(isanimal(L))
|
||||
SM = L
|
||||
if(L.summoned || (SM && SM.supernatural) )
|
||||
if(L.client) // Player-controlled mobs are immune to being killed by this.
|
||||
|
||||
Reference in New Issue
Block a user