[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
+1 -2
View File
@@ -1,4 +1,3 @@
////////////////////////////////
/proc/message_admins(msg)
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
@@ -705,7 +704,7 @@
to_chat(usr, "<b>No Devils located</b>" )
/datum/admins/proc/output_devil_info(mob/living/M)
if(istype(M) && M.mind && M.mind.devilinfo)
if(is_devil(M))
to_chat(usr, SSticker.mode.printdevilinfo(M.mind))
else
to_chat(usr, "<b>[M] is not a devil.")
+3 -2
View File
@@ -567,13 +567,14 @@
for(var/X in SSticker.mode.devils)
var/datum/mind/devil = X
var/mob/M = devil.current
var/datum/antagonist/devil/devilinfo = devil.has_antag_datum(ANTAG_DATUM_DEVIL)
if(M)
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name] : [devil.devilinfo.truename]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<tr><td><a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name] : [devilinfo.truename]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == 2 ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
dat += "<td><A HREF='?_src_=holder;traitor=\ref[M]'>Show Objective</A></td></tr>"
dat += "<td><A HREF='?_src_=holder;admincheckdevilinfo=\ref[M]'>Show all devil info</A></td></tr>"
else
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[devil]'>[devil.name] : [devil.devilinfo.truename] ([devil.key])</a><i>devil body destroyed!</i></td></tr>"
dat += "<tr><td><a href='?_src_=vars;Vars=\ref[devil]'>[devil.name] : [devilinfo.truename] ([devil.key])</a><i>devil body destroyed!</i></td></tr>"
dat += "<td><A href='?priv_msg=[devil.key]'>PM</A></td>"
dat += "</table>"
+2 -1
View File
@@ -20,6 +20,7 @@
var/oxy_damage = 0
density = 1
anchored = 1
var/banType = "lavaland"
/obj/effect/mob_spawn/attack_ghost(mob/user)
if(!SSticker.HasRoundStarted() || !loc)
@@ -27,7 +28,7 @@
if(!uses)
to_chat(user, "<span class='warning'>This spawner is out of charges!</span>")
return
if(jobban_isbanned(user, "lavaland"))
if(jobban_isbanned(user, banType))
to_chat(user, "<span class='warning'>You are jobanned!</span>")
return
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be cloned!)",,"Yes","No")
+1 -5
View File
@@ -32,11 +32,7 @@
var/mob/living/carbon/human/devil = create_event_devil(spawn_loc)
Mind.transfer_to(devil)
SSticker.mode.finalize_devil(Mind, FALSE)
SSticker.mode.add_devil_objectives(src, 2)
Mind.announceDevilLaws()
Mind.announce_objectives()
add_devil(devil, ascendable = FALSE)
spawned_mobs += devil
message_admins("[key_name_admin(devil)] has been made into a devil by an event.")
+79 -28
View File
@@ -1,3 +1,9 @@
#define PRE_TITLE 1
#define TITLE 2
#define SYLLABLE 3
#define MULTIPLE_SYLLABLE 4
#define SUFFIX 5
/obj/item/weapon/book/codex_gigas
name = "Codex Gigas"
icon_state ="demonomicon"
@@ -8,16 +14,14 @@
unique = 1
title = "The codex gigas"
var/inUse = 0
var/currentName = ""
var/currentSection = PRE_TITLE
/obj/item/weapon/book/codex_gigas/attack_self(mob/user)
if(is_blind(user))
to_chat(user, "<span class='warning'>As you are trying to read, you suddenly feel very stupid.</span>")
return
if(ismonkey(user))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You skim through the book but can't comprehend any of it.</span>")
return
if(inUse)
@@ -27,31 +31,78 @@
if(U.check_acedia())
to_chat(user, "<span class='notice'>None of this matters, why are you reading this? You put the [title] down.</span>")
return
inUse = 1
var/devilName = copytext(sanitize(input(user, "What infernal being do you wish to research?", "Codex Gigas", null) as text),1,MAX_MESSAGE_LEN)
var/speed = 300
var/correctness = 85
var/willpower = 98
user.visible_message("[user] opens [title] and begins reading intently.")
ask_name(user)
/obj/item/weapon/book/codex_gigas/proc/perform_research(mob/user, devilName)
if(!devilName)
user.visible_message("[user] closes [title] without looking anything up.")
return
inUse = TRUE
var/speed = 300
var/correctness = 85
if(ishuman(user))
var/mob/living/carbon/human/U = user
if(U.job in list("Curator")) // the curator is both faster, and more accurate than normal crew members at research
speed = 45
speed = 100
correctness = 100
willpower = 100
if(U.job in list("Captain", "Security Officer", "Head of Security", "Detective", "Warden"))
willpower = 99
if(U.job in list("Clown")) // WHO GAVE THE CLOWN A DEMONOMICON? BAD THINGS WILL HAPPEN!
willpower = 25
correctness -= U.getBrainLoss() *0.5 //Brain damage makes researching hard.
speed += U.getBrainLoss() * 3
user.visible_message("[user] opens [title] and begins reading intently.")
if(do_after(U, speed, 0, U))
var/usedName = devilName
if(!prob(correctness))
usedName += "x"
var/datum/devilinfo/devil = devilInfo(usedName, 0)
user << browse("Information on [devilName]<br><br><br>[GLOB.lawlorify[LORE][devil.ban]]<br>[GLOB.lawlorify[LORE][devil.bane]]<br>[GLOB.lawlorify[LORE][devil.obligation]]<br>[GLOB.lawlorify[LORE][devil.banish]]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
inUse = 0
sleep(10)
if(!prob(willpower))
U.influenceSin()
onclose(user, "book")
if(do_after(user, speed, 0, user))
var/usedName = devilName
if(!prob(correctness))
usedName += "x"
var/datum/antagonist/devil/devil = devilInfo(usedName)
display_devil(devil, user, usedName)
sleep(10)
onclose(user, "book")
inUse = FALSE
/obj/item/weapon/book/codex_gigas/proc/display_devil(datum/antagonist/devil/devil, mob/reader, devilName)
reader << browse("Information on [devilName]<br><br><br>[GLOB.lawlorify[LORE][devil.ban]]<br>[GLOB.lawlorify[LORE][devil.bane]]<br>[GLOB.lawlorify[LORE][devil.obligation]]<br>[GLOB.lawlorify[LORE][devil.banish]]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
/obj/item/weapon/book/codex_gigas/proc/ask_name(mob/reader)
ui_interact(reader)
/obj/item/weapon/book/codex_gigas/ui_act(action, params)
if(..())
return
if(!action)
return FALSE
if(action == "search")
SStgui.close_uis(src)
addtimer(CALLBACK(src, .proc/perform_research, usr, currentName), 0)
currentName = ""
currentSection = PRE_TITLE
return FALSE
else
currentName += action
var/oldSection = currentSection
if(GLOB.devil_pre_title.Find(action))
currentSection = TITLE
else if(GLOB.devil_title.Find(action))
currentSection = SYLLABLE
else if(GLOB.devil_syllable.Find(action))
if (currentSection>=SYLLABLE)
currentSection = MULTIPLE_SYLLABLE
else
currentSection = SYLLABLE
else if(GLOB.devil_suffix.Find(action))
currentSection = SUFFIX
else
to_chat(world, "Codex gigas failure [action]")
return currentSection != oldSection
/obj/item/weapon/book/codex_gigas/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "codex_gigas", name, 450, 450, master_ui, state)
ui.open()
/obj/item/weapon/book/codex_gigas/ui_data(mob/user)
var/list/data = list()
data["name"]=currentName
data["currentSection"]=currentSection
return data
@@ -34,8 +34,8 @@
if(SSticker && SSticker.mode)
SSblackbox.ReportDeath(src)
if(mind && mind.devilinfo)
INVOKE_ASYNC(mind.devilinfo, /datum/devilinfo.proc/beginResurrectionCheck, src)
if(is_devil(src))
INVOKE_ASYNC(is_devil(src), /datum/antagonist/devil.proc/beginResurrectionCheck, src)
/mob/living/carbon/human/proc/makeSkeleton()
status_flags |= DISFIGURED
+7 -8
View File
@@ -811,23 +811,22 @@
/mob/living/proc/owns_soul()
if(mind)
return mind.soulOwner == mind
return 1
return TRUE
/mob/living/proc/return_soul()
hellbound = 0
if(mind)
if(mind.soulOwner.devilinfo)//Not sure how this could happen, but whatever.
mind.soulOwner.devilinfo.remove_soul(mind)
var/datum/antagonist/devil/devilInfo = mind.soulOwner.has_antag_datum(ANTAG_DATUM_DEVIL)
if(devilInfo)//Not sure how this could be null, but let's just try anyway.
devilInfo.remove_soul(mind)
mind.soulOwner = mind
/mob/living/proc/has_bane(banetype)
if(mind)
if(mind.devilinfo)
return mind.devilinfo.bane == banetype
return 0
var/datum/antagonist/devil/devilInfo = is_devil(src)
return (banetype == devilInfo.bane)
/mob/living/proc/check_weakness(obj/item/weapon, mob/living/attacker)
if(mind && mind.devilinfo)
if(mind && mind.has_antag_datum(ANTAG_DATUM_DEVIL))
return check_devil_bane_multiplier(weapon, attacker)
return 1
+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 ..()
+4 -2
View File
@@ -52,7 +52,7 @@
user.put_in_hands(contract)
else
var/obj/item/weapon/paper/contract/infernal/contract // = new(user.loc, C.mind, contractType, user.mind)
var/contractTypeName = input(user, "What type of contract?") in list ("Power", "Wealth", "Prestige", "Magic", "Knowledge")
var/contractTypeName = input(user, "What type of contract?") in list ("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship")
switch(contractTypeName)
if("Power")
contract = new /obj/item/weapon/paper/contract/infernal/power(C.loc, C.mind, user.mind)
@@ -64,6 +64,8 @@
contract = new /obj/item/weapon/paper/contract/infernal/magic(C.loc, C.mind, user.mind)
if("Knowledge")
contract = new /obj/item/weapon/paper/contract/infernal/knowledge(C.loc, C.mind, user.mind)
if("Friendship")
contract = new /obj/item/weapon/paper/contract/infernal/friend(C.loc, C.mind, user.mind)
C.put_in_hands(contract)
else
to_chat(user, "<span class='notice'>[C] seems to not be sentient. You cannot summon a contract for [C.p_them()].</span>")
@@ -106,7 +108,7 @@
continuing = 1
else
for(var/mob/living/C in orange(2, get_turf(user.loc))) //Can also phase in when nearby a potential buyer.
if (C.mind && C.mind.soulOwner == C.mind)
if (C.owns_soul())
continuing = 1
break
if(continuing)
+31 -2
View File
@@ -35,10 +35,39 @@
charge_max = 50
cooldown_min = 10
action_icon_state = "camera_jump"
var/ranges = list(7,8,9,10/*,11,12*/)
var/ranges = list(7,8,9,10)
/obj/effect/proc_holder/spell/targeted/view_range/cast(list/targets, mob/user = usr)
for(var/mob/C in targets)
if(!C.client)
continue
C.client.change_view(input("Select view range:", "Range", 4) in ranges)
C.client.change_view(input("Select view range:", "Range", 4) in ranges)
/obj/effect/proc_holder/spell/targeted/summon_friend
name = "Summon Friend"
desc = "The reward for selling your soul."
invocation_type = "none"
include_user = 1
range = -1
clothes_req = 0
charge_max = 50
cooldown_min = 10
action_icon_state = "sacredflame"
var/mob/living/friend
var/obj/effect/mob_spawn/human/demonic_friend/friendShell
/obj/effect/proc_holder/spell/targeted/summon_friend/cast(list/targets, mob/user = usr)
if(!QDELETED(friend))
to_chat(friend, "<span class='userdanger'>Your master has deemed you a poor friend. Your durance in hell will now resume.</span>")
friend.dust(TRUE)
qdel(friendShell)
return
if(!QDELETED(friendShell))
qdel(friendShell)
return
for(var/C in targets)
var/mob/living/L = C
friendShell = new /obj/effect/mob_spawn/human/demonic_friend(L.loc, L.mind, src)
/obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless
clothes_req = FALSE
+8 -6
View File
@@ -181,12 +181,13 @@
for(var/V in listeners)
var/mob/living/L = V
if(L.mind && L.mind.devilinfo && findtext(message, L.mind.devilinfo.truename))
var/start = findtext(message, L.mind.devilinfo.truename)
listeners = list(L) //let's be honest you're never going to find two devils with the same name
var/datum/antagonist/devil/devilinfo = is_devil(L)
if(devilinfo && findtext(message, devilinfo.truename))
var/start = findtext(message, devilinfo.truename)
listeners = list(L) //Devil names are unique.
power_multiplier *= 5 //if you're a devil and god himself addressed you, you fucked up
//Cut out the name so it doesn't trigger commands
message = copytext(message, 0, start)+copytext(message, start + length(L.mind.devilinfo.truename), length(message) + 1)
message = copytext(message, 0, start)+copytext(message, start + length(devilinfo.truename), length(message) + 1)
break
else if(dd_hasprefix(message, L.real_name))
specific_listeners += L //focus on those with the specified name
@@ -362,8 +363,9 @@
cooldown = COOLDOWN_MEME
for(var/V in listeners)
var/mob/living/L = V
if(L.mind && L.mind.devilinfo)
L.say("[L.mind.devilinfo.truename]")
if(is_devil(L))
var/datum/antagonist/devil/devilinfo = is_devil(L)
L.say("[devilinfo.truename]")
else
L.say("[L.real_name]")
sleep(5) //So the chat flows more naturally