Merge pull request #5702 from Citadel-Station-13/upstream-merge-35639

[MIRROR] Refactors anti-magic into a component
This commit is contained in:
LetterJay
2018-02-25 16:59:38 -06:00
committed by GitHub
42 changed files with 378 additions and 128 deletions
@@ -21,6 +21,7 @@
if(ishuman(H) && !fly)
fly = new
fly.Grant(H)
H.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/angel/on_species_loss(mob/living/carbon/human/H)
if(fly)
@@ -31,6 +32,7 @@
if(H.dna && H.dna.species &&((H.dna.features["wings"] != "None") && ("wings" in H.dna.species.mutant_bodyparts)))
H.dna.features["wings"] = "None"
H.update_body()
H.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
..()
/datum/species/angel/spec_life(mob/living/carbon/human/H)
@@ -69,6 +69,14 @@
info_text = "As an <span class='danger'>Adamantine Golem</span>, you possess special vocal cords allowing you to \"resonate\" messages to all golems."
prefix = "Adamantine"
/datum/species/golem/adamantine/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT)
/datum/species/golem/adamantine/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT)
..()
//The suicide bombers of golemkind
/datum/species/golem/plasma
name = "Plasma Golem"
@@ -161,6 +169,14 @@
prefix = "Silver"
special_names = list("Surfer", "Chariot", "Lining")
/datum/species/golem/silver/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/golem/silver/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
..()
//Harder to stun, deals more damage, but it's even slower
/datum/species/golem/plasteel
name = "Plasteel Golem"
@@ -664,6 +680,14 @@
punchdamagehigh = 8 // not as heavy as stone
prefix = "Cloth"
/datum/species/golem/cloth/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/golem/cloth/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
..()
/datum/species/golem/cloth/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
@@ -87,6 +87,10 @@
to_chat(H, "<span class='notice'>[victim] doesn't have blood!</span>")
return
V.drain_cooldown = world.time + 30
if(victim.anti_magic_check(FALSE, TRUE))
to_chat(victim, "<span class='warning'>[H] tries to bite you, but stops before touching you!</span>")
to_chat(H, "<span class='warning'>[victim] is blessed! You stop just in time to avoid catching fire.</span>")
return
if(!do_after(H, 30, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood