Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
@@ -1,43 +0,0 @@
/datum/game_mode/devil/devil_agents
name = "Devil Agents"
config_tag = "devil_agents"
required_players = 25
required_enemies = 3
recommended_enemies = 8
reroll_friendly = 0
traitors_possible = 10 //hard limit on traitors if scaling is turned off
num_modifier = 4
objective_count = 2
var/list/target_list = list()
var/list/late_joining_list = list()
minimum_devils = 3
announce_text = "There are devil agents onboard the station, trying to outbid each other!\n\
+ <span class='danger'>Devils</span>: Purchase souls and interfere with your rivals!\n\
+ <span class='notice'>Crew</span>: Resist the lure of sin and remain pure!"
/datum/game_mode/devil/devil_agents/post_setup()
var/i = 0
for(var/datum/mind/devil in devils)
i++
if(i + 1 > devils.len)
i = 0
target_list[devil] = devils[i + 1]
..()
/datum/game_mode/devil/devil_agents/add_devil_objectives(datum/mind/devil_mind, quantity)
..(devil_mind, quantity - give_outsell_objective(devil_mind))
/datum/game_mode/devil/devil_agents/proc/give_outsell_objective(datum/mind/devil)
//If you override this method, have it return the number of objectives added.
if(target_list.len && target_list[devil]) // Is a double agent
var/datum/mind/target_mind = target_list[devil]
var/datum/objective/devil/outsell/outsellobjective = new
outsellobjective.owner = devil
outsellobjective.target = target_mind
outsellobjective.update_explanation_text()
devil.objectives += outsellobjective
return 1
return 0
+1 -1
View File
@@ -20,7 +20,7 @@ var/global/list/whiteness = list (
/mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker)
switch(mind.devilinfo.bane)
if(BANE_WHITECLOTHES)
if(ishuman(attacker))
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
+108 -58
View File
@@ -1,61 +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
name = "devil"
config_tag = "devil"
antag_flag = ROLE_DEVIL
protected_jobs = list("Lawyer", "Librarian", "Chaplain", "Head of Security", "Captain", "AI")
required_players = 0
required_enemies = 1
recommended_enemies = 4
reroll_friendly = 1
enemy_minimum_age = 0
var/traitors_possible = 4 //hard limit on devils if scaling is turned off
var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual.
var/objective_count = 2
var/minimum_devils = 1
announce_text = "There are devils onboard the station!\n\
+ <span class='danger'>Devils</span>: Purchase souls and tempt the crew to sin!\n\
+ <span class='notice'>Crew</span>: Resist the lure of sin and remain pure!"
/datum/game_mode/devil/pre_setup()
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
if(config.protect_assistant_from_antagonist)
restricted_jobs += "Assistant"
var/num_devils = 1
if(config.traitor_scaling_coeff)
num_devils = max(minimum_devils, min( round(num_players()/(config.traitor_scaling_coeff*3))+ 2 + num_modifier, round(num_players()/(config.traitor_scaling_coeff*1.5)) + num_modifier ))
else
num_devils = max(minimum_devils, min(num_players(), traitors_possible))
for(var/j = 0, j < num_devils, j++)
if (!antag_candidates.len)
break
var/datum/mind/devil = pick(antag_candidates)
devils += devil
devil.special_role = traitor_name
devil.restricted_roles = restricted_jobs
log_game("[devil.key] (ckey) has been selected as a [traitor_name]")
antag_candidates.Remove(devil)
if(devils.len < required_enemies)
return 0
return 1
/datum/game_mode/devil/post_setup()
for(var/datum/mind/devil in devils)
spawn(rand(10,100))
finalize_devil(devil, objective_count)
spawn(100)
add_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent.
devil.announceDevilLaws()
devil.announce_objectives()
modePlayer += devils
..()
return 1
/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)
+34 -51
View File
@@ -7,8 +7,6 @@
#define TRUE_DEVIL 2
#define ARCH_DEVIL 3
#define LOSS_PER_DEATH 2
#define SOULVALUE soulsOwned.len-reviveNumber
#define DEVILRESURRECTTIME 600
@@ -16,9 +14,8 @@
var/global/list/allDevils = list()
var/global/list/lawlorify = list (
LORE = list(
OBLIGATION_FOOD = "This devil seems to always offer its victims food before slaughtering them.",
OBLIGATION_FIDDLE = "This devil will never turn down a musical challenge.",
OBLIGATION_DANCEOFF = "This devil will never turn down a dance off.",
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.",
@@ -38,18 +35,17 @@ var/global/list/lawlorify = list (
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 infuse its body with holy water.",
BANISH_COFFIN = "This devil will return to life if its remains are not placed within a coffin.",
BANISH_FORMALDYHIDE = "To banish the devil, you must inject its lifeless body with embalming fluid.",
BANISH_RUNES = "This devil will resurrect after death, unless its remains are within a rune.",
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 = "Its corpse must be utterly destroyed to prevent resurrection.",
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_FIDDLE = "When not in immediate danger, if you are challenged to a musical duel, you must accept it. You are not obligated to duel the same person twice.",
OBLIGATION_DANCEOFF = "When not in immediate danger, if you are challenged to a dance off, you must accept it. You are not obligated to face off with the same person twice.",
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.",
@@ -62,7 +58,7 @@ var/global/list/lawlorify = list (
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 its forms shall be your downfall.",
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.",
@@ -79,7 +75,7 @@ var/global/list/lawlorify = list (
)
)
/datum/devilinfo
/datum/devilinfo/
var/datum/mind/owner = null
var/obligation
var/ban
@@ -90,16 +86,6 @@ var/global/list/lawlorify = list (
var/reviveNumber = 0
var/form = BASIC_DEVIL
var/exists = 0
var/static/list/dont_remove_spells = list(
/obj/effect/proc_holder/spell/targeted/summon_contract,
/obj/effect/proc_holder/spell/targeted/conjure_item/violin,
/obj/effect/proc_holder/spell/targeted/summon_dancefloor)
/datum/devilinfo/New()
..()
dont_remove_spells = typecacheof(dont_remove_spells)
/proc/randomDevilInfo(name = randomDevilName())
var/datum/devilinfo/devil = new
@@ -140,7 +126,7 @@ var/global/list/lawlorify = list (
return preTitle + title + mainName + suffix
/proc/randomdevilobligation()
return pick(OBLIGATION_FOOD, OBLIGATION_FIDDLE, OBLIGATION_DANCEOFF, OBLIGATION_GREET, OBLIGATION_PRESENCEKNOWN, OBLIGATION_SAYNAME, OBLIGATION_ANNOUNCEKILL, OBLIGATION_ANSWERTONAME)
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)
@@ -152,10 +138,11 @@ var/global/list/lawlorify = list (
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
owner.current.nutrition = NUTRITION_LEVEL_FULL
H.nutrition = NUTRITION_LEVEL_FULL
owner.current << "<span class='warning'>You feel satiated as you received a new soul.</span>"
update_hud()
switch(SOULVALUE)
@@ -176,16 +163,16 @@ var/global/list/lawlorify = list (
update_hud()
/datum/devilinfo/proc/check_regression()
if(form == ARCH_DEVIL)
if (form == ARCH_DEVIL)
return //arch devil can't regress
//Yes, fallthrough behavior is intended, so I can't use a switch statement.
if(form == TRUE_DEVIL && SOULVALUE < TRUE_THRESHOLD)
regress_blood_lizard()
if(form == BLOOD_LIZARD && SOULVALUE < BLOOD_THRESHOLD)
regress_humanoid()
if(SOULVALUE < 0)
remove_spells()
owner.current << "<span class='warning'>As punishment for your failures, all of your powers except contract creation have been revoked."
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)
@@ -198,7 +185,7 @@ var/global/list/lawlorify = list (
/datum/devilinfo/proc/regress_humanoid()
owner.current << "<span class='warning'>Your powers weaken, have more contracts be signed to regain power."
if(ishuman(owner.current))
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()
@@ -221,7 +208,7 @@ var/global/list/lawlorify = list (
/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(ishuman(owner.current))
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"
@@ -301,7 +288,7 @@ var/global/list/lawlorify = list (
/datum/devilinfo/proc/remove_spells()
for(var/X in owner.spell_list)
var/obj/effect/proc_holder/spell/S = X
if(!is_type_in_typecache(S, dont_remove_spells))
if(!istype(S, /obj/effect/proc_holder/spell/targeted/summon_contract))
owner.RemoveSpell(S)
/datum/devilinfo/proc/give_summon_contract()
@@ -310,31 +297,27 @@ var/global/list/lawlorify = list (
/datum/devilinfo/proc/give_base_spells(give_summon_contract = 0)
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/fireball/hellish(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/summon_pitchfork(null))
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()
if(obligation == OBLIGATION_FIDDLE)
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/violin(null))
if(obligation == OBLIGATION_DANCEOFF)
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_dancefloor(null))
/datum/devilinfo/proc/give_lizard_spells()
remove_spells()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/summon_pitchfork(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/fireball/hellish(null))
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/conjure_item/summon_pitchfork/greater(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/fireball/hellish(null))
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/conjure_item/summon_pitchfork/ascended(null))
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)
@@ -390,7 +373,7 @@ var/global/list/lawlorify = list (
return 0
return 1
if(BANISH_FUNERAL_GARB)
if(ishuman(body))
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
@@ -404,7 +387,7 @@ var/global/list/lawlorify = list (
/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 += LOSS_PER_DEATH
reviveNumber++
update_hud()
if(body)
body.revive(1,0)
-114
View File
@@ -1,114 +0,0 @@
/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>"
text += "<br>"
world << text
/datum/game_mode/proc/finalize_devil(datum/mind/devil_mind)
var/trueName= randomDevilName()
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" && ishuman(devil_mind.current))
var/mob/living/carbon/human/S = devil_mind.current
S << "<span class='notice'>Your infernal nature has allowed you to overcome your clownishness.</span>"
S.dna.remove_mutation(CLOWNMUT)
if(issilicon(devil_mind.current))
add_law_sixsixsix(devil_mind.current)
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
for(var/i = 1 to quantity)
var/type = pick(validtypes)
var/datum/objective/devil/objective = new type(null)
objective.owner = devil_mind
devil_mind.objectives += objective
if(!istype(objective, /datum/objective/devil/buy_target))
validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target.
else
objective.find_target()
/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>"
/datum/game_mode/proc/printdevilinfo(datum/mind/ply)
if(!ply.devilinfo)
return "Target is not a devil."
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></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_sintouched_icons_added(datum/mind/sintouched_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED]
hud.join_hud(sintouched_mind.current)
set_antag_hud(sintouched_mind.current, "sintouched")
/datum/game_mode/proc/update_sintouched_icons_removed(datum/mind/sintouched_mind)
var/datum/atom_hud/antag/hud = huds[ANTAG_HUD_SINTOUCHED]
hud.leave_hud(sintouched_mind.current)
set_antag_hud(sintouched_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)
+1 -2
View File
@@ -13,7 +13,7 @@
icon_state = "imp"
icon_living = "imp"
speed = 1
a_intent = INTENT_HARM
a_intent = "harm"
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/magic/demon_attack1.ogg'
@@ -26,7 +26,6 @@
health = 200
healable = 0
environment_smash = 1
obj_damage = 40
melee_damage_lower = 10
melee_damage_upper = 15
see_in_dark = 8
+14 -59
View File
@@ -3,33 +3,29 @@
/datum/objective/devil/soulquantity
explanation_text = "You shouldn't see this text. Error:DEVIL1"
target_amount = 4
var/quantity = 4
/datum/objective/devil/soulquantity/New()
target_amount = pick(6,7,8)
update_explanation_text()
/datum/objective/devil/soulquantity/update_explanation_text()
explanation_text = "Purchase, and retain control over at least [target_amount] souls."
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 == owner)
if(L.soulOwner != L)
count++
return count >= target_amount
return count >= quantity
/datum/objective/devil/soulquality
explanation_text = "You shouldn't see this text. Error:DEVIL2"
var/contractType
var/contractName
var/quantity
/datum/objective/devil/soulquality/New()
contractType = pick(CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_REVIVE, CONTRACT_KNOWLEDGE/*, CONTRACT_UNWILLING*/)
target_amount = pick(1,2)
var/contractName
quantity = pick(1,2)
switch(contractType)
if(CONTRACT_POWER)
contractName = "for power"
@@ -45,10 +41,7 @@
contractName = "for knowledge"
//if(CONTRACT_UNWILLING) //Makes round unfun.
// contractName = "against their will"
update_explanation_text()
/datum/objective/devil/soulquality/update_explanation_text()
explanation_text = "Have mortals sign at least [target_amount] contracts [contractName]"
explanation_text = "Have mortals sign at least [quantity] contracts [contractName]"
/datum/objective/devil/soulquality/check_completion()
var/count = 0
@@ -56,52 +49,14 @@
var/datum/mind/L = S
if(L.soulOwner != L && L.damnation_type == contractType)
count++
return count>=target_amount
return count>=quantity
/datum/objective/devil/sintouch
explanation_text = "You shouldn't see this text. Error:DEVIL3"
var/quantity
/datum/objective/devil/sintouch/New()
target_amount = pick(4,5)
explanation_text = "Ensure at least [target_amount] mortals are sintouched."
quantity = pick(4,5)
explanation_text = "Ensure at least [quantity] mortals are sintouched."
/datum/objective/devil/sintouch/check_completion()
return target_amount>=ticker.mode.sintouched.len
/datum/objective/devil/buy_target
explanation_text = "You shouldn't see this text. Error:DEVIL4"
/datum/objective/devil/buy_target/update_explanation_text()
if(target)
explanation_text = "Purchase and retain the soul of [target.name], the [target.assigned_role]."
else
explanation_text = "Free objective."
/datum/objective/devil/buy_target/check_completion()
return target.soulOwner == owner
/datum/objective/devil/outsell
explanation_text = "You shouldn't see this text. Error:DEVIL5"
/datum/objective/devil/outsell/New()
/datum/objective/devil/outsell/update_explanation_text()
explanation_text = "Purchase and retain control over more souls than [target.devilinfo.truename], known to mortals as [target.name], the [target.assigned_role]."
/datum/objective/devil/outsell/check_completion()
var/selfcount = 0
for(var/S in owner.devilinfo.soulsOwned)
var/datum/mind/L = S
if(L.soulOwner == owner)
selfcount++
var/targetcount = 0
for(var/S in target.devilinfo.soulsOwned)
var/datum/mind/L = S
if(L.soulOwner == target)
targetcount++
return selfcount > targetcount
return quantity>=ticker.mode.sintouched.len
@@ -11,8 +11,8 @@
gender = NEUTER
health = 350
maxHealth = 350
ventcrawler = VENTCRAWLER_NONE
density = 1
ventcrawler = 0
density = 0
pass_flags = 0
var/ascended = 0
sight = (SEE_TURFS | SEE_OBJS)
@@ -22,20 +22,13 @@
mob_size = MOB_SIZE_LARGE
var/mob/living/oldform
var/list/devil_overlays[DEVIL_TOTAL_LAYERS]
bodyparts = list(/obj/item/bodypart/chest/devil, /obj/item/bodypart/head/devil, /obj/item/bodypart/l_arm/devil,
/obj/item/bodypart/r_arm/devil, /obj/item/bodypart/r_leg/devil, /obj/item/bodypart/l_leg/devil)
/mob/living/carbon/true_devil/New()
create_bodyparts() //initialize bodyparts
create_internal_organs()
..()
/mob/living/carbon/true_devil/create_internal_organs()
internal_organs += new /obj/item/organ/brain
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)
..()
@@ -52,13 +45,13 @@
/mob/living/carbon/true_devil/Login()
..()
mind.announceDevilLaws()
mind.announce_objectives()
/mob/living/carbon/true_devil/death(gibbed)
stat = DEAD
..(gibbed)
drop_all_held_items()
drop_l_hand()
drop_r_hand()
spawn (0)
mind.devilinfo.beginResurrectionCheck(src)
@@ -67,12 +60,18 @@
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <b>[src]</b>!\n"
//Left hand items
for(var/obj/item/I in held_items)
if(!(I.flags & ABSTRACT))
if(I.blood_DNA)
msg += "<span class='warning'>It is holding \icon[I] [I.gender==PLURAL?"some":"a"] blood-stained [I.name] in its [get_held_index_name(get_held_index_of_item(I))]!</span>\n"
else
msg += "It is holding \icon[I] \a [I] in its [get_held_index_name(get_held_index_of_item(I))].\n"
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)
@@ -82,9 +81,9 @@
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 its gaping wounds.</span>\n"
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 its wounds.</span>\n"
msg += "<span class='warning'>You can see hellfire inside of it's wounds.</span>\n"
msg += "*---------*</span>"
user << msg
@@ -102,17 +101,11 @@
/mob/living/carbon/true_devil/assess_threat()
return 666
/mob/living/carbon/true_devil/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0)
/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/soundbang_act()
return 0
/mob/living/carbon/true_devil/get_ear_protection()
return 2
/mob/living/carbon/true_devil/attacked_by(obj/item/I, mob/living/user, def_zone)
var/weakness = check_weakness(I, user)
@@ -130,9 +123,12 @@
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>", null, COMBAT_MESSAGE_RANGE)
"<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
@@ -210,14 +206,4 @@
if(has_bane(BANE_LIGHT))
b_loss *=2
adjustBruteLoss(b_loss)
return ..()
/mob/living/carbon/true_devil/update_body() //we don't use the bodyparts layer for devils.
return
/mob/living/carbon/true_devil/update_body_parts()
return
/mob/living/carbon/true_devil/update_damage_overlays() //devils don't have damage overlays.
return
return ..()
@@ -4,12 +4,10 @@
return 1
return 0
/mob/living/carbon/true_devil/update_inv_hands()
/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()
var/obj/item/l_hand = get_item_for_held_index(1) //hardcoded 2-hands only, for now.
var/obj/item/r_hand = get_item_for_held_index(2)
if(r_hand)
@@ -23,8 +21,7 @@
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
r_hand.layer = ABOVE_HUD_LAYER
r_hand.plane = ABOVE_HUD_PLANE
r_hand.screen_loc = ui_hand_position(get_held_index_of_item(r_hand))
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
if(l_hand)
@@ -39,13 +36,19 @@
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
l_hand.layer = ABOVE_HUD_LAYER
l_hand.plane = ABOVE_HUD_PLANE
l_hand.screen_loc = ui_hand_position(get_held_index_of_item(l_hand))
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]