Skip to content

Commit

Permalink
add: Updated Devil gamemode (#5944)
Browse files Browse the repository at this point in the history
* let's do first step to rework that piece of ..

* step 2 - remove fucken devilinfo from mind

* step 3 - eat zuzya (clean mind and living procs)

* toy gigax, fake devil datum

* UPD

* UPD

* some fixes

* UPD

* попытка зарезолвить конфликт дубль 1

* дубль 2

* fastfix

* double 3

* Delete code/game/gamemodes/devil/devilinfo.dm

* CLRF to LF

* Resurrection rework

* catsmile

* fix inconsistent

* fix.. again

* improve

* resurrection bugfixes

* полностью модульные бейны

* фикс пробелов

* fixes. again

* fix nr2

* again

* omagad is THAT objectivos?????

* fix

* UPD

* forgotten moments fixed

* identitation fix

* fix again

* ranks are now separated datum

* fix

* fix again

* forgotten things

* some fixes

* NO_DEATH TRAIT

* bugfixes + rewrite toy gigas

* whoops.

* UPD + bugfix

* fastfix

* fastfix and trailing

* metabolism UPD

* the last fix, i hope

* попытка исправить cast

* resurrection rework

* fix

* fix again...

* UPD

* модульная информация о димоне

* fixes

* UPD

* fix inconsistent

* the last fixes

* UPD

* fix inconsistent

* cleanup

* runtime fixes

* Global list liquidation - full modular devil bans, devil obligations

* inconsistent fix

* fix

* UPD

* fastfix

* UPD

* UPD

* fix inconsistent

* fix again

* rewrite codex gigas + resolve merge conflict

* rewrite sintouched to antagonist datum

* dme

* inconsistent

* last fixes

* rewrite sintouched give objectives

* les go final

* fix

* fix inconsistent

* fix

* i love inconsistent

* finallyyyyyyyy

* тепеь финал

* forgotten moments and ama ready

* clean unused

* forgotten moments

* forgotten moments fix

* improve

* improve x2

* fix

* wtf

* Rewrite add reagent signal

* early*

* improve

* first fixes

* fix vocal cords

* more fixes

* упс

* optimize

* fiix

* mor fix

* get_all_objectives

* OnUnarmedAttack

* 1

* 2

* 3

* conflicts

* fix

* fix x2

* dme

* smol fix

* <br>

* improve

* fix inconsistent

* fix x2

* trailing....
  • Loading branch information
Antoonij authored Jan 6, 2025
1 parent b192529 commit e29c2bd
Show file tree
Hide file tree
Showing 53 changed files with 1,918 additions and 1,440 deletions.
37 changes: 0 additions & 37 deletions code/__DEFINES/contracts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,3 @@
#define CONTRACT_FOOD "Food"
#define CONTRACT_SPACE "Space Gear"
#define CONTRACT_CALAMITY "Calamity"

#define BANE_SALT "salt"
#define BANE_LIGHT "light"
#define BANE_IRON "iron"
#define BANE_WHITECLOTHES "whiteclothes"
#define BANE_SILVER "silver"
#define BANE_HARVEST "harvest"
#define BANE_TOOLBOX "toolbox"

#define OBLIGATION_FOOD "food"
#define OBLIGATION_FIDDLE "fiddle"
#define OBLIGATION_DANCEOFF "danceoff"
#define OBLIGATION_GREET "greet"
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
#define OBLIGATION_SAYNAME "sayname"
#define OBLIGATION_ANNOUNCEKILL "announcekill"
#define OBLIGATION_ANSWERTONAME "answername"

#define BAN_HURTWOMAN "hurtwoman"
#define BAN_HURTMAN "hurtman"
#define BAN_CHAPEL "chapel"
#define BAN_HURTPRIEST "hurtpriest"
#define BAN_AVOIDWATER "avoidwater"
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
#define BAN_HURTLIZARD "hurtlizard"
#define BAN_HURTANIMAL "hurtanimal"

#define BANISH_WATER "water"
#define BANISH_COFFIN "coffin"
#define BANISH_FORMALDYHIDE "embalm"
#define BANISH_RUNES "runes"
#define BANISH_CANDLES "candles"
#define BANISH_DESTRUCTION "destruction"
#define BANISH_FUNERAL_GARB "funeral"

#define LORE 1
#define LAW 2
10 changes: 10 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@
#define COMSIG_LIVING_SHOCK_PREVENTED "living_shock_prevented"
///sent by stuff like stunbatons and tasers: ()
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock"
/// Source: /mob/living/proc/flash_eyes(intensity, override_blindness_check, affect_silicon, visual, type)
#define COMSIG_LIVING_EARLY_FLASH_EYES "living_flash_eyes"
#define STOP_FLASHING_EYES (1<<0)
///from base of mob/living/revive() (full_heal, admin_revive)
#define COMSIG_LIVING_REVIVE "living_revive"
///from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
Expand Down Expand Up @@ -582,6 +585,8 @@
///From living/Life(). (deltatime, times_fired)
#define COMSIG_LIVING_LIFE "living_life"
///from base of mob/living/death(): (gibbed)
#define COMSIG_LIVING_EARLY_DEATH "living_early_death"
///from base of mob/living/death(): (gibbed)
#define COMSIG_LIVING_DEATH "living_death"
//sent from mobs when they exit their body as a ghost
#define COMSIG_LIVING_GHOSTIZED "ghostized"
Expand Down Expand Up @@ -1008,6 +1013,11 @@
///from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
#define COMSIG_FOOD_EATEN "food_eaten"

/// Reagents
/// Source: /datum/reagents/proc/add_reagent (datum/reagents, reagent_id, amount, data, reagtemp, no_react, chem_temp)
#define COMSIG_EARLY_REAGENT_ADDED "reagent_early_added"
#define COMPONENT_PREVENT_ADD_REAGENT (1<<0)

//Gibs

///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
Expand Down
87 changes: 87 additions & 0 deletions code/__DEFINES/devil.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
GLOBAL_LIST_INIT(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/psych = 1,
/obj/item/clothing/under/rank/orderly = 1,
/obj/item/clothing/under/rank/security/brigphys = 1,
/obj/item/clothing/under/rank/internalaffairs = 1,
/obj/item/clothing/under/rank/ntrep = 1,
/obj/item/clothing/under/det = 1,
/obj/item/clothing/under/wedding/bride_white = 1,
/obj/item/clothing/under/mafia/white = 1,
/obj/item/clothing/under/noble_clothes = 1,
/obj/item/clothing/under/sl_suit = 1,
/obj/item/clothing/under/burial = 1
))

#define ENRAGED_THRESHOLD 4
#define BLOOD_THRESHOLD 7
#define TRUE_THRESHOLD 10

#define BASIC_DEVIL_REGEN_THRESHOLD 10 SECONDS
#define ENRAGED_DEVIL_REGEN_THRESHOLD 10 SECONDS
#define BLOOD_LIZARD_REGEN_THRESHOLD 5 SECONDS
#define TRUE_DEVIL_REGEN_THRESHOLD 3 SECONDS

#define BASIC_DEVIL_REGEN_AMOUNT 20
#define ENRAGED_DEVIL_REGEN_AMOUNT 40
#define BLOOD_LIZARD_REGEN_AMOUNT 60
#define TRUE_DEVIL_REGEN_AMOUNT 80

#define BASIC_DEVIL_RANK /datum/devil_rank/basic_devil
#define ENRAGED_DEVIL_RANK /datum/devil_rank/enraged_devil
#define BLOOD_LIZARD_RANK /datum/devil_rank/blood_lizard
#define TRUE_DEVIL_RANK /datum/devil_rank/true_devil

#define BANE_SALT "salt"
#define BANE_LIGHT "light"
#define BANE_IRON "iron"
#define BANE_WHITECLOTHES "whiteclothes"
#define BANE_SILVER "silver"
#define BANE_HARVEST "harvest"
#define BANE_TOOLBOX "toolbox"

#define OBLIGATION_FOOD "food"
#define OBLIGATION_FIDDLE "fiddle"
#define OBLIGATION_DANCEOFF "danceoff"
#define OBLIGATION_GREET "greet"
#define OBLIGATION_PRESENCEKNOWN "presenceknown"
#define OBLIGATION_SAYNAME "sayname"
#define OBLIGATION_ANNOUNCEKILL "announcekill"
#define OBLIGATION_ANSWERTONAME "answername"

#define BAN_HURTWOMAN "hurtwoman"
#define BAN_HURTMAN "hurtman"
#define BAN_CHAPEL "chapel"
#define BAN_HURTPRIEST "hurtpriest"
#define BAN_AVOIDWATER "avoidwater"
#define BAN_STRIKEUNCONCIOUS "strikeunconcious"
#define BAN_HURTLIZARD "hurtlizard"
#define BAN_HURTANIMAL "hurtanimal"

#define BANISH_WATER "water"
#define BANISH_COFFIN "coffin"
#define BANISH_FORMALDYHIDE "embalm"
#define BANISH_RUNES "runes"
#define BANISH_CANDLES "candles"
#define BANISH_DESTRUCTION "destruction"
#define BANISH_FUNERAL_GARB "funeral"

#define BANE_TOOLBOX_DAMAGE_MODIFIER 2.5
#define BANE_HARVEST_DAMAGE_MULTIPLIER 2

GLOBAL_LIST_EMPTY(allDevils)
//These are also used in the codex gigas, so let's declare them globally.
GLOBAL_LIST_INIT(devil_pre_title, list("Dark ", "Hellish ", "Fallen ", "Fiery ", "Sinful ", "Blood ", "Fluffy "))
GLOBAL_LIST_INIT(devil_title, list("Lord ", "Prelate ", "Count ", "Viscount ", "Vizier ", "Elder ", "Adept "))
GLOBAL_LIST_INIT(devil_syllable, list("hal", "ve", "odr", "neit", "ci", "quon", "mya", "folth", "wren", "geyr", "hil", "niet", "twou", "phi", "coa"))
GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", ", the Lord of all things", ", Jr."))
94 changes: 48 additions & 46 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,52 @@
#define GAMEMODE_IS_WIZARD (SSticker && istype(SSticker.mode, /datum/game_mode/wizard))
#define GAMEMODE_IS_RAGIN_MAGES (SSticker && istype(SSticker.mode, /datum/game_mode/wizard/raginmages))

//special roles
// special roles
// Distinct from the ROLE_X defines because some antags have multiple special roles but only one ban type
#define SPECIAL_ROLE_ABDUCTOR_AGENT "Abductor Agent"
#define SPECIAL_ROLE_ABDUCTOR_SCIENTIST "Abductor Scientist"
#define SPECIAL_ROLE_BLOB "Blob"
#define SPECIAL_ROLE_BLOB_OVERMIND "Blob Overmind"
#define SPECIAL_ROLE_BLOB_MINION "Blob Minion"
#define SPECIAL_ROLE_BORER "Borer"
#define SPECIAL_ROLE_CARP "Space Carp"
#define SPECIAL_ROLE_CHANGELING "Changeling"
#define SPECIAL_ROLE_CULTIST "Cultist"
#define SPECIAL_ROLE_CLOCKER "Clockwork cultist"
#define SPECIAL_ROLE_DEATHSQUAD "Death Commando"
#define SPECIAL_ROLE_ERT "Response Team"
#define SPECIAL_ROLE_FREE_GOLEM "Free Golem"
#define SPECIAL_ROLE_GOLEM "Golem"
#define SPECIAL_ROLE_HEAD_REV "Head Revolutionary"
#define SPECIAL_ROLE_HEADSLUG "HeadSlug"
#define SPECIAL_ROLE_HONKSQUAD "Honksquad"
#define SPECIAL_ROLE_REV "Revolutionary"
#define SPECIAL_ROLE_MORPH "Morph"
#define SPECIAL_ROLE_MULTIVERSE "Multiverse Traveller"
#define SPECIAL_ROLE_NUKEOPS "Syndicate"
#define SPECIAL_ROLE_PYROCLASTIC_SLIME "Pyroclastic Anomaly Slime"
#define SPECIAL_ROLE_RAIDER "Vox Raider"
#define SPECIAL_ROLE_REVENANT "Revenant"
#define SPECIAL_ROLE_SHADOWLING "Shadowling"
#define SPECIAL_ROLE_SHADOWLING_THRALL "Shadowling Thrall"
#define SPECIAL_ROLE_DEMON "Demon"
#define SPECIAL_ROLE_SUPER "Super"
#define SPECIAL_ROLE_SYNDICATE_DEATHSQUAD "Syndicate Commando"
#define SPECIAL_ROLE_TRAITOR "Traitor"
#define SPECIAL_ROLE_VAMPIRE "Vampire"
#define SPECIAL_ROLE_VAMPIRE_THRALL "Vampire Thrall"
#define SPECIAL_ROLE_WIZARD "Wizard"
#define SPECIAL_ROLE_WIZARD_APPRENTICE "Wizard Apprentice"
#define SPECIAL_ROLE_XENOMORPH "Xenomorph"
#define SPECIAL_ROLE_XENOMORPH_QUEEN "Xenomorph Queen"
#define SPECIAL_ROLE_XENOMORPH_HUNTER "Xenomorph Hunter"
#define SPECIAL_ROLE_XENOMORPH_DRONE "Xenomorph Drone"
#define SPECIAL_ROLE_XENOMORPH_SENTINEL "Xenomorph Sentinel"
#define SPECIAL_ROLE_XENOMORPH_LARVA "Xenomorph Larva"
#define SPECIAL_ROLE_SPACE_NINJA "Space Ninja"
#define SPECIAL_ROLE_THIEF "Thief"
#define SPECIAL_ROLE_SPACE_DRAGON "Space Dragon"
#define SPECIAL_ROLE_EVENTMISC "Event Role"
#define SPECIAL_ROLE_MALFAI "Malfunctioning AI"
#define SPECIAL_ROLE_ABDUCTOR_AGENT "Abductor Agent"
#define SPECIAL_ROLE_ABDUCTOR_SCIENTIST "Abductor Scientist"
#define SPECIAL_ROLE_BLOB "Blob"
#define SPECIAL_ROLE_BLOB_OVERMIND "Blob Overmind"
#define SPECIAL_ROLE_BLOB_MINION "Blob Minion"
#define SPECIAL_ROLE_BORER "Borer"
#define SPECIAL_ROLE_CARP "Space Carp"
#define SPECIAL_ROLE_CHANGELING "Changeling"
#define SPECIAL_ROLE_CULTIST "Cultist"
#define SPECIAL_ROLE_CLOCKER "Clockwork cultist"
#define SPECIAL_ROLE_DEATHSQUAD "Death Commando"
#define SPECIAL_ROLE_ERT "Response Team"
#define SPECIAL_ROLE_FREE_GOLEM "Free Golem"
#define SPECIAL_ROLE_GOLEM "Golem"
#define SPECIAL_ROLE_HEAD_REV "Head Revolutionary"
#define SPECIAL_ROLE_HEADSLUG "HeadSlug"
#define SPECIAL_ROLE_HONKSQUAD "Honksquad"
#define SPECIAL_ROLE_REV "Revolutionary"
#define SPECIAL_ROLE_MORPH "Morph"
#define SPECIAL_ROLE_MULTIVERSE "Multiverse Traveller"
#define SPECIAL_ROLE_NUKEOPS "Syndicate"
#define SPECIAL_ROLE_PYROCLASTIC_SLIME "Pyroclastic Anomaly Slime"
#define SPECIAL_ROLE_RAIDER "Vox Raider"
#define SPECIAL_ROLE_REVENANT "Revenant"
#define SPECIAL_ROLE_SHADOWLING "Shadowling"
#define SPECIAL_ROLE_SHADOWLING_THRALL "Shadowling Thrall"
#define SPECIAL_ROLE_DEMON "Demon"
#define SPECIAL_ROLE_SUPER "Super"
#define SPECIAL_ROLE_SYNDICATE_DEATHSQUAD "Syndicate Commando"
#define SPECIAL_ROLE_TRAITOR "Traitor"
#define SPECIAL_ROLE_VAMPIRE "Vampire"
#define SPECIAL_ROLE_VAMPIRE_THRALL "Vampire Thrall"
#define SPECIAL_ROLE_WIZARD "Wizard"
#define SPECIAL_ROLE_WIZARD_APPRENTICE "Wizard Apprentice"
#define SPECIAL_ROLE_XENOMORPH "Xenomorph"
#define SPECIAL_ROLE_XENOMORPH_QUEEN "Xenomorph Queen"
#define SPECIAL_ROLE_XENOMORPH_HUNTER "Xenomorph Hunter"
#define SPECIAL_ROLE_XENOMORPH_DRONE "Xenomorph Drone"
#define SPECIAL_ROLE_XENOMORPH_SENTINEL "Xenomorph Sentinel"
#define SPECIAL_ROLE_XENOMORPH_LARVA "Xenomorph Larva"
#define SPECIAL_ROLE_SPACE_NINJA "Space Ninja"
#define SPECIAL_ROLE_THIEF "Thief"
#define SPECIAL_ROLE_SPACE_DRAGON "Space Dragon"
#define SPECIAL_ROLE_EVENTMISC "Event Role"
#define SPECIAL_ROLE_MALFAI "Malfunctioning AI"
#define SPECIAL_ROLE_SINTOUCHED "Sintouched"
#define SPECIAL_ROLE_DEVIL_PAWN "Devil's pawn"
2 changes: 1 addition & 1 deletion code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_CULTIST = /datum/game_mode/cult, // Cultist
ROLE_CLOCKER = /datum/game_mode/clockwork, // Clockwork Cultist
ROLE_DEMON, // Demons (Slaughter/Laughter/Shadow)
ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil
ROLE_DEVIL, // Devil
ROLE_GSPIDER, // Giant spider
ROLE_GUARDIAN, // Guardian
ROLE_ELITE, // Lavaland Elite
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
//mob traits
#define TRAIT_GODMODE "godmode"
#define TRAIT_PACIFISM "pacifism"
#define TRAIT_NO_DEATH "nodeath"
#define TRAIT_WATERBREATH "waterbreathing"
#define TRAIT_BLOODCRAWL "bloodcrawl"
#define TRAIT_BLOODCRAWL_EAT "bloodcrawl_eat"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NEARSIGHTED" = TRAIT_NEARSIGHTED,
"TRAIT_NEGATES_GRAVITY" = TRAIT_NEGATES_GRAVITY,
"TRAIT_NO_BIOCHIPS" = TRAIT_NO_BIOCHIPS,
"TRAIT_NO_DEATH" = TRAIT_NO_DEATH,
"TRAIT_NO_BLOOD" = TRAIT_NO_BLOOD,
"TRAIT_NO_BLOOD_RESTORE" = TRAIT_NO_BLOOD_RESTORE,
"TRAIT_NO_BREATH" = TRAIT_NO_BREATH,
Expand Down
5 changes: 3 additions & 2 deletions code/datums/components/ritual_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
src.allowed_categories = allowed_categories
src.allowed_species = allowed_species
src.allowed_special_role = allowed_special_role

get_rituals()

/datum/component/ritual_object/RegisterWithParent()
Expand Down Expand Up @@ -62,7 +63,7 @@
if(allowed_species && !is_type_in_list(human.dna.species, allowed_species))
return

if(allowed_special_role && !is_type_in_list(human.mind?.special_role, allowed_special_role))
if(allowed_special_role && !LAZYIN(allowed_special_role, human.mind?.special_role))
return

active_ui = TRUE
Expand Down Expand Up @@ -111,7 +112,7 @@
if(ritual.allowed_species && !is_type_in_list(human.dna.species, ritual.allowed_species))
continue

if(ritual.allowed_special_role && !is_type_in_list(human.mind?.special_role, ritual.allowed_special_role))
if(ritual.allowed_special_role && !LAZYIN(ritual.allowed_special_role, human.mind?.special_role))
continue

LAZYADD(rituals_list, ritual.name)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/ectoplasmic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
create_effect = TRUE
if(5)
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
human.influenceSin()
human.mind?.add_antag_datum(/datum/antagonist/sintouched)
to_chat(human, span_revenbignotice("You suddenly feel your soul become corrupted."))
else
human.apply_damage(80, STAMINA)
Expand Down
51 changes: 51 additions & 0 deletions code/datums/elements/devil_banishment.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/datum/element/devil_banishment
element_flags = ELEMENT_DETACH_ON_HOST_DESTROY|ELEMENT_BESPOKE
id_arg_index = 2

var/linked_timer

/datum/element/devil_banishment/Attach(datum/target)
. = ..()
var/mob/living/carbon/human = target

if(!istype(human) || !human.mind?.has_antag_datum(/datum/antagonist/devil))
return ELEMENT_INCOMPATIBLE

RegisterSignal(human, COMSIG_LIVING_EARLY_DEATH, PROC_REF(pre_death))

/datum/element/devil_banishment/Detach(datum/target)
. = ..()

UnregisterSignal(target, COMSIG_LIVING_EARLY_DEATH)

/datum/element/devil_banishment/proc/pre_death(datum/source, gibbed)
SIGNAL_HANDLER

if(gibbed || linked_timer)
return

var/mob/living/carbon/human = source
var/datum/antagonist/devil/devil = human?.mind?.has_antag_datum(/datum/antagonist/devil)

if(!devil?.info)
return

playsound(get_turf(human), 'sound/magic/vampire_anabiosis.ogg', 50, 0, TRUE)
linked_timer = addtimer(CALLBACK(src, PROC_REF(try_banishment), human, devil), devil.rank.regen_threshold / 2, TIMER_LOOP | TIMER_STOPPABLE | TIMER_DELETE_ME)

/datum/element/devil_banishment/proc/try_banishment(mob/living/carbon/human, datum/antagonist/devil/devil)
if(human.health >= human.maxHealth)
stop_banishment_check()
return

if(!devil.info.banish.check_banishment())
return

human.dust()

/datum/element/devil_banishment/proc/stop_banishment_check()
if(!linked_timer)
return

deltimer(linked_timer)
linked_timer = null
Loading

0 comments on commit e29c2bd

Please sign in to comment.