Skip to content

Commit

Permalink
early return
Browse files Browse the repository at this point in the history
  • Loading branch information
Runian committed Nov 25, 2024
1 parent e2b4b73 commit eb47e26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/modules/projectiles/ammo_types/energy_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
/datum/ammo/energy/tesla/on_hit_mob(mob/target_mob, obj/projectile/proj)
if(isxeno(target_mob)) //need 1 second more than the actual effect time
var/mob/living/carbon/xenomorph/X = target_mob
if(!(X.xeno_caste.caste_flags & CASTE_PLASMADRAIN_IMMUNE))
X.use_plasma(0.3 * X.xeno_caste.plasma_max * X.xeno_caste.plasma_regen_limit) //Drains 30% of max plasma on hit
if(X.xeno_caste.caste_flags & CASTE_PLASMADRAIN_IMMUNE)
return
X.use_plasma(0.3 * X.xeno_caste.plasma_max * X.xeno_caste.plasma_regen_limit) //Drains 30% of max plasma on hit

/datum/ammo/energy/lasburster
name = "lasburster bolt"
Expand Down

0 comments on commit eb47e26

Please sign in to comment.