diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm
index e9e25da8391..85d8945c054 100644
--- a/code/__HELPERS/trait_helpers.dm
+++ b/code/__HELPERS/trait_helpers.dm
@@ -126,7 +126,8 @@
: FALSE)\
: FALSE)
#define HAS_TRAIT_NOT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (length(target.status_traits[trait] - source) > 0) : FALSE) : FALSE)
-
+/// A simple helper for checking traits in a mob's mind
+#define HAS_MIND_TRAIT(target, trait) (HAS_TRAIT(target, trait) || (target.mind ? HAS_TRAIT(target.mind, trait) : FALSE))
/// Gives a unique trait source for any given datum
#define UNIQUE_TRAIT_SOURCE(target) "unique_source_[UID(target)]"
@@ -219,6 +220,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_HAS_GPS "has_gps" // used for /Stat
#define TRAIT_CAN_VIEW_HEALTH "can_view_health" // Also used for /Stat
+//***** MIND TRAITS *****/
+#define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion
+
//***** ITEM AND MOB TRAITS *****//
/// Show what machine/door wires do when held.
#define TRAIT_SHOW_WIRE_INFO "show_wire_info"
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index d2a6ed085c8..05fc457383a 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -85,6 +85,11 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BADASS" = TRAIT_BADASS,
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING
),
+
+ /datum/mind = list(
+ "TRAIT_HOLY" = TRAIT_HOLY
+ ),
+
/obj/item = list(
"TRAIT_SHOW_WIRE_INFO" = TRAIT_SHOW_WIRE_INFO,
"TRAIT_SUPERMATTER_IMMUNE" = TRAIT_SUPERMATTER_IMMUNE,
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 0cca25eb14c..6899c55c8de 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -63,7 +63,6 @@
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
var/datum/mindslaves/som //stands for slave or master...hush..
- var/isholy = FALSE // is this person a chaplain or admin role allowed to use bibles
var/isblessed = FALSE // is this person blessed by a chaplain?
var/num_blessed = 0 // for prayers
diff --git a/code/datums/spells/chaplain_bless.dm b/code/datums/spells/chaplain_bless.dm
index 35ab9fcedab..8c88be8ba55 100644
--- a/code/datums/spells/chaplain_bless.dm
+++ b/code/datums/spells/chaplain_bless.dm
@@ -34,7 +34,7 @@
revert_cast()
return
- if(!user.mind.isholy)
+ if(!HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "Somehow, you are not holy enough to use this ability. This should never happen. Report this bug.")
revert_cast()
return
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 9b4127742d8..d738d6c0dd0 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -810,7 +810,7 @@
exit = new /obj/effect/cult_portal_exit(target)
/obj/effect/portal/cult/attackby(obj/I, mob/user, params)
- if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user) || istype(I, /obj/item/nullrod) && user.mind.isholy)
+ if(istype(I, /obj/item/melee/cultblade/dagger) && iscultist(user) || istype(I, /obj/item/nullrod) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "You close the portal with your [I].")
playsound(src, 'sound/magic/magic_missile.ogg', 100, TRUE)
qdel(src)
diff --git a/code/game/gamemodes/cult/cult_mode.dm b/code/game/gamemodes/cult/cult_mode.dm
index a7baf98882b..947a7d783a5 100644
--- a/code/game/gamemodes/cult/cult_mode.dm
+++ b/code/game/gamemodes/cult/cult_mode.dm
@@ -27,7 +27,7 @@ GLOBAL_LIST_EMPTY(all_cults)
return FALSE
if(iscultist(mind.current))
return TRUE //If they're already in the cult, assume they are convertable
- if(mind.isholy)
+ if(HAS_MIND_TRAIT(mind.current, TRAIT_HOLY))
return FALSE
if(ishuman(mind.current))
var/mob/living/carbon/human/H = mind.current
diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm
index b0e5e363140..ab25da432f7 100644
--- a/code/game/gamemodes/wizard/soulstone.dm
+++ b/code/game/gamemodes/wizard/soulstone.dm
@@ -38,7 +38,7 @@
if(iscultist(user) && purified && !iswizard(user))
return FALSE
- if(iscultist(user) || iswizard(user) || (user.mind?.isholy && purified || usability == TRUE))
+ if(iscultist(user) || iswizard(user) || (HAS_MIND_TRAIT(user, TRAIT_HOLY) && purified) || usability)
return TRUE
return FALSE
@@ -69,7 +69,7 @@
if(iscultist(user) && purified && !iswizard(user))
to_chat(user, "[src] reeks of holy magic. You will need to cleanse it with a ritual dagger before anything can be done with it.")
return
- if(user.mind?.isholy)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "An overwhelming feeling of dread comes over you as you pick up [src]. It looks fragile enough to break with your hands.")
return
if(!can_use(user))
@@ -178,7 +178,7 @@
return
/obj/item/soulstone/attackby(obj/item/O, mob/user)
- if(istype(O, /obj/item/storage/bible) && !iscultist(user) && user.mind.isholy)
+ if(istype(O, /obj/item/storage/bible) && !iscultist(user) && HAS_MIND_TRAIT(user, TRAIT_HOLY))
if(purified)
return
to_chat(user, "You begin to exorcise [src].")
@@ -238,7 +238,7 @@
release_shades(user)
return
- if(!user.mind.isholy)
+ if(!HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "The shard feels too tough to shatter, you are not holy enough to free its captive!")
return
diff --git a/code/game/jobs/job/support_chaplain.dm b/code/game/jobs/job/support_chaplain.dm
index 39d66aa46ea..8dfafc345cb 100644
--- a/code/game/jobs/job/support_chaplain.dm
+++ b/code/game/jobs/job/support_chaplain.dm
@@ -33,8 +33,8 @@
if(visualsOnly)
return
- if(H.mind)
- H.mind.isholy = TRUE
+ if(istype(H.mind))
+ ADD_TRAIT(H.mind, TRAIT_HOLY, ROUNDSTART_TRAIT)
INVOKE_ASYNC(src, PROC_REF(religion_pick), H)
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index 2916ba408db..2b41c2b9f00 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -37,7 +37,7 @@
/obj/item/nullrod/attack(mob/M, mob/living/carbon/user)
..()
var/datum/antagonist/vampire/V = M.mind?.has_antag_datum(/datum/antagonist/vampire)
- if(ishuman(M) && V && user.mind.isholy)
+ if(ishuman(M) && V && HAS_MIND_TRAIT(M, TRAIT_HOLY))
if(!V.get_ability(/datum/vampire_passive/full))
to_chat(M, "The nullrod's power interferes with your own!")
V.adjust_nullification(30 + sanctify_force, 15 + sanctify_force)
@@ -45,7 +45,7 @@
/obj/item/nullrod/pickup(mob/living/user)
. = ..()
if(sanctify_force)
- if(!user.mind || !user.mind.isholy)
+ if(!user.mind || !HAS_MIND_TRAIT(user, TRAIT_HOLY))
user.adjustBruteLoss(force)
user.adjustFireLoss(sanctify_force)
user.Weaken(10 SECONDS)
@@ -57,7 +57,7 @@
/obj/item/nullrod/attack_self(mob/user)
- if(user.mind?.isholy && !reskinned)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY) && !reskinned)
reskin_holy_weapon(user)
/obj/item/nullrod/examine(mob/living/user)
@@ -469,7 +469,7 @@
/obj/item/nullrod/carp/attack_self(mob/living/user)
if(used_blessing)
return
- if(user.mind && !user.mind.isholy)
+ if(user.mind && !HAS_MIND_TRAIT(user, TRAIT_HOLY))
return
to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.")
user.faction |= "carp"
@@ -541,7 +541,7 @@
if(!iscarbon(M))
return ..()
- if(!user.mind || !user.mind.isholy)
+ if(!user.mind || !HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "You are not close enough with [SSticker.Bible_deity_name] to use [src].")
return
@@ -594,7 +594,7 @@
/obj/item/nullrod/salt/attack_self(mob/user)
- if(!user.mind || !user.mind.isholy)
+ if(!user.mind || !HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "You are not close enough with [SSticker.Bible_deity_name] to use [src].")
return
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index 1c890e28658..35432af8c70 100644
--- a/code/game/objects/items/weapons/storage/bible.dm
+++ b/code/game/objects/items/weapons/storage/bible.dm
@@ -84,7 +84,7 @@
if(!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey")
to_chat(user, "You don't have the dexterity to do this!")
return
- if(!user.mind?.isholy)
+ if(!HAS_MIND_TRAIT(user, TRAIT_HOLY))
to_chat(user, "The book sizzles in your hands.")
user.take_organ_damage(0, 10)
return
@@ -118,16 +118,16 @@
if(isfloorturf(target))
to_chat(user, "You hit the floor with the bible.")
- if(user.mind?.isholy)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
for(var/obj/O in target)
O.cult_reveal()
if(istype(target, /obj/machinery/door/airlock))
to_chat(user, "You hit the airlock with the bible.")
- if(user.mind?.isholy)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
var/obj/airlock = target
airlock.cult_reveal()
- if(user.mind?.isholy && target.reagents)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY) && target.reagents)
if(target.reagents.has_reagent("water")) //blesses all the water in the holder
to_chat(user, "You bless [target].")
var/water2holy = target.reagents.get_reagent_amount("water")
@@ -142,7 +142,7 @@
/obj/item/storage/bible/attack_self(mob/user)
. = ..()
- if(!customisable || !user.mind?.isholy)
+ if(!customisable || !HAS_MIND_TRAIT(user, TRAIT_HOLY))
return
var/list/skins = list()
@@ -183,7 +183,7 @@
SSticker.Bible_item_state = item_state
/obj/item/storage/bible/proc/radial_check(mob/user)
- if(!user?.mind.isholy || !ishuman(user))
+ if(!HAS_MIND_TRAIT(user, TRAIT_HOLY) || !ishuman(user))
return FALSE
var/mob/living/carbon/human/H = user
if(!src || !H.is_in_hands(src) || H.incapacitated())
diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm
index d1973f34c16..e45cc1c41c3 100644
--- a/code/modules/admin/verbs/pray.dm
+++ b/code/modules/admin/verbs/pray.dm
@@ -30,7 +30,7 @@
deity = SSticker.cultdat.entity_name
log_say("(PRAYER) [msg]", usr)
- msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""][mind && mind.isholy ? " (blessings: [mind.num_blessed])" : ""]: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_TP(src,"TP")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) ([ADMIN_SC(src,"SC")]) (BLESS) (SMITE): [msg]"
+ msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""][mind && HAS_MIND_TRAIT(usr, TRAIT_HOLY) ? " (blessings: [mind.num_blessed])" : ""]: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_TP(src,"TP")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) ([ADMIN_SC(src,"SC")]) (BLESS) (SMITE): [msg]"
for(var/client/X in GLOB.admins)
if(check_rights(R_EVENT,0,X.mob))
diff --git a/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm b/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
index f6217c0d09b..b2c6c2db499 100644
--- a/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
@@ -58,7 +58,7 @@
if(ismindshielded(C) || C.mind.has_antag_datum(/datum/antagonist/vampire) || C.mind.has_antag_datum(/datum/antagonist/mindslave))
C.visible_message("[C] seems to resist the takeover!", "You feel a familiar sensation in your skull that quickly dissipates.")
return
- if(C.mind.isholy)
+ if(HAS_MIND_TRAIT(C, TRAIT_HOLY))
C.visible_message("[C] seems to resist the takeover!", "Your faith in [SSticker.Bible_deity_name] has kept your mind clear of all evil.")
return
return TRUE
diff --git a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
index eae5a5719ac..56b4a980940 100644
--- a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
@@ -8,7 +8,7 @@
if(V?.get_ability(/datum/vampire_passive/full))
return TRUE
//Holy characters are resistant to vampire powers
- if(mind?.isholy)
+ if(HAS_MIND_TRAIT(user, TRAIT_HOLY))
return FALSE
return TRUE
diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm
index 318a72fcfc9..08ec0f5920e 100644
--- a/code/modules/response_team/ert_outfits.dm
+++ b/code/modules/response_team/ert_outfits.dm
@@ -426,8 +426,8 @@
/datum/outfit/job/centcom/response_team/paranormal/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
. = ..()
- if(H.mind)
- H.mind.isholy = TRUE
+ if(istype(H.mind))
+ ADD_TRAIT(H.mind, TRAIT_HOLY, ROUNDSTART_TRAIT)
/datum/outfit/job/centcom/response_team/paranormal/amber
name = "RT Paranormal (Amber)"
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index 21ecf45b88b..a809ec7ed82 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -175,7 +175,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby"))
if(owner.mind)
//Holy characters are very good at speaking with the voice of god
- if(owner.mind.isholy)
+ if(HAS_MIND_TRAIT(owner, TRAIT_HOLY))
power_multiplier *= 2
//Command staff has authority
if(owner.mind.assigned_role in GLOB.command_positions)