Refactors anti-magic into a component (#35639)

* Refactors anti-magic into a component

* plenty o stuff, mainly holy and antimagic traits

* fix

* fix2

* moved to components, moved some of the logic to the component

* don't blame me if the code looks copypastey

* right
This commit is contained in:
XDTM
2018-02-25 21:45:12 +01:00
committed by oranges
parent c7efd2b6a3
commit 2ac902ab3c
42 changed files with 315 additions and 65 deletions

View File

@@ -125,7 +125,7 @@
/datum/status_effect/belligerent/proc/do_movement_toggle(force_damage)
var/number_legs = owner.get_num_legs()
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.null_rod_check() && number_legs)
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check() && number_legs)
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
if(GLOB.ratvar_awakens)
owner.Knockdown(20)
@@ -218,7 +218,7 @@
if(owner.confused)
owner.confused = 0
severity = 0
else if(!owner.null_rod_check() && owner.stat != DEAD && severity)
else if(!owner.anti_magic_check() && owner.stat != DEAD && severity)
var/static/hum = get_sfx('sound/effects/screech.ogg') //same sound for every proc call
if(owner.getToxLoss() > MANIA_DAMAGE_TO_CONVERT)
if(is_eligible_servant(owner))