Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Wraith from goonstation (BUT RE-CODED AND OUR OWN SPRITES, DO NOT BE SCARED IN OOC) #4419

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define ROLE_FLORIDA_MAN "Florida Man"
#define ROLE_SLASHER "Slasher"
#define ROLE_MONSTERHUNTER "Monster Hunter"
#define ROLE_WRAITH "Wraith"

// Latejoin roles
#define ROLE_HERETIC_SMUGGLER "Heretic Smuggler"
Expand Down Expand Up @@ -160,7 +161,8 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_WIZARD_MIDROUND = 14,
//monkestation edit start
ROLE_PLAGUERAT = 0,
ROLE_CORTICAL_BORER = 0, // Module ID: CORTICAL_BORERS
ROLE_CORTICAL_BORER = 0,
ROLE_WRAITH = 0,
ROLE_DRIFTING_CONTRACTOR = 0,
ROLE_VAMPIRICACCIDENT = 0,
ROLE_MONSTERHUNTER = 0,
Expand Down
13 changes: 13 additions & 0 deletions code/__DEFINES/~monkestation/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
/// is something a worm
#define iscorticalborer(A) (istype(A, /mob/living/basic/cortical_borer))

/// is something a spookier than normal ghost
#define iswraith(A) (istype(A, /mob/living/basic/wraith))

/// Is the mob a blood brother
#define IS_BROTHER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/brother))

Expand Down Expand Up @@ -58,3 +61,13 @@

/// How much heretic Mark of Rust mark does to items
#define RUST_MARK_DAMAGE 50

// Wraith evolutions
/// Not evolved at all
#define EVOLUTION_WRAITH_NONE (1<<0)
/// Focuses on summoning creatures
#define EVOLUTION_WRAITH_HARBINGER (1<<1)
/// Focuses on making everyone very annoyed
#define EVOLUTION_WRAITH_PLAGUEBRINGER (1<<2)
/// Basically the clown path, you annoy everyone very minorly very often
#define EVOLUTION_WRAITH_TRICKSTER (1<<3)
2 changes: 2 additions & 0 deletions code/_globalvars/lists/poll_ignore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define POLL_IGNORE_CARGORILLA "cargorilla"
#define POLL_IGNORE_CONTRACTOR_SUPPORT "contractor_support"
#define POLL_IGNORE_CONSTRUCT "construct"
#define POLL_IGNORE_WRAITH "wraith" // MONKESTATION ADDITION -- WRAITH
#define POLL_IGNORE_CORTICAL_BORER "cortical_borer" // MONKESTATION ADDITION -- CORTICAL_BORERS
#define POLL_IGNORE_TERATOMA "teratoma" // MONKESTATION ADDITION -- TERATOMAS
#define POLL_IGNORE_DRONE "drone"
Expand Down Expand Up @@ -49,6 +50,7 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
POLL_IGNORE_CARGORILLA = "Cargorilla",
POLL_IGNORE_CONTRACTOR_SUPPORT = "Contractor Support Unit",
POLL_IGNORE_CONSTRUCT = "Construct",
POLL_IGNORE_WRAITH = "Wraith", // MONKESTATION ADDITION -- WRAITH
POLL_IGNORE_CORTICAL_BORER = "Cortical Borer", // MONKESTATION ADDITION -- CORTICAL_BORERS
POLL_IGNORE_TERATOMA = "Teratoma", // MONKESTATION ADDITION -- TERATOMAS
POLL_IGNORE_DRONE = "Drone shells",
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/sql_ban_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
ROLE_TRAITOR,
ROLE_VAMPIRICACCIDENT,
ROLE_WIZARD,
ROLE_WRAITH, // MONKESTATION ADDITION -- WRAITH
BAN_OPFOR,
ROLE_ASSAULT_OPERATIVE,
),
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/dead/crew_manifest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
return GLOB.always_state

/datum/crew_manifest/ui_status(mob/user, datum/ui_state/state)
return (isnewplayer(user) || isobserver(user) || isAI(user) || ispAI(user)) ? UI_INTERACTIVE : UI_CLOSE
// MONKESTATION EDIT OLD -- WRAITH
// return (isnewplayer(user) || isobserver(user) || isAI(user) || ispAI(user)) ? UI_INTERACTIVE : UI_CLOSE
// MONKESTATION EDIT NEW
return (isnewplayer(user) || isobserver(user) || iswraith(user) || isAI(user) || ispAI(user)) ? UI_INTERACTIVE : UI_CLOSE

/datum/crew_manifest/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/tgui/states/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
GLOBAL_DATUM_INIT(observer_state, /datum/ui_state/observer_state, new)

/datum/ui_state/observer_state/can_use_topic(src_object, mob/user)
if(isobserver(user))
// if(isobserver(user)) // MONKESTATION EDIT OLD -- WRAITH
if(isobserver(user) || iswraith(user)) // MONKESTATION EDIT NEW
return UI_INTERACTIVE
return UI_CLOSE

Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/datum/action/cooldown/spell/wraith
panel = "Wraith Abilities"

spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC
antimagic_flags = MAGIC_RESISTANCE_HOLY

button_icon = 'monkestation/code/modules/antagonists/wraith/icons/abilities.dmi'
background_icon_state = "bg_revenant"
overlay_icon_state = "bg_revenant_border"

/// Will we break if a non-wraith tries to use us?
var/wraith_only = FALSE
/// How much essence this spell costs to fire
var/essence_cost = 0
/// Toggles if cooldown applies to us, used for debugging
var/ignore_cooldown = FALSE

/datum/action/cooldown/spell/wraith/New()
. = ..()
name = "[name] ([essence_cost]e) [cooldown_time ? "([cooldown_time / 10]s)" : ""]"

/datum/action/cooldown/spell/wraith/can_cast_spell(feedback = TRUE)
var/mob/living/basic/wraith/true_owner = owner
if(!istype(true_owner))
if(wraith_only)
return FALSE
return TRUE // If an admin wants to give this to humans, we let them

if(true_owner.stunned)
if(feedback)
to_chat(owner, span_warning("You can't cast [src] whilst stunned!"))
return FALSE

if(true_owner.essence < essence_cost)
if(feedback)
to_chat(owner, span_warning("You are missing [essence_cost - true_owner.essence] essence to cast this spell!"))
return FALSE

return TRUE

/datum/action/cooldown/spell/wraith/before_cast(atom/cast_on)
. = ..()
if(. & SPELL_CANCEL_CAST)
return

if(!can_cast_spell())
reset_spell_cooldown()
return . | SPELL_CANCEL_CAST

/datum/action/cooldown/spell/wraith/cast(atom/cast_on)
. = ..()
var/mob/living/basic/wraith/true_owner = owner
if(istype(true_owner))
true_owner.essence -= essence_cost

/datum/action/cooldown/spell/wraith/after_cast(atom/cast_on)
. = ..()
if(ignore_cooldown)
reset_spell_cooldown()

/datum/action/cooldown/spell/pointed/wraith
panel = "Wraith Abilities"

spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC
antimagic_flags = MAGIC_RESISTANCE_HOLY

button_icon = 'monkestation/code/modules/antagonists/wraith/icons/abilities.dmi'
background_icon_state = "bg_revenant"
overlay_icon_state = "bg_revenant_border"

/// Will we break if a non-wraith tries to use us?
var/wraith_only = FALSE
/// How much essence this spell costs to fire
var/essence_cost = 0
/// Toggles if cooldown applies to us, used for debugging
var/ignore_cooldown = FALSE

/datum/action/cooldown/spell/pointed/wraith/New()
. = ..()
name = "[name] ([essence_cost]e) [cooldown_time ? "([cooldown_time / 10]s)" : ""]"

/datum/action/cooldown/spell/pointed/wraith/can_cast_spell(feedback = TRUE)
var/mob/living/basic/wraith/true_owner = owner
if(!istype(true_owner))
if(wraith_only)
return FALSE
return TRUE // If an admin wants to give this to humans, we let them

if(true_owner.stunned)
if(feedback)
to_chat(owner, span_warning("You can't cast [src] whilst stunned!"))
return FALSE

if(true_owner.essence < essence_cost)
if(feedback)
to_chat(owner, span_warning("You are missing [essence_cost - true_owner.essence] essence to cast this spell!"))
return FALSE

return TRUE

/datum/action/cooldown/spell/pointed/wraith/before_cast(atom/cast_on)
. = ..()
if(. & SPELL_CANCEL_CAST)
return

if(!can_cast_spell())
return . | SPELL_CANCEL_CAST

/datum/action/cooldown/spell/pointed/wraith/cast(atom/cast_on)
. = ..()
var/mob/living/basic/wraith/true_owner = owner
if(istype(true_owner))
true_owner.essence -= essence_cost

/datum/action/cooldown/spell/pointed/wraith/after_cast(atom/cast_on)
. = ..()
if(ignore_cooldown)
reset_spell_cooldown()
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/datum/action/cooldown/spell/pointed/wraith/absorb_corpse
name = "Absorb Corpse"
desc = "Consume a dead, not completelly decayed target's soul to permanently gain more essence regeneration."
button_icon_state = "absorb_corpse"

essence_cost = 20
cooldown_time = 45 SECONDS

/datum/action/cooldown/spell/pointed/wraith/absorb_corpse/before_cast(mob/living/carbon/human/cast_on)
. = ..()
if(!ismob(cast_on))
return . | SPELL_CANCEL_CAST

if(!istype(cast_on))
to_chat(owner, span_warning("[cast_on]'s soul is unworthy of harvest."))
return . | SPELL_CANCEL_CAST

if(cast_on.soul_sucked || !cast_on.mind)
to_chat(owner, span_warning("[cast_on] does not possess a soul!"))
return . | SPELL_CANCEL_CAST

if(cast_on.stat != DEAD)
to_chat(owner, span_warning("This human is not dead. You can't steal their soul."))
return . | SPELL_CANCEL_CAST

var/obj/item/organ/internal/heart/target_heart = cast_on.get_organ_slot(ORGAN_SLOT_HEART)
if(!target_heart || target_heart?.damage >= target_heart.maxHealth)
to_chat(owner, span_warning("This human is too decayed to have their soul harvested."))
return . | SPELL_CANCEL_CAST

/datum/action/cooldown/spell/pointed/wraith/absorb_corpse/cast(mob/living/carbon/human/cast_on)
. = ..()
if(!istype(cast_on)) // what happen
return

cast_on.soul_sucked = TRUE
cast_on.visible_message(span_warning("[cast_on] floats into the air, as they rapidly go pale!"))
animate(cast_on, 3 SECONDS, pixel_y = cast_on.pixel_y + 16)
sleep(3 SECONDS)

if(HAS_TRAIT(cast_on, TRAIT_USES_SKINTONES)) // make them deathly white, afterall they dont have a soul anymore
cast_on.skin_tone = "albino"
cast_on.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
else
var/datum/color_palette/generic_colors/located = cast_on.dna.color_palettes[/datum/color_palette/generic_colors]
located.mutant_color = "#FFFFFF"

cast_on.update_body(is_creating = TRUE)

animate(cast_on, 0.5 SECOND, pixel_y = cast_on.pixel_y - 16)
cast_on.visible_message("[cast_on] lands with a loud thud on the floor!")

to_chat(owner, span_revennotice("You successfully consumed [cast_on]'s soul!"))

cooldown_time += 15 SECONDS
var/mob/living/basic/wraith/true_owner = owner
if(istype(true_owner))
true_owner.essence_gain += 2
true_owner.eaten_corpses++
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/datum/action/cooldown/spell/pointed/wraith/animate_object
name = "Animate Object"
desc = "Animates an object to attack any nearby humans."
button_icon_state = "animate_object"

essence_cost = 100
cooldown_time = 30 SECONDS

aim_assist = FALSE

/datum/action/cooldown/spell/pointed/wraith/animate_object/before_cast(obj/item/cast_on)
. = ..()
if(!istype(cast_on) || cast_on.anchored || cast_on.density) // The wraith did not buy the machine animating DLC
. |= SPELL_CANCEL_CAST

/datum/action/cooldown/spell/pointed/wraith/animate_object/cast(obj/item/cast_on)
. = ..()
new /obj/effect/temp_visual/revenant(get_turf(cast_on))
var/mob/living/basic/wraith_spawn/animated_item/mob = new(get_turf(cast_on), cast_on)
if(istype(cast_on, /obj/item/weldingtool) || isgrenade(cast_on))
cast_on.attack_self(mob)
Loading
Loading