initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
var/global/list/whiteness = list (
/obj/item/clothing/under/color/white = 2,
/obj/item/clothing/under/rank/bartender = 1,
/obj/item/clothing/under/rank/chef = 1,
/obj/item/clothing/under/rank/chief_engineer = 1,
/obj/item/clothing/under/rank/scientist = 1,
/obj/item/clothing/under/rank/chemist = 1,
/obj/item/clothing/under/rank/chief_medical_officer = 1,
/obj/item/clothing/under/rank/geneticist = 1,
/obj/item/clothing/under/rank/virologist = 1,
/obj/item/clothing/under/rank/nursesuit = 1,
/obj/item/clothing/under/rank/medical = 1,
/obj/item/clothing/under/rank/det = 1,
/obj/item/clothing/under/suit_jacket/white = 0.5,
/obj/item/clothing/under/burial = 1
)
/mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker)
switch(mind.devilinfo.bane)
if(BANE_WHITECLOTHES)
if(istype(attacker, /mob/living/carbon/human))
var/mob/living/carbon/human/H = attacker
if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = H.w_uniform
if(whiteness[U.type])
src.visible_message("<span class='warning'>[src] seems to have been harmed by the purity of [attacker]'s clothes.</span>", "<span class='notice'>Unsullied white clothing is disrupting your form.</span>")
return whiteness[U.type] + 1
if(BANE_TOOLBOX)
if(istype(weapon,/obj/item/weapon/storage/toolbox))
src.visible_message("<span class='warning'>The [weapon] seems unusually robust this time.</span>", "<span class='notice'>The [weapon] is your unmaking!</span>")
return 2.5 // Will take four hits with a normal toolbox.
if(BANE_HARVEST)
if(istype(weapon,/obj/item/weapon/reagent_containers/food/snacks/grown/))
src.visible_message("<span class='warning'>The spirits of the harvest aid in the exorcism.</span>", "<span class='notice'>The harvest spirits are harming you.</span>")
src.Weaken(2)
qdel(weapon)
return 2
return 1
@@ -0,0 +1,111 @@
/datum/game_mode
var/list/datum/mind/sintouched = list()
var/list/datum/mind/devils = list()
var/devil_ascended = 0 // Number of arch devils on station
/datum/game_mode/proc/auto_declare_completion_sintouched()
var/text = ""
if(sintouched.len)
text += "<br><span class='big'><b>The sintouched were:</b></span>"
var/list/sintouchedUnique = uniqueList(sintouched)
for(var/S in sintouchedUnique)
var/datum/mind/sintouched_mind = S
text += printplayer(sintouched_mind)
text += printobjectives(sintouched_mind)
text += "<br>"
text += "<br>"
world << text
/datum/game_mode/proc/auto_declare_completion_devils()
/var/text = ""
if(devils.len)
text += "<br><span class='big'><b>The devils were:</b></span>"
for(var/D in devils)
var/datum/mind/devil = D
text += printplayer(devil)
text += printdevilinfo(devil)
text += printobjectives(devil)
text += "<br>"
world << text
/datum/game_mode/devil
/datum/game_mode/proc/finalize_devil(datum/mind/devil_mind)
var/mob/living/carbon/human/S = devil_mind.current
var/trueName= randomDevilName()
var/datum/objective/devil/soulquantity/soulquant = new
soulquant.owner = devil_mind
var/datum/objective/devil/obj_2 = pick(new /datum/objective/devil/soulquality(null), new /datum/objective/devil/sintouch(null))
obj_2.owner = devil_mind
devil_mind.objectives += obj_2
devil_mind.objectives += soulquant
devil_mind.devilinfo = devilInfo(trueName, 1)
devil_mind.store_memory("Your devilic true name is [devil_mind.devilinfo.truename]<br>[lawlorify[LAW][devil_mind.devilinfo.ban]]<br>You may not use violence to coerce someone into selling their soul.<br>You may not directly and knowingly physically harm a devil, other than yourself.<br>[lawlorify[LAW][devil_mind.devilinfo.bane]]<br>[lawlorify[LAW][devil_mind.devilinfo.obligation]]<br>[lawlorify[LAW][devil_mind.devilinfo.banish]]<br>")
devil_mind.devilinfo.owner = devil_mind
devil_mind.devilinfo.give_base_spells(1)
spawn(10)
devil_mind.devilinfo.update_hud()
if(devil_mind.assigned_role == "Clown")
S << "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>"
S.dna.remove_mutation(CLOWNMUT)
/datum/mind/proc/announceDevilLaws()
if(!devilinfo)
return
current << "<span class='warning'><b>You remember your link to the infernal. You are [src.devilinfo.truename], an agent of hell, a devil. And you were sent to the plane of creation for a reason. A greater purpose. Convince the crew to sin, and embroiden Hell's grasp.</b></span>"
current << "<span class='warning'><b>However, your infernal form is not without weaknesses.</b></span>"
current << "You may not use violence to coerce someone into selling their soul."
current << "You may not directly and knowingly physically harm a devil, other than yourself."
current << lawlorify[LAW][src.devilinfo.bane]
current << lawlorify[LAW][src.devilinfo.ban]
current << lawlorify[LAW][src.devilinfo.obligation]
current << lawlorify[LAW][src.devilinfo.banish]
current << "<br/><br/><span class='warning'>Remember, the crew can research your weaknesses if they find out your devil name.</span><br>"
var/obj_count = 1
current << "<span class='notice'>Your current objectives:</span>"
for(var/O in objectives)
var/datum/objective/objective = O
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
/datum/game_mode/proc/printdevilinfo(datum/mind/ply)
if(!ply.devilinfo)
return ""
var/text = "</br>The devil's true name is: [ply.devilinfo.truename]</br>"
text += "The devil's bans were:</br>"
text += " [lawlorify[LORE][ply.devilinfo.ban]]</br>"
text += " [lawlorify[LORE][ply.devilinfo.bane]]</br>"
text += " [lawlorify[LORE][ply.devilinfo.obligation]]</br>"
text += " [lawlorify[LORE][ply.devilinfo.banish]]</br>"
return text
/datum/game_mode/proc/update_devil_icons_added(datum/mind/devil_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_DEVIL]
hud.join_hud(devil_mind.current)
set_antag_hud(devil_mind.current, "devil")
/datum/game_mode/proc/update_devil_icons_removed(datum/mind/devil_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_DEVIL]
hud.leave_hud(devil_mind.current)
set_antag_hud(devil_mind.current, null)
/datum/game_mode/proc/update_sintouch_icons_added(datum/mind/sin_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED]
hud.join_hud(sin_mind.current)
set_antag_hud(sin_mind.current, "sintouched")
/datum/game_mode/proc/update_sintouch_icons_removed(datum/mind/sin_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED]
hud.leave_hud(sin_mind.current)
set_antag_hud(sin_mind.current, null)
/datum/game_mode/proc/update_soulless_icons_added(datum/mind/soulless_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SOULLESS]
hud.join_hud(soulless_mind.current)
set_antag_hud(soulless_mind.current, "soulless")
/datum/game_mode/proc/update_soulless_icons_removed(datum/mind/soulless_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SOULLESS]
hud.leave_hud(soulless_mind.current)
set_antag_hud(soulless_mind.current, null)
+439
View File
@@ -0,0 +1,439 @@
#define BLOOD_THRESHOLD 3 //How many souls are needed per stage.
#define TRUE_THRESHOLD 7
#define ARCH_THRESHOLD 12
#define BASIC_DEVIL 0
#define BLOOD_LIZARD 1
#define TRUE_DEVIL 2
#define ARCH_DEVIL 3
#define SOULVALUE soulsOwned.len-reviveNumber
#define DEVILRESURRECTTIME 600
var/global/list/allDevils = list()
var/global/list/lawlorify = list (
LORE = list(
OBLIGATION_FOOD = "This devil seems to always offer it's victims food before slaughtering them.",
OBLIGATION_DRINK = "This devil seems to always offer it's victims a drink before slaughtering them.",
OBLIGATION_GREET = "This devil seems to only be able to converse with people it knows the name of.",
OBLIGATION_PRESENCEKNOWN = "This devil seems to be unable to attack from stealth.",
OBLIGATION_SAYNAME = "He will always chant his name upon killing someone.",
OBLIGATION_ANNOUNCEKILL = "This devil always loudly announces his kills for the world to hear.",
OBLIGATION_ANSWERTONAME = "This devil always responds to his truename.",
BANE_SILVER = "Silver seems to gravely injure this devil.",
BANE_SALT = "Throwing salt at this devil will hinder his ability to use infernal powers temporarily.",
BANE_LIGHT = "Bright flashes will disorient the devil, likely causing him to flee.",
BANE_IRON = "Cold iron will slowly injure him, until he can purge it from his system.",
BANE_WHITECLOTHES = "Wearing clean white clothing will help ward off this devil.",
BANE_HARVEST = "Presenting the labors of a harvest will disrupt the devil.",
BANE_TOOLBOX = "That which holds the means of creation also holds the means of the devil's undoing.",
BAN_HURTWOMAN = "This devil seems to prefer hunting men.",
BAN_CHAPEL = "This devil avoids holy ground.",
BAN_HURTPRIEST = "The annointed clergy appear to be immune to his powers.",
BAN_AVOIDWATER = "The devil seems to have some sort of aversion to water, though it does not appear to harm him.",
BAN_STRIKEUNCONCIOUS = "This devil only shows interest in those who are awake.",
BAN_HURTLIZARD = "This devil will not strike a lizardman first.",
BAN_HURTANIMAL = "This devil avoids hurting animals.",
BANISH_WATER = "To banish the devil, you must sprinkle holy water upon it's body.",
BANISH_COFFIN = "This devil will return to life if it's remains are not placed within a coffin.",
BANISH_FORMALDYHIDE = "To banish the devil, you must inject it's lifeless body with embalming fluid.",
BANISH_RUNES = "This devil will resurrect after death, unless it's remains are within a rune.",
BANISH_CANDLES = "A large number of nearby lit candles will prevent it from resurrecting.",
BANISH_DESTRUCTION = "It's corpse must be utterly destroyed to prevent resurrection.",
BANISH_FUNERAL_GARB = "If clad in funeral garments, this devil will be unable to resurrect. Should the clothes not fit, lay them gently on top of the devil's corpse."
),
LAW = list(
OBLIGATION_FOOD = "When not acting in self defense, you must always offer your victim food before harming them.",
OBLIGATION_DRINK = "When not acting in self defense, you must always offer your victim drink before harming them.",
OBLIGATION_GREET = "You must always greet other people by their last name before talking with them.",
OBLIGATION_PRESENCEKNOWN = "You must always make your presence known before attacking.",
OBLIGATION_SAYNAME = "You must always say your true name after you kill someone.",
OBLIGATION_ANNOUNCEKILL = "Upon killing someone, you must make your deed known to all within earshot, over comms if reasonably possible.",
OBLIGATION_ANSWERTONAME = "If you are not under attack, you must always respond to your true name.",
BAN_HURTWOMAN = "You must never harm a female outside of self defense.",
BAN_CHAPEL = "You must never attempt to enter the chapel.",
BAN_HURTPRIEST = "You must never attack a priest.",
BAN_AVOIDWATER = "You must never willingly touch a wet surface.",
BAN_STRIKEUNCONCIOUS = "You must never strike an unconcious person.",
BAN_HURTLIZARD = "You must never harm a lizardman outside of self defense.",
BAN_HURTANIMAL = "You must never harm a non-sentient creature or robot outside of self defense.",
BANE_SILVER = "Silver, in all of it's forms shall be your downfall.",
BANE_SALT = "Salt will disrupt your magical abilities.",
BANE_LIGHT = "Blinding lights will prevent you from using offensive powers for a time.",
BANE_IRON = "Cold wrought iron shall act as poison to you.",
BANE_WHITECLOTHES = "Those clad in pristine white garments will strike you true.",
BANE_HARVEST = "The fruits of the harvest shall be your downfall.",
BANE_TOOLBOX = "Toolboxes are bad news for you, for some reason.",
BANISH_WATER = "If your corpse is filled with holy water, you will be unable to resurrect.",
BANISH_COFFIN = "If your corpse is in a coffin, you will be unable to resurrect.",
BANISH_FORMALDYHIDE = "If your corpse is embalmed, you will be unable to resurrect.",
BANISH_RUNES = "If your corpse is placed within a rune, you will be unable to resurrect.",
BANISH_CANDLES = "If your corpse is near lit candles, you will be unable to resurrect.",
BANISH_DESTRUCTION = "If your corpse is destroyed, you will be unable to resurrect.",
BANISH_FUNERAL_GARB = "If your corpse is clad in funeral garments, you will be unable to resurrect."
)
)
/datum/devilinfo/
var/datum/mind/owner = null
var/obligation
var/ban
var/bane
var/banish
var/truename
var/list/datum/mind/soulsOwned = new
var/reviveNumber = 0
var/form = BASIC_DEVIL
var/exists = 0
/proc/randomDevilInfo(name = randomDevilName())
var/datum/devilinfo/devil = new
devil.truename = name
devil.bane = randomdevilbane()
devil.obligation = randomdevilobligation()
devil.ban = randomdevilban()
devil.banish = randomdevilbanish()
return devil
/proc/devilInfo(name, saveDetails = 0)
if(allDevils[lowertext(name)])
return allDevils[lowertext(name)]
else
var/datum/devilinfo/devil = randomDevilInfo(name)
allDevils[lowertext(name)] = devil
devil.exists = saveDetails
return devil
/proc/randomDevilName()
var/preTitle = ""
var/title = ""
var/mainName = ""
var/suffix = ""
if(prob(65))
if(prob(35))
preTitle = pick("Dark ", "Hellish ", "Fiery ", "Sinful ", "Blood ")
title = pick("Lord ", "Fallen Prelate ", "Count ", "Viscount ", "Vizier ", "Elder ", "Adept ")
var/probability = 100
mainName = pick("Hal", "Ve", "Odr", "Neit", "Ci", "Quon", "Mya", "Folth", "Wren", "Gyer", "Geyr", "Hil", "Niet", "Twou", "Hu", "Don")
while(prob(probability))
mainName += pick("hal", "ve", "odr", "neit", "ca", "quon", "mya", "folth", "wren", "gyer", "geyr", "hil", "niet", "twoe", "phi", "coa")
probability -= 20
if(prob(40))
suffix = pick(" the Red", " the Soulless", " the Master", ", the Lord of all things", ", Jr.")
return preTitle + title + mainName + suffix
/proc/randomdevilobligation()
return pick(OBLIGATION_FOOD, OBLIGATION_DRINK, OBLIGATION_GREET, OBLIGATION_PRESENCEKNOWN, OBLIGATION_SAYNAME, OBLIGATION_ANNOUNCEKILL, OBLIGATION_ANSWERTONAME)
/proc/randomdevilban()
return pick(BAN_HURTWOMAN, BAN_CHAPEL, BAN_HURTPRIEST, BAN_AVOIDWATER, BAN_STRIKEUNCONCIOUS, BAN_HURTLIZARD, BAN_HURTANIMAL)
/proc/randomdevilbane()
return pick(BANE_SALT, BANE_LIGHT, BANE_IRON, BANE_WHITECLOTHES, BANE_SILVER, BANE_HARVEST, BANE_TOOLBOX)
/proc/randomdevilbanish()
return pick(BANISH_WATER, BANISH_COFFIN, BANISH_FORMALDYHIDE, BANISH_RUNES, BANISH_CANDLES, BANISH_DESTRUCTION, BANISH_FUNERAL_GARB)
/datum/devilinfo/proc/add_soul(datum/mind/soul)
var/mob/living/carbon/human/H = owner.current
if(soulsOwned.Find(soul))
return
soulsOwned += soul
H.nutrition = NUTRITION_LEVEL_FULL
owner.current << "<span class='warning'>You feel satiated as you received a new soul.</span>"
update_hud()
switch(SOULVALUE)
if(0)
owner.current << "<span class='warning'>Your hellish powers have been restored."
give_base_spells()
if(BLOOD_THRESHOLD)
increase_blood_lizard()
if(TRUE_THRESHOLD)
increase_true_devil()
if(ARCH_THRESHOLD)
increase_arch_devil()
/datum/devilinfo/proc/remove_soul(datum/mind/soul)
if(soulsOwned.Remove(soul))
check_regression()
owner.current << "<span class='warning'>You feel as though a soul has slipped from your grasp.</span>"
update_hud()
/datum/devilinfo/proc/check_regression()
if (form == ARCH_DEVIL)
return //arch devil can't regress
switch(SOULVALUE)
if(-1)
remove_spells()
owner.current << "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked."
if(BLOOD_THRESHOLD-1)
regress_humanoid()
if(TRUE_THRESHOLD-1)
regress_blood_lizard()
/datum/devilinfo/proc/increase_form()
switch(form)
if(BASIC_DEVIL)
increase_blood_lizard()
if(BLOOD_LIZARD)
increase_true_devil()
if(TRUE_DEVIL)
increase_arch_devil()
/datum/devilinfo/proc/regress_humanoid()
owner.current << "<span class='warning'>Your powers weaken, have more contracts be signed to regain power."
if(istype(owner.current, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner.current
H.set_species(/datum/species/human, 1)
H.regenerate_icons()
give_base_spells()
if(istype(owner.current.loc, /obj/effect/dummy/slaughter/))
owner.current.forceMove(get_turf(owner.current))//Fixes dying while jaunted leaving you permajaunted.
form = BASIC_DEVIL
/datum/devilinfo/proc/regress_blood_lizard()
var/mob/living/carbon/true_devil/D = owner.current
D << "<span class='warning'>Your powers weaken, have more contracts be signed to regain power."
D.oldform.loc = D.loc
owner.transfer_to(D.oldform)
give_lizard_spells()
qdel(D)
form = BLOOD_LIZARD
update_hud()
/datum/devilinfo/proc/increase_blood_lizard()
owner.current << "<span class='warning'>You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard."
sleep(50)
if(istype(owner.current, /mob/living/carbon/human))
var/mob/living/carbon/human/H = owner.current
H.set_species(/datum/species/lizard, 1)
H.underwear = "Nude"
H.undershirt = "Nude"
H.socks = "Nude"
H.dna.features["mcolor"] = "511" //A deep red
H.regenerate_icons()
else //Did the devil get hit by a staff of transmutation?
owner.current.color = "#501010"
give_lizard_spells()
form = BLOOD_LIZARD
/datum/devilinfo/proc/increase_true_devil()
owner.current << "<span class='warning'>You feel as though your current form is about to shed. You will soon turn into a true devil."
sleep(50)
var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(owner.current.loc)
A.faction |= "hell"
owner.current.loc = A
A.oldform = owner.current
owner.transfer_to(A)
A.set_name()
give_true_spells()
form = TRUE_DEVIL
update_hud()
/datum/devilinfo/proc/increase_arch_devil()
var/mob/living/carbon/true_devil/D = owner.current
D << "<span class='warning'>You feel as though your form is about to ascend."
sleep(50)
if(!D)
return
D.visible_message("<span class='warning'>[D]'s skin begins to erupt with spikes.</span>", \
"<span class='warning'>Your flesh begins creating a shield around yourself.</span>")
sleep(100)
if(!D)
return
D.visible_message("<span class='warning'>The horns on [D]'s head slowly grow and elongate.</span>", \
"<span class='warning'>Your body continues to mutate. Your telepathic abilities grow.</span>")
sleep(90)
if(!D)
return
D.visible_message("<span class='warning'>[D]'s body begins to violently stretch and contort.</span>", \
"<span class='warning'>You begin to rend apart the final barriers to ultimate power.</span>")
sleep(40)
if(!D)
return
D << "<i><b>Yes!</b></i>"
sleep(10)
if(!D)
return
D << "<i><b><span class='big'>YES!!</span></b></i>"
sleep(10)
if(!D)
return
D << "<i><b><span class='reallybig'>YE--</span></b></i>"
sleep(1)
if(!D)
return
world << "<font size=5><span class='danger'><b>\"SLOTH, WRATH, GLUTTONY, ACEDIA, ENVY, GREED, PRIDE! FIRES OF HELL AWAKEN!!\"</font></span>"
world << 'sound/hallucinations/veryfar_noise.ogg'
give_arch_spells()
D.convert_to_archdevil()
if(istype(D.loc, /obj/effect/dummy/slaughter/))
D.forceMove(get_turf(D))//Fixes dying while jaunted leaving you permajaunted.
var/area/A = get_area(owner.current)
if(A)
notify_ghosts("An arch devil has ascended in \the [A.name]. Reach out to the devil to be given a new shell for your soul.", source = owner.current, action=NOTIFY_ATTACK)
sleep(50)
if(!ticker.mode.devil_ascended)
SSshuttle.emergency.request(null, 0.3)
ticker.mode.devil_ascended++
form = ARCH_DEVIL
/datum/devilinfo/proc/remove_spells()
for(var/X in owner.spell_list)
var/obj/effect/proc_holder/spell/S = X
if(!istype(S, /obj/effect/proc_holder/spell/targeted/summon_contract))
owner.RemoveSpell(S)
/datum/devilinfo/proc/give_summon_contract()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_contract(null))
/datum/devilinfo/proc/give_base_spells(give_summon_contract = 0)
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball/hellish(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_pitchfork(null))
if(give_summon_contract)
give_summon_contract()
/datum/devilinfo/proc/give_lizard_spells()
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_pitchfork(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball/hellish(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/infernal_jaunt(null))
/datum/devilinfo/proc/give_true_spells()
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_pitchfork/greater(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball/hellish(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/infernal_jaunt(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/sintouch(null))
/datum/devilinfo/proc/give_arch_spells()
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_pitchfork/ascended(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/sintouch/ascended(null))
/datum/devilinfo/proc/beginResurrectionCheck(mob/living/body)
if(SOULVALUE>0)
owner.current<< "<span class='userdanger'>Your body has been damaged to the point that you may no longer use it. At the cost of some of your power, you will return to life soon. Remain in your body.</span>"
sleep(DEVILRESURRECTTIME)
if (!body || body.stat == DEAD)
if(SOULVALUE>0)
if(check_banishment(body))
owner.current<< "<span class='userdanger'>Unfortunately, the mortals have finished a ritual that prevents your resurrection.</span>"
return -1
else
owner.current<< "<span class='userdanger'>WE LIVE AGAIN!</span>"
return hellish_resurrection(body)
else
owner.current<< "<span class='userdanger'>Unfortunately, the power that stemmed from your contracts has been extinguished. You no longer have enough power to resurrect.</span>"
return -1
else
owner.current << "<span class='danger'> You seem to have resurrected without your hellish powers.</span>"
else
owner.current << "<span class='userdanger'>Your hellish powers are too weak to resurrect yourself.</span>"
/datum/devilinfo/proc/check_banishment(mob/living/body)
switch(banish)
if(BANISH_WATER)
if(istype(body, /mob/living/carbon))
var/mob/living/carbon/H = body
return H.reagents.has_reagent("holy water")
return 0
if(BANISH_COFFIN)
return (body && istype(body.loc, /obj/structure/closet/coffin))
if(BANISH_FORMALDYHIDE)
if(istype(body, /mob/living/carbon))
var/mob/living/carbon/H = body
return H.reagents.has_reagent("formaldehyde")
return 0
if(BANISH_RUNES)
if(body)
for(var/obj/effect/decal/cleanable/crayon/R in range(0,body))
if (R.name == "rune")
return 1
return 0
if(BANISH_CANDLES)
if(body)
var/count = 0
for(var/obj/item/candle/C in range(1,body))
count += C.lit
if(count>=4)
return 1
return 0
if(BANISH_DESTRUCTION)
if(body)
return 0
return 1
if(BANISH_FUNERAL_GARB)
if(istype(body, /mob/living/carbon/human))
var/mob/living/carbon/human/H = body
if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under/burial))
return 1
return 0
else
for(var/obj/item/clothing/under/burial/B in range(0,body))
if(B.loc == get_turf(B)) //Make sure it's not in someone's inventory or something.
return 1
return 0
/datum/devilinfo/proc/hellish_resurrection(mob/living/body)
message_admins("[owner.name] (true name is: [truename]) is resurrecting using hellish energy.</a>")
if(SOULVALUE <= ARCH_THRESHOLD) // once ascended, arch devils do not go down in power by any means.
reviveNumber++
update_hud()
if(body)
body.revive(1,0)
if(istype(body.loc, /obj/effect/dummy/slaughter/))
body.forceMove(get_turf(body))//Fixes dying while jaunted leaving you permajaunted.
if(istype(body, /mob/living/carbon/true_devil))
var/mob/living/carbon/true_devil/D = body
if(D.oldform)
D.oldform.revive(1,0) // Heal the old body too, so the devil doesn't resurrect, then immediately regress into a dead body.
else
if(blobstart.len > 0)
var/turf/targetturf = get_turf(pick(blobstart))
var/mob/currentMob = owner.current
if(!currentMob)
currentMob = owner.get_ghost()
if(!currentMob)
message_admins("[owner.name]'s devil resurrection failed due to client logoff. Aborting.")
return -1 //
if(currentMob.mind != owner)
message_admins("[owner.name]'s devil resurrection failed due to becoming a new mob. Aborting.")
return -1
currentMob.change_mob_type( /mob/living/carbon/human , targetturf, null, 1)
var/mob/living/carbon/human/H = owner.current
give_summon_contract()
if(SOULVALUE >= BLOOD_THRESHOLD)
H.set_species(/datum/species/lizard, 1)
H.underwear = "Nude"
H.undershirt = "Nude"
H.socks = "Nude"
H.dna.features["mcolor"] = "511"
H.regenerate_icons()
if(SOULVALUE >= TRUE_THRESHOLD) //Yes, BOTH this and the above if statement are to run if soulpower is high enough.
var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(targetturf)
A.faction |= "hell"
H.forceMove(A)
A.oldform = H
A.set_name()
owner.transfer_to(A)
if(SOULVALUE >= ARCH_THRESHOLD)
A.convert_to_archdevil()
else
throw EXCEPTION("Unable to find a blobstart landmark for hellish resurrection")
check_regression()
/datum/devilinfo/proc/update_hud()
if(istype(owner.current, /mob/living/carbon))
var/mob/living/C = owner.current
if(C.hud_used && C.hud_used.devilsouldisplay)
C.hud_used.devilsouldisplay.update_counter(SOULVALUE)
+56
View File
@@ -0,0 +1,56 @@
//////////////////The Monster
/mob/living/simple_animal/imp
name = "imp"
real_name = "imp"
desc = "A large, menacing creature covered in armored black scales."
speak_emote = list("cackles")
emote_hear = list("cackles","screeches")
response_help = "thinks better of touching"
response_disarm = "flails at"
response_harm = "punches"
icon = 'icons/mob/mob.dmi'
icon_state = "imp"
icon_living = "imp"
speed = 1
a_intent = "harm"
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/magic/demon_attack1.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 250 //Weak to cold
maxbodytemp = INFINITY
faction = list("hell")
attacktext = "wildly tears into"
maxHealth = 200
health = 200
healable = 0
environment_smash = 1
melee_damage_lower = 10
melee_damage_upper = 15
see_in_dark = 8
var/boost = 0
bloodcrawl = BLOODCRAWL_EAT
see_invisible = SEE_INVISIBLE_MINIMUM
var/list/consumed_mobs = list()
var/playstyle_string = "<B><font size=3 color='red'>You are an imp,</font> a mischevious creature from hell. You are the lowest rank on the hellish totem pole \
Though you are not obligated to help, perhaps by aiding a higher ranking devil, you might just get a promotion. However, you are incapable \
of intentionally harming a fellow devil.</B>"
/mob/living/simple_animal/imp/New()
..()
boost = world.time + 30
/mob/living/simple_animal/imp/Life()
..()
if(boost<world.time)
speed = 1
else
speed = 0
/mob/living/simple_animal/imp/death()
..(1)
playsound(get_turf(src),'sound/magic/demon_dies.ogg', 200, 1)
visible_message("<span class='danger'>[src] screams in agony as it sublimates into a sulfurous smoke.</span>")
ghostize()
qdel(src)
+62
View File
@@ -0,0 +1,62 @@
/datum/objective/devil
dangerrating = 5
/datum/objective/devil/soulquantity
explanation_text = "You shouldn't see this text. Error:DEVIL1"
var/quantity = 4
/datum/objective/devil/soulquantity/New()
quantity = pick(6,8)
explanation_text = "Purchase, and retain control over at least [quantity] souls."
/datum/objective/devil/soulquantity/check_completion()
var/count = 0
for(var/S in owner.devilinfo.soulsOwned)
var/datum/mind/L = S
if(L.soulOwner != L)
count++
return count >= quantity
/datum/objective/devil/soulquality
explanation_text = "You shouldn't see this text. Error:DEVIL2"
var/contractType
var/quantity
/datum/objective/devil/soulquality/New()
contractType = pick(CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_REVIVE, CONTRACT_KNOWLEDGE/*, CONTRACT_UNWILLING*/)
var/contractName
quantity = pick(1,2)
switch(contractType)
if(CONTRACT_POWER)
contractName = "for power"
if(CONTRACT_WEALTH)
contractName = "for wealth"
if(CONTRACT_PRESTIGE)
contractName = "for prestige"
if(CONTRACT_MAGIC)
contractName = "for magic"
if(CONTRACT_REVIVE)
contractName = "of revival"
if(CONTRACT_KNOWLEDGE)
contractName = "for knowledge"
//if(CONTRACT_UNWILLING) //Makes round unfun.
// contractName = "against their will"
explanation_text = "Have mortals sign at least [quantity] contracts [contractName]"
/datum/objective/devil/soulquality/check_completion()
var/count = 0
for(var/S in owner.devilinfo.soulsOwned)
var/datum/mind/L = S
if(L.soulOwner != L && L.damnation_type == contractType)
count++
return count>=quantity
/datum/objective/devil/sintouch
var/quantity
/datum/objective/devil/sintouch/New()
quantity = pick(4,5)
explanation_text = "Ensure at least [quantity] mortals are sintouched."
/datum/objective/devil/sintouch/check_completion()
return quantity>=ticker.mode.sintouched.len
@@ -0,0 +1,209 @@
#define DEVIL_HANDS_LAYER 1
#define DEVIL_HEAD_LAYER 2
#define DEVIL_TOTAL_LAYERS 2
/mob/living/carbon/true_devil
name = "True Devil"
desc = "A pile of infernal energy, taking a vaguely humanoid form."
icon = 'icons/mob/32x64.dmi'
icon_state = "true_devil"
gender = NEUTER
health = 350
maxHealth = 350
ventcrawler = 0
density = 0
pass_flags = 0
var/ascended = 0
sight = (SEE_TURFS | SEE_OBJS)
status_flags = CANPUSH
languages_spoken = ALL //The devil speaks all languages meme
languages_understood = ALL //The devil speaks all languages meme
mob_size = MOB_SIZE_LARGE
var/mob/living/oldform
var/list/devil_overlays[DEVIL_TOTAL_LAYERS]
/mob/living/carbon/true_devil/New()
internal_organs += new /obj/item/organ/brain/
internal_organs += new /obj/item/organ/tongue
for(var/X in internal_organs)
var/obj/item/organ/I = X
I.Insert(src)
..()
/mob/living/carbon/true_devil/proc/convert_to_archdevil()
maxHealth = 5000 // not an IMPOSSIBLE amount, but still near impossible.
ascended = 1
health = maxHealth
icon_state = "arch_devil"
/mob/living/carbon/true_devil/proc/set_name()
name = mind.devilinfo.truename
real_name = name
/mob/living/carbon/true_devil/Login()
..()
mind.announceDevilLaws()
/mob/living/carbon/true_devil/death(gibbed)
stat = DEAD
..(gibbed)
drop_l_hand()
drop_r_hand()
spawn (0)
mind.devilinfo.beginResurrectionCheck(src)
/mob/living/carbon/true_devil/examine(mob/user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <b>[src]</b>!\n"
//Left hand items
if(l_hand && !(l_hand.flags&ABSTRACT))
if(l_hand.blood_DNA)
msg += "<span class='warning'>It is holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in its left hand!</span>\n"
else
msg += "It is holding \icon[l_hand] \a [l_hand] in its left hand.\n"
//Right hand items
if(r_hand && !(r_hand.flags&ABSTRACT))
if(r_hand.blood_DNA)
msg += "<span class='warning'>It is holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in its right hand!</span>\n"
else
msg += "It is holding \icon[r_hand] \a [r_hand] in its right hand.\n"
//Braindead
if(!client && stat != DEAD)
msg += "The devil seems to be in deep contemplation.\n"
//Damaged
if(stat == DEAD)
msg += "<span class='deadsay'>The hellfire seems to have been extinguished, for now at least.</span>\n"
else if(health < (maxHealth/10))
msg += "<span class='warning'>You can see hellfire inside of it's gaping wounds.</span>\n"
else if(health < (maxHealth/2))
msg += "<span class='warning'>You can see hellfire inside of it's wounds.</span>\n"
msg += "*---------*</span>"
user << msg
/mob/living/carbon/true_devil/IsAdvancedToolUser()
return 1
/mob/living/carbon/true_devil/canUseTopic(atom/movable/M, be_close = 0)
if(incapacitated())
return 0
if(be_close && !in_range(M, src))
return 0
return 1
/mob/living/carbon/true_devil/assess_threat()
return 666
/mob/living/carbon/true_devil/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
if(mind && has_bane(BANE_LIGHT))
mind.disrupt_spells(-500)
return ..() //flashes don't stop devils UNLESS it's their bane.
/mob/living/carbon/true_devil/attacked_by(obj/item/I, mob/living/user, def_zone)
var/weakness = check_weakness(I, user)
apply_damage(I.force * weakness, I.damtype, def_zone)
var/message_verb = ""
if(I.attack_verb && I.attack_verb.len)
message_verb = "[pick(I.attack_verb)]"
else if(I.force)
message_verb = "attacked"
var/attack_message = "[src] has been [message_verb] with [I]."
if(user)
user.do_attack_animation(src)
if(user in viewers(src, null))
attack_message = "[user] has [message_verb] [src] with [I]!"
if(message_verb)
visible_message("<span class='danger'>[attack_message]</span>",
"<span class='userdanger'>[attack_message]</span>")
return TRUE
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
A.attack_hand(src)
/mob/living/carbon/true_devil/Process_Spacemove(movement_dir = 0)
return 1
/mob/living/carbon/true_devil/singularity_act()
if(ascended)
return 0
return ..()
/mob/living/carbon/true_devil/attack_ghost(mob/dead/observer/user as mob)
if(ascended || user.mind.soulOwner == src.mind)
var/mob/living/simple_animal/imp/S = new(get_turf(loc))
S.key = user.key
S.mind.assigned_role = "Imp"
S.mind.special_role = "Imp"
var/datum/objective/newobjective = new
newobjective.explanation_text = "Try to get a promotion to a higher devilic rank."
S.mind.objectives += newobjective
S << S.playstyle_string
S << "<B>Objective #[1]</B>: [newobjective.explanation_text]"
return
else
return ..()
/mob/living/carbon/true_devil/can_be_revived()
return 1
/mob/living/carbon/true_devil/resist_fire()
//They're immune to fire.
/mob/living/carbon/true_devil/attack_hand(mob/living/carbon/human/M)
if(..())
switch(M.a_intent)
if ("harm")
var/damage = rand(1, 5)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
adjustBruteLoss(damage)
add_logs(M, src, "attacked")
updatehealth()
if ("disarm")
if (!lying && !ascended) //No stealing the arch devil's pitchfork.
if (prob(5))
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
add_logs(M, src, "pushed")
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if (prob(25))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
/mob/living/carbon/true_devil/handle_breathing()
// devils do not need to breathe
/mob/living/carbon/true_devil/is_literate()
return 1
/mob/living/carbon/true_devil/ex_act(severity, ex_target)
if(!ascended)
var/b_loss
switch (severity)
if (1)
b_loss = 500
if (2)
b_loss = 150
if(3)
b_loss = 30
if(has_bane(BANE_LIGHT))
b_loss *=2
adjustBruteLoss(b_loss)
return ..()
@@ -0,0 +1,61 @@
/mob/living/carbon/true_devil/unEquip(obj/item/I, force)
if(..(I,force))
update_inv_hands()
return 1
return 0
/mob/living/carbon/true_devil/proc/update_inv_hands()
//TODO LORDPIDEY: Figure out how to make the hands line up properly. the l/r_hand_image should use the down sprite when facing down, left, or right, and the up sprite when facing up.
remove_overlay(DEVIL_HANDS_LAYER)
var/list/hands_overlays = list()
if(r_hand)
var/r_state = r_hand.item_state
if(!r_state)
r_state = r_hand.icon_state
var/image/r_hand_image = r_hand.build_worn_icon(state = r_state, default_layer = DEVIL_HANDS_LAYER, default_icon_file = r_hand.righthand_file, isinhands = TRUE)
hands_overlays += r_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
r_hand.layer = ABOVE_HUD_LAYER
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
if(l_hand)
var/l_state = l_hand.item_state
if(!l_state)
l_state = l_hand.icon_state
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = DEVIL_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
hands_overlays += l_hand_image
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
l_hand.layer = ABOVE_HUD_LAYER
l_hand.screen_loc = ui_lhand
client.screen |= l_hand
if(hands_overlays.len)
devil_overlays[DEVIL_HANDS_LAYER] = hands_overlays
apply_overlay(DEVIL_HANDS_LAYER)
/mob/living/carbon/true_devil/update_inv_l_hand()
update_inv_hands()
/mob/living/carbon/true_devil/update_inv_r_hand()
update_inv_hands()
/mob/living/carbon/true_devil/remove_overlay(cache_index)
if(devil_overlays[cache_index])
overlays -= devil_overlays[cache_index]
devil_overlays[cache_index] = null
/mob/living/carbon/true_devil/apply_overlay(cache_index)
var/image/I = devil_overlays[cache_index]
if(I)
add_overlay(I)