[MIRROR] Devil refactor+small revamp (#887)

* Devil refactor+small revamp

* Delete mind.dm.rej

* clean up rej

* Delete admin_investigate.dm.rej

* Delete mapping.dm.rej

* compile fix
This commit is contained in:
CitadelStationBot
2017-05-18 09:06:01 -05:00
committed by Poojawa
parent 59b8cfbc93
commit c6a671a11b
30 changed files with 551 additions and 292 deletions
+78 -45
View File
@@ -32,12 +32,14 @@
/obj/item/weapon/paper/contract/employment/attack(mob/living/M, mob/living/carbon/human/user)
var/deconvert = 0
if(M.mind == target && target.soulOwner != target)
var/deconvert = FALSE
if(M.mind == target && !M.owns_soul())
if(user.mind && (user.mind.assigned_role == "Lawyer"))
deconvert = prob (25)
deconvert = TRUE
else if (user.mind && (user.mind.assigned_role =="Head of Personnel") || (user.mind.assigned_role == "Centcom Commander"))
deconvert = prob (10) // the HoP doesn't have AS much legal training
deconvert = prob (25) // the HoP doesn't have AS much legal training
else
deconvert = prob (5)
if(deconvert)
M.visible_message("<span class='notice'>[user] reminds [M] that [M]'s soul was already purchased by Nanotrasen!</span>")
to_chat(M, "<span class='boldnotice'>You feel that your soul has returned to its rightful owner, Nanotrasen.</span>")
@@ -57,6 +59,7 @@
var/contractType = 0
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/datum/mind/owner
var/datum/antagonist/devil/devil_datum
icon_state = "paper_onfire"
/obj/item/weapon/paper/contract/infernal/power
@@ -84,6 +87,10 @@
name = "paper- contract for knowledge"
contractType = CONTRACT_KNOWLEDGE
/obj/item/weapon/paper/contract/infernal/friend
name = "paper- contract for a friend"
contractType = CONTRACT_FRIEND
/obj/item/weapon/paper/contract/infernal/unwilling
name = "paper- infernal contract"
contractType = CONTRACT_UNWILLING
@@ -91,11 +98,10 @@
/obj/item/weapon/paper/contract/infernal/New(atom/loc, mob/living/nTarget, datum/mind/nOwner)
..()
owner = nOwner
devil_datum = owner.has_antag_datum(ANTAG_DATUM_DEVIL)
target = nTarget
update_text()
/obj/item/weapon/paper/contract/infernal
/obj/item/weapon/paper/contract/infernal/suicide_act(mob/user)
if(signed && (user == target.current) && istype(user,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = user
@@ -111,49 +117,56 @@
info = "This shouldn't be seen. Error DEVIL:6"
/obj/item/weapon/paper/contract/infernal/power/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for infernal power</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for power and physical strength. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for infernal power</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for power and physical strength. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/wealth/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for unlimited wealth</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for a pocket that never runs out of valuable resources. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for unlimited wealth</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for a pocket that never runs out of valuable resources. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/prestige/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for prestige</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for prestige and esteem among my peers. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for prestige</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for prestige and esteem among my peers. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/magic/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for magic</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for arcane abilities beyond normal human ability. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for magic</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for arcane abilities beyond normal human ability. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/revive/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for resurrection</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for resurrection and curing of all injuries. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for resurrection</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for resurrection and curing of all injuries. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/knowledge/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for knowledge</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for boundless knowledge. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for knowledge</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for boundless knowledge. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/friend/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for a friend</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename], in exchange for a friend. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
info += "<i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/unwilling/update_text(signature = "____________", blood = 0)
info = "<center><B>Contract for slave</B></center><BR><BR><BR>I, [target], hereby offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename]. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
info = "<center><B>Contract for slave</B></center><BR><BR><BR>I, [target], hereby offer my soul to the infernal hells by way of the infernal agent [devil_datum.truename]. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, "
if(blood)
info += "<font face=\"Nyala\" color=#600A0A size=6><i>[signature]</i></font>"
else
@@ -179,33 +192,40 @@
return ..()
/obj/item/weapon/paper/contract/infernal/proc/attempt_signature(mob/living/carbon/human/user, blood = 0)
if(user.IsAdvancedToolUser() && user.is_literate())
if(user.mind == target)
if(user.mind.soulOwner != owner)
if (contractType == CONTRACT_REVIVE)
to_chat(user, "<span class='notice'>You are already alive, this contract would do nothing.</span>")
else
if(signed)
to_chat(user, "<span class='notice'>This contract has already been signed. It may not be signed again.</span>")
else
to_chat(user, "<span class='notice'>You quickly scrawl your name on the contract</span>")
if(FulfillContract(target.current, blood)<=0)
to_chat(user, "<span class='notice'>But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?</span>")
return 1
else
to_chat(user, "<span class='notice'>This devil already owns your soul, you may not sell it to them again.</span>")
else
to_chat(user, "<span class='notice'>Your signature simply slides off the sheet, it seems this contract is not meant for you to sign.</span>")
else
if(!user.IsAdvancedToolUser() || !user.is_literate())
to_chat(user, "<span class='notice'>You don't know how to read or write.</span>")
return 0
return 0
if(user.mind != target)
to_chat(user, "<span class='notice'>Your signature simply slides off the sheet, it seems this contract is not meant for you to sign.</span>")
return 0
if(user.mind.soulOwner == owner)
to_chat(user, "<span class='notice'>This devil already owns your soul, you may not sell it to them again.</span>")
return 0
if(signed)
to_chat(user, "<span class='notice'>This contract has already been signed. It may not be signed again.</span>")
return 0
if(!user.mind.hasSoul)
to_chat(user, "<span class='notice'>You do not possess a soul.</span>")
return 0
if(prob(user.getBrainLoss()))
to_chat(user, "<span class='notice'>You quickly scrawl 'your name' on the contract.</span>")
signIncorrectly()
return 0
if (contractType == CONTRACT_REVIVE)
to_chat(user, "<span class='notice'>You are already alive, this contract would do nothing.</span>")
return 0
else
to_chat(user, "<span class='notice'>You quickly scrawl your name on the contract</span>")
if(fulfillContract(target.current, blood)<=0)
to_chat(user, "<span class='notice'>But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?</span>")
return 1
/obj/item/weapon/paper/contract/infernal/revive/attack(mob/M, mob/living/user)
if (target == M.mind && M.stat == DEAD && M.mind.soulOwner == M.mind)
if (cooldown)
to_chat(user, "<span class='notice'>Give [M] a chance to think through the contract, don't rush him.</span>")
to_chat(user, "<span class='notice'>Give [M] a chance to think through the contract, don't rush them.</span>")
return 0
cooldown = TRUE
var/mob/living/carbon/human/H = M
@@ -223,7 +243,7 @@
add_logs(user, H, "infernally revived via contract")
user.visible_message("<span class='notice'>With a sudden blaze, [H] stands back up.</span>")
H.fakefire()
FulfillContract(H, 1)//Revival contracts are always signed in blood
fulfillContract(H, 1)//Revival contracts are always signed in blood
addtimer(CALLBACK(H, /mob/living/carbon/human.proc/fakefireextinguish), 5, TIMER_UNIQUE)
addtimer(CALLBACK(src, "resetcooldown"), 300, TIMER_UNIQUE)
else
@@ -233,20 +253,26 @@
cooldown = FALSE
/obj/item/weapon/paper/contract/infernal/proc/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
signed = 1
/obj/item/weapon/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?
user.mind.soulOwner.devilinfo.remove_soul(user.mind) //Then they lose their claim.
var/datum/antagonist/devil/ownerDevilInfo = user.mind.soulOwner.has_antag_datum(ANTAG_DATUM_DEVIL)
ownerDevilInfo.remove_soul(user.mind) //Then they lose their claim.
user.mind.soulOwner = owner
user.hellbound = contractType
user.mind.damnation_type = contractType
owner.devilinfo.add_soul(user.mind)
var/datum/antagonist/devil/devilInfo = owner.has_antag_datum(ANTAG_DATUM_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>")
to_chat(user, "<span class='boldnotice'>This does NOT make you an antagonist if you were not already.</span>")
return 1
return TRUE
/obj/item/weapon/paper/contract/infernal/power/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
/obj/item/weapon/paper/contract/infernal/proc/signIncorrectly(mob/living/carbon/human/user = target.current, blood = FALSE)
signed = 1
update_text("your name", blood)
/obj/item/weapon/paper/contract/infernal/power/fulfillContract(mob/living/carbon/human/user = target.current, blood = FALSE)
if(!user.dna)
return -1
user.dna.add_mutation(HULK)
@@ -254,13 +280,14 @@
organ.Insert(user)
return ..()
/obj/item/weapon/paper/contract/infernal/wealth/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
/obj/item/weapon/paper/contract/infernal/wealth/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind) // How in the hell could that happen?
return -1
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_wealth(null))
return ..()
/obj/item/weapon/paper/contract/infernal/prestige/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
/obj/item/weapon/paper/contract/infernal/prestige/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
//Basically turns the signer into the captain, and uploads an ion law making them the captain.
var/obj/item/worn = user.wear_id
var/obj/item/weapon/card/id/id = null
if(worn)
@@ -292,16 +319,22 @@
return ..()
/obj/item/weapon/paper/contract/infernal/magic/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
/obj/item/weapon/paper/contract/infernal/magic/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
return -1
user.mind.AddSpell(new /obj/effect/proc_holder/spell/aimed/fireball(null))
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless(null))
user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
return ..()
/obj/item/weapon/paper/contract/infernal/knowledge/FulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
/obj/item/weapon/paper/contract/infernal/knowledge/fulfillContract(mob/living/carbon/human/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
return -1
user.dna.add_mutation(XRAY)
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/view_range(null))
return ..()
/obj/item/weapon/paper/contract/infernal/friend/fulfillContract(mob/living/user = target.current, blood = 0)
if(!istype(user) || !user.mind)
return -1
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_friend(null))
return ..()