Skip to content

Commit

Permalink
Merge pull request #385 from wraith-54321/tg-wizardzzz
Browse files Browse the repository at this point in the history
Ports cheese wizards as well as summon simians(as well as some other PRs that they rely on)
  • Loading branch information
dwasint authored Sep 27, 2023
2 parents 7f51372 + ad08f31 commit 4c8651b
Show file tree
Hide file tree
Showing 69 changed files with 1,094 additions and 220 deletions.
2 changes: 1 addition & 1 deletion _maps/templates/lazy_templates/wizard_den.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
/turf/open/floor/wood,
/area/centcom/wizard_station)
"SD" = (
/obj/structure/bookcase/random/reference,
/obj/structure/bookcase/random/reference/wizard,
/turf/open/floor/engine/cult,
/area/centcom/wizard_station)
"Tl" = (
Expand Down
15 changes: 15 additions & 0 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,27 @@
#define EFFECT_PARALYZE "paralyze"
#define EFFECT_IMMOBILIZE "immobilize"
//Bitflags defining which status effects could be or are inflicted on a mob
/// If set, this mob can be stunned.
#define CANSTUN (1<<0)
/// If set, this mob can be knocked down (or stamcrit)
#define CANKNOCKDOWN (1<<1)
/// If set, this mob can be knocked unconscious via status effect.
/// NOTE, does not mean immune to sleep. Unconscious and sleep are two different things.
/// NOTE, does not relate to the unconscious stat either. Only the status effect.
#define CANUNCONSCIOUS (1<<2)
/// If set, this mob can be grabbed or pushed when bumped into
#define CANPUSH (1<<3)
/// Mob godmode. Prevents most statuses and damage from being taken, but is more often than not a crapshoot. Use with caution.
#define GODMODE (1<<4)

DEFINE_BITFIELD(status_flags, list(
"CAN STUN" = CANSTUN,
"CAN KNOCKDOWN" = CANKNOCKDOWN,
"CAN UNCONSCIOUS" = CANUNCONSCIOUS,
"CAN PUSH" = CANPUSH,
"GOD MODE" = GODMODE,
))

//Health Defines
#define HEALTH_THRESHOLD_CRIT 0
#define HEALTH_THRESHOLD_FULLCRIT -30
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@
#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze"
///from base of mob/living/Immobilize() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize"
///from base of mob/living/incapacitate() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_INCAPACITATE "living_incapacitate"
///from base of mob/living/Unconscious() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious"
///from base of mob/living/Sleeping() (amount, ignore_canstun)
#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping"
/// from mob/living/check_stun_immunity(): (check_flags)
#define COMSIG_LIVING_GENERIC_STUN_CHECK "living_check_stun"
#define COMPONENT_NO_STUN (1<<0) //For all of them
///from base of /mob/living/can_track(): (mob/user)
#define COMSIG_LIVING_CAN_TRACK "mob_cantrack"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_wizard.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Signal sent when we finish invoking a rune
/// Signal sent when we finish invoking a rune. Will also send the amount of cheese sacrificed on the rune : (cheese_sacrificed)
#define COMSIG_GRAND_RUNE_COMPLETE "grand rune complete"
/// Signal sent when we finish 7 grand rituals
#define COMSIG_GRAND_RITUAL_FINAL_COMPLETE "grand ritual finale complete"
8 changes: 7 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_DISFIGURED "disfigured"
/// Tracks whether we're gonna be a baby alien's mummy.
#define TRAIT_XENO_HOST "xeno_host"
/// This mob is immune to stun causing status effects and stamcrit.
/// Prefer to use [/mob/living/proc/check_stun_immunity] over checking for this trait exactly.
#define TRAIT_STUNIMMUNE "stun_immunity"
#define TRAIT_BATON_RESISTANCE "baton_resistance"
/// Anti Dual-baton cooldown bypass exploit.
Expand Down Expand Up @@ -671,6 +673,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_CUSTOM_TAP_SOUND "no_tap_sound"
/// Makes the feedback message when someone else is putting this item on you more noticeable
#define TRAIT_DANGEROUS_OBJECT "dangerous_object"
/// determines whether or not objects are haunted and teleport/attack randomly
#define TRAIT_HAUNTED "haunted"

//quirk traits
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
Expand Down Expand Up @@ -911,7 +915,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define CHANGELING_DRAIN "drain"
/// changelings with this trait can no longer talk over the hivemind
#define CHANGELING_HIVEMIND_MUTE "ling_mute"
#define HIGHLANDER "highlander"
#define TRAIT_HULK "hulk"
#define STASIS_MUTE "stasis"
#define GENETICS_SPELL "genetics_spell"
Expand All @@ -921,6 +924,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define NANITES_TRAIT "nanites"
#define FLASHLIGHT_EYES "flashlight_eyes"
#define IMPURE_OCULINE "impure_oculine"
#define HAUNTIUM_REAGENT_TRAIT "hauntium_reagent_trait"
#define TRAIT_SANTA "santa"
#define SCRYING_ORB "scrying-orb"
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
Expand Down Expand Up @@ -1019,6 +1023,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define SPEED_TRAIT "speed_trait"
/// Trait given to mobs that have been autopsied
#define AUTOPSY_TRAIT "autopsy_trait"
/// Trait given by [/datum/status_effect/blessing_of_insanity]
#define MAD_WIZARD_TRAIT "mad_wizard_trait"


/**
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
"TRAIT_UNCATCHABLE" = TRAIT_UNCATCHABLE,
"TRAIT_DANGEROUS_OBJECT" = TRAIT_DANGEROUS_OBJECT,
"TRAIT_HAUNTED" = TRAIT_HAUNTED,
),
/atom = list(
"TRAIT_KEEP_TOGETHER" = TRAIT_KEEP_TOGETHER,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ai/monkey/monkey_behaviors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
if(possible_enemy == controller.pawn)
continue // don't target ourselves
if(!enemies[possible_enemy]) //We don't hate this creature! But we might still attack it!
if(!controller.blackboard[BB_MONKEY_AGGRESSIVE]) //We are not aggressive either, so we won't attack!
if(faction_check(possible_enemy.faction, list(FACTION_MONKEY, FACTION_JUNGLE), exact_match = FALSE) && !controller.blackboard[BB_MONKEY_TARGET_MONKEYS]) // do not target your team. includes monkys gorillas etc.
continue
if(HAS_AI_CONTROLLER_TYPE(possible_enemy, /datum/ai_controller/monkey) && !controller.blackboard[BB_MONKEY_TARGET_MONKEYS]) //Do not target poor monkes
continue
Expand Down
2 changes: 2 additions & 0 deletions code/datums/ai/monkey/monkey_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ have ways of interacting with a specific mob and control it.
. = ..()
if(. & AI_CONTROLLER_INCOMPATIBLE)
return
pawn = new_pawn
set_blackboard_key(BB_MONKEY_AGGRESSIVE, TRUE) //Angry
set_trip_mode(mode = FALSE)

/datum/ai_controller/monkey/TryPossessPawn(atom/new_pawn)
if(!isliving(new_pawn))
Expand Down
7 changes: 0 additions & 7 deletions code/datums/components/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,6 @@
/datum/component/two_handed/proc/wield(mob/living/carbon/user)
if(wielded)
return
if(ismonkey(user))
if(require_twohands)
to_chat(user, span_notice("[parent] is too heavy and cumbersome for you to carry!"))
user.dropItemToGround(parent, force=TRUE)
else
to_chat(user, span_notice("It's too heavy for you to wield fully."))
return
if(user.get_inactive_held_item())
if(require_twohands)
to_chat(user, span_notice("[parent] is too cumbersome to carry in one hand!"))
Expand Down
10 changes: 10 additions & 0 deletions code/datums/elements/haunted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@
REMOVE_TRAIT(master, TRAIT_MOVE_FLYING, ELEMENT_TRAIT(type))
master.RemoveElement(/datum/element/movetype_handler)
return ..()

/atom/movable/proc/make_haunted(source, color) //if not haunted, make haunted
if(!HAS_TRAIT(src, TRAIT_HAUNTED))
AddElement(/datum/element/haunted, color)
ADD_TRAIT(src, TRAIT_HAUNTED, source)

/atom/movable/proc/remove_haunted(source) //if haunted, make not haunted
REMOVE_TRAIT(src, TRAIT_HAUNTED, source)
if(!HAS_TRAIT(src, TRAIT_HAUNTED))
RemoveElement(/datum/element/haunted)
6 changes: 2 additions & 4 deletions code/datums/materials/hauntium.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@

/datum/material/hauntium/on_applied_obj(obj/o, amount, material_flags)
. = ..()
if(isitem(o))
o.AddElement(/datum/element/haunted)
o.make_haunted(INNATE_TRAIT, "#f8f8ff")

/datum/material/hauntium/on_removed_obj(obj/o, amount, material_flags)
. = ..()
if(isitem(o))
o.RemoveElement(/datum/element/haunted)
o.remove_haunted(INNATE_TRAIT)
5 changes: 5 additions & 0 deletions code/datums/mood_events/drug_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@
/datum/mood_event/nicotine_withdrawal_severe
description = "Head pounding. Cold sweating. Feeling anxious. Need a smoke to calm down!"
mood_change = -8

/datum/mood_event/hauntium_spirits
description = "I feel my soul degrading!"
mood_change = -8
timeout = 8 MINUTES
6 changes: 6 additions & 0 deletions code/datums/mood_events/generic_negative_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,9 @@
/datum/mood_event/unsatisfied_nomad
description = "I've been here too long! I want to go out and explore space!"
mood_change = -3

///Wizard cheesy grand finale - what everyone but the wizard gets
/datum/mood_event/madness_despair
description = "UNWORTHY, UNWORTHY, UNWORTHY!!!"
mood_change = -200
special_screen_obj = "mood_despair"
5 changes: 5 additions & 0 deletions code/datums/mood_events/generic_positive_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,8 @@
mood_change = 2
special_screen_obj = "birthday"
special_screen_replace = FALSE

///Wizard cheesy grand finale - what the wizard gets
/datum/mood_event/madness_elation
description = "Madness truly is the greatest of blessings..."
mood_change = 200
4 changes: 4 additions & 0 deletions code/datums/mood_events/morbid_events.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/mood_event/morbid_hauntium
description = "I feel a better connection with the spirits, I love this!"
mood_change = 3
timeout = 6 MINUTES
15 changes: 14 additions & 1 deletion code/datums/mutations/hulk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var/scream_delay = 50
var/last_scream = 0
/// List of traits to add/remove when someone gets this mutation.
var/static/list/mutation_traits = list(
var/list/mutation_traits = list(
TRAIT_CHUNKYFINGERS,
TRAIT_HULK,
TRAIT_IGNOREDAMAGESLOWDOWN,
Expand Down Expand Up @@ -256,4 +256,17 @@
yeeted_person.throw_at(T, 10, 6, the_hulk, TRUE, TRUE)
log_combat(the_hulk, yeeted_person, "has thrown by tail")

/datum/mutation/human/hulk/wizardly
species_allowed = null //yes skeleton/lizard hulk - note that species that dont have skintone changing (like skellies) get custom handling
health_req = 0
instability = 0
scream_delay = 2.5 SECONDS // halved to be more annoying (spell doesn't last long anyways)
/// List of traits to add/remove when someone gets this mutation.
mutation_traits = list(
TRAIT_HULK,
TRAIT_IGNOREDAMAGESLOWDOWN,
TRAIT_PUSHIMMUNE,
TRAIT_STUNIMMUNE,
) // no chunk

#undef HULK_TAILTHROW_STEPS
4 changes: 2 additions & 2 deletions code/datums/mutations/sight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@
to_chat(source, span_warning("You shoot with your laser eyes!"))
source.changeNext_move(CLICK_CD_RANGE)
source.newtonian_move(get_dir(target, source))
var/obj/projectile/beam/laser_eyes/LE = new(source.loc)
var/obj/projectile/beam/laser/laser_eyes/LE = new(source.loc)
LE.firer = source
LE.def_zone = ran_zone(source.zone_selected)
LE.preparePixelProjectile(target, source, modifiers)
INVOKE_ASYNC(LE, TYPE_PROC_REF(/obj/projectile, fire))
playsound(source, 'sound/weapons/taser2.ogg', 75, TRUE)

///Projectile type used by laser eyes
/obj/projectile/beam/laser_eyes
/obj/projectile/beam/laser/laser_eyes
name = "beam"
icon = 'icons/effects/genetics.dmi'
icon_state = "eyelasers"
Expand Down
110 changes: 78 additions & 32 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@
return ..()

/datum/status_effect/his_grace/on_apply()
owner.log_message("gained His Grace's stun immunity", LOG_ATTACK)
owner.add_stun_absorption("hisgrace", INFINITY, 3, null, "His Grace protects you from the stun!")
owner.add_stun_absorption(
source = id,
priority = 3,
self_message = span_boldwarning("His Grace protects you from the stun!"),
)
return ..()

/datum/status_effect/his_grace/on_remove()
owner.remove_stun_absorption(id)

/datum/status_effect/his_grace/tick()
bloodlust = 0
var/graces = 0
Expand All @@ -45,11 +51,6 @@
owner.adjustOxyLoss(-(grace_heal * 2))
owner.adjustCloneLoss(-grace_heal)

/datum/status_effect/his_grace/on_remove()
owner.log_message("lost His Grace's stun immunity", LOG_ATTACK)
if(islist(owner.stun_absorption) && owner.stun_absorption["hisgrace"])
owner.stun_absorption -= "hisgrace"


/datum/status_effect/wish_granters_gift //Fully revives after ten seconds.
id = "wish_granters_gift"
Expand Down Expand Up @@ -112,34 +113,30 @@
icon_state = "blooddrunk"

/datum/status_effect/blooddrunk/on_apply()
. = ..()
if(.)
ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, BLOODDRUNK_TRAIT)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.physiology.brute_mod *= 0.1
H.physiology.burn_mod *= 0.1
H.physiology.tox_mod *= 0.1
H.physiology.oxy_mod *= 0.1
H.physiology.clone_mod *= 0.1
H.physiology.stamina_mod *= 0.1
owner.log_message("gained blood-drunk stun immunity", LOG_ATTACK)
owner.add_stun_absorption("blooddrunk", INFINITY, 4)
owner.playsound_local(get_turf(owner), 'sound/effects/singlebeat.ogg', 40, 1, use_reverb = FALSE)
ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, BLOODDRUNK_TRAIT)
if(ishuman(owner))
var/mob/living/carbon/human/human_owner = owner
human_owner.physiology.brute_mod *= 0.1
human_owner.physiology.burn_mod *= 0.1
human_owner.physiology.tox_mod *= 0.1
human_owner.physiology.oxy_mod *= 0.1
human_owner.physiology.clone_mod *= 0.1
human_owner.physiology.stamina_mod *= 0.1
owner.add_stun_absorption(source = id, priority = 4)
owner.playsound_local(get_turf(owner), 'sound/effects/singlebeat.ogg', 40, 1, use_reverb = FALSE)
return TRUE

/datum/status_effect/blooddrunk/on_remove()
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.physiology.brute_mod *= 10
H.physiology.burn_mod *= 10
H.physiology.tox_mod *= 10
H.physiology.oxy_mod *= 10
H.physiology.clone_mod *= 10
H.physiology.stamina_mod *= 10
owner.log_message("lost blood-drunk stun immunity", LOG_ATTACK)
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, BLOODDRUNK_TRAIT);
if(islist(owner.stun_absorption) && owner.stun_absorption["blooddrunk"])
owner.stun_absorption -= "blooddrunk"
var/mob/living/carbon/human/human_owner = owner
human_owner.physiology.brute_mod *= 10
human_owner.physiology.burn_mod *= 10
human_owner.physiology.tox_mod *= 10
human_owner.physiology.oxy_mod *= 10
human_owner.physiology.clone_mod *= 10
human_owner.physiology.stamina_mod *= 10
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, BLOODDRUNK_TRAIT)
owner.remove_stun_absorption(id)

//Used by changelings to rapidly heal
//Heals 10 brute and oxygen damage every second, and 5 fire
Expand Down Expand Up @@ -486,3 +483,52 @@
name = "Nest Vitalization"
desc = "The resin seems to pulsate around you. It seems to be sustaining your vital functions. You feel ill..."
icon_state = "nest_life"

/**
* Granted to wizards upon satisfying the cheese sacrifice during grand rituals.
* Halves incoming damage and makes the owner stun immune, damage slow immune, levitating(even in space and hyperspace!) and glowing.
*/
/datum/status_effect/blessing_of_insanity
id = "blessing_of_insanity"
duration = -1
tick_interval = -1
alert_type = /atom/movable/screen/alert/status_effect/blessing_of_insanity

/atom/movable/screen/alert/status_effect/blessing_of_insanity
name = "Blessing of Insanity"
desc = "Your devotion to madness has improved your resilience to all damage and you gain the power to levitate!"
//no screen alert - the gravity already throws one

/datum/status_effect/blessing_of_insanity/on_apply()
if(ishuman(owner))
var/mob/living/carbon/human/human_owner = owner
var/datum/physiology/owner_physiology = human_owner.physiology
owner_physiology.brute_mod *= 0.5
owner_physiology.burn_mod *= 0.5
owner_physiology.tox_mod *= 0.5
owner_physiology.oxy_mod *= 0.5
owner_physiology.clone_mod *= 0.5
owner_physiology.stamina_mod *= 0.5
owner.add_filter("mad_glow", 2, list("type" = "outline", "color" = "#eed811c9", "size" = 2))
owner.AddElement(/datum/element/forced_gravity, 0)
owner.AddElement(/datum/element/simple_flying)
owner.add_stun_absorption(source = id, priority = 4)
add_traits(list(TRAIT_IGNOREDAMAGESLOWDOWN, TRAIT_FREE_HYPERSPACE_MOVEMENT), MAD_WIZARD_TRAIT)
owner.playsound_local(get_turf(owner), 'sound/chemistry/ahaha.ogg', vol = 100, vary = TRUE, use_reverb = TRUE)
return TRUE

/datum/status_effect/blessing_of_insanity/on_remove()
if(ishuman(owner))
var/mob/living/carbon/human/human_owner = owner
var/datum/physiology/owner_physiology = human_owner.physiology
owner_physiology.brute_mod *= 2
owner_physiology.burn_mod *= 2
owner_physiology.tox_mod *= 2
owner_physiology.oxy_mod *= 2
owner_physiology.clone_mod *= 2
owner_physiology.stamina_mod *= 2
owner.remove_filter("mad_glow")
owner.RemoveElement(/datum/element/forced_gravity, 0)
owner.RemoveElement(/datum/element/simple_flying)
owner.remove_stun_absorption(id)
remove_traits(list(TRAIT_IGNOREDAMAGESLOWDOWN, TRAIT_FREE_HYPERSPACE_MOVEMENT), MAD_WIZARD_TRAIT)
Loading

0 comments on commit 4c8651b

Please sign in to comment.