Fixes rev mindswap (#34567)

This commit is contained in:
ShizCalev
2018-01-21 13:28:41 -05:00
committed by CitadelStationBot
parent f692ffaa0c
commit 68cfdb617b
28 changed files with 60 additions and 79 deletions
+2 -2
View File
@@ -373,7 +373,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/player_key = G_found.key
//Now for special roles and equipment.
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR)
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(/datum/antagonist/traitor)
if(traitordatum)
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
traitordatum.equip()
@@ -392,7 +392,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/list/ninja_spawn = list()
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
ninja_spawn += L
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(/datum/antagonist/ninja)
ninjadatum.equip_space_ninja()
if(ninja_spawn.len)
new_character.forceMove(pick(ninja_spawn))
+2 -2
View File
@@ -27,8 +27,8 @@
log_game("[scientist.mind.key] (ckey) has been selected as [T.name] abductor scientist.")
log_game("[agent.mind.key] (ckey) has been selected as [T.name] abductor agent.")
scientist.mind.add_antag_datum(ANTAG_DATUM_ABDUCTOR_SCIENTIST, T)
agent.mind.add_antag_datum(ANTAG_DATUM_ABDUCTOR_AGENT, T)
scientist.mind.add_antag_datum(/datum/antagonist/abductor/scientist, T)
agent.mind.add_antag_datum(/datum/antagonist/abductor/agent, T)
spawned_mobs += list(agent, scientist)
return SUCCESSFUL_SPAWN
+2 -2
View File
@@ -819,7 +819,7 @@
/mob/living/proc/return_soul()
hellbound = 0
if(mind)
var/datum/antagonist/devil/devilInfo = mind.soulOwner.has_antag_datum(ANTAG_DATUM_DEVIL)
var/datum/antagonist/devil/devilInfo = mind.soulOwner.has_antag_datum(/datum/antagonist/devil)
if(devilInfo)//Not sure how this could be null, but let's just try anyway.
devilInfo.remove_soul(mind)
mind.soulOwner = mind
@@ -829,7 +829,7 @@
return devilInfo && banetype == devilInfo.bane
/mob/living/proc/check_weakness(obj/item/weapon, mob/living/attacker)
if(mind && mind.has_antag_datum(ANTAG_DATUM_DEVIL))
if(mind && mind.has_antag_datum(/datum/antagonist/devil))
return check_devil_bane_multiplier(weapon, attacker)
return 1
+3 -3
View File
@@ -93,7 +93,7 @@
/obj/item/paper/contract/infernal/New(atom/loc, mob/living/nTarget, datum/mind/nOwner)
..()
owner = nOwner
devil_datum = owner.has_antag_datum(ANTAG_DATUM_DEVIL)
devil_datum = owner.has_antag_datum(/datum/antagonist/devil)
target = nTarget
update_text()
@@ -251,12 +251,12 @@
/obj/item/paper/contract/infernal/proc/fulfillContract(mob/living/carbon/human/user = target.current, blood = FALSE)
signed = TRUE
if(user.mind.soulOwner != user.mind) //They already sold their soul to someone else?
var/datum/antagonist/devil/ownerDevilInfo = user.mind.soulOwner.has_antag_datum(ANTAG_DATUM_DEVIL)
var/datum/antagonist/devil/ownerDevilInfo = user.mind.soulOwner.has_antag_datum(/datum/antagonist/devil)
ownerDevilInfo.remove_soul(user.mind) //Then they lose their claim.
user.mind.soulOwner = owner
user.hellbound = contractType
user.mind.damnation_type = contractType
var/datum/antagonist/devil/devilInfo = owner.has_antag_datum(ANTAG_DATUM_DEVIL)
var/datum/antagonist/devil/devilInfo = owner.has_antag_datum(/datum/antagonist/devil)
devilInfo.add_soul(user.mind)
update_text(user.real_name, blood)
to_chat(user, "<span class='notice'>A profound emptiness washes over you as you lose ownership of your soul.</span>")
@@ -9,7 +9,6 @@
invocation_type = "whisper"
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
var/unconscious_amount_caster = 400 //how much the caster is stunned for after the spell
var/unconscious_amount_victim = 400 //how much the victim is stunned for after the spell
@@ -54,7 +53,8 @@ Also, you never added distance checking after target is selected. I've went ahea
to_chat(user, "<span class='warning'>You're killing yourself! You can't concentrate enough to do this!</span>")
return
if((target.mind.special_role in protected_roles) || cmptext(copytext(target.key,1,2),"@"))
var/datum/mind/TM = target.mind
if((TM.has_antag_datum(/datum/antagonist/wizard) || TM.has_antag_datum(/datum/antagonist/cult) || TM.has_antag_datum(/datum/antagonist/clockcult) || TM.has_antag_datum(/datum/antagonist/changeling) || TM.has_antag_datum(/datum/antagonist/rev)) || cmptext(copytext(target.key,1,2),"@"))
to_chat(user, "<span class='warning'>[target.p_their(TRUE)] mind is resisting your spell!</span>")
return
+1 -1
View File
@@ -88,7 +88,7 @@
if(!T || T.type != type)
continue
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(ANTAG_DATUM_ABDUCTOR)
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(/datum/antagonist/abductor)
if(!A || !(H.mind in A.team.members))
continue
to_chat(H, rendered)