mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Changes heretic monster check to rely on traits instead of antag datums (#89703)
## About The Pull Request Doesn't affect anything besides fixing the armsy issue and making mindless heretic summons also count as, well, summons. Closes #89696 ## Changelog 🆑 fix: Armsy (aka Lord Of The Night (aka flesh snek (aka heretic ascention))) no longer affects itself with its own spells /🆑
This commit is contained in:
@@ -255,12 +255,10 @@ GLOBAL_LIST_INIT(ai_employers, list(
|
||||
/// Checks if the given mob is a heretic and is guaranteed to return the datum if possible - will cause issues with above trait
|
||||
#define GET_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic))
|
||||
|
||||
/// Check if the given mob is a heretic monster.
|
||||
#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic_monster))
|
||||
/// Check if the given mob is a lunatic
|
||||
#define IS_LUNATIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/lunatic))
|
||||
/// Checks if the given mob is either a heretic, heretic monster or a lunatic.
|
||||
#define IS_HERETIC_OR_MONSTER(mob) (IS_HERETIC(mob) || IS_HERETIC_MONSTER(mob) || IS_LUNATIC(mob))
|
||||
#define IS_HERETIC_OR_MONSTER(mob) (IS_HERETIC(mob) || HAS_TRAIT(mob, TRAIT_HERETIC_SUMMON) || IS_LUNATIC(mob))
|
||||
/// CHecks if the given mob is in the mansus realm
|
||||
#define IS_IN_MANSUS(mob) (istype(get_area(mob), /area/centcom/heretic_sacrifice))
|
||||
|
||||
|
||||
@@ -1456,4 +1456,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
///A trait given to users as a mutex to prevent repeated unresolved attempts to christen a shuttle
|
||||
#define TRAIT_ATTEMPTING_CHRISTENING "attempting_christening"
|
||||
|
||||
///Trait given to heretic summons, making them immune to heretic spells
|
||||
#define TRAIT_HERETIC_SUMMON "heretic_summon"
|
||||
|
||||
// END TRAIT DEFINES
|
||||
|
||||
@@ -314,6 +314,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_HEAR_THROUGH_DARKNESS" = TRAIT_HEAR_THROUGH_DARKNESS,
|
||||
"TRAIT_HEAVY_DRINKER" = TRAIT_HEAVY_DRINKER,
|
||||
"TRAIT_HEAVY_SLEEPER" = TRAIT_HEAVY_SLEEPER,
|
||||
"TRAIT_HERETIC_SUMMON" = TRAIT_HERETIC_SUMMON,
|
||||
"TRAIT_HIDE_EXTERNAL_ORGANS" = TRAIT_HIDE_EXTERNAL_ORGANS,
|
||||
"TRAIT_HIGH_VALUE_RANSOM" = TRAIT_HIGH_VALUE_RANSOM,
|
||||
"TRAIT_HOLY" = TRAIT_HOLY,
|
||||
|
||||
@@ -554,6 +554,7 @@
|
||||
|
||||
var/datum/antagonist/heretic_monster/heretic_monster = summoned.mind.add_antag_datum(/datum/antagonist/heretic_monster)
|
||||
heretic_monster.set_owner(user.mind)
|
||||
ADD_TRAIT(heretic_monster, TRAIT_HERETIC_SUMMON, INNATE_TRAIT)
|
||||
|
||||
var/datum/objective/heretic_summon/summon_objective = locate() in user.mind.get_all_objectives()
|
||||
summon_objective?.num_summoned++
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if(isliving(victim))
|
||||
var/mob/living/mob_victim = victim
|
||||
if(mob_victim.stat == DEAD || !IS_HERETIC_MONSTER(mob_victim))
|
||||
if(mob_victim.stat == DEAD || !HAS_TRAIT(mob_victim, TRAIT_HERETIC_SUMMON))
|
||||
return SECONDARY_ATTACK_CALL_NORMAL
|
||||
|
||||
if(heal_heretic_monster(hand, mob_victim, caster))
|
||||
@@ -73,7 +73,7 @@
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Extract organ"
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
if(IS_HERETIC_MONSTER(mob_victim))
|
||||
if(HAS_TRAIT(mob_victim, TRAIT_HERETIC_SUMMON))
|
||||
context[SCREENTIP_CONTEXT_RMB] = "Heal [ishuman(mob_victim) ? "minion" : "summon"]"
|
||||
. = CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
on_made_callback?.Invoke(human_target)
|
||||
ADD_TRAIT(human_target, TRAIT_FAKEDEATH, TRAIT_STATUS_EFFECT(id))
|
||||
ADD_TRAIT(human_target, TRAIT_HERETIC_SUMMON, TRAIT_STATUS_EFFECT(id))
|
||||
human_target.become_husk(TRAIT_STATUS_EFFECT(id))
|
||||
human_target.faction |= FACTION_HERETIC
|
||||
|
||||
@@ -90,6 +91,7 @@
|
||||
|
||||
on_lost_callback?.Invoke(human_target)
|
||||
REMOVE_TRAIT(human_target, TRAIT_FAKEDEATH, TRAIT_STATUS_EFFECT(id))
|
||||
REMOVE_TRAIT(human_target, TRAIT_HERETIC_SUMMON, TRAIT_STATUS_EFFECT(id))
|
||||
human_target.cure_husk(TRAIT_STATUS_EFFECT(id))
|
||||
human_target.faction -= FACTION_HERETIC
|
||||
human_target.mind?.remove_antag_datum(/datum/antagonist/heretic_monster)
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
var/mob/living/monster = new monster_type(loc)
|
||||
monster.PossessByPlayer(user.key)
|
||||
monster.set_name()
|
||||
ADD_TRAIT(monster, TRAIT_HERETIC_SUMMON, INNATE_TRAIT)
|
||||
var/datum/antagonist/heretic_monster/woohoo_free_antag = new(src)
|
||||
monster.mind.add_antag_datum(woohoo_free_antag)
|
||||
if(ascendee)
|
||||
|
||||
@@ -906,7 +906,7 @@ means that you'll be forced to move carefully while it's on. Fits in pockets, an
|
||||
successful_sneak_attack = FALSE
|
||||
sneak_attack_fail_message = TRUE
|
||||
|
||||
else if(IS_HERETIC_MONSTER(living_target) && prob(50)) // IT IS HARD TO SNEAK ATTACK SOMETHING WITH TOO MANY REDUNDANT EVERYTHINGS.
|
||||
else if(HAS_TRAIT(living_target, TRAIT_HERETIC_SUMMON) && prob(50)) // IT IS HARD TO SNEAK ATTACK SOMETHING WITH TOO MANY REDUNDANT EVERYTHINGS.
|
||||
successful_sneak_attack = FALSE
|
||||
sneak_attack_fail_message = TRUE
|
||||
|
||||
|
||||
@@ -34,3 +34,4 @@
|
||||
/mob/living/basic/heretic_summon/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/death_drops, string_list(list(/obj/effect/gibspawner/generic)))
|
||||
ADD_TRAIT(src, TRAIT_HERETIC_SUMMON, INNATE_TRAIT)
|
||||
|
||||
Reference in New Issue
Block a user