Bludsuckers
@@ -58,6 +58,7 @@
|
|||||||
#define ANTAG_HUD_SOULLESS 21
|
#define ANTAG_HUD_SOULLESS 21
|
||||||
#define ANTAG_HUD_CLOCKWORK 22
|
#define ANTAG_HUD_CLOCKWORK 22
|
||||||
#define ANTAG_HUD_BROTHER 23
|
#define ANTAG_HUD_BROTHER 23
|
||||||
|
#define ANTAG_HUD_BLOODSUCKER 24
|
||||||
|
|
||||||
// Notification action types
|
// Notification action types
|
||||||
#define NOTIFY_JUMP "jump"
|
#define NOTIFY_JUMP "jump"
|
||||||
|
|||||||
14
code/__DEFINES/bloodsucker.dm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Bloodsucker related antag datums
|
||||||
|
#define ANTAG_DATUM_BLOODSUCKER /datum/antagonist/bloodsucker
|
||||||
|
#define ANTAG_DATUM_VASSAL /datum/antagonist/vassal
|
||||||
|
#define ANTAG_DATUM_HUNTER /datum/antagonist/vamphunter
|
||||||
|
|
||||||
|
// BLOODSUCKER
|
||||||
|
#define BLOODSUCKER_LEVEL_TO_EMBRACE 3
|
||||||
|
#define BLOODSUCKER_FRENZY_TIME 25 // How long the vamp stays in frenzy.
|
||||||
|
#define BLOODSUCKER_FRENZY_OUT_TIME 300 // How long the vamp goes back into frenzy.
|
||||||
|
#define BLOODSUCKER_STARVE_VOLUME 5 // Amount of blood, below which a Vamp is at risk of frenzy.
|
||||||
|
|
||||||
|
#define CAT_STRUCTURE "Structures"
|
||||||
|
|
||||||
|
#define MARTIALART_HUNTER "hunter-fu"
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
#define ROLE_LAVALAND "lavaland"
|
#define ROLE_LAVALAND "lavaland"
|
||||||
#define ROLE_INTERNAL_AFFAIRS "internal affairs agent"
|
#define ROLE_INTERNAL_AFFAIRS "internal affairs agent"
|
||||||
#define ROLE_GANG "gangster"
|
#define ROLE_GANG "gangster"
|
||||||
|
#define ROLE_BLOODSUCKER "bloodsucker"
|
||||||
|
#define ROLE_MONSTERHUNTER "monster hunter"
|
||||||
|
|
||||||
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
|
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
|
||||||
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
|
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
|
||||||
@@ -60,7 +62,9 @@ GLOBAL_LIST_INIT(special_roles, list(
|
|||||||
ROLE_OVERTHROW = /datum/game_mode/overthrow,
|
ROLE_OVERTHROW = /datum/game_mode/overthrow,
|
||||||
ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs,
|
ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs,
|
||||||
ROLE_SENTIENCE,
|
ROLE_SENTIENCE,
|
||||||
ROLE_GANG = /datum/game_mode/gang
|
ROLE_GANG = /datum/game_mode/gang,
|
||||||
|
ROLE_BLOODSUCKER = /datum/game_mode/bloodsucker,
|
||||||
|
ROLE_MONSTERHUNTER
|
||||||
))
|
))
|
||||||
|
|
||||||
//Job defines for what happens when you fail to qualify for any job during job selection
|
//Job defines for what happens when you fail to qualify for any job during job selection
|
||||||
|
|||||||
@@ -126,6 +126,12 @@
|
|||||||
#define TRAIT_ABDUCTOR_TRAINING "abductor-training"
|
#define TRAIT_ABDUCTOR_TRAINING "abductor-training"
|
||||||
#define TRAIT_ABDUCTOR_SCIENTIST_TRAINING "abductor-scientist-training"
|
#define TRAIT_ABDUCTOR_SCIENTIST_TRAINING "abductor-scientist-training"
|
||||||
#define TRAIT_SURGEON "surgeon"
|
#define TRAIT_SURGEON "surgeon"
|
||||||
|
#define TRAIT_COLDBLOODED "coldblooded" // Your body is literal room temperature. Does not make you immune to the temp.
|
||||||
|
#define TRAIT_NONATURALHEAL "nonaturalheal" // Only Admins can heal you. NOTHING else does it unless it's given the god tag.
|
||||||
|
#define TRAIT_NORUNNING "norunning" // You walk!
|
||||||
|
#define TRAIT_NOMARROW "nomarrow" // You don't make blood.
|
||||||
|
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
|
||||||
|
|
||||||
|
|
||||||
//non-mob traits
|
//non-mob traits
|
||||||
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
|
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
|
||||||
@@ -216,4 +222,4 @@
|
|||||||
#define NINJA_SUIT_TRAIT "ninja-suit"
|
#define NINJA_SUIT_TRAIT "ninja-suit"
|
||||||
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
||||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||||
#define MADE_UNCLONEABLE "made-uncloneable"
|
#define MADE_UNCLONEABLE "made-uncloneable"
|
||||||
|
|||||||
@@ -349,6 +349,13 @@
|
|||||||
devilsouldisplay = new /obj/screen/devil/soul_counter
|
devilsouldisplay = new /obj/screen/devil/soul_counter
|
||||||
infodisplay += devilsouldisplay
|
infodisplay += devilsouldisplay
|
||||||
|
|
||||||
|
blood_display = new /obj/screen/bloodsucker/blood_counter // Blood Volume
|
||||||
|
infodisplay += blood_display
|
||||||
|
vamprank_display = new /obj/screen/bloodsucker/rank_counter // Vampire Rank
|
||||||
|
infodisplay += vamprank_display
|
||||||
|
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter // Sunlight
|
||||||
|
infodisplay += sunlight_display
|
||||||
|
|
||||||
zone_select = new /obj/screen/zone_sel()
|
zone_select = new /obj/screen/zone_sel()
|
||||||
zone_select.icon = ui_style
|
zone_select.icon = ui_style
|
||||||
zone_select.update_icon(mymob)
|
zone_select.update_icon(mymob)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ GLOBAL_LIST_INIT(huds, list(
|
|||||||
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
|
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
|
||||||
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
|
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
|
||||||
ANTAG_HUD_BROTHER = new/datum/atom_hud/antag/hidden(),
|
ANTAG_HUD_BROTHER = new/datum/atom_hud/antag/hidden(),
|
||||||
|
ANTAG_HUD_BLOODSUCKER = new/datum/atom_hud/antag/bloodsucker()
|
||||||
))
|
))
|
||||||
|
|
||||||
/datum/atom_hud
|
/datum/atom_hud
|
||||||
|
|||||||
294
code/game/gamemodes/bloodsucker/bloodsucker.dm
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
|
||||||
|
/datum/game_mode
|
||||||
|
var/list/datum/mind/bloodsuckers = list() // List of minds belonging to this game mode.
|
||||||
|
var/list/datum/mind/vassals = list() // List of minds that have been turned into Vassals.
|
||||||
|
var/list/datum/mind/vamphunters = list() // List of minds hunting vampires.
|
||||||
|
var/obj/effect/sunlight/bloodsucker_sunlight // Sunlight Timer. Created on first Bloodsucker assign. Destroyed on last removed Bloodsucker.
|
||||||
|
|
||||||
|
// LISTS //
|
||||||
|
var/list/vassal_allowed_antags = list(/datum/antagonist/brother, /datum/antagonist/traitor, /datum/antagonist/traitor/internal_affairs, /datum/antagonist/survivalist, \
|
||||||
|
/datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee)
|
||||||
|
// The antags you're allowed to be if turning Vassal.
|
||||||
|
|
||||||
|
/datum/game_mode/bloodsucker
|
||||||
|
name = "bloodsucker"
|
||||||
|
config_tag = "bloodsucker"
|
||||||
|
traitor_name = "Bloodsucker"
|
||||||
|
antag_flag = ROLE_BLOODSUCKER
|
||||||
|
false_report_weight = 1
|
||||||
|
restricted_jobs = list("AI","Cyborg")
|
||||||
|
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Deputy")
|
||||||
|
required_players = 0
|
||||||
|
required_enemies = 1
|
||||||
|
recommended_enemies = 4
|
||||||
|
reroll_friendly = 1
|
||||||
|
enemy_minimum_age = 7
|
||||||
|
|
||||||
|
announce_span = "danger"
|
||||||
|
announce_text = "Filthy, bloodsucking vampires are crawling around disguised as crewmembers!\n\
|
||||||
|
<span class='danger'>Bloodsuckers</span>: The crew are cattle, while you are both shepherd and slaughterhouse.\n\
|
||||||
|
<span class='notice'>Crew</span>: Put an end to the undead infestation before the station is overcome!"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Seems to be run by game ONCE, and finds all potential players to be antag.
|
||||||
|
/datum/game_mode/bloodsucker/pre_setup()
|
||||||
|
|
||||||
|
// Set Restricted Jobs
|
||||||
|
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||||
|
restricted_jobs += protected_jobs
|
||||||
|
|
||||||
|
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||||
|
restricted_jobs += "Assistant"
|
||||||
|
|
||||||
|
// Set number of Vamps
|
||||||
|
recommended_enemies = CLAMP(round(num_players()/10), 1, 6);
|
||||||
|
|
||||||
|
// Select Antags
|
||||||
|
for(var/i = 0, i < recommended_enemies, i++)
|
||||||
|
if (!antag_candidates.len)
|
||||||
|
break
|
||||||
|
var/datum/mind/bloodsucker = pick(antag_candidates)
|
||||||
|
// Can we even BE a bloodsucker?
|
||||||
|
//if (can_make_bloodsucker(bloodsucker, display_warning=FALSE))
|
||||||
|
bloodsuckers += bloodsucker
|
||||||
|
bloodsucker.restricted_roles = restricted_jobs
|
||||||
|
log_game("[bloodsucker.key] (ckey) has been selected as a Bloodsucker.")
|
||||||
|
antag_candidates.Remove(bloodsucker) // Apparently you can also write antag_candidates -= bloodsucker
|
||||||
|
|
||||||
|
// FULPSTATION: Assign Hunters (as many as monsters, plus one)
|
||||||
|
assign_monster_hunters(bloodsuckers.len, TRUE, bloodsuckers) // FULP
|
||||||
|
|
||||||
|
// Do we have enough vamps to continue?
|
||||||
|
return bloodsuckers.len >= required_enemies
|
||||||
|
|
||||||
|
|
||||||
|
// Gamemode is all done being set up. We have all our Vamps. We now pick objectives and let them know what's happening.
|
||||||
|
/datum/game_mode/bloodsucker/post_setup()
|
||||||
|
|
||||||
|
// Sunlight (Creating Bloodsuckers manually will check to create this, too)
|
||||||
|
check_start_sunlight()
|
||||||
|
|
||||||
|
// Vamps
|
||||||
|
for(var/datum/mind/bloodsucker in bloodsuckers)
|
||||||
|
// spawn() --> Run block of code but game continues on past it.
|
||||||
|
// sleep() --> Run block of code and freeze code there (including whoever called us) until it's resolved.
|
||||||
|
|
||||||
|
//Clean Bloodsucker Species (racist?)
|
||||||
|
//clean_invalid_species(bloodsucker)
|
||||||
|
// TO-DO !!!
|
||||||
|
|
||||||
|
// Add Bloodsucker Antag Datum (or remove from list on Fail)
|
||||||
|
if (!make_bloodsucker(bloodsucker))
|
||||||
|
bloodsuckers -= bloodsucker
|
||||||
|
|
||||||
|
// NOTE: Hunters are done in ..() parent proc
|
||||||
|
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
// Checking for ACTUALLY Dead Vamps
|
||||||
|
/datum/game_mode/bloodsucker/are_special_antags_dead()
|
||||||
|
// Bloodsucker not Final Dead
|
||||||
|
for(var/datum/mind/bloodsucker in bloodsuckers)
|
||||||
|
if(!bloodsucker.AmFinalDeath())
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
// Init Sunlight (called from datum_bloodsucker.on_gain(), in case game mode isn't even Bloodsucker
|
||||||
|
/datum/game_mode/proc/check_start_sunlight()
|
||||||
|
// Already Sunlight (and not about to cancel)
|
||||||
|
if (istype(bloodsucker_sunlight) && !bloodsucker_sunlight.cancel_me)
|
||||||
|
return
|
||||||
|
bloodsucker_sunlight = new ()
|
||||||
|
|
||||||
|
// End Sun (last bloodsucker removed)
|
||||||
|
/datum/game_mode/proc/check_cancel_sunlight()
|
||||||
|
// No Sunlight
|
||||||
|
if (!istype(bloodsucker_sunlight))
|
||||||
|
return
|
||||||
|
if (bloodsuckers.len <= 0)
|
||||||
|
bloodsucker_sunlight.cancel_me = TRUE
|
||||||
|
qdel(bloodsucker_sunlight)
|
||||||
|
bloodsucker_sunlight = null
|
||||||
|
|
||||||
|
/datum/game_mode/proc/is_daylight()
|
||||||
|
return istype(bloodsucker_sunlight) && bloodsucker_sunlight.amDay
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/can_make_bloodsucker(datum/mind/bloodsucker, datum/mind/creator, display_warning=TRUE) // Creator is just here so we can display fail messages to whoever is turning us.
|
||||||
|
// No Mind
|
||||||
|
if(!bloodsucker || !bloodsucker.key) // KEY is client login?
|
||||||
|
//if(creator) // REMOVED. You wouldn't see their name if there is no mind, so why say anything?
|
||||||
|
// to_chat(creator, "<span class='danger'>[bloodsucker] isn't self-aware enough to be raised as a Bloodsucker!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Current body is invalid
|
||||||
|
if(!ishuman(bloodsucker.current))// && !ismonkey(bloodsucker.current))
|
||||||
|
if(display_warning && creator)
|
||||||
|
to_chat(creator, "<span class='danger'>[bloodsucker] isn't evolved enough to be raised as a Bloodsucker!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Species Must have a HEART (Sorry Plasmabois)
|
||||||
|
var/mob/living/carbon/human/H = bloodsucker.current
|
||||||
|
if(NOBLOOD in H.dna.species.species_traits)
|
||||||
|
if(display_warning && creator)
|
||||||
|
to_chat(creator, "<span class='danger'>[bloodsucker]'s DNA isn't compatible!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Already a Non-Human Antag
|
||||||
|
if(bloodsucker.has_antag_datum(/datum/antagonist/abductor) || bloodsucker.has_antag_datum(/datum/antagonist/devil) || bloodsucker.has_antag_datum(/datum/antagonist/changeling))
|
||||||
|
return FALSE
|
||||||
|
// Already a vamp
|
||||||
|
if(bloodsucker.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
if(display_warning && creator)
|
||||||
|
to_chat(creator, "<span class='danger'>[bloodsucker] is already a Bloodsucker!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Not High Enough
|
||||||
|
if(creator)
|
||||||
|
var/datum/antagonist/bloodsucker/creator_bloodsucker = creator.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if(!istype(creator_bloodsucker) || creator_bloodsucker.vamplevel < BLOODSUCKER_LEVEL_TO_EMBRACE)
|
||||||
|
to_chat(creator, "<span class='danger'>Your blood is too thin to turn this corpse!</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/make_bloodsucker(datum/mind/bloodsucker, datum/mind/creator = null) // NOTE: This is a game_mode/proc, NOT a game_mode/bloodsucker/proc! We need to access this function despite the game mode.
|
||||||
|
if (!can_make_bloodsucker(bloodsucker))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Create Datum: Fledgling
|
||||||
|
var/datum/antagonist/bloodsucker/A
|
||||||
|
|
||||||
|
// [FLEDGLING]
|
||||||
|
if (creator)
|
||||||
|
A = new ANTAG_DATUM_BLOODSUCKER(bloodsucker)
|
||||||
|
A.creator = creator
|
||||||
|
bloodsucker.add_antag_datum(A)
|
||||||
|
// Log
|
||||||
|
message_admins("[bloodsucker] has become a Bloodsucker, and was created by [creator].")
|
||||||
|
log_admin("[bloodsucker] has become a Bloodsucker, and was created by [creator].")
|
||||||
|
|
||||||
|
// [MASTER]
|
||||||
|
else
|
||||||
|
A = bloodsucker.add_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/remove_bloodsucker(datum/mind/bloodsucker)
|
||||||
|
bloodsucker.remove_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/clean_invalid_species(datum/mind/bloodsucker)
|
||||||
|
// Only checking for Humans here
|
||||||
|
if (!ishuman(bloodsucker.current) || !bloodsucker.current.client)
|
||||||
|
return
|
||||||
|
var/am_valid = TRUE
|
||||||
|
var/mob/living/carbon/human/H = bloodsucker.current
|
||||||
|
|
||||||
|
// Check if PLASMAMAN?
|
||||||
|
if(NOBLOOD in H.dna.species.species_traits)
|
||||||
|
am_valid = FALSE
|
||||||
|
|
||||||
|
// PROBLEM:
|
||||||
|
//
|
||||||
|
// Setting species leaves clothes on. If you were a plasmaman, we need to reassign your entire outfit. Otherwise
|
||||||
|
// everyone will wonder why you're a human with Plasma clothes (jk they'll know you're antag)
|
||||||
|
|
||||||
|
// Convert to HUMAN (along with ID and PDA)
|
||||||
|
if (!am_valid)
|
||||||
|
H.set_species(/datum/species/human)
|
||||||
|
H.real_name = H.client.prefs.custom_names["human"]
|
||||||
|
if (H.wear_id)
|
||||||
|
H.wear_id.GetID().registered_name = H.real_name
|
||||||
|
H.wear_id.GetID().update_label()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/can_make_vassal(mob/living/target, datum/mind/creator, display_warning=TRUE)//, check_antag_or_loyal=FALSE)
|
||||||
|
// Not Correct Type: Abort
|
||||||
|
if (!iscarbon(target) || !creator)
|
||||||
|
return FALSE
|
||||||
|
if (target.stat > UNCONSCIOUS)
|
||||||
|
return FALSE
|
||||||
|
// Check Overdose: Am I even addicted to blood? Do I even have any in me?
|
||||||
|
//if (!target.reagents.addiction_list || !target.reagents.reagent_list)
|
||||||
|
//message_admins("DEBUG2: can_make_vassal() Abort: No reagents")
|
||||||
|
// return 0
|
||||||
|
// Check Overdose: Did my current volume go over the Overdose threshold?
|
||||||
|
//var/am_addicted = 0
|
||||||
|
//for (var/datum/reagent/blood/vampblood/blood in target.reagents.addiction_list) // overdosed is tracked in reagent_list, not addiction_list.
|
||||||
|
//message_admins("DEBUG3: can_make_vassal() Found Blood! [blood] [blood.overdose]")
|
||||||
|
//if (blood.overdosed)
|
||||||
|
// am_addicted = 1 // Blood is present in addiction? That's all we need.
|
||||||
|
// break
|
||||||
|
|
||||||
|
//if (!am_addicted)
|
||||||
|
//message_admins("DEBUG4: can_make_vassal() Abort: No Blood")
|
||||||
|
// return 0
|
||||||
|
// No Mind!
|
||||||
|
if (!target.mind || !target.mind.key)
|
||||||
|
if (display_warning)
|
||||||
|
to_chat(creator, "<span class='danger'>[target] isn't self-aware enough to be made into a Vassal.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Already MY Vassal
|
||||||
|
var/datum/antagonist/vassal/V = target.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
if (istype(V) && V.master)
|
||||||
|
if (V.master.owner == creator)
|
||||||
|
if (display_warning)
|
||||||
|
to_chat(creator, "<span class='danger'>[target] is already your loyal Vassal!</span>")
|
||||||
|
else
|
||||||
|
if (display_warning)
|
||||||
|
to_chat(creator, "<span class='danger'>[target] is the loyal Vassal of another Bloodsucker!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Already Antag or Loyal (Vamp Hunters count as antags)
|
||||||
|
if (target.mind.enslaved_to || AmInvalidAntag(target.mind)) //!VassalCheckAntagValid(target.mind, check_antag_or_loyal)) // HAS_TRAIT(target, TRAIT_MINDSHIELD, "implant") ||
|
||||||
|
if (display_warning)
|
||||||
|
to_chat(creator, "<span class='danger'>[target] resists the power of your blood to dominate their mind!</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/AmValidAntag(datum/mind/M)
|
||||||
|
// No List?
|
||||||
|
if(!islist(M.antag_datums) || M.antag_datums.len == 0)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Am I NOT an invalid Antag? NOTE: We already excluded non-antags above. Don't worry about the "No List?" check in AmInvalidIntag()
|
||||||
|
return !AmInvalidAntag(M)
|
||||||
|
|
||||||
|
/datum/game_mode/proc/AmInvalidAntag(datum/mind/M)
|
||||||
|
// No List?
|
||||||
|
if(!islist(M.antag_datums) || M.antag_datums.len == 0)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Does even ONE antag appear in this mind that isn't in the list? Then FAIL!
|
||||||
|
for(var/datum/antagonist/antag_datum in M.antag_datums)
|
||||||
|
if (!(antag_datum.type in vassal_allowed_antags)) // vassal_allowed_antags is a list stored in the game mode, above.
|
||||||
|
//message_admins("DEBUG VASSAL: Found Invalid: [antag_datum] // [antag_datum.type]")
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
//message_admins("DEBUG VASSAL: Valid Antags! (total of [M.antag_datums.len])")
|
||||||
|
// WHEN YOU DELETE THE ABOVE: Remove the 3 second timer on converting the vassal too.
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/game_mode/proc/make_vassal(mob/living/target, datum/mind/creator)
|
||||||
|
if (!can_make_vassal(target,creator))
|
||||||
|
return FALSE
|
||||||
|
// Make Vassal
|
||||||
|
var/datum/antagonist/vassal/V = new ANTAG_DATUM_VASSAL(target.mind)
|
||||||
|
var/datum/antagonist/bloodsucker/B = creator.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
V.master = B
|
||||||
|
target.mind.add_antag_datum(V, V.master.get_team())
|
||||||
|
// Update Bloodsucker Title (we're a daddy now)
|
||||||
|
B.SelectTitle(am_fledgling = FALSE) // Only works if you have no title yet.
|
||||||
|
|
||||||
|
// Log
|
||||||
|
message_admins("[target] has become a Vassal, and is enslaved to [creator].")
|
||||||
|
log_admin("[target] has become a Vassal, and is enslaved to [creator].")
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/game_mode/proc/remove_vassal(datum/mind/vassal)
|
||||||
|
vassal.remove_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
49
code/game/gamemodes/bloodsucker/hunter.dm
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Called from game mode pre_setup()
|
||||||
|
/datum/game_mode/proc/assign_monster_hunters(monster_count = 4, guaranteed_hunters = FALSE, list/datum/mind/exclude_from_hunter)
|
||||||
|
|
||||||
|
// Not all game modes GUARANTEE a hunter
|
||||||
|
if (rand(0,2) == 0) // 50% of the time, we get fewer or NO Hunters
|
||||||
|
if (!guaranteed_hunters)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
monster_count /= 2
|
||||||
|
|
||||||
|
var/list/no_hunter_jobs = list("AI","Cyborg")
|
||||||
|
|
||||||
|
// Set Restricted Jobs
|
||||||
|
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||||
|
no_hunter_jobs += list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Deputy")
|
||||||
|
|
||||||
|
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||||
|
no_hunter_jobs += "Assistant"
|
||||||
|
|
||||||
|
// Find Valid Hunters
|
||||||
|
var/list/datum/mind/hunter_candidates = get_players_for_role(ROLE_MONSTERHUNTER)
|
||||||
|
|
||||||
|
// Assign Hunters (as many as vamps, plus one)
|
||||||
|
for(var/i = 1, i < monster_count, i++) // Start at 1 so we skip Hunters if there's only one sucker.
|
||||||
|
if (!hunter_candidates.len)
|
||||||
|
break
|
||||||
|
// Assign Hunter
|
||||||
|
var/datum/mind/hunter = pick(hunter_candidates)
|
||||||
|
hunter_candidates.Remove(hunter) // Remove Either Way
|
||||||
|
// Already Antag? Skip
|
||||||
|
if (islist(exclude_from_hunter) && (locate(hunter) in exclude_from_hunter)) //if (islist(hunter.antag_datums) && hunter.antag_datums.len)
|
||||||
|
i --
|
||||||
|
continue
|
||||||
|
// NOTE:
|
||||||
|
vamphunters += hunter
|
||||||
|
hunter.restricted_roles = no_hunter_jobs
|
||||||
|
log_game("[hunter.key] (ckey) has been selected as a Hunter.")
|
||||||
|
|
||||||
|
// Called from game mode post_setup()
|
||||||
|
/datum/game_mode/proc/finalize_monster_hunters(monster_count = 4)
|
||||||
|
var/amEvil = TRUE // First hunter is always an evil boi
|
||||||
|
for(var/datum/mind/hunter in vamphunters)
|
||||||
|
var/datum/antagonist/vamphunter/A = new ANTAG_DATUM_HUNTER(hunter)
|
||||||
|
A.bad_dude = amEvil
|
||||||
|
hunter.add_antag_datum(A)
|
||||||
|
amEvil = FALSE // Every other hunter is just a boring greytider
|
||||||
@@ -409,7 +409,7 @@ SLIME SCANNER
|
|||||||
var/mob/living/carbon/human/H = C
|
var/mob/living/carbon/human/H = C
|
||||||
if(H.bleed_rate)
|
if(H.bleed_rate)
|
||||||
msg += "<span class='danger'>Subject is bleeding!</span>\n"
|
msg += "<span class='danger'>Subject is bleeding!</span>\n"
|
||||||
var/blood_percent = round((C.blood_volume / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100)
|
var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100)
|
||||||
var/blood_type = C.dna.blood_type
|
var/blood_type = C.dna.blood_type
|
||||||
if(blood_id != ("blood" || "jellyblood"))//special blood substance
|
if(blood_id != ("blood" || "jellyblood"))//special blood substance
|
||||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||||
|
|||||||
@@ -26,6 +26,9 @@
|
|||||||
if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
|
if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
|
||||||
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
|
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
|
||||||
|
|
||||||
|
if(target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
SSticker.mode.remove_vassal(target.mind)
|
||||||
|
|
||||||
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable || target.mind.has_antag_datum(/datum/antagonist/gang/boss))
|
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable || target.mind.has_antag_datum(/datum/antagonist/gang/boss))
|
||||||
if(!silent)
|
if(!silent)
|
||||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
||||||
|
|||||||
@@ -20,10 +20,9 @@
|
|||||||
return
|
return
|
||||||
if(broken || !Adjacent(user))
|
if(broken || !Adjacent(user))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
|
|
||||||
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
|
//see code/modules/mob/dead/new_player/preferences.dm at approx line 545 for comments!
|
||||||
//this is largely copypasted from there.
|
//this is largely copypasted from there.
|
||||||
|
|
||||||
|
|||||||
84
code/modules/antagonists/bloodsucker/bloodsucker_flaws.dm
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
|
||||||
|
// Getting Flaws:
|
||||||
|
//
|
||||||
|
// Killing crew
|
||||||
|
//
|
||||||
|
// Gaining ranks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// * COMPULSION * Things you must do
|
||||||
|
//
|
||||||
|
// SELECTIVE: -Gender/BloodType/Job sustains you, but others give you less.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// * WEAKNESSES * Things that may harm you
|
||||||
|
//
|
||||||
|
// LIGHTS: -Bright light nullifies the Examine benefits of Masquerade.
|
||||||
|
// -Bright lights disable your healing (including in Torpor)
|
||||||
|
//
|
||||||
|
// STAKES: -Stakes kill you immediately.
|
||||||
|
//
|
||||||
|
// PAINFUL: -Your feed victims scream, despite being unconscious.
|
||||||
|
//
|
||||||
|
// FIRE: -You only need your max health (not x2) in fire damage to die.
|
||||||
|
//
|
||||||
|
// CORPSE: -Your Masquerade turns off when unconscious or crit.
|
||||||
|
//
|
||||||
|
// FERAL: -
|
||||||
|
//
|
||||||
|
// CRAVEN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// BANES //
|
||||||
|
|
||||||
|
// These are basically small weaknesses that affect your character in certain circumstances.
|
||||||
|
// As a rule, they should be specific as to when they happen, or have only some certain
|
||||||
|
// drawback.
|
||||||
|
|
||||||
|
// (core ideas)
|
||||||
|
// SENSITIVE: You are slightly blinded by bright lights.
|
||||||
|
// DARKFRIEND: Your automatic healing is at a crawl when in bright light.
|
||||||
|
// TRADITIONAL: Every five minutes spent outside a coffin lowers your rate of automatic healing.
|
||||||
|
// CONSUMED: Every five minutes spent outside a coffin increases the rate at which your blood ticks down.
|
||||||
|
// GOURMAND: Animals and blood bags offer you no nourishment when feeding.
|
||||||
|
// DEATHMASK: You no longer fake having a heartbeat, and always show up as pale when examined.
|
||||||
|
// BESTIAL: When your blood is low, you will twitch involuntarily.
|
||||||
|
|
||||||
|
// (alternate ideas)
|
||||||
|
// STERILE: There is a high chance that turning corpses to Bloodsuckers will fail, and further attempts on them by you are impossible.
|
||||||
|
// FERAL: You're a threat to Vampire-kind: New Bloodsuckers may have an Objective to destroy you.
|
||||||
|
// UNHOLY: The Chapel, the Bible, and Holy Water set you on fire.
|
||||||
|
// PARANOID: Only your own claimed coffin counts for healing and banes.
|
||||||
|
|
||||||
|
|
||||||
|
// ON LEVEL-UP:
|
||||||
|
// Burn Damage increases
|
||||||
|
// Regen Rate increases
|
||||||
|
// Max Punch Damage increase
|
||||||
|
// Reset Level Timer
|
||||||
|
// Select Bane
|
||||||
|
|
||||||
|
|
||||||
|
// How to Burn Vamps:
|
||||||
|
// C.adjustFireLoss(20)
|
||||||
|
// C.adjust_fire_stacks(6)
|
||||||
|
// C.IgniteMob()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/AssignRandomBane()
|
||||||
|
return
|
||||||
148
code/modules/antagonists/bloodsucker/bloodsucker_integration.dm
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
// INTEGRATION: Adding Procs and Datums to existing "classes"
|
||||||
|
/mob/living/proc/AmBloodsucker(falseIfInDisguise=FALSE)
|
||||||
|
// No Datum
|
||||||
|
if (!mind || !mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/proc/HaveBloodsuckerBodyparts(var/displaymessage="") // displaymessage can be something such as "rising from death" for Torpid Sleep. givewarningto is the person receiving messages.
|
||||||
|
if (!getorganslot("heart"))
|
||||||
|
if (displaymessage != "")
|
||||||
|
to_chat(src, "<span class='warning'>Without a heart, you are incapable of [displaymessage].</span>")
|
||||||
|
return FALSE
|
||||||
|
if (!get_bodypart("head"))
|
||||||
|
if (displaymessage != "")
|
||||||
|
to_chat(src, "<span class='warning'>Without a head, you are incapable of [displaymessage].</span>")
|
||||||
|
return FALSE
|
||||||
|
if (!getorgan(/obj/item/organ/brain)) // NOTE: This is mostly just here so we can do one scan for all needed parts when creating a vamp. You probably won't be trying to use powers w/out a brain.
|
||||||
|
if (displaymessage != "")
|
||||||
|
to_chat(src, "<span class='warning'>Without a brain, you are incapable of [displaymessage].</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// GET DAMAGE
|
||||||
|
|
||||||
|
|
||||||
|
// Do NOT count the damage on prosthetics for this.
|
||||||
|
/mob/living/proc/getBruteLoss_nonProsthetic()
|
||||||
|
return getBruteLoss()
|
||||||
|
/mob/living/proc/getFireLoss_nonProsthetic()
|
||||||
|
return getFireLoss()
|
||||||
|
/mob/living/carbon/getBruteLoss_nonProsthetic()
|
||||||
|
var/amount = 0
|
||||||
|
for(var/obj/item/bodypart/BP in bodyparts)
|
||||||
|
if (BP.status < 2)
|
||||||
|
amount += BP.brute_dam
|
||||||
|
return amount
|
||||||
|
/mob/living/carbon/getFireLoss_nonProsthetic()
|
||||||
|
var/amount = 0
|
||||||
|
for(var/obj/item/bodypart/BP in bodyparts)
|
||||||
|
if (BP.status < 2)
|
||||||
|
amount += BP.burn_dam
|
||||||
|
return amount
|
||||||
|
|
||||||
|
// EXAMINING
|
||||||
|
/mob/living/carbon/human/proc/ReturnVampExamine(var/mob/viewer)
|
||||||
|
if (!mind || !viewer.mind)
|
||||||
|
return ""
|
||||||
|
// Target must be a Vamp
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (!bloodsuckerdatum)
|
||||||
|
return ""
|
||||||
|
|
||||||
|
// Viewer is Target's Vassal?
|
||||||
|
if (viewer.mind.has_antag_datum(ANTAG_DATUM_VASSAL) in bloodsuckerdatum.vassals)
|
||||||
|
var/returnString = "\[<span class='warning'><EM>This is your Master!</EM></span>\]"
|
||||||
|
var/returnIcon = "[icon2html('icons/mob/hud.dmi', world, "bloodsucker_big")]"
|
||||||
|
returnString += "\n"
|
||||||
|
return returnIcon + returnString
|
||||||
|
|
||||||
|
// Viewer not a Vamp AND not the target's vassal?
|
||||||
|
if (!viewer.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) && !(viewer in bloodsuckerdatum.vassals))
|
||||||
|
return ""
|
||||||
|
|
||||||
|
// Default String
|
||||||
|
var/returnString = "\[<span class='warning'><EM>[bloodsuckerdatum.ReturnFullName(1)]</EM></span>\]"
|
||||||
|
var/returnIcon = "[icon2html('icons/mob/hud.dmi', world, "bloodsucker_big")]"
|
||||||
|
|
||||||
|
// In Disguise (Veil)?
|
||||||
|
//if (name_override != null)
|
||||||
|
// returnString += "<span class='suicide'> ([real_name] in disguise!) </span>"
|
||||||
|
|
||||||
|
//returnString += "\n" Don't need spacers. Using . += "" in examine.dm does this on its own.
|
||||||
|
return returnIcon + returnString
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/carbon/human/proc/ReturnVassalExamine(var/mob/viewer)
|
||||||
|
if (!mind || !viewer.mind)
|
||||||
|
return ""
|
||||||
|
// Am I not even a Vassal? Then I am not marked.
|
||||||
|
var/datum/antagonist/vassal/vassaldatum = mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
if (!vassaldatum)
|
||||||
|
return ""
|
||||||
|
// Only Vassals and Bloodsuckers can recognize marks.
|
||||||
|
if (!viewer.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) && !viewer.mind.has_antag_datum(ANTAG_DATUM_VASSAL))
|
||||||
|
return ""
|
||||||
|
|
||||||
|
// Default String
|
||||||
|
var/returnString = "\[<span class='warning'>"
|
||||||
|
var/returnIcon = ""
|
||||||
|
// Am I Viewer's Vassal?
|
||||||
|
if (vassaldatum.master.owner == viewer.mind)
|
||||||
|
returnString += "This [dna.species.name] bears YOUR mark!"
|
||||||
|
returnIcon = "[icon2html('icons/mob/hud.dmi', world, "vassal_big")]"
|
||||||
|
// Am I someone ELSE'S Vassal?
|
||||||
|
else if (viewer.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
returnString += "This [dna.species.name] bears the mark of <span class='boldwarning'>[vassaldatum.master.ReturnFullName(vassaldatum.master.owner.current,1)]</span>"
|
||||||
|
returnIcon = "[icon2html('icons/mob/hud.dmi', world, "vassal_grey_big")]"
|
||||||
|
// Are you serving the same master as I am?
|
||||||
|
else if (viewer.mind.has_antag_datum(ANTAG_DATUM_VASSAL) in vassaldatum.master.vassals)
|
||||||
|
returnString += "[p_they(TRUE)] bears the mark of your Master"
|
||||||
|
returnIcon = "[icon2html('icons/mob/hud.dmi', world, "bloodsucker_big")]"
|
||||||
|
// You serve a different Master than I do.
|
||||||
|
else
|
||||||
|
returnString += "[p_they(TRUE)] bears the mark of another Bloodsucker"
|
||||||
|
returnIcon = "[icon2html('icons/mob/hud.dmi', world, "vassal_grey_big")]"
|
||||||
|
|
||||||
|
returnString += "</span>\]" // \n" Don't need spacers. Using . += "" in examine.dm does this on its own.
|
||||||
|
return returnIcon + returnString
|
||||||
|
|
||||||
|
|
||||||
|
// Am I "pale" when examined? Bloodsuckers can trick this.
|
||||||
|
/mob/living/carbon/proc/ShowAsPaleExamine()
|
||||||
|
|
||||||
|
// Normal Creatures:
|
||||||
|
if(!mind || !mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
return blood_volume < BLOOD_VOLUME_SAFE
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (bloodsuckerdatum.poweron_masquerade)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// If a Bloodsucker is malnourished, AND if his temperature matches his surroundings (aka he hasn't fed recently and looks COLD)...
|
||||||
|
return blood_volume < BLOOD_VOLUME_OKAY // && !(bodytemperature <= get_temperature() + 2)
|
||||||
|
|
||||||
|
/mob/living/carbon/human/ShowAsPaleExamine()
|
||||||
|
// Check for albino, as per human/examine.dm's check.
|
||||||
|
if (skin_tone == "albino")
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return ..() // Return vamp check
|
||||||
|
|
||||||
|
/mob/living/carbon/proc/scan_blood_volume()
|
||||||
|
// Vamps don't show up normally to scanners unless Masquerade power is on ----> scanner.dm
|
||||||
|
if (mind)
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum) && bloodsuckerdatum.poweron_masquerade)
|
||||||
|
return BLOOD_VOLUME_NORMAL
|
||||||
|
return blood_volume
|
||||||
|
|
||||||
|
/mob/living/proc/IsFrenzied()
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/mob/living/proc/StartFrenzy(inTime = 120)
|
||||||
|
set waitfor = FALSE
|
||||||
500
code/modules/antagonists/bloodsucker/bloodsucker_life.dm
Normal file
@@ -0,0 +1,500 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// TO PLUG INTO LIFE:
|
||||||
|
|
||||||
|
// Cancel BLOOD life
|
||||||
|
// Cancel METABOLISM life (or find a way to control what gets digested)
|
||||||
|
// Create COLDBLOODED trait (thermal homeostasis)
|
||||||
|
|
||||||
|
// EXAMINE
|
||||||
|
//
|
||||||
|
// Show as dead when...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/LifeTick() // Should probably run from life.dm, same as handle_changeling
|
||||||
|
set waitfor = FALSE // Don't make on_gain() wait for this function to finish. This lets this code run on the side.
|
||||||
|
|
||||||
|
var/notice_healing = FALSE
|
||||||
|
while (owner && !AmFinalDeath()) // owner.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) == src
|
||||||
|
|
||||||
|
// Deduct Blood
|
||||||
|
if (owner.current.stat == CONSCIOUS && !poweron_feed && !HAS_TRAIT(owner.current, TRAIT_DEATHCOMA) && !istype(owner.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
AddBloodVolume(-0.08) // -.15 (before tick went from 10 to 30, but we also charge more for faking life now)
|
||||||
|
|
||||||
|
// Heal
|
||||||
|
if (HandleHealing(1))
|
||||||
|
if (notice_healing == FALSE && owner.current.blood_volume > 0)
|
||||||
|
to_chat(owner, "<span class='notice'>The power of your blood begins knitting your wounds...</span>")
|
||||||
|
notice_healing = TRUE
|
||||||
|
else if (notice_healing == TRUE)
|
||||||
|
notice_healing = FALSE
|
||||||
|
|
||||||
|
// Apply Low Blood Effects
|
||||||
|
HandleStarving()
|
||||||
|
|
||||||
|
// Death
|
||||||
|
HandleDeath()
|
||||||
|
|
||||||
|
// Standard Update
|
||||||
|
update_hud()
|
||||||
|
|
||||||
|
// Daytime Sleep in Coffin
|
||||||
|
if (SSticker.mode.is_daylight() && !HAS_TRAIT_FROM(owner.current, TRAIT_DEATHCOMA, "bloodsucker"))
|
||||||
|
if(istype(owner.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
Torpor_Begin()
|
||||||
|
|
||||||
|
// Wait before next pass
|
||||||
|
sleep(10)//sleep(30)
|
||||||
|
|
||||||
|
// Free my Vassals! (if I haven't yet)
|
||||||
|
FreeAllVassals()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// BLOOD
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/AddBloodVolume(value)
|
||||||
|
owner.current.blood_volume = CLAMP(owner.current.blood_volume + value, 0, maxBloodVolume)
|
||||||
|
update_hud()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/HandleFeeding(mob/living/carbon/target, mult=1)
|
||||||
|
// mult: SILENT feed is 1/3 the amount
|
||||||
|
|
||||||
|
var/blood_taken = min(feedAmount, target.blood_volume) * mult // Starts at 15 (now 8 since we doubled the Feed time)
|
||||||
|
target.blood_volume -= blood_taken
|
||||||
|
|
||||||
|
// Simple Animals lose a LOT of blood, and take damage. This is to keep cats, cows, and so forth from giving you insane amounts of blood.
|
||||||
|
if (!ishuman(target))
|
||||||
|
target.blood_volume -= (blood_taken / max(target.mob_size, 0.1)) * 3.5 // max() to prevent divide-by-zero
|
||||||
|
target.apply_damage_type(blood_taken / 3.5) // Don't do too much damage, or else they die and provide no blood nourishment.
|
||||||
|
if (target.blood_volume <= 0)
|
||||||
|
target.blood_volume = 0
|
||||||
|
target.death(0)
|
||||||
|
|
||||||
|
///////////
|
||||||
|
// Shift Body Temp (toward Target's temp, by volume taken)
|
||||||
|
owner.current.bodytemperature = ((owner.current.blood_volume * owner.current.bodytemperature) + (blood_taken * target.bodytemperature)) / (owner.current.blood_volume + blood_taken)
|
||||||
|
// our volume * temp, + their volume * temp, / total volume
|
||||||
|
///////////
|
||||||
|
|
||||||
|
// Reduce Value Quantity
|
||||||
|
if (target.stat == DEAD) // Penalty for Dead Blood
|
||||||
|
blood_taken /= 3
|
||||||
|
if (!ishuman(target)) // Penalty for Non-Human Blood
|
||||||
|
blood_taken /= 2
|
||||||
|
//if (!iscarbon(target)) // Penalty for Animals (they're junk food)
|
||||||
|
|
||||||
|
|
||||||
|
// Apply to Volume
|
||||||
|
AddBloodVolume(blood_taken)
|
||||||
|
|
||||||
|
// Reagents (NOT Blood!)
|
||||||
|
if(target.reagents && target.reagents.total_volume)
|
||||||
|
target.reagents.reaction(owner.current, INGEST, 1 / target.reagents.total_volume) // Run Reaction: what happens when what they have mixes with what I have?
|
||||||
|
target.reagents.trans_to(owner.current, 1) // Run transfer of 1 unit of reagent from them to me.
|
||||||
|
|
||||||
|
// Blood Gulp Sound
|
||||||
|
owner.current.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/mood_event/drankblood
|
||||||
|
description = "<span class='nicegreen'>I have fed greedly from that which nourishes me.</span>\n"
|
||||||
|
mood_change = 10
|
||||||
|
timeout = 900
|
||||||
|
/datum/mood_event/drankblood_bad
|
||||||
|
description = "<span class='boldwarning'>I drank the blood of a lesser creature. Disgusting.</span>\n"
|
||||||
|
mood_change = -4
|
||||||
|
timeout = 900
|
||||||
|
/datum/mood_event/drankblood_dead
|
||||||
|
description = "<span class='boldwarning'>I drank dead blood. I am better than this.</span>\n"
|
||||||
|
mood_change = -7
|
||||||
|
timeout = 900
|
||||||
|
/datum/mood_event/drankblood_synth
|
||||||
|
description = "<span class='boldwarning'>I drank synthetic blood. What is wrong with me?</span>\n"
|
||||||
|
mood_change = -7
|
||||||
|
timeout = 900
|
||||||
|
/datum/mood_event/drankkilled
|
||||||
|
description = "<span class='boldwarning'>I drank from my victim until they died. I feel...less human.</span>\n"
|
||||||
|
mood_change = -12
|
||||||
|
timeout = 6000
|
||||||
|
/datum/mood_event/madevamp
|
||||||
|
description = "<span class='boldwarning'>A soul has been cursed to undeath by my own hand.</span>\n"
|
||||||
|
mood_change = -10
|
||||||
|
timeout = 10000
|
||||||
|
/datum/mood_event/vampatefood
|
||||||
|
description = "<span class='boldwarning'>Mortal nourishment no longer sustains me. I feel unwell.</span>\n"
|
||||||
|
mood_change = -6
|
||||||
|
timeout = 1000
|
||||||
|
/datum/mood_event/coffinsleep
|
||||||
|
description = "<span class='nicegreen'>I slept in a coffin during the day. I feel whole again.</span>\n"
|
||||||
|
mood_change = 8
|
||||||
|
timeout = 1200
|
||||||
|
/datum/mood_event/daylight_1
|
||||||
|
description = "<span class='boldwarning'>I slept poorly in a makeshift coffin during the day.</span>\n"
|
||||||
|
mood_change = -3
|
||||||
|
timeout = 1000
|
||||||
|
/datum/mood_event/daylight_2
|
||||||
|
description = "<span class='boldwarning'>I have been scorched by the unforgiving rays of the sun.</span>\n"
|
||||||
|
mood_change = -6
|
||||||
|
timeout = 1200
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// HEALING
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
//
|
||||||
|
/datum/antagonist/bloodsucker/proc/HandleHealing(mult = 1)
|
||||||
|
|
||||||
|
// NOTE: Mult of 0 is just a TEST to see if we are injured and need to go into Torpor!
|
||||||
|
// It is called from your coffin on close (by you only)
|
||||||
|
|
||||||
|
if (poweron_masquerade == TRUE || owner.current.AmStaked())
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
owner.current.adjustStaminaLoss(-5 * (regenRate * 4) * mult, 0) // Humans lose stamina damage really quickly. Vamps should heal more.
|
||||||
|
owner.current.adjustCloneLoss(-1 * (regenRate * 4) * mult, 0)
|
||||||
|
owner.current.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1 * (regenRate * 4) * mult) //adjustBrainLoss(-1 * (regenRate * 4) * mult, 0)
|
||||||
|
|
||||||
|
owner.current.setOxyLoss(0)
|
||||||
|
owner.current.setToxLoss(0)
|
||||||
|
|
||||||
|
// No Bleeding
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
H.bleed_rate = 0
|
||||||
|
|
||||||
|
// Damage Heal: Do I have damage to ANY bodypart?
|
||||||
|
if (iscarbon(owner.current))
|
||||||
|
var/mob/living/carbon/C = owner.current
|
||||||
|
var/costMult = 1 // Coffin makes it cheaper
|
||||||
|
|
||||||
|
// BURN: Heal in Coffin while Fakedeath, or when damage above maxhealth (you can never fully heal fire)
|
||||||
|
var/fireheal = 0
|
||||||
|
var/amInCoffinWhileTorpor = istype(C.loc, /obj/structure/closet/crate/coffin) && (mult == 0 || HAS_TRAIT(C, TRAIT_DEATHCOMA)) // Check for mult 0 OR death coma. (mult 0 means we're testing from coffin)
|
||||||
|
if(amInCoffinWhileTorpor)
|
||||||
|
mult *= 5 // Increase multiplier if we're sleeping in a coffin.
|
||||||
|
fireheal = min(C.getFireLoss_nonProsthetic(), regenRate) // NOTE: Burn damage ONLY heals in torpor.
|
||||||
|
costMult = 0.25
|
||||||
|
// Extinguish Fire
|
||||||
|
C.ExtinguishMob()
|
||||||
|
else
|
||||||
|
// No Blood? Lower Mult
|
||||||
|
if (owner.current.blood_volume <= 0)
|
||||||
|
mult = 0.25
|
||||||
|
// Crit from burn? Lower damage to maximum allowed.
|
||||||
|
//if (C.getFireLoss() > owner.current.getMaxHealth())
|
||||||
|
// fireheal = regenRate / 2
|
||||||
|
// BRUTE: Always Heal
|
||||||
|
var/bruteheal = min(C.getBruteLoss_nonProsthetic(), regenRate)
|
||||||
|
|
||||||
|
// Heal if Damaged
|
||||||
|
if (bruteheal + fireheal > 0)
|
||||||
|
// Just a check? Don't heal/spend, and return.
|
||||||
|
if (mult == 0)
|
||||||
|
return TRUE
|
||||||
|
// We have damage. Let's heal (one time)
|
||||||
|
C.adjustBruteLoss(-bruteheal * mult, forced=TRUE)// Heal BRUTE / BURN in random portions throughout the body.
|
||||||
|
C.adjustFireLoss(-fireheal * mult, forced=TRUE)
|
||||||
|
//C.heal_overall_damage(bruteheal * mult, fireheal * mult) // REMOVED: We need to FORCE this, because otherwise, vamps won't heal EVER. Swapped to above.
|
||||||
|
|
||||||
|
// Pay Cost
|
||||||
|
AddBloodVolume((bruteheal * -0.5 + fireheal * -1) / mult * costMult) // Costs blood to heal
|
||||||
|
|
||||||
|
// Healed! Done for this tick.
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// Limbs? (And I have no other healing)
|
||||||
|
if (amInCoffinWhileTorpor)
|
||||||
|
|
||||||
|
// Heal Missing
|
||||||
|
var/list/missing = owner.current.get_missing_limbs()
|
||||||
|
if (missing.len)
|
||||||
|
// Cycle through ALL limbs and regen them!
|
||||||
|
for (var/targetLimbZone in missing)
|
||||||
|
// 1) Find ONE Limb and regenerate it.
|
||||||
|
//var/targetLimbZone = pick(missing)
|
||||||
|
owner.current.regenerate_limb(targetLimbZone, 0) // regenerate_limbs() <--- If you want to EXCLUDE certain parts, do it like this ----> regenerate_limbs(0, list("head"))
|
||||||
|
// 2) Limb returns Damaged
|
||||||
|
var/obj/item/bodypart/L = owner.current.get_bodypart( targetLimbZone )
|
||||||
|
AddBloodVolume(20 * costMult) // Costs blood to heal
|
||||||
|
L.brute_dam = 60
|
||||||
|
to_chat(owner.current, "<span class='notice'>Your flesh knits as it regrows [L]!</span>")
|
||||||
|
playsound(owner.current, 'sound/magic/demon_consume.ogg', 50, 1)
|
||||||
|
|
||||||
|
|
||||||
|
// DONE! After regenerating ANY number of limbs, we stop here.
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/*else // REMOVED: For now, let's just leave prosthetics on. Maybe you WANT to be a robovamp.
|
||||||
|
// Remove Prosthetic/False Limb
|
||||||
|
for(var/obj/item/bodypart/BP in C.bodyparts)
|
||||||
|
message_admins("T1: [BP] ")
|
||||||
|
if (istype(BP) && BP.status == 2)
|
||||||
|
message_admins("T2: [BP] ")
|
||||||
|
BP.drop_limb()
|
||||||
|
return TRUE
|
||||||
|
// NOTE: Limbs have a "status", like their hosts "stat". 2 is dead (aka Prosthetic). 1 seems to be idle/alive.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Cure Final Disabilities
|
||||||
|
CureDisabilities()
|
||||||
|
|
||||||
|
// Remove Embedded!
|
||||||
|
C.remove_all_embedded_objects()
|
||||||
|
// Heal Organs (will respawn original eyes etc. but we replace right away, next)
|
||||||
|
owner.current.regenerate_organs()
|
||||||
|
// Eyes/Heart
|
||||||
|
CheckVampOrgans() // Heart, Eyes
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/CureDisabilities()
|
||||||
|
var/mob/living/carbon/C = owner.current
|
||||||
|
|
||||||
|
C.cure_blind(list(EYE_DAMAGE))//()
|
||||||
|
C.cure_nearsighted(EYE_DAMAGE)
|
||||||
|
C.set_blindness(0) // Added 9/2/19
|
||||||
|
C.set_blurriness(0) // Added 9/2/19
|
||||||
|
C.update_tint() // Added 9/2/19
|
||||||
|
C.update_sight() // Added 9/2/19
|
||||||
|
|
||||||
|
for(var/O in C.internal_organs) //owner.current.adjust_eye_damage(-100) // This was removed by TG
|
||||||
|
var/obj/item/organ/organ = O
|
||||||
|
organ.setOrganDamage(0)
|
||||||
|
|
||||||
|
owner.current.cure_husk()
|
||||||
|
|
||||||
|
|
||||||
|
// I am hungry!
|
||||||
|
/datum/antagonist/bloodsucker/proc/HandleStarving()
|
||||||
|
|
||||||
|
// High: Faster Healing
|
||||||
|
// Med: Pale
|
||||||
|
// Low: Twitch
|
||||||
|
// V.Low: Blur Vision
|
||||||
|
// EMPTY: Frenzy!
|
||||||
|
// BLOOD_VOLUME_GOOD: [336] Pale (handled in bloodsucker_integration.dm
|
||||||
|
// BLOOD_VOLUME_BAD: [224] Jitter
|
||||||
|
if(owner.current.blood_volume < BLOOD_VOLUME_BAD && !prob(0.5))
|
||||||
|
owner.current.Jitter(3)
|
||||||
|
// BLOOD_VOLUME_SURVIVE: [122] Blur Vision
|
||||||
|
if(owner.current.blood_volume < BLOOD_VOLUME_BAD / 2)
|
||||||
|
owner.current.blur_eyes(8 - 8 * (owner.current.blood_volume / BLOOD_VOLUME_BAD))
|
||||||
|
// Nutrition
|
||||||
|
owner.current.nutrition = min(owner.current.blood_volume, NUTRITION_LEVEL_FED) // <-- 350 //NUTRITION_LEVEL_FULL
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// DEATH
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/HandleDeath()
|
||||||
|
// FINAL DEATH
|
||||||
|
// Fire Damage? (above double health)
|
||||||
|
if (owner.current.getFireLoss_nonProsthetic() >= owner.current.getMaxHealth() * 2)
|
||||||
|
FinalDeath()
|
||||||
|
return
|
||||||
|
// Staked while "Temp Death" or Asleep
|
||||||
|
if (owner.current.StakeCanKillMe() && owner.current.AmStaked())
|
||||||
|
FinalDeath()
|
||||||
|
return
|
||||||
|
// Not "Alive"?
|
||||||
|
if (!owner.current || !isliving(owner.current) || isbrain(owner.current) || !get_turf(owner.current))
|
||||||
|
FinalDeath()
|
||||||
|
return
|
||||||
|
// Missing Brain or Heart?
|
||||||
|
if (!owner.current.HaveBloodsuckerBodyparts())
|
||||||
|
FinalDeath()
|
||||||
|
return
|
||||||
|
|
||||||
|
// Disable Powers: Masquerade * NOTE * This should happen as a FLAW!
|
||||||
|
//if (stat >= UNCONSCIOUS)
|
||||||
|
// for (var/datum/action/bloodsucker/masquerade/P in powers)
|
||||||
|
// P.Deactivate()
|
||||||
|
|
||||||
|
// TEMP DEATH
|
||||||
|
var/total_brute = owner.current.getBruteLoss_nonProsthetic()
|
||||||
|
var/total_burn = owner.current.getFireLoss_nonProsthetic()
|
||||||
|
var/total_damage = total_brute + total_burn
|
||||||
|
// Died? Convert to Torpor (fake death)
|
||||||
|
if (owner.current.stat >= DEAD)
|
||||||
|
Torpor_Begin()
|
||||||
|
to_chat(owner, "<span class='danger'>Your immortal body will not yet relinquish your soul to the abyss. You enter Torpor.</span>")
|
||||||
|
if (poweron_masquerade == TRUE)
|
||||||
|
to_chat(owner, "<span class='warning'>Your wounds will not heal until you disable the <span class='boldnotice'>Masquerade</span> power.</span>")
|
||||||
|
// End Torpor:
|
||||||
|
else // No damage, OR brute healed and NOT in coffin (since you cannot heal burn)
|
||||||
|
if (total_damage <= 0 || total_brute <= 0 && !istype(owner.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
// Not Daytime, Not in Torpor
|
||||||
|
if (!SSticker.mode.is_daylight() && HAS_TRAIT_FROM(owner.current, TRAIT_DEATHCOMA, "bloodsucker"))
|
||||||
|
Torpor_End()
|
||||||
|
// Fake Unconscious
|
||||||
|
if (poweron_masquerade == TRUE && total_damage >= owner.current.getMaxHealth() - HEALTH_THRESHOLD_FULLCRIT)
|
||||||
|
owner.current.Unconscious(20,1)
|
||||||
|
|
||||||
|
//HEALTH_THRESHOLD_CRIT 0
|
||||||
|
//HEALTH_THRESHOLD_FULLCRIT -30
|
||||||
|
//HEALTH_THRESHOLD_DEAD -100
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/Torpor_Begin(amInCoffin=FALSE)
|
||||||
|
owner.current.stat = UNCONSCIOUS
|
||||||
|
owner.current.fakedeath("bloodsucker") // Come after UNCONSCIOUS or else it fails
|
||||||
|
//owner.current.update_stat()
|
||||||
|
ADD_TRAIT(owner.current, TRAIT_NODEATH,"bloodsucker") // Without this, you'll just keep dying while you recover.
|
||||||
|
ADD_TRAIT(owner.current, TRAIT_RESISTHIGHPRESSURE,"bloodsucker") // So you can heal in 0 G. otherwise you just...heal forever.
|
||||||
|
ADD_TRAIT(owner.current, TRAIT_RESISTLOWPRESSURE,"bloodsucker") // So you can heal in 0 G. otherwise you just...heal forever.
|
||||||
|
// Visuals
|
||||||
|
owner.current.update_sight()
|
||||||
|
owner.current.reload_fullscreen()
|
||||||
|
// Disable ALL Powers
|
||||||
|
for (var/datum/action/bloodsucker/power in powers)
|
||||||
|
if (power.active && !power.can_use_in_torpor)
|
||||||
|
power.DeactivatePower()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/Torpor_End()
|
||||||
|
owner.current.stat = SOFT_CRIT
|
||||||
|
owner.current.cure_fakedeath("bloodsucker") // Come after SOFT_CRIT or else it fails
|
||||||
|
//owner.current.update_stat()
|
||||||
|
REMOVE_TRAIT(owner.current, TRAIT_NODEATH, "bloodsucker")
|
||||||
|
REMOVE_TRAIT(owner.current, TRAIT_RESISTHIGHPRESSURE, "bloodsucker") // So you can heal in 0 G. otherwise you just...heal forever.
|
||||||
|
REMOVE_TRAIT(owner.current, TRAIT_RESISTLOWPRESSURE, "bloodsucker") // So you can heal in 0 G. otherwise you just...heal forever.
|
||||||
|
to_chat(owner, "<span class='warning'>You have recovered from Torpor.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/proc/AmFinalDeath()
|
||||||
|
// Standard Antags can be dead OR final death
|
||||||
|
return owner && (owner.current && owner.current.stat >= DEAD || owner.AmFinalDeath())
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/AmFinalDeath()
|
||||||
|
return owner && owner.AmFinalDeath()
|
||||||
|
/datum/antagonist/changeling/AmFinalDeath()
|
||||||
|
return owner && owner.AmFinalDeath()
|
||||||
|
|
||||||
|
/datum/mind/proc/AmFinalDeath()
|
||||||
|
return !current || QDELETED(current) || !isliving(current) || isbrain(current) || !get_turf(current) // NOTE: "isliving()" is not the same as STAT == CONSCIOUS. This is to make sure you're not a BORG (aka silicon)
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/FinalDeath()
|
||||||
|
|
||||||
|
playsound(get_turf(owner.current), 'sound/effects/tendril_destroyed.ogg', 60, 1)
|
||||||
|
owner.current.drop_all_held_items()
|
||||||
|
owner.current.unequip_everything()
|
||||||
|
var/mob/living/carbon/C = owner.current
|
||||||
|
C.remove_all_embedded_objects()
|
||||||
|
|
||||||
|
// Make me UN-CLONEABLE
|
||||||
|
owner.current.hellbound = TRUE // This was done during creation, but let's do it again one more time...to make SURE this guy stays dead.
|
||||||
|
|
||||||
|
|
||||||
|
// Free my Vassals!
|
||||||
|
FreeAllVassals()
|
||||||
|
|
||||||
|
// Elders get Dusted
|
||||||
|
if (vamplevel >= 4) // (vamptitle)
|
||||||
|
owner.current.visible_message("<span class='warning'>[owner.current]'s skin crackles and dries, their skin and bones withering to dust. A hollow cry whips from what is now a sandy pile of remains.</span>", \
|
||||||
|
"<span class='userdanger'>Your soul escapes your withering body as the abyss welcomes you to your Final Death.</span>", \
|
||||||
|
"<span class='italics'>You hear a dry, crackling sound.</span>")
|
||||||
|
owner.current.dust()
|
||||||
|
// Fledglings get Gibbed
|
||||||
|
else
|
||||||
|
owner.current.visible_message("<span class='warning'>[owner.current]'s skin bursts forth in a spray of gore and detritus. A horrible cry echoes from what is now a wet pile of decaying meat.</span>", \
|
||||||
|
"<span class='userdanger'>Your soul escapes your withering body as the abyss welcomes you to your Final Death.</span>", \
|
||||||
|
"<span class='italics'>You hear a wet, bursting sound.</span>")
|
||||||
|
owner.current.gib()
|
||||||
|
playsound(owner.current.loc, 'sound/effects/tendril_destroyed.ogg', 40, 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// HUMAN FOOD
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/mob/proc/CheckBloodsuckerEatFood(var/food_nutrition)
|
||||||
|
if (!isliving(src))
|
||||||
|
return
|
||||||
|
var/mob/living/L = src
|
||||||
|
if (!L.AmBloodsucker())
|
||||||
|
return
|
||||||
|
// We're a vamp? Try to eat food...
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
bloodsuckerdatum.handle_eat_human_food(food_nutrition)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/handle_eat_human_food(var/food_nutrition) // Called from snacks.dm and drinks.dm
|
||||||
|
set waitfor = FALSE
|
||||||
|
|
||||||
|
if (!owner.current || !iscarbon(owner.current))
|
||||||
|
return
|
||||||
|
var/mob/living/carbon/C = owner.current
|
||||||
|
|
||||||
|
// Remove Nutrition, Give Bad Food
|
||||||
|
C.nutrition -= food_nutrition
|
||||||
|
foodInGut += food_nutrition
|
||||||
|
|
||||||
|
// Already ate some bad clams? Then we can back out, because we're already sick from it.
|
||||||
|
if (foodInGut != food_nutrition)
|
||||||
|
return
|
||||||
|
// Haven't eaten, but I'm in a Human Disguise.
|
||||||
|
else if (poweron_masquerade)
|
||||||
|
to_chat(C, "<span class='notice'>Your stomach turns, but your \"human disguise\" keeps the food down...for now.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
// Keep looping until we purge. If we have activated our Human Disguise, we ignore the food. But it'll come up eventually...
|
||||||
|
var/sickphase = 0
|
||||||
|
while (foodInGut)
|
||||||
|
|
||||||
|
sleep(50)
|
||||||
|
|
||||||
|
C.adjust_disgust(10 * sickphase)
|
||||||
|
|
||||||
|
// Wait an interval...
|
||||||
|
sleep(50 + 50 * sickphase) // At intervals of 100, 150, and 200. (10 seconds, 15 seconds, and 20 seconds)
|
||||||
|
|
||||||
|
// Died? Cancel
|
||||||
|
if (C.stat == DEAD)
|
||||||
|
return
|
||||||
|
// Put up disguise? Then hold off the vomit.
|
||||||
|
if (poweron_masquerade)
|
||||||
|
if (sickphase > 0)
|
||||||
|
to_chat(C, "<span class='notice'>Your stomach settles temporarily. You regain your composure...for now.</span>")
|
||||||
|
sickphase = 0
|
||||||
|
continue
|
||||||
|
|
||||||
|
switch(sickphase)
|
||||||
|
if (1)
|
||||||
|
to_chat(C, "<span class='warning'>You feel unwell. You can taste ash on your tongue.</span>")
|
||||||
|
C.Stun(10)
|
||||||
|
if (2)
|
||||||
|
to_chat(C, "<span class='warning'>Your stomach turns. Whatever you ate tastes of grave dirt and brimstone.</span>")
|
||||||
|
C.Dizzy(15)
|
||||||
|
C.Stun(13)
|
||||||
|
if (3)
|
||||||
|
to_chat(C, "<span class='warning'>You purge the food of the living from your viscera! You've never felt worse.</span>")
|
||||||
|
C.vomit(foodInGut * 4, foodInGut * 2, 0) // (var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1, var/toxic = 0)
|
||||||
|
C.blood_volume = max(0, C.blood_volume - foodInGut * 2)
|
||||||
|
C.Stun(30)
|
||||||
|
//C.Dizzy(50)
|
||||||
|
foodInGut = 0
|
||||||
|
|
||||||
|
sickphase ++
|
||||||
355
code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// Hide a random object somewhere on the station:
|
||||||
|
// var/turf/targetturf = get_random_station_turf()
|
||||||
|
// var/turf/targetturf = get_safe_random_station_turf()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker
|
||||||
|
martyr_compatible = TRUE
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/proc/generate_objective()
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// // PROCS // //
|
||||||
|
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/proc/return_possible_targets()
|
||||||
|
var/list/possible_targets = list()
|
||||||
|
|
||||||
|
// Look at all crew members, and for/loop through.
|
||||||
|
for(var/datum/mind/possible_target in get_crewmember_minds())
|
||||||
|
// Check One: Default Valid User
|
||||||
|
if(possible_target != owner && ishuman(possible_target.current) && possible_target.current.stat != DEAD)// && is_unique_objective(possible_target))
|
||||||
|
// Check Two: Am Bloodsucker? OR in Bloodsucker list?
|
||||||
|
if (possible_target.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) || (possible_target in SSticker.mode.bloodsuckers))
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
possible_targets += possible_target
|
||||||
|
|
||||||
|
return possible_targets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/lair
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/lair/update_explanation_text()
|
||||||
|
explanation_text = "Create a lair by claiming a coffin."// Make sure to keep it safe!"
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/lair/check_completion()
|
||||||
|
var/datum/antagonist/bloodsucker/antagdatum = owner.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (antagdatum && antagdatum.coffin && antagdatum.lair)
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Space_Station_13_areas.dm <--- all the areas
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Vassal becomes a Head, or part of a department
|
||||||
|
/datum/objective/bloodsucker/protege
|
||||||
|
|
||||||
|
// LOOKUP: /datum/crewmonitor/proc/update_data(z) for .assignment to see how to get a person's PDA.
|
||||||
|
var/list/roles = list(
|
||||||
|
"Captain",
|
||||||
|
"Head of Security",
|
||||||
|
"Head of Personnel",
|
||||||
|
"Research Director",
|
||||||
|
"Chief Engineer",
|
||||||
|
"Chief Medical Officer",
|
||||||
|
"Quartermaster"
|
||||||
|
)
|
||||||
|
var/list/departs = list(
|
||||||
|
"Head of Security",
|
||||||
|
"Research Director",
|
||||||
|
"Chief Engineer",
|
||||||
|
"Chief Medical Officer",
|
||||||
|
"Quartermaster"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
var/target_role // Equals "HEAD" when it's not a department role.
|
||||||
|
var/department_string
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/protege/generate_objective()
|
||||||
|
target_role = rand(0,2) == 0 ? "HEAD" : pick(departs)
|
||||||
|
|
||||||
|
// Heads?
|
||||||
|
if (target_role == "HEAD")
|
||||||
|
target_amount = rand(1, round(SSticker.mode.num_players() / 20))
|
||||||
|
target_amount = CLAMP(target_amount,1,3)
|
||||||
|
// Department?
|
||||||
|
else
|
||||||
|
switch(target_role)
|
||||||
|
if("Head of Security")
|
||||||
|
department_string = "Security"
|
||||||
|
if("Research Director")
|
||||||
|
department_string = "Science"
|
||||||
|
if("Chief Engineer")
|
||||||
|
department_string = "Engineering"
|
||||||
|
if("Chief Medical Officer")
|
||||||
|
department_string = "Medical"
|
||||||
|
if("Quartermaster")
|
||||||
|
department_string = "Cargo"
|
||||||
|
target_amount = rand(round(SSticker.mode.num_players() / 20), round(SSticker.mode.num_players() / 10))
|
||||||
|
target_amount = CLAMP(target_amount, 2, 4)
|
||||||
|
..()
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/protege/update_explanation_text()
|
||||||
|
if (target_role == "HEAD")
|
||||||
|
if (target_amount == 1)
|
||||||
|
explanation_text = "Guarantee a Vassal ends up as a Department Head or in a Leadership role."
|
||||||
|
else
|
||||||
|
explanation_text = "Guarantee [target_amount] Vassals end up as different Leadership or Department Heads."
|
||||||
|
else
|
||||||
|
explanation_text = "Have [target_amount] Vassal[target_amount==1?"":"s"] in the [department_string] department."
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/protege/check_completion()
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/antagdatum = owner.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (!antagdatum || antagdatum.vassals.len == 0)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Get list of all jobs that are qualified (for HEAD, this is already done)
|
||||||
|
var/list/valid_jobs
|
||||||
|
if (target_role == "HEAD")
|
||||||
|
valid_jobs = roles
|
||||||
|
else
|
||||||
|
valid_jobs = list()
|
||||||
|
var/list/alljobs = subtypesof(/datum/job) // This is just a list of TYPES, not the actual variables!
|
||||||
|
for(var/T in alljobs)
|
||||||
|
var/datum/job/J = SSjob.GetJobType(T) //
|
||||||
|
if (!istype(J))
|
||||||
|
continue
|
||||||
|
// Found a job whose Dept Head matches either list of heads, or this job IS the head
|
||||||
|
if ((target_role in J.department_head) || target_role == J.title)
|
||||||
|
valid_jobs += J.title
|
||||||
|
|
||||||
|
|
||||||
|
// Check Vassals, and see if they match
|
||||||
|
var/objcount = 0
|
||||||
|
var/list/counted_roles = list() // So you can't have more than one Captain count.
|
||||||
|
for(var/datum/antagonist/vassal/V in antagdatum.vassals)
|
||||||
|
if (!V || !V.owner) // Must exist somewhere, and as a vassal.
|
||||||
|
continue
|
||||||
|
|
||||||
|
var/thisRole = "none"
|
||||||
|
|
||||||
|
// Mind Assigned
|
||||||
|
if ((V.owner.assigned_role in valid_jobs) && !(V.owner.assigned_role in counted_roles))
|
||||||
|
//to_chat(owner, "<span class='userdanger'>PROTEGE OBJECTIVE: (MIND ROLE)</span>")
|
||||||
|
thisRole = V.owner.assigned_role
|
||||||
|
// Mob Assigned
|
||||||
|
else if ((V.owner.current.job in valid_jobs) && !(V.owner.current.job in counted_roles))
|
||||||
|
//to_chat(owner, "<span class='userdanger'>PROTEGE OBJECTIVE: (MOB JOB)</span>")
|
||||||
|
thisRole = V.owner.current.job
|
||||||
|
// PDA Assigned
|
||||||
|
else if (V.owner.current && ishuman(V.owner.current))
|
||||||
|
var/mob/living/carbon/human/H = V.owner.current
|
||||||
|
var/obj/item/card/id/I = H.wear_id ? H.wear_id.GetID() : null
|
||||||
|
if (I && (I.assignment in valid_jobs) && !(I.assignment in counted_roles))
|
||||||
|
//to_chat(owner, "<span class='userdanger'>PROTEGE OBJECTIVE: (GET ID)</span>")
|
||||||
|
thisRole = I.assignment
|
||||||
|
|
||||||
|
// NO MATCH
|
||||||
|
if (thisRole == "none")
|
||||||
|
continue
|
||||||
|
|
||||||
|
// SUCCESS!
|
||||||
|
objcount ++
|
||||||
|
if (target_role == "HEAD")
|
||||||
|
counted_roles += thisRole // Add to list so we don't count it again (but only if it's a Head)
|
||||||
|
|
||||||
|
// NOTE!!!!!!!!!!!
|
||||||
|
|
||||||
|
// Look for jobs value on mobs! This is assigned at start, but COULD be assigned from HoP?
|
||||||
|
//
|
||||||
|
// ALSO - Search through all jobs (look for prefs earlier that look for all jobs, and search through all jobs to see if their head matches the head listed, or it IS the head)
|
||||||
|
//
|
||||||
|
// ALSO - registered_account in _vending.dm for banks, and assigning new ones.
|
||||||
|
|
||||||
|
//to_chat(antagdatum.owner, "<span class='userdanger'>PROTEGE OBJECTIVE: Final Count: [objcount] of [antagdatum.vassals.len] vassals</span>")
|
||||||
|
return objcount >= target_amount
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Eat blood from a lot of people
|
||||||
|
/datum/objective/bloodsucker/gourmand
|
||||||
|
|
||||||
|
// HOW: Track each feed (if human). Count victory.
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Convert a crewmate
|
||||||
|
/datum/objective/bloodsucker/embrace
|
||||||
|
|
||||||
|
// HOW: Find crewmate. Check if person is a bloodsucker
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Defile a facility with blood
|
||||||
|
/datum/objective/bloodsucker/desecrate
|
||||||
|
|
||||||
|
// Space_Station_13_areas.dm <--- all the areas
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Destroy the Solar Arrays
|
||||||
|
/datum/objective/bloodsucker/solars
|
||||||
|
|
||||||
|
// Space_Station_13_areas.dm <--- all the areas
|
||||||
|
/datum/objective/bloodsucker/solars/update_explanation_text()
|
||||||
|
explanation_text = "Prevent all solar arrays on the station from functioning."
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/solars/check_completion()
|
||||||
|
// Sort through all /obj/machinery/power/solar_control in the station ONLY, and check that they are functioning.
|
||||||
|
// Make sure that lastgen is 0 or connected_panels.len is 0. Doesnt matter if it's tracking.
|
||||||
|
for (var/obj/machinery/power/solar_control/SC in SSsun.solars)
|
||||||
|
// Check On Station:
|
||||||
|
var/turf/T = get_turf(SC)
|
||||||
|
if(!T || !is_station_level(T.z)) // <------ Taken from NukeOp
|
||||||
|
//message_admins("DEBUG A: [SC] not on station!")
|
||||||
|
continue // Not on station! We don't care about this.
|
||||||
|
if (SC && SC.lastgen > 0 && SC.connected_panels.len > 0 && SC.connected_tracker)
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Steal hearts. You just really wanna have some hearts.
|
||||||
|
/datum/objective/bloodsucker/heartthief
|
||||||
|
// NOTE: Look up /steal in objective.dm for inspiration.
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/heartthief/generate_objective()
|
||||||
|
target_amount = rand(2,3)
|
||||||
|
|
||||||
|
update_explanation_text()
|
||||||
|
//dangerrating += target_amount * 2
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/heartthief/update_explanation_text()
|
||||||
|
explanation_text = "Steal and keep [target_amount] heart[target_amount == 1 ? "" : "s"]." // TO DO: Limit them to Human Only!
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/heartthief/check_completion()
|
||||||
|
// -Must have a body.
|
||||||
|
if (!owner.current)
|
||||||
|
return FALSE
|
||||||
|
// Taken from /steal in objective.dm
|
||||||
|
var/list/all_items = owner.current.GetAllContents() // Includes items inside other items.
|
||||||
|
var/itemcount = FALSE
|
||||||
|
for(var/obj/I in all_items) //Check for items
|
||||||
|
if(istype(I, /obj/item/organ/heart))
|
||||||
|
itemcount ++
|
||||||
|
if (itemcount >= target_amount) // Got the right amount?
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/survive
|
||||||
|
martyr_compatible = FALSE
|
||||||
|
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/survive/update_explanation_text()
|
||||||
|
explanation_text = "Survive the entire shift without succumbing to Final Death."
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/survive/check_completion()
|
||||||
|
// -Must have a body.
|
||||||
|
if (!owner.current || !isliving(owner.current))
|
||||||
|
return FALSE
|
||||||
|
// Dead, without a head or heart? Cya
|
||||||
|
return owner.current.stat != DEAD// || owner.current.HaveBloodsuckerBodyparts()
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/vamphunter
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/vamphunter/generate_objective()
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/vamphunter/update_explanation_text()
|
||||||
|
explanation_text = "Destroy all Bloodsuckers on [station_name()]."
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/vamphunter/check_completion()
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (M && M.current && M.current.stat != DEAD && get_turf(M.current))
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/monsterhunter
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/monsterhunter/generate_objective()
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/monsterhunter/update_explanation_text()
|
||||||
|
explanation_text = "Destroy all monsters on [station_name()]."
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/monsterhunter/check_completion()
|
||||||
|
var/list/datum/mind/monsters = list()
|
||||||
|
monsters += SSticker.mode.bloodsuckers
|
||||||
|
monsters += SSticker.mode.devils
|
||||||
|
monsters += SSticker.mode.cult
|
||||||
|
monsters += SSticker.mode.wizards
|
||||||
|
monsters += SSticker.mode.apprentices
|
||||||
|
//monsters += SSticker.mode.servants_of_ratvar
|
||||||
|
//monsters += SSticker.mode.changelings disabled anyways
|
||||||
|
|
||||||
|
for (var/datum/mind/M in monsters)
|
||||||
|
if (M && M != owner && M.current && M.current.stat != DEAD && get_turf(M.current))
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/datum/objective/bloodsucker/vassal
|
||||||
|
|
||||||
|
// GENERATE!
|
||||||
|
/datum/objective/bloodsucker/vassal/generate_objective()
|
||||||
|
update_explanation_text()
|
||||||
|
|
||||||
|
// EXPLANATION
|
||||||
|
/datum/objective/bloodsucker/vassal/update_explanation_text()
|
||||||
|
explanation_text = "Guarantee the success of your Master's mission!"
|
||||||
|
|
||||||
|
// WIN CONDITIONS?
|
||||||
|
/datum/objective/bloodsucker/vassal/check_completion()
|
||||||
|
var/datum/antagonist/vassal/antag_datum = owner.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
return antag_datum.master && antag_datum.master.owner && antag_datum.master.owner.current && antag_datum.master.owner.current.stat != DEAD
|
||||||
413
code/modules/antagonists/bloodsucker/bloodsucker_powers.dm
Normal file
@@ -0,0 +1,413 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker
|
||||||
|
name = "Vampiric Gift"
|
||||||
|
desc = "A vampiric gift."
|
||||||
|
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the BACKGROUND icon
|
||||||
|
background_icon_state = "vamp_power_off" //And this is the state for the background icon
|
||||||
|
var/background_icon_state_on = "vamp_power_on" // FULP: Our "ON" icon alternative.
|
||||||
|
var/background_icon_state_off = "vamp_power_off" // FULP: Our "OFF" icon alternative.
|
||||||
|
icon_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||||
|
button_icon_state = "power_feed" //And this is the state for the action icon
|
||||||
|
buttontooltipstyle = "cult"
|
||||||
|
|
||||||
|
// Action-Related
|
||||||
|
//var/amPassive = FALSE // REMOVED: Just made it its own kind. // Am I just "on" at all times? (aka NO ICON)
|
||||||
|
var/amTargetted = FALSE // Am I asked to choose a target when enabled? (Shows as toggled ON when armed)
|
||||||
|
var/amToggle = FALSE // Can I be actively turned on and off?
|
||||||
|
var/amSingleUse = FALSE // Am I removed after a single use?
|
||||||
|
var/active = FALSE
|
||||||
|
var/cooldown = 20 // 10 ticks, 1 second.
|
||||||
|
var/cooldownUntil = 0 // From action.dm: next_use_time = world.time + cooldown_time
|
||||||
|
|
||||||
|
|
||||||
|
// Power-Related
|
||||||
|
var/level_current = 0 // Can increase to yield new abilities. Each power goes up in strength each Rank.
|
||||||
|
//var/level_max = 1 //
|
||||||
|
var/bloodcost = 10
|
||||||
|
var/needs_button = TRUE // Taken from Changeling - for passive abilities that dont need a button
|
||||||
|
var/bloodsucker_can_buy = FALSE // Must be a bloodsucker to use this power.
|
||||||
|
var/warn_constant_cost = FALSE // Some powers charge you for staying on. Masquerade, Cloak, Veil, etc.
|
||||||
|
var/can_use_in_torpor = FALSE // Most powers don't function if you're in torpor.
|
||||||
|
var/must_be_capacitated = FALSE // Some powers require you to be standing and ready.
|
||||||
|
var/can_be_immobilized = FALSE // Brawn can be used when incapacitated/laying if it's because you're being immobilized. NOTE: If must_be_capacitated is FALSE, this is irrelevant.
|
||||||
|
var/can_be_staked = FALSE // Only Feed can happen with a stake in you.
|
||||||
|
var/cooldown_static = FALSE // Feed, Masquerade, and One-Shot powers don't improve their cooldown.
|
||||||
|
//var/not_bloodsucker = FALSE // This goes to Vassals or Hunters, but NOT bloodsuckers.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/New()
|
||||||
|
if (bloodcost > 0)
|
||||||
|
desc += "<br><br><b>COST:</b> [bloodcost] Blood" // Modify description to add cost.
|
||||||
|
if (warn_constant_cost)
|
||||||
|
desc += "<br><br><i>Your over-time blood consumption increases while [name] is active.</i>"
|
||||||
|
if (amSingleUse)
|
||||||
|
desc += "<br><br><i>Useable once per night.</i>"
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
// NOTES
|
||||||
|
//
|
||||||
|
// click.dm <--- Where we can take over mouse clicks
|
||||||
|
// spells.dm /add_ranged_ability() <--- How we take over the mouse click to use a power on a target.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/Trigger()
|
||||||
|
|
||||||
|
// Active? DEACTIVATE AND END!
|
||||||
|
if (active && CheckCanDeactivate(TRUE))
|
||||||
|
DeactivatePower()
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE))
|
||||||
|
return
|
||||||
|
|
||||||
|
PayCost()
|
||||||
|
|
||||||
|
if (amToggle)
|
||||||
|
active = !active
|
||||||
|
UpdateButtonIcon()
|
||||||
|
|
||||||
|
if (!amToggle || !active)
|
||||||
|
StartCooldown() // Must come AFTER UpdateButton(), otherwise icon will revert.
|
||||||
|
|
||||||
|
ActivatePower() // NOTE: ActivatePower() freezes this power in place until it ends.
|
||||||
|
|
||||||
|
if (active) // Did we not manually disable? Handle it here.
|
||||||
|
DeactivatePower()
|
||||||
|
|
||||||
|
if (amSingleUse)
|
||||||
|
RemoveAfterUse()
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/CheckCanPayCost(display_error)
|
||||||
|
if(!owner || !owner.mind)
|
||||||
|
return FALSE
|
||||||
|
// Cooldown?
|
||||||
|
if (cooldownUntil > world.time)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "[src] is unavailable. Wait [(cooldownUntil - world.time) / 10] seconds.")
|
||||||
|
return FALSE
|
||||||
|
// Have enough blood?
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if (L.blood_volume < bloodcost)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You need at least [bloodcost] blood to activate [name]</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/CheckCanUse(display_error) // These checks can be scanned every frame while a ranged power is on.
|
||||||
|
if(!owner || !owner.mind)
|
||||||
|
return FALSE
|
||||||
|
// Torpor?
|
||||||
|
if(!can_use_in_torpor && HAS_TRAIT(owner, TRAIT_DEATHCOMA))
|
||||||
|
if(display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Not while you're in Torpor.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Stake?
|
||||||
|
if(!can_be_staked && owner.AmStaked())
|
||||||
|
if(display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You have a stake in your chest! Your powers are useless.</span>")
|
||||||
|
// Incap?
|
||||||
|
if(must_be_capacitated)
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if (L.incapacitated(ignore_restraints=TRUE,ignore_grab=TRUE) || L.lying && !can_be_immobilized)
|
||||||
|
if(display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Not while you're incapacitated!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Constant Cost (out of blood)
|
||||||
|
if(warn_constant_cost)
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if(L.blood_volume <= 0)
|
||||||
|
if(display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You don't have the blood to upkeep [src].</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/StartCooldown()
|
||||||
|
set waitfor = FALSE
|
||||||
|
// Alpha Out
|
||||||
|
button.color = rgb(128,0,0,128)
|
||||||
|
button.alpha = 100
|
||||||
|
// Calculate Cooldown (by power's level)
|
||||||
|
var/this_cooldown = (cooldown_static || amSingleUse) ? cooldown : max(cooldown / 2, cooldown - (cooldown / 16 * (level_current-1)))
|
||||||
|
// NOTE: With this formula, you'll hit half cooldown at level 8 for that power.
|
||||||
|
|
||||||
|
// Wait for cooldown
|
||||||
|
cooldownUntil = world.time + this_cooldown
|
||||||
|
spawn(this_cooldown)
|
||||||
|
// Alpha In
|
||||||
|
button.color = rgb(255,255,255,255)
|
||||||
|
button.alpha = 255
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/CheckCanDeactivate(display_error)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/UpdateButtonIcon()
|
||||||
|
background_icon_state = active? background_icon_state_on : background_icon_state_off
|
||||||
|
..()//UpdateButtonIcon()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/PayCost()
|
||||||
|
// owner for actions is the mob, not mind.
|
||||||
|
var/mob/living/L = owner
|
||||||
|
L.blood_volume -= bloodcost
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/ActivatePower()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
active = FALSE
|
||||||
|
UpdateButtonIcon()
|
||||||
|
StartCooldown()
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/ContinueActive(mob/living/user, mob/living/target) // Used by loops to make sure this power can stay active.
|
||||||
|
return active && user && (!warn_constant_cost || user.blood_volume > 0)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/RemoveAfterUse()
|
||||||
|
// Un-Learn Me! (GO HOME
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum))
|
||||||
|
bloodsuckerdatum.powers -= src
|
||||||
|
Remove(owner)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/proc/Upgrade()
|
||||||
|
level_current ++
|
||||||
|
|
||||||
|
/////////////////////////////////// PASSIVE POWERS ///////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// New Type: Passive (Always on, no button)
|
||||||
|
/datum/action/bloodsucker/passive
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/passive/New()
|
||||||
|
// REMOVED: DO NOTHBING!
|
||||||
|
..()
|
||||||
|
// Don't Display Button! (it doesn't do anything anyhow)
|
||||||
|
button.screen_loc = DEFAULT_BLOODSPELLS
|
||||||
|
button.moved = DEFAULT_BLOODSPELLS
|
||||||
|
button.ordered = FALSE
|
||||||
|
/datum/action/bloodsucker/passive/Destroy()
|
||||||
|
if(owner)
|
||||||
|
Remove(owner)
|
||||||
|
target = null
|
||||||
|
|
||||||
|
/////////////////////////////////// TARGETTED POWERS ///////////////////////////////////
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted
|
||||||
|
// NOTE: All Targeted spells are Toggles! We just don't bother checking here.
|
||||||
|
var/target_range = 99
|
||||||
|
var/message_Trigger = "Select a target."
|
||||||
|
var/obj/effect/proc_holder/bloodsucker/bs_proc_holder
|
||||||
|
var/power_activates_immediately = TRUE // Most powers happen the moment you click. Some, like Mesmerize, require time and shouldn't cost you if they fail.
|
||||||
|
|
||||||
|
var/power_in_use = FALSE // Is this power LOCKED due to being used?
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/New(Target)
|
||||||
|
desc += "<br>\[<i>Targeted Power</i>\]" // Modify description to add notice that this is aimed.
|
||||||
|
..()
|
||||||
|
// Create Proc Holder for intercepting clicks
|
||||||
|
bs_proc_holder = new ()
|
||||||
|
bs_proc_holder.linked_power = src
|
||||||
|
|
||||||
|
// Click power: Begin Aim
|
||||||
|
/datum/action/bloodsucker/targeted/Trigger()
|
||||||
|
|
||||||
|
if (active && CheckCanDeactivate(TRUE))
|
||||||
|
DeactivateRangedAbility()
|
||||||
|
DeactivatePower()
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE))
|
||||||
|
return
|
||||||
|
|
||||||
|
active = !active
|
||||||
|
UpdateButtonIcon()
|
||||||
|
|
||||||
|
// Create & Link Targeting Proc
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if (L.ranged_ability)
|
||||||
|
L.ranged_ability.remove_ranged_ability()
|
||||||
|
bs_proc_holder.add_ranged_ability(L)
|
||||||
|
|
||||||
|
if (message_Trigger != "")
|
||||||
|
to_chat(owner, "<span class='announce'>[message_Trigger]</span>")
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/CheckCanUse(display_error)
|
||||||
|
if (!..())
|
||||||
|
return FALSE
|
||||||
|
if (!owner.client) // <--- We don't allow non client usage so that using powers like mesmerize will FAIL if you try to use them as ghost. Why? because ranged_abvility in spell.dm
|
||||||
|
return FALSE // doesn't let you remove powers if you're not there. So, let's just cancel the power entirely.
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
// Don't run ..(), we don't want to engage the cooldown until we USE this power!
|
||||||
|
active = FALSE
|
||||||
|
UpdateButtonIcon()
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/proc/DeactivateRangedAbility()
|
||||||
|
// Only Turned off when CLICK is disabled...aka, when you successfully clicked (or
|
||||||
|
bs_proc_holder.remove_ranged_ability()
|
||||||
|
//qdel(bs_proc_holder)
|
||||||
|
|
||||||
|
// Check if target is VALID (wall, turf, or character?)
|
||||||
|
/datum/action/bloodsucker/targeted/proc/CheckValidTarget(atom/A)
|
||||||
|
return FALSE // FALSE targets nothing.
|
||||||
|
|
||||||
|
// Check if valid target meets conditions
|
||||||
|
/datum/action/bloodsucker/targeted/proc/CheckCanTarget(atom/A, display_error)
|
||||||
|
// Out of Range
|
||||||
|
if(!(A in view(target_range, owner)))
|
||||||
|
if(display_error && target_range > 1) // Only warn for range if it's greater than 1. Brawn doesn't need to announce itself.
|
||||||
|
to_chat(owner, "<span class='warning'>Your target is out of range.</span>")
|
||||||
|
return FALSE
|
||||||
|
return istype(A)
|
||||||
|
|
||||||
|
// Click Target
|
||||||
|
/datum/action/bloodsucker/targeted/proc/ClickWithPower(atom/A)
|
||||||
|
// CANCEL RANGED TARGET check
|
||||||
|
if (power_in_use || !CheckValidTarget(A))
|
||||||
|
return FALSE
|
||||||
|
// Valid? (return true means DON'T cancel power!)
|
||||||
|
if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE) || !CheckCanTarget(A, TRUE))
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// Skip this part so we can return TRUE right away.
|
||||||
|
if (power_activates_immediately)
|
||||||
|
PowerActivatedSuccessfully() // Mesmerize pays only after success.
|
||||||
|
|
||||||
|
power_in_use = TRUE // Lock us into this ability until it successfully fires off. Otherwise, we pay the blood even if we fail.
|
||||||
|
FireTargetedPower(A) // We use this instead of ActivatePower(), which has no input
|
||||||
|
power_in_use = FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/proc/FireTargetedPower(atom/A)
|
||||||
|
// Like ActivatePower, but specific to Targeted (and takes an atom input). We don't use ActivatePower for targeted.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/proc/PowerActivatedSuccessfully()
|
||||||
|
// The power went off! We now pay the cost of the power.
|
||||||
|
|
||||||
|
PayCost()
|
||||||
|
DeactivateRangedAbility()
|
||||||
|
DeactivatePower()
|
||||||
|
StartCooldown() // Do AFTER UpdateIcon() inside of DeactivatePower. Otherwise icon just gets wiped.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/ContinueActive(mob/living/user, mob/living/target) // Used by loops to make sure this power can stay active.
|
||||||
|
return ..() // active// && user.mind && user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Target Proc Holder
|
||||||
|
/obj/effect/proc_holder/bloodsucker
|
||||||
|
var/datum/action/bloodsucker/targeted/linked_power
|
||||||
|
|
||||||
|
/obj/effect/proc_holder/bloodsucker/remove_ranged_ability(msg)
|
||||||
|
..()
|
||||||
|
linked_power.DeactivatePower()
|
||||||
|
//qdel(src)
|
||||||
|
|
||||||
|
/obj/effect/proc_holder/bloodsucker/InterceptClickOn(mob/living/caller, params, atom/A)
|
||||||
|
return linked_power.ClickWithPower(A)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// P O W E R S
|
||||||
|
// * BLOOD
|
||||||
|
// ADDICTIVE: A) Your blood is dangerously addictive, and causes consumers to rendew their own blood at an increased rate (as well as heal). B) Vassals on your blood get special gifts.
|
||||||
|
//
|
||||||
|
// * HASTE
|
||||||
|
// SPRINT: A) Hastily speed in a direction faster than the eye can see. B) Spin and dizzy people you pass. C) Chance to knock down people you pass.
|
||||||
|
// LUNGE: Leap toward a location and put your target into an agressive hold.
|
||||||
|
//
|
||||||
|
// * AGILITY
|
||||||
|
// CELERITY: Dodge projectiles and even bullets. Perhaps avoid explosions!
|
||||||
|
// REFLEXES TRAIT_NOSLIPWATER, TRAIT_NOSLIPALL
|
||||||
|
//
|
||||||
|
// * STEALTH
|
||||||
|
// CLOAK: A) Vanish into the shadows when stationary. B) Moving does not break your current level of invisibility (but stops you from hiding further).
|
||||||
|
// DISGUISE: A) Bear the face and voice of a new person. B) Bear a random outfit of an unknown profession.
|
||||||
|
//
|
||||||
|
// * FEED
|
||||||
|
// A) Mute victim while Feeding (and slowly deal Stamina damage) B) Paralyze victim while feeding C) Sleep victim while Feeding
|
||||||
|
//
|
||||||
|
// * MEZMERIZE
|
||||||
|
// LOVE: Target falls in love with you. Being harmed directly causes them harm if they see it?
|
||||||
|
// STAY: Target will do everything they can to stand in the same place.
|
||||||
|
// FOLLOW: Target follows you, spouting random phrases from their history (or maybe Poly's or NPC's vocab?)
|
||||||
|
// ATTACK: Target finds a nearby non-Bloodsucker victim to attack.
|
||||||
|
//
|
||||||
|
// * EXPEL
|
||||||
|
// TAINT: Mark areas with your corrupting blood. Your coffin must remain in an area so marked to gain any benefit. Spiders, roaches, and rats will infest the area, cobwebs grow rapidly, and trespassers are overcome with fear.
|
||||||
|
// SERVITUDE: Your blood binds a mortal to your will. Vassals feel your pain and can locate you anywhere. Your death causes them agony.
|
||||||
|
// HEIR: Raise a moral corpse into a Bloodsucker. The change will take a while, and the body must be brought to a tainted coffin to rise.
|
||||||
|
//
|
||||||
|
// * NIGHTMARE
|
||||||
|
// BOGEYMAN: Terrify those who view you in your death-form, causing them to shake, pale, and drop possessions.
|
||||||
|
// HORROR: Horrified characters cannot speak, shake, and slowly push away from the source.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* POWERS: VERSION TWO
|
||||||
|
|
||||||
|
* FEED
|
||||||
|
1: Paralyze
|
||||||
|
2: Unconscious
|
||||||
|
3: Sleep
|
||||||
|
|
||||||
|
* LUNGE
|
||||||
|
1: Grab: Aggressive
|
||||||
|
2: Grab from Behind: Neck
|
||||||
|
3: Grab from Darkness: Neck
|
||||||
|
|
||||||
|
* CLOAK
|
||||||
|
1: Hide
|
||||||
|
2: Move
|
||||||
|
3: Full Speed
|
||||||
|
|
||||||
|
* MESMERIZE
|
||||||
|
1: Stay
|
||||||
|
2: Mute
|
||||||
|
3: Follow + Blind
|
||||||
|
|
||||||
|
* BRAWN
|
||||||
|
1: Punch Hard
|
||||||
|
2: Open Doors and Lockers
|
||||||
|
3:
|
||||||
|
|
||||||
|
* HASTE
|
||||||
|
1: Speed to location
|
||||||
|
2: Dodge Bullets
|
||||||
|
3:
|
||||||
|
|
||||||
|
* VEIL
|
||||||
|
1:
|
||||||
|
2:
|
||||||
|
3:
|
||||||
|
|
||||||
|
* FORTITUDE
|
||||||
|
1: Break Bonds and Grapples
|
||||||
|
2:
|
||||||
|
3: Immune to Brute Damage
|
||||||
|
|
||||||
|
* DEMENT
|
||||||
|
1: Shuffle Names
|
||||||
|
2:
|
||||||
|
3:
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
198
code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
#define TIME_BLOODSUCKER_NIGHT 1080 // 12 minutes
|
||||||
|
#define TIME_BLOODSUCKER_DAY_WARN 90 // 1.5 minutes
|
||||||
|
#define TIME_BLOODSUCKER_DAY_FINAL_WARN 25 // 25 sec
|
||||||
|
#define TIME_BLOODSUCKER_DAY 60 // 1.5 minutes // 10 is a second, 600 is a minute.
|
||||||
|
#define TIME_BLOODSUCKER_BURN_INTERVAL 40 // 4 sec
|
||||||
|
|
||||||
|
|
||||||
|
// Over Time, tick down toward a "Solar Flare" of UV buffeting the station. This period is harmful to vamps.
|
||||||
|
/obj/effect/sunlight
|
||||||
|
//var/amDay = FALSE
|
||||||
|
var/cancel_me = FALSE
|
||||||
|
var/amDay = FALSE
|
||||||
|
var/time_til_cycle = 0
|
||||||
|
|
||||||
|
/obj/effect/sunlight/Initialize()
|
||||||
|
countdown()
|
||||||
|
hud_tick()
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/countdown()
|
||||||
|
set waitfor = FALSE
|
||||||
|
|
||||||
|
while(!cancel_me)
|
||||||
|
|
||||||
|
time_til_cycle = TIME_BLOODSUCKER_NIGHT
|
||||||
|
|
||||||
|
// Part 1: Night (all is well)
|
||||||
|
while (time_til_cycle > TIME_BLOODSUCKER_DAY_WARN)
|
||||||
|
sleep(10)
|
||||||
|
if (cancel_me)
|
||||||
|
return
|
||||||
|
//sleep(TIME_BLOODSUCKER_NIGHT - TIME_BLOODSUCKER_DAY_WARN)
|
||||||
|
warn_daylight(1,"<span class = 'danger'>Solar Flares will bombard the station with dangerous UV in [TIME_BLOODSUCKER_DAY_WARN / 60] minutes. <b>Prepare to seek cover in a coffin or closet.</b></span>") // time2text <-- use Help On
|
||||||
|
give_home_power() // Give VANISHING ACT power to all vamps with a lair!
|
||||||
|
|
||||||
|
// Part 2: Night Ending
|
||||||
|
while (time_til_cycle > TIME_BLOODSUCKER_DAY_FINAL_WARN)
|
||||||
|
sleep(10)
|
||||||
|
if (cancel_me)
|
||||||
|
return
|
||||||
|
//sleep(TIME_BLOODSUCKER_DAY_WARN - TIME_BLOODSUCKER_DAY_FINAL_WARN)
|
||||||
|
message_admins("BLOODSUCKER NOTICE: Daylight beginning in [TIME_BLOODSUCKER_DAY_FINAL_WARN] seconds.)")
|
||||||
|
warn_daylight(2,"<span class = 'userdanger'>Solar Flares are about to bombard the station! You have [TIME_BLOODSUCKER_DAY_FINAL_WARN] seconds to find cover!</span>",\
|
||||||
|
"<span class = 'danger'>In [TIME_BLOODSUCKER_DAY_FINAL_WARN / 10], your master will be at risk of a Solar Flare. Make sure they find cover!</span>")
|
||||||
|
|
||||||
|
// (FINAL LIL WARNING)
|
||||||
|
while (time_til_cycle > 5)
|
||||||
|
sleep(10)
|
||||||
|
if (cancel_me)
|
||||||
|
return
|
||||||
|
//sleep(TIME_BLOODSUCKER_DAY_FINAL_WARN - 50)
|
||||||
|
warn_daylight(3,"<span class = 'userdanger'>Seek cover, for Sol rises!</span>")
|
||||||
|
|
||||||
|
// Part 3: Night Ending
|
||||||
|
while (time_til_cycle > 0)
|
||||||
|
sleep(10)
|
||||||
|
if (cancel_me)
|
||||||
|
return
|
||||||
|
//sleep(50)
|
||||||
|
warn_daylight(4,"<span class = 'userdanger'>Solar flares bombard the station with deadly UV light!</span><br><span class = ''>Stay in cover for the next [TIME_BLOODSUCKER_DAY / 60] minutes or risk Final Death!</span>",\
|
||||||
|
"<span class = 'danger'>Solar flares bombard the station with UV light!</span>")
|
||||||
|
|
||||||
|
// Part 4: Day
|
||||||
|
amDay = TRUE
|
||||||
|
message_admins("BLOODSUCKER NOTICE: Daylight Beginning (Lasts for [TIME_BLOODSUCKER_DAY / 60] minutes.)")
|
||||||
|
time_til_cycle = TIME_BLOODSUCKER_DAY
|
||||||
|
sleep(10) // One second grace period.
|
||||||
|
//var/daylight_time = TIME_BLOODSUCKER_DAY
|
||||||
|
var/issued_XP = FALSE
|
||||||
|
while(time_til_cycle > 0)
|
||||||
|
punish_vamps()
|
||||||
|
sleep(TIME_BLOODSUCKER_BURN_INTERVAL)
|
||||||
|
if (cancel_me)
|
||||||
|
return
|
||||||
|
//daylight_time -= TIME_BLOODSUCKER_BURN_INTERVAL
|
||||||
|
// Issue Level Up!
|
||||||
|
if (!issued_XP && time_til_cycle <= 15)
|
||||||
|
issued_XP = TRUE
|
||||||
|
vamps_rank_up()
|
||||||
|
|
||||||
|
warn_daylight(5,"<span class = 'announce'>The solar flare has ended, and the daylight danger has passed...for now.</span>",\
|
||||||
|
"<span class = 'announce'>The solar flare has ended, and the daylight danger has passed...for now.</span>")
|
||||||
|
amDay = FALSE
|
||||||
|
day_end() // Remove VANISHING ACT power from all vamps who have it! Clear Warnings (sunlight, locker protection)
|
||||||
|
message_admins("BLOODSUCKER NOTICE: Daylight Ended. Resetting to Night (Lasts for [TIME_BLOODSUCKER_NIGHT / 60] minutes.)")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/hud_tick()
|
||||||
|
set waitfor = FALSE
|
||||||
|
|
||||||
|
while(!cancel_me)
|
||||||
|
|
||||||
|
// Update all Bloodsucker sunlight huds
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M) || !istype(M.current))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum))
|
||||||
|
bloodsuckerdatum.update_sunlight(max(0, time_til_cycle), amDay) // This pings all HUDs
|
||||||
|
|
||||||
|
sleep(10)
|
||||||
|
time_til_cycle --
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/warn_daylight(danger_level=0, vampwarn = "", vassalwarn = "")
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M))
|
||||||
|
continue
|
||||||
|
to_chat(M,vampwarn)
|
||||||
|
if (M.current)
|
||||||
|
if (danger_level == 1)
|
||||||
|
M.current.playsound_local(null, 'sound/chatter/griffin_3.ogg', 50 + danger_level, 1)
|
||||||
|
else if (danger_level == 2)
|
||||||
|
M.current.playsound_local(null, 'sound/chatter/griffin_5.ogg', 50 + danger_level, 1)
|
||||||
|
else if (danger_level == 3)
|
||||||
|
M.current.playsound_local(null, 'sound/effects/alert.ogg', 75, 1)
|
||||||
|
else if (danger_level == 4)
|
||||||
|
M.current.playsound_local(null, 'sound/ambience/ambimystery.ogg', 100, 1)
|
||||||
|
else if (danger_level == 5)
|
||||||
|
M.current.playsound_local(null, 'sound/spookoween/ghosty_wind.ogg', 90, 1)
|
||||||
|
|
||||||
|
if (vassalwarn != "")
|
||||||
|
for (var/datum/mind/M in SSticker.mode.vassals)
|
||||||
|
if (!istype(M))
|
||||||
|
continue
|
||||||
|
to_chat(M,vassalwarn)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/punish_vamps()
|
||||||
|
// Cycle through all vamp antags and check if they're inside a closet.
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M) || !istype(M.current))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (!istype(bloodsuckerdatum))
|
||||||
|
continue
|
||||||
|
// Closets offer SOME protection
|
||||||
|
if (istype(M.current.loc, /obj/structure))
|
||||||
|
// Coffins offer the BEST protection
|
||||||
|
if (istype(M.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
SEND_SIGNAL(M.current, COMSIG_ADD_MOOD_EVENT, "vampsleep", /datum/mood_event/coffinsleep)
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
if (!bloodsuckerdatum.warn_sun_locker)
|
||||||
|
to_chat(M, "<span class='warning'>Your skin sizzles. The [M.current.loc] doesn't protect well against UV bombardment.</span>")
|
||||||
|
bloodsuckerdatum.warn_sun_locker = TRUE
|
||||||
|
M.current.adjustFireLoss(0.5 + bloodsuckerdatum.vamplevel / 2) // M.current.fireloss += 0.5 + bloodsuckerdatum.vamplevel / 2 // Do DIRECT damage. Being spaced was causing this to not occur. setFireLoss(bloodsuckerdatum.vamplevel)
|
||||||
|
M.current.updatehealth()
|
||||||
|
SEND_SIGNAL(M.current, COMSIG_ADD_MOOD_EVENT, "vampsleep", /datum/mood_event/daylight_1)
|
||||||
|
// Out in the Open? Buh Bye
|
||||||
|
else
|
||||||
|
if (!bloodsuckerdatum.warn_sun_burn)
|
||||||
|
if (bloodsuckerdatum.vamplevel > 0)
|
||||||
|
to_chat(M, "<span class='userdanger'>The solar flare sets your skin ablaze!</span>")
|
||||||
|
else
|
||||||
|
to_chat(M, "<span class='userdanger'>The solar flare scalds your neophyte skin!</span>")
|
||||||
|
bloodsuckerdatum.warn_sun_burn = TRUE
|
||||||
|
if (M.current.fire_stacks <= 0)
|
||||||
|
M.current.fire_stacks = 0
|
||||||
|
if (bloodsuckerdatum.vamplevel > 0)
|
||||||
|
M.current.adjust_fire_stacks(0.2 + bloodsuckerdatum.vamplevel / 10)
|
||||||
|
M.current.IgniteMob()
|
||||||
|
M.current.adjustFireLoss(2 + bloodsuckerdatum.vamplevel) // M.current.fireloss += 2 + bloodsuckerdatum.vamplevel // Do DIRECT damage. Being spaced was causing this to not occur. //setFireLoss(2 + bloodsuckerdatum.vamplevel)
|
||||||
|
M.current.updatehealth()
|
||||||
|
SEND_SIGNAL(M.current, COMSIG_ADD_MOOD_EVENT, "vampsleep", /datum/mood_event/daylight_2)
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/day_end()
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M) || !istype(M.current))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (!istype(bloodsuckerdatum))
|
||||||
|
continue
|
||||||
|
// Reset Warnings
|
||||||
|
bloodsuckerdatum.warn_sun_locker = FALSE
|
||||||
|
bloodsuckerdatum.warn_sun_burn = FALSE
|
||||||
|
// Remove Dawn Powers
|
||||||
|
for(var/datum/action/bloodsucker/P in bloodsuckerdatum.powers)
|
||||||
|
if (istype(P, /datum/action/bloodsucker/gohome))
|
||||||
|
bloodsuckerdatum.powers -= P
|
||||||
|
P.Remove(M.current)
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/vamps_rank_up()
|
||||||
|
set waitfor = FALSE
|
||||||
|
// Cycle through all vamp antags and check if they're inside a closet.
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M) || !istype(M.current))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum))
|
||||||
|
bloodsuckerdatum.RankUp() // Rank up! Must still be in a coffin to level!
|
||||||
|
|
||||||
|
/obj/effect/sunlight/proc/give_home_power()
|
||||||
|
// It's late...! Give the "Vanishing Act" gohome power to bloodsuckers.
|
||||||
|
for (var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!istype(M) || !istype(M.current))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum) && bloodsuckerdatum.lair && !(locate(/datum/action/bloodsucker/gohome) in bloodsuckerdatum.powers))
|
||||||
|
bloodsuckerdatum.BuyPower(new /datum/action/bloodsucker/gohome)
|
||||||
116
code/modules/antagonists/bloodsucker/bloodsucker_ui.dm
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// For all things visual, such as leveling up
|
||||||
|
|
||||||
|
|
||||||
|
// Look up: _vending.dm proc/ui_interact()
|
||||||
|
// Malf_Modules.dm proc/use()
|
||||||
|
|
||||||
|
/*
|
||||||
|
/datum/antagonist/bloodsucker/proc/LevelUpMenu()
|
||||||
|
var/list/dat = list()
|
||||||
|
|
||||||
|
dat += "<h3>You have become more ancient.<BR>Direct the path of your blood</h3>"
|
||||||
|
dat += "<HR>"
|
||||||
|
|
||||||
|
// Step One: Decide powers you CAN buy.
|
||||||
|
for(var/pickedpower in typesof(/datum/action/bloodsucker))
|
||||||
|
var/obj/effect/proc_holder/spell/bloodsucker/power = pickedpower
|
||||||
|
// NAME
|
||||||
|
dat += "<A href='byond://?src=[REF(src)];[module.mod_pick_name]=1'>[power.name]</A>"
|
||||||
|
// COST
|
||||||
|
dat += "<td align='right'><b>[power.name] </b><a href='byond://?src=[REF(src)];vend=[REF(R)]'>Vend</a></td>"
|
||||||
|
dat == "<BR>"
|
||||||
|
|
||||||
|
var/datum/browser/popup = new(owner.current, "bloodsuckerrank", "Bloodsucker Rank Up")
|
||||||
|
popup.set_content(dat.Join())
|
||||||
|
popup.open()
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/Topic(href, href_list)
|
||||||
|
if(..())
|
||||||
|
return
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// From browser.dm: /datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
var/list/dat = list()
|
||||||
|
dat += "<B>Select use of processing time: (currently #[processing_time] left.)</B><BR>"
|
||||||
|
dat += "<HR>"
|
||||||
|
dat += "<B>Install Module:</B><BR>"
|
||||||
|
dat += "<I>The number afterwards is the amount of processing time it consumes.</I><BR>"
|
||||||
|
for(var/datum/AI_Module/large/module in possible_modules)
|
||||||
|
dat += "<A href='byond://?src=[REF(src)];[module.mod_pick_name]=1'>[module.module_name]</A><A href='byond://?src=[REF(src)];showdesc=[module.mod_pick_name]'>\[?\]</A> ([module.cost])<BR>"
|
||||||
|
for(var/datum/AI_Module/small/module in possible_modules)
|
||||||
|
dat += "<A href='byond://?src=[REF(src)];[module.mod_pick_name]=1'>[module.module_name]</A><A href='byond://?src=[REF(src)];showdesc=[module.mod_pick_name]'>\[?\]</A> ([module.cost])<BR>"
|
||||||
|
dat += "<HR>"
|
||||||
|
if(temp)
|
||||||
|
dat += "[temp]"
|
||||||
|
var/datum/browser/popup = new(user, "modpicker", "Malf Module Menu")
|
||||||
|
popup.set_content(dat.Join())
|
||||||
|
popup.open()
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
var/dat = ""
|
||||||
|
var/datum/bank_account/account
|
||||||
|
var/mob/living/carbon/human/H
|
||||||
|
var/obj/item/card/id/C
|
||||||
|
if(ishuman(user))
|
||||||
|
H = user
|
||||||
|
C = H.get_idcard(TRUE)
|
||||||
|
|
||||||
|
if(!C)
|
||||||
|
dat += "<font color = 'red'><h3>No ID Card detected!</h3></font>"
|
||||||
|
else if (!C.registered_account)
|
||||||
|
dat += "<font color = 'red'><h3>No account on registered ID card!</h3></font>"
|
||||||
|
if(onstation && C && C.registered_account)
|
||||||
|
account = C.registered_account
|
||||||
|
dat += "<h3>Select an item</h3>"
|
||||||
|
dat += "<div class='statusDisplay'>"
|
||||||
|
if(!product_records.len)
|
||||||
|
dat += "<font color = 'red'>No product loaded!</font>"
|
||||||
|
else
|
||||||
|
var/list/display_records = product_records + coin_records
|
||||||
|
if(extended_inventory)
|
||||||
|
display_records = product_records + coin_records + hidden_records
|
||||||
|
dat += "<table>"
|
||||||
|
for (var/datum/data/vending_product/R in display_records)
|
||||||
|
var/price_listed = "$[default_price]"
|
||||||
|
var/is_hidden = hidden_records.Find(R)
|
||||||
|
if(is_hidden && !extended_inventory)
|
||||||
|
continue
|
||||||
|
if(R.custom_price)
|
||||||
|
price_listed = "$[R.custom_price]"
|
||||||
|
if(!onstation || account && account.account_job && account.account_job.paycheck_department == payment_department)
|
||||||
|
price_listed = "FREE"
|
||||||
|
if(coin_records.Find(R) || is_hidden)
|
||||||
|
price_listed = "$[R.custom_premium_price ? R.custom_premium_price : extra_price]"
|
||||||
|
dat += "<tr><td><img src='data:image/jpeg;base64,[GetIconForProduct(R)]'/></td>"
|
||||||
|
dat += "<td style=\"width: 100%\"><b>[sanitize(R.name)] ([price_listed])</b></td>"
|
||||||
|
if(R.amount > 0 && ((C && C.registered_account && onstation) || (!onstation && isliving(user))))
|
||||||
|
dat += "<td align='right'><b>[R.amount] </b><a href='byond://?src=[REF(src)];vend=[REF(R)]'>Vend</a></td>"
|
||||||
|
else
|
||||||
|
dat += "<td align='right'><span class='linkOff'>Not Available</span></td>"
|
||||||
|
dat += "</tr>"
|
||||||
|
dat += "</table>"
|
||||||
|
dat += "</div>"
|
||||||
|
if(onstation && C && C.registered_account)
|
||||||
|
dat += "<b>Balance: $[account.account_balance]</b>"
|
||||||
|
if(istype(src, /obj/machinery/vending/snack))
|
||||||
|
dat += "<h3>Chef's Food Selection</h3>"
|
||||||
|
dat += "<div class='statusDisplay'>"
|
||||||
|
for (var/O in dish_quants)
|
||||||
|
if(dish_quants[O] > 0)
|
||||||
|
var/N = dish_quants[O]
|
||||||
|
dat += "<a href='byond://?src=[REF(src)];dispense=[sanitize(O)]'>Dispense</A> "
|
||||||
|
dat += "<B>[capitalize(O)] ($[default_price]): [N]</B><br>"
|
||||||
|
dat += "</div>"
|
||||||
|
|
||||||
|
var/datum/browser/popup = new(user, "vending", (name))
|
||||||
|
popup.set_content(dat)
|
||||||
|
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
|
||||||
|
popup.open()
|
||||||
|
*/
|
||||||
794
code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
Normal file
@@ -0,0 +1,794 @@
|
|||||||
|
/datum/team/vampireclan
|
||||||
|
name = "Clan" // Teravanni,
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker
|
||||||
|
name = "Bloodsucker"
|
||||||
|
roundend_category = "bloodsuckers"
|
||||||
|
antagpanel_category = "Bloodsucker"
|
||||||
|
job_rank = ROLE_BLOODSUCKER
|
||||||
|
|
||||||
|
// NAME
|
||||||
|
var/vampname // My Dracula name
|
||||||
|
var/vamptitle // My Dracula title
|
||||||
|
var/vampreputation // My "Surname" or description of my deeds
|
||||||
|
// CLAN
|
||||||
|
var/datum/team/vampireclan/clan
|
||||||
|
var/list/datum/antagonist/vassal/vassals = list()// Vassals under my control. Periodically remove the dead ones.
|
||||||
|
var/datum/mind/creator // Who made me? For both Vassals AND Bloodsuckers (though Master Vamps won't have one)
|
||||||
|
// POWERS
|
||||||
|
var/list/datum/action/powers = list()// Purchased powers
|
||||||
|
var/poweron_feed = FALSE // Am I feeding?
|
||||||
|
var/poweron_masquerade = FALSE
|
||||||
|
// STATS
|
||||||
|
var/vamplevel = 0
|
||||||
|
var/vamplevel_unspent = 1
|
||||||
|
var/regenRate = 0.3 // How many points of Brute do I heal per tick?
|
||||||
|
var/feedAmount = 15 // Amount of blood drawn from a target per tick.
|
||||||
|
var/maxBloodVolume = 600 // Maximum blood a Vamp can hold via feeding. // BLOOD_VOLUME_NORMAL 550 // BLOOD_VOLUME_SAFE 475 //BLOOD_VOLUME_OKAY 336 //BLOOD_VOLUME_BAD 224 // BLOOD_VOLUME_SURVIVE 122
|
||||||
|
// OBJECTIVES
|
||||||
|
var/list/datum/objective/objectives_given = list() // For removal if needed.
|
||||||
|
var/area/lair
|
||||||
|
var/obj/structure/closet/crate/coffin
|
||||||
|
// TRACKING
|
||||||
|
var/foodInGut = 0 // How much food to throw up later. You shouldn't have eaten that.
|
||||||
|
var/warn_sun_locker = FALSE // So we only get the locker burn message once per day.
|
||||||
|
var/warn_sun_burn = FALSE // So we only get the sun burn message once per day.
|
||||||
|
|
||||||
|
// LISTS
|
||||||
|
var/static/list/defaultTraits = list (TRAIT_STABLEHEART, TRAIT_NOBREATH, TRAIT_SLEEPIMMUNE, TRAIT_NOCRITDAMAGE, TRAIT_RESISTCOLD, TRAIT_RADIMMUNE, TRAIT_VIRUSIMMUNE, TRAIT_NIGHT_VISION, \
|
||||||
|
TRAIT_NOSOFTCRIT, TRAIT_NOHARDCRIT, TRAIT_AGEUSIA, TRAIT_COLDBLOODED, TRAIT_NONATURALHEAL, TRAIT_NOMARROW, TRAIT_NOPULSE)
|
||||||
|
// NOTES: TRAIT_AGEUSIA <-- Doesn't like flavors.
|
||||||
|
// REMOVED: TRAIT_NODEATH
|
||||||
|
// TO ADD:
|
||||||
|
//var/static/list/defaultOrgans = list (/obj/item/organ/heart/vampheart,/obj/item/organ/heart/vampeyes)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/on_gain()
|
||||||
|
SSticker.mode.bloodsuckers |= owner // Add if not already in here (and you might be, if you were picked at round start)
|
||||||
|
SSticker.mode.check_start_sunlight()// Start Sunlight? (if first Vamp)
|
||||||
|
SelectFirstName()// Name & Title
|
||||||
|
SelectTitle(am_fledgling=TRUE) // If I have a creator, then set as Fledgling.
|
||||||
|
SelectReputation(am_fledgling=TRUE)
|
||||||
|
AssignStarterPowersAndStats()// Give Powers & Stats
|
||||||
|
forge_bloodsucker_objectives()// Objectives & Team
|
||||||
|
update_bloodsucker_icons_added(owner.current, "bloodsucker") // Add Antag HUD
|
||||||
|
LifeTick() // Run Life Function
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/on_removal()
|
||||||
|
SSticker.mode.bloodsuckers -= owner
|
||||||
|
SSticker.mode.check_cancel_sunlight()// End Sunlight? (if last Vamp)
|
||||||
|
ClearAllPowersAndStats()// Clear Powers & Stats
|
||||||
|
clear_bloodsucker_objectives() // Objectives
|
||||||
|
update_bloodsucker_icons_removed(owner.current)// Clear Antag HUD
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/greet()
|
||||||
|
var/fullname = ReturnFullName(TRUE)
|
||||||
|
to_chat(owner, "<span class='userdanger'>You are [fullname], a bloodsucking vampire!</span><br>")
|
||||||
|
owner.announce_objectives()
|
||||||
|
to_chat(owner, "<span class='boldannounce'>* You regenerate your health slowly, you're weak to fire, and you depend on blood to survive. Allow your stolen blood to run too low, and you will find yourself at \
|
||||||
|
risk of being discovered!</span><br>")
|
||||||
|
//to_chat(owner, "<span class='boldannounce'>As an immortal, your power is linked to your age. The older you grow, the more abilities you will have access to.<span>")
|
||||||
|
var/vamp_greet
|
||||||
|
vamp_greet += "<span class='boldannounce'>* Other Bloodsuckers are not necessarily your friends, but your survival may depend on cooperation. Betray them at your own discretion and peril.</span><br>"
|
||||||
|
vamp_greet += "<span class='boldannounce'><i>* Use \",b\" to speak your ancient Bloodsucker language.</span><br>"
|
||||||
|
vamp_greet += "<span class='announce'>Bloodsucker Tip: Rest in a <i>Coffin</i> to claim it, and that area, as your lair.</span><br>"
|
||||||
|
vamp_greet += "<span class='announce'>Bloodsucker Tip: Fear the daylight! Solar flares will bombard the station periodically, and only your coffin can guarantee your safety.</span><br>"
|
||||||
|
to_chat(owner, vamp_greet)
|
||||||
|
|
||||||
|
owner.current.playsound_local(null, 'sound/bloodsucker/BloodsuckerAlert.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||||
|
antag_memory += "Although you were born a mortal, in un-death you earned the name <b>[fullname]</b>.<br>"
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/farewell()
|
||||||
|
owner.current.visible_message("[owner.current]'s skin flushes with color, their eyes growing glossier. They look...alive.",\
|
||||||
|
"<span class='userdanger'><FONT size = 3>With a snap, your curse has ended. You are no longer a Bloodsucker. You live once more!</FONT></span>")
|
||||||
|
// Refill with Blood
|
||||||
|
owner.current.blood_volume = max(owner.current.blood_volume,BLOOD_VOLUME_SAFE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/SelectFirstName()
|
||||||
|
// Names (EVERYONE gets one))
|
||||||
|
if (owner.current.gender == MALE)
|
||||||
|
vampname = pick("Desmond","Rudolph","Dracul","Vlad","Pyotr","Gregor","Cristian","Christoff","Marcu","Andrei","Constantin","Gheorghe","Grigore","Ilie","Iacob","Luca","Mihail","Pavel","Vasile","Octavian","Sorin", \
|
||||||
|
"Sveyn","Aurel","Alexe","Iustin","Theodor","Dimitrie","Octav","Damien","Magnus","Caine","Abel", // Romanian/Ancient
|
||||||
|
"Lucius","Gaius","Otho","Balbinus","Arcadius","Romanos","Alexios","Vitellius", // Latin
|
||||||
|
"Melanthus","Teuthras","Orchamus","Amyntor","Axion", // Greek
|
||||||
|
"Thoth","Thutmose","Osorkon,","Nofret","Minmotu","Khafra" // Egyptian
|
||||||
|
"Dio")
|
||||||
|
|
||||||
|
else
|
||||||
|
vampname = pick("Islana","Tyrra","Greganna","Pytra","Hilda","Andra","Crina","Viorela","Viorica","Anemona","Camelia","Narcisa","Sorina","Alessia","Sophia","Gladda","Arcana","Morgan","Lasarra","Ioana","Elena", \
|
||||||
|
"Alina","Rodica","Teodora","Denisa","Mihaela","Svetla","Stefania","Diyana","Kelssa","Lilith", // Romanian/Ancient
|
||||||
|
"Alexia","Athanasia","Callista","Karena","Nephele","Scylla","Ursa", // Latin
|
||||||
|
"Alcestis","Damaris","Elisavet","Khthonia","Teodora", // Greek
|
||||||
|
"Nefret","Ankhesenpep") // Egyptian
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/SelectTitle(am_fledgling = 0, forced=FALSE)
|
||||||
|
// Already have Title
|
||||||
|
if (!forced && vamptitle != null)
|
||||||
|
return
|
||||||
|
// Titles [Master]
|
||||||
|
if (!am_fledgling)
|
||||||
|
if (owner.current.gender == MALE)
|
||||||
|
vamptitle = pick ("Count","Baron","Viscount","Prince","Duke","Tzar","Dreadlord","Lord","Master")
|
||||||
|
else
|
||||||
|
vamptitle = pick ("Countess","Baroness","Viscountess","Princess","Duchess","Tzarina","Dreadlady","Lady","Mistress")
|
||||||
|
to_chat(owner, "<span class='announce'>You have earned a title! You are now known as <i>[ReturnFullName(TRUE)]</i>!</span>")
|
||||||
|
// Titles [Fledgling]
|
||||||
|
else
|
||||||
|
vamptitle = null
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/SelectReputation(am_fledgling = 0, forced=FALSE)
|
||||||
|
// Already have Reputation
|
||||||
|
if (!forced && vampreputation != null)
|
||||||
|
return
|
||||||
|
// Reputations [Master]
|
||||||
|
if (!am_fledgling)
|
||||||
|
vampreputation = pick("Butcher","Blood Fiend","Crimson","Red","Black","Terror","Nightman","Feared","Ravenous","Fiend","Malevolent","Wicked","Ancient","Plaguebringer","Sinister","Forgotten","Wretched","Baleful", \
|
||||||
|
"Inqisitor","Harvester","Reviled","Robust","Betrayer","Destructor","Damned","Accursed","Terrible","Vicious","Profane","Vile","Depraved","Foul","Slayer","Manslayer","Sovereign","Slaughterer", \
|
||||||
|
"Forsaken","Mad","Dragon","Savage","Villainous","Nefarious","Inquisitor","Marauder","Horrible","Immortal","Undying","Overlord","Corrupt","Hellspawn","Tyrant","Sanguineous")
|
||||||
|
if (owner.current.gender == MALE)
|
||||||
|
if (prob(10)) // Gender override
|
||||||
|
vampreputation = pick("King of the Damned", "Blood King", "Emperor of Blades", "Sinlord", "God-King")
|
||||||
|
else
|
||||||
|
if (prob(10)) // Gender override
|
||||||
|
vampreputation = pick("Queen of the Damned", "Blood Queen", "Empress of Blades", "Sinlady", "God-Queen")
|
||||||
|
|
||||||
|
to_chat(owner, "<span class='announce'>You have earned a reputation! You are now known as <i>[ReturnFullName(TRUE)]</i>!</span>")
|
||||||
|
|
||||||
|
// Reputations [Fledgling]
|
||||||
|
else
|
||||||
|
vampreputation = pick ("Crude","Callow","Unlearned","Neophyte","Novice","Unseasoned","Fledgling","Young","Neonate","Scrapling","Untested","Unproven","Unknown","Newly Risen","Born","Scavenger","Unknowing",\
|
||||||
|
"Unspoiled","Disgraced","Defrocked","Shamed","Meek","Timid","Broken")//,"Fresh")
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/AmFledgling()
|
||||||
|
return !vamptitle
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/ReturnFullName(var/include_rep=0)
|
||||||
|
|
||||||
|
var/fullname
|
||||||
|
// Name First
|
||||||
|
fullname = (vampname ? vampname : owner.current.name)
|
||||||
|
// Title
|
||||||
|
if (vamptitle)
|
||||||
|
fullname = vamptitle + " " + fullname
|
||||||
|
// Rep
|
||||||
|
if (include_rep && vampreputation)
|
||||||
|
fullname = fullname + " the " + vampreputation
|
||||||
|
|
||||||
|
return fullname
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/BuyPower(datum/action/bloodsucker/power)//(obj/effect/proc_holder/spell/power)
|
||||||
|
powers += power
|
||||||
|
power.Grant(owner.current)// owner.AddSpell(power)
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/AssignStarterPowersAndStats()
|
||||||
|
// Blood/Rank Counter
|
||||||
|
add_hud()
|
||||||
|
update_hud(TRUE) // Set blood value, current rank
|
||||||
|
// Powers
|
||||||
|
BuyPower(new /datum/action/bloodsucker/feed)
|
||||||
|
BuyPower(new /datum/action/bloodsucker/masquerade)
|
||||||
|
// Traits
|
||||||
|
for (var/T in defaultTraits)
|
||||||
|
ADD_TRAIT(owner.current, T, "bloodsucker")
|
||||||
|
// Traits: Species
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
var/datum/species/S = H.dna.species
|
||||||
|
S.species_traits |= DRINKSBLOOD
|
||||||
|
// Clear Addictions
|
||||||
|
owner.current.reagents.addiction_list = list() // Start over from scratch. Lucky you! At least you're not addicted to blood anymore (if you were)
|
||||||
|
// Stats
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
var/datum/species/S = H.dna.species
|
||||||
|
// Make Changes
|
||||||
|
S.brutemod *= 0.5
|
||||||
|
S.burnmod += 0.2 // <-------------------- Start small, but burn mod increases based on rank!
|
||||||
|
S.coldmod = 0
|
||||||
|
S.stunmod *= 0.5
|
||||||
|
S.siemens_coeff *= 0.75 //base electrocution coefficient 1
|
||||||
|
//S.heatmod += 0.5 // Heat shouldn't affect. Only Fire.
|
||||||
|
//S.punchstunthreshold = 8 //damage at which punches from this race will stun 9
|
||||||
|
S.punchdamagelow += 1 //lowest possible punch damage 0
|
||||||
|
S.punchdamagehigh += 1 //highest possible punch damage 9
|
||||||
|
// Clown
|
||||||
|
if(istype(H) && owner.assigned_role == "Clown")
|
||||||
|
//to_chat(H, "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself.")
|
||||||
|
H.dna.remove_mutation(CLOWNMUT)
|
||||||
|
to_chat(H, "As a vampiric clown, you are no longer a danger to yourself. Your nature is subdued.")
|
||||||
|
// Physiology
|
||||||
|
CheckVampOrgans() // Heart, Eyes
|
||||||
|
// Language
|
||||||
|
owner.current.grant_language(/datum/language/vampiric)
|
||||||
|
// Soul
|
||||||
|
owner.current.hellbound = TRUE
|
||||||
|
owner.hasSoul = FALSE // If false, renders the character unable to sell their soul.
|
||||||
|
owner.isholy = FALSE // is this person a chaplain or admin role allowed to use bibles
|
||||||
|
// Disabilities
|
||||||
|
CureDisabilities()
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/ClearAllPowersAndStats()
|
||||||
|
// Blood/Rank Counter
|
||||||
|
remove_hud()
|
||||||
|
// Powers
|
||||||
|
while(powers.len)
|
||||||
|
var/datum/action/bloodsucker/power = pick(powers)
|
||||||
|
powers -= power
|
||||||
|
power.Remove(owner.current)
|
||||||
|
// owner.RemoveSpell(power)
|
||||||
|
// Traits
|
||||||
|
for (var/T in defaultTraits)
|
||||||
|
REMOVE_TRAIT(owner.current, T, "bloodsucker")
|
||||||
|
// Traits: Species
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
H.set_species(H.dna.species.type)
|
||||||
|
// Stats
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
H.set_species(H.dna.species.type)
|
||||||
|
// Clown
|
||||||
|
if(istype(H) && owner.assigned_role == "Clown")
|
||||||
|
H.dna.add_mutation(CLOWNMUT)
|
||||||
|
// NOTE: Use initial() to return things to default!
|
||||||
|
// Physiology
|
||||||
|
owner.current.regenerate_organs()
|
||||||
|
// Update Health
|
||||||
|
owner.current.setMaxHealth(100)
|
||||||
|
// Language
|
||||||
|
owner.current.remove_language(/datum/language/vampiric)
|
||||||
|
// Soul
|
||||||
|
if (owner.soulOwner == owner) // Return soul, if *I* own it.
|
||||||
|
owner.hasSoul = TRUE
|
||||||
|
owner.current.hellbound = FALSE
|
||||||
|
|
||||||
|
datum/antagonist/bloodsucker/proc/RankUp()
|
||||||
|
set waitfor = FALSE
|
||||||
|
if (!owner || !owner.current)
|
||||||
|
return
|
||||||
|
|
||||||
|
vamplevel_unspent ++
|
||||||
|
// Spend Rank Immediately?
|
||||||
|
if (istype(owner.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
SpendRank()
|
||||||
|
else
|
||||||
|
to_chat(owner, "<EM><span class='notice'>You have grown more ancient! Sleep in a coffin that you have claimed to thicken your blood and become more powerful.</span></EM>")
|
||||||
|
if (vamplevel_unspent >= 2)
|
||||||
|
to_chat(owner, "<span class='announce'>Bloodsucker Tip: If you cannot find or steal a coffin to use, they can be built from wooden planks.</span><br>")
|
||||||
|
|
||||||
|
|
||||||
|
datum/antagonist/bloodsucker/proc/LevelUpPowers()
|
||||||
|
for(var/datum/action/bloodsucker/power in powers)
|
||||||
|
power.level_current ++
|
||||||
|
|
||||||
|
datum/antagonist/bloodsucker/proc/SpendRank()
|
||||||
|
set waitfor = FALSE
|
||||||
|
if (vamplevel_unspent <= 0 || !owner || !owner.current || !owner.current.client)
|
||||||
|
return
|
||||||
|
|
||||||
|
/////////
|
||||||
|
// Powers
|
||||||
|
|
||||||
|
// Purchase Power Prompt
|
||||||
|
var/list/options = list() // Taken from gasmask.dm, for Clown Masks.
|
||||||
|
for(var/pickedpower in typesof(/datum/action/bloodsucker))
|
||||||
|
var/datum/action/bloodsucker/power = pickedpower
|
||||||
|
// If I don't own it, and I'm allowed to buy it.
|
||||||
|
if (!(locate(power) in powers) && initial(power.bloodsucker_can_buy))
|
||||||
|
options[initial(power.name)] = power // TESTING: After working with TGUI, it seems you can use initial() to view the variables inside a path?
|
||||||
|
options["\[ Not Now \]"] = null
|
||||||
|
|
||||||
|
// Abort?
|
||||||
|
if (options.len > 1)
|
||||||
|
var/choice = input(owner.current, "You have the opportunity to grow more ancient. Select a power to advance your Rank.", "Your Blood Thickens...") in options
|
||||||
|
// Cheat-Safety: Can't keep opening/closing coffin to spam levels
|
||||||
|
if (vamplevel_unspent <= 0) // Already spent all your points, and tried opening/closing your coffin, pal.
|
||||||
|
return
|
||||||
|
if (!istype(owner.current.loc, /obj/structure/closet/crate/coffin))
|
||||||
|
to_chat(owner.current, "<span class='warning'>Return to your coffin to advance your Rank.</span>")
|
||||||
|
return
|
||||||
|
if (!choice || !options[choice] || (locate(options[choice]) in powers)) // ADDED: Check to see if you already have this power, due to window stacking.
|
||||||
|
to_chat(owner.current, "<span class='notice'>You prevent your blood from thickening just yet, but you may try again later.</span>")
|
||||||
|
return
|
||||||
|
// Buy New Powers
|
||||||
|
var/datum/action/bloodsucker/P = options[choice]
|
||||||
|
BuyPower(new P)
|
||||||
|
to_chat(owner.current, "<span class='notice'>You have learned [initial(P.name)]!</span>")
|
||||||
|
else
|
||||||
|
to_chat(owner.current, "<span class='notice'>You grow more ancient by the night!</span>")
|
||||||
|
|
||||||
|
/////////
|
||||||
|
// Advance Powers (including new)
|
||||||
|
LevelUpPowers()
|
||||||
|
|
||||||
|
/////////
|
||||||
|
// Advance Stats
|
||||||
|
if (ishuman(owner.current))
|
||||||
|
var/mob/living/carbon/human/H = owner.current
|
||||||
|
var/datum/species/S = H.dna.species
|
||||||
|
S.burnmod += 0.025 // Slightly more burn damage
|
||||||
|
S.stunmod *= 0.95 // Slightly less stun time.
|
||||||
|
S.punchdamagelow += 0.5
|
||||||
|
S.punchdamagehigh += 0.5 // NOTE: This affects the hitting power of Brawn.
|
||||||
|
// More Health
|
||||||
|
owner.current.setMaxHealth(owner.current.maxHealth + 5)
|
||||||
|
// Vamp Stats
|
||||||
|
regenRate += 0.05 // Points of brute healed (starts at 0.3)
|
||||||
|
feedAmount += 2 // Increase how quickly I munch down vics (15)
|
||||||
|
maxBloodVolume += 50 // Increase my max blood (600)
|
||||||
|
|
||||||
|
|
||||||
|
/////////
|
||||||
|
|
||||||
|
vamplevel ++
|
||||||
|
vamplevel_unspent --
|
||||||
|
|
||||||
|
// Assign True Reputation
|
||||||
|
if (vamplevel == 4)
|
||||||
|
SelectReputation(am_fledgling=FALSE, forced=TRUE)
|
||||||
|
|
||||||
|
to_chat(owner.current, "<span class='notice'>You are now a rank [vamplevel] Bloodsucker. Your strength, resistence, health, feed rate, regen rate, and maximum blood have all increased!</span>")
|
||||||
|
to_chat(owner.current, "<span class='notice'>Your existing powers have all ranked up as well!</span>")
|
||||||
|
to_chat(owner.current, "<span class='warning'>However, your weakness to fire and sunlight have also increased!</span>")
|
||||||
|
|
||||||
|
update_hud(TRUE)
|
||||||
|
|
||||||
|
owner.current.playsound_local(null, 'sound/effects/pope_entry.ogg', 25, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//This handles the application of antag huds/special abilities
|
||||||
|
/datum/antagonist/bloodsucker/apply_innate_effects(mob/living/mob_override)
|
||||||
|
return
|
||||||
|
|
||||||
|
//This handles the removal of antag huds/special abilities
|
||||||
|
/datum/antagonist/bloodsucker/remove_innate_effects(mob/living/mob_override)
|
||||||
|
return
|
||||||
|
|
||||||
|
//Assign default team and creates one for one of a kind team antagonists
|
||||||
|
/datum/antagonist/bloodsucker/create_team(datum/team/team)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Create Objectives
|
||||||
|
/datum/antagonist/bloodsucker/proc/forge_bloodsucker_objectives() // Fledgling vampires can have different objectives.
|
||||||
|
|
||||||
|
// TEAM
|
||||||
|
//clan = new /datum/team/vampireclan(owner)
|
||||||
|
|
||||||
|
|
||||||
|
// Lair Objective: Create a Lair
|
||||||
|
var/datum/objective/bloodsucker/lair/lair_objective = new
|
||||||
|
lair_objective.owner = owner
|
||||||
|
lair_objective.generate_objective()
|
||||||
|
add_objective(lair_objective)
|
||||||
|
|
||||||
|
// Protege Objective
|
||||||
|
var/datum/objective/bloodsucker/protege/protege_objective = new
|
||||||
|
protege_objective.owner = owner
|
||||||
|
protege_objective.generate_objective()
|
||||||
|
add_objective(protege_objective)
|
||||||
|
|
||||||
|
if (rand(0,1) == 0)
|
||||||
|
// Heart Thief Objective
|
||||||
|
var/datum/objective/bloodsucker/heartthief/heartthief_objective = new
|
||||||
|
heartthief_objective.owner = owner
|
||||||
|
heartthief_objective.generate_objective()
|
||||||
|
add_objective(heartthief_objective)
|
||||||
|
|
||||||
|
else
|
||||||
|
// Solars Objective
|
||||||
|
var/datum/objective/bloodsucker/solars/solars_objective = new
|
||||||
|
solars_objective.owner = owner
|
||||||
|
solars_objective.generate_objective()
|
||||||
|
add_objective(solars_objective)
|
||||||
|
|
||||||
|
// Survive Objective
|
||||||
|
var/datum/objective/bloodsucker/survive/survive_objective = new
|
||||||
|
survive_objective.owner = owner
|
||||||
|
survive_objective.generate_objective()
|
||||||
|
add_objective(survive_objective)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/add_objective(var/datum/objective/O)
|
||||||
|
objectives += O
|
||||||
|
objectives_given += O
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/clear_bloodsucker_objectives()
|
||||||
|
|
||||||
|
var/datum/team/team = get_team()
|
||||||
|
if(team)
|
||||||
|
team.remove_member(owner)
|
||||||
|
|
||||||
|
for(var/O in objectives_given)
|
||||||
|
objectives -= O
|
||||||
|
qdel(O)
|
||||||
|
objectives_given = list() // Traitors had this, so I added it. Not sure why.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/get_team()
|
||||||
|
return clan
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Name shown on antag list
|
||||||
|
/datum/antagonist/bloodsucker/antag_listing_name()
|
||||||
|
return ..() + "([ReturnFullName(TRUE)])"
|
||||||
|
|
||||||
|
//Whatever interesting things happened to the antag admins should know about
|
||||||
|
//Include additional information about antag in this part
|
||||||
|
/datum/antagonist/bloodsucker/antag_listing_status()
|
||||||
|
if (owner && owner.AmFinalDeath())
|
||||||
|
return "<font color=red>Final Death</font>"
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Individual roundend report
|
||||||
|
/datum/antagonist/bloodsucker/roundend_report()
|
||||||
|
// Get the default Objectives
|
||||||
|
var/list/report = list()
|
||||||
|
|
||||||
|
// Vamp Name
|
||||||
|
report += "<br><span class='header'><b>\[[ReturnFullName(TRUE)]\]</b></span>"
|
||||||
|
|
||||||
|
// Default Report
|
||||||
|
report += ..()
|
||||||
|
|
||||||
|
// Now list their vassals
|
||||||
|
if (vassals.len > 0)
|
||||||
|
report += "<span class='header'>Their Vassals were...</span>"
|
||||||
|
for (var/datum/antagonist/vassal/V in vassals)
|
||||||
|
if (V.owner)
|
||||||
|
var/jobname = V.owner.assigned_role ? "the [V.owner.assigned_role]" : ""
|
||||||
|
report += "<b>[V.owner.name]</b> [jobname]"
|
||||||
|
|
||||||
|
return report.Join("<br>")
|
||||||
|
|
||||||
|
//Displayed at the start of roundend_category section, default to roundend_category header
|
||||||
|
/datum/antagonist/bloodsucker/roundend_report_header()
|
||||||
|
return "<span class='header'>Lurking in the darkness, the Bloodsuckers were:</span><br>"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 2019 Breakdown of Bloodsuckers:
|
||||||
|
|
||||||
|
// G A M E P L A Y
|
||||||
|
//
|
||||||
|
// Bloodsuckers should be inherrently powerful: they never stay dead, and they can hide in plain sight
|
||||||
|
// better than any other antagonist aboard the station.
|
||||||
|
//
|
||||||
|
// However, only elder Bloodsuckers are the powerful creatures of legend. Ranking up as a Bloodsucker
|
||||||
|
// should impart slight strength and health benefits, as well as powers that can grow over time. But
|
||||||
|
// their weaknesses should grow as well, and not just to fire.
|
||||||
|
|
||||||
|
|
||||||
|
// A B I L I T I E S
|
||||||
|
//
|
||||||
|
// * Bloodsuckers can FEIGN LIFE + DEATH.
|
||||||
|
// Feigning LIFE:
|
||||||
|
// - Warms up the body
|
||||||
|
// - Creates a heartbeat
|
||||||
|
// - Fake blood amount (550)
|
||||||
|
// Feign DEATH:
|
||||||
|
// - When lying down or sitting, you appear "dead and lifeless"
|
||||||
|
|
||||||
|
// * Bloodsuckers REGENERATE
|
||||||
|
// - Brute damage heals rather rapidly. Burn damage heals slowly.
|
||||||
|
// - Healing is reduced when hungry or starved.
|
||||||
|
// - Burn does not heal when starved. A starved vampire remains "dead" until burns can heal.
|
||||||
|
// - Bodyparts and organs regrow in Torpor (except for the Heart and Brain).
|
||||||
|
//
|
||||||
|
// * Bloodsuckers are IMMORTAL
|
||||||
|
// - Brute damage cannot destroy them (and it caps very low, so they don't stack too much)
|
||||||
|
// - Burn damage can only kill them at very high amounts.
|
||||||
|
// - Removing the head kills the vamp forever.
|
||||||
|
// - Removing the heart kills the vamp until replaced.
|
||||||
|
//
|
||||||
|
// * Bloodsuckers are DEAD
|
||||||
|
// - They do not breathe.
|
||||||
|
// - Cold affects them less.
|
||||||
|
// - They are immune to disease (but can spread it)
|
||||||
|
// - Food is useless and cause sickness.
|
||||||
|
// - Nothing can heal the vamp other than his own blood.
|
||||||
|
//
|
||||||
|
// * Bloodsuckers are PREDATORS
|
||||||
|
// - They detect life/heartbeats nearby.
|
||||||
|
// - They know other predators instantly (Vamps, Werewolves, and alien types) regardless of disguise.
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// * Bloodsuckers enter Torpor when DEAD or RESTING in coffin
|
||||||
|
// - Torpid vampires regenerate their health. Coffins negate cost and speed up the process.
|
||||||
|
// ** To rest in a coffin, either SLEEP or CLOSE THE LID while you're in it. You will be given a prompt to sleep until healed. Healing in a coffin costs NO blood!
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// O B J E C T I V E S
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// 1) GROOM AN HEIR: Find a person with appropriate traits (hair, blood type, gender) to be turned as a Vampire. Before they rise, they must be properly trained. Raise them to great power after their change.
|
||||||
|
//
|
||||||
|
// 2) BIBLIOPHILE: Research objects of interest, study items looking for clues of ancient secrets, and hunt down the clues to a Vampiric artifact of horrible power.
|
||||||
|
//
|
||||||
|
// 3) CRYPT LORD: Build a terrifying sepulcher to your evil, with servants to lavish upon you in undeath. The trappings of a true crypt lord come at grave cost.
|
||||||
|
//
|
||||||
|
// 4) GOURMOND: Oh, to taste all the delicacies the station has to offer! DRINK ## BLOOD FROM VICTIMS WHO LIVE, EAT ## ORGANS FROM VICTIMS WHO LIVE
|
||||||
|
|
||||||
|
|
||||||
|
// Vassals
|
||||||
|
//
|
||||||
|
// - Loyal to (and In Love With) Master
|
||||||
|
// - Master can speak to, summon, or punish his Vassals, even while asleep or torpid.
|
||||||
|
// - Master may have as many Vassals as Rank
|
||||||
|
// - Vassals see their Master's speech emboldened!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Dev Notes
|
||||||
|
//
|
||||||
|
// HEALING: Maybe Vamps metabolize specially? Like, they slowly drip their own blood into their system?
|
||||||
|
// - Give Vamps their own metabolization proc, perhaps?
|
||||||
|
// ** shadowpeople.dm has rules for healing.
|
||||||
|
//
|
||||||
|
// KILLING: It's almost impossible to track who someone has directly killed. But an Admin could be given
|
||||||
|
// an easy way to whip a Bloodsucker for cruel behavior, as a RP mechanic but not a punishment.
|
||||||
|
// **
|
||||||
|
//
|
||||||
|
// HUNGER: Just keep adjusting mob's nutrition to Blood Hunger level. No need to cancel nutrition from eating.
|
||||||
|
// ** mob.dm /set_nutrition()
|
||||||
|
// ** snacks.dm / attack() <-- Stop food from doing anything?
|
||||||
|
|
||||||
|
// ORGANS: Liver
|
||||||
|
// ** life.dm /handle_liver()
|
||||||
|
//
|
||||||
|
// CORPSE: Most of these effects likely go away when using "Masquerade" to appear alive.
|
||||||
|
// ** status_procs.dm /adjust_bodytemperature()
|
||||||
|
// ** traits.dm /TRAIT_NOBREATH /TRAIT_SLEEPIMMUNE /TRAIT_RESISTCOLD /TRAIT_RADIMMUNE /TRAIT_VIRUSIMMUNE
|
||||||
|
// * MASQUERADE ON/OFF: /TRAIT_FAKEDEATH (M)
|
||||||
|
// * /TRAIT_NIGHT_VISION
|
||||||
|
// * /TRAIT_DEATHCOMA <-- This basically makes you immobile. When using status_procs /fakedeath(), make sure to remove Coma unless we're in Torpor!
|
||||||
|
// * /TRAIT_NODEATH <--- ???
|
||||||
|
// ** species /NOZOMBIE
|
||||||
|
// * ADD: TRAIT_COLDBLOODED <-- add to carbon/life.dm /natural_bodytemperature_stabilization()
|
||||||
|
//
|
||||||
|
// MASQUERADE Appear as human!
|
||||||
|
// ** examine.dm /examine() <-- Change "blood_volume < BLOOD_VOLUME_SAFE" to a new examine
|
||||||
|
//
|
||||||
|
// NOSFERATU ** human.add_trait(TRAIT_DISFIGURED, "insert_vamp_datum_here") <-- Makes you UNKNOWN unless your ID says otherwise.
|
||||||
|
// STEALTH ** human_helpers.dm /get_visible_name() ** shadowpeople.dm has rules for Light.
|
||||||
|
//
|
||||||
|
// FRENZY ** living.dm /update_mobility() (USED TO be update_canmove)
|
||||||
|
//
|
||||||
|
// PREDATOR See other Vamps!
|
||||||
|
// * examine.dm /examine()
|
||||||
|
//
|
||||||
|
// WEAKNESSES: -Poor mood in Chapel or near Chaplain. -Stamina damage from Bible
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//message_admins("DEBUG3: attempt_cast() [name] / [user_C.handcuffed] ")
|
||||||
|
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
//
|
||||||
|
// Death (fire, heart, brain, head)
|
||||||
|
// Disable Life: BLOOD
|
||||||
|
// Body Temp
|
||||||
|
// Spend blood over time (more if imitating life) (none if sleeping in coffin)
|
||||||
|
// Auto-Heal (brute to 0, fire to 99) (toxin/o2 always 0)
|
||||||
|
//
|
||||||
|
// Hud Icons
|
||||||
|
// UI Blood Counter
|
||||||
|
// Examine Name (+Masquerade, only "Dead and lifeless" if not standing?)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Turn vamps
|
||||||
|
// Create vassals
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// FIX LIST
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
// HUD! //
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/update_bloodsucker_icons_added(datum/mind/m)
|
||||||
|
var/datum/atom_hud/antag/vamphud = GLOB.huds[ANTAG_HUD_BLOODSUCKER]
|
||||||
|
vamphud.join_hud(owner.current)
|
||||||
|
set_antag_hud(owner.current, "bloodsucker") // "bloodsucker"
|
||||||
|
owner.current.hud_list[ANTAG_HUD].icon = image('icons/mob/hud.dmi', owner.current, "bloodsucker") //Check prepare_huds in mob.dm to see why.
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/update_bloodsucker_icons_removed(datum/mind/m)
|
||||||
|
var/datum/atom_hud/antag/vamphud = GLOB.huds[ANTAG_HUD_BLOODSUCKER]
|
||||||
|
vamphud.leave_hud(owner.current)
|
||||||
|
set_antag_hud(owner.current, null)
|
||||||
|
|
||||||
|
/datum/atom_hud/antag/bloodsucker // from hud.dm in /datums/ Also see data_huds.dm + antag_hud.dm
|
||||||
|
|
||||||
|
/datum/atom_hud/antag/bloodsucker/add_to_single_hud(mob/M, atom/A)
|
||||||
|
if (!check_valid_hud_user(M,A)) // FULP: This checks if the Mob is a Vassal, and if the Atom is his master OR on his team.
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/datum/atom_hud/antag/bloodsucker/proc/check_valid_hud_user(mob/M, atom/A) // Remember: A is being added to M's hud. Because M's hud is a /antag/vassal hud, this means M is the vassal here.
|
||||||
|
// Ghost Admins always see Bloodsuckers/Vassals
|
||||||
|
if (isobserver(M))
|
||||||
|
return TRUE
|
||||||
|
// GOAL: Vassals see their Master and his other Vassals.
|
||||||
|
// GOAL: Vassals can BE seen by their Bloodsucker and his other Vassals.
|
||||||
|
// GOAL: Bloodsuckers can see each other.
|
||||||
|
if (!M || !A || !ismob(A) || !M.mind)// || !A.mind)
|
||||||
|
return FALSE
|
||||||
|
var/mob/A_mob = A
|
||||||
|
if (!A_mob.mind)
|
||||||
|
return FALSE
|
||||||
|
// Find Datums: Bloodsucker
|
||||||
|
var/datum/antagonist/bloodsucker/atom_B = A_mob.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
var/datum/antagonist/bloodsucker/mob_B = M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
// Check 1) Are we both Bloodsuckers?
|
||||||
|
if (atom_B && mob_B)
|
||||||
|
return TRUE
|
||||||
|
// Find Datums: Vassal
|
||||||
|
var/datum/antagonist/vassal/atom_V = A_mob.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
var/datum/antagonist/vassal/mob_V = M.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
// Check 2) If they are a BLOODSUCKER, then are they my Master?
|
||||||
|
if (mob_V && atom_B == mob_V.master)
|
||||||
|
return TRUE // SUCCESS!
|
||||||
|
// Check 3) If I am a BLOODSUCKER, then are they my Vassal?
|
||||||
|
if (mob_B && atom_V && (atom_V in mob_B.vassals))
|
||||||
|
return TRUE // SUCCESS!
|
||||||
|
// Check 4) If we are both VASSAL, then do we have the same master?
|
||||||
|
if (atom_V && mob_V && atom_V.master == mob_V.master)
|
||||||
|
return TRUE // SUCCESS!
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// BLOOD COUNTER & RANK MARKER ! //
|
||||||
|
|
||||||
|
#define ui_sunlight_display "WEST:6,CENTER-0:0" // 6 pixels to the right, zero tiles & 5 pixels DOWN.
|
||||||
|
#define ui_blood_display "WEST:6,CENTER-1:0" // 1 tile down
|
||||||
|
#define ui_vamprank_display "WEST:6,CENTER-2:-5" // 2 tiles down
|
||||||
|
|
||||||
|
/datum/hud
|
||||||
|
var/obj/screen/bloodsucker/blood_counter/blood_display
|
||||||
|
var/obj/screen/bloodsucker/rank_counter/vamprank_display
|
||||||
|
var/obj/screen/bloodsucker/sunlight_counter/sunlight_display
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/add_hud()
|
||||||
|
return
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/remove_hud()
|
||||||
|
// No Hud? Get out.
|
||||||
|
if (!owner.current.hud_used)
|
||||||
|
return
|
||||||
|
owner.current.hud_used.blood_display.invisibility = INVISIBILITY_ABSTRACT
|
||||||
|
owner.current.hud_used.vamprank_display.invisibility = INVISIBILITY_ABSTRACT
|
||||||
|
owner.current.hud_used.sunlight_display.invisibility = INVISIBILITY_ABSTRACT
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/update_hud(updateRank=FALSE)
|
||||||
|
// No Hud? Get out.
|
||||||
|
if (!owner.current.hud_used)
|
||||||
|
return
|
||||||
|
// Update Blood Counter
|
||||||
|
if (owner.current.hud_used.blood_display)
|
||||||
|
var/valuecolor = "#FF6666"
|
||||||
|
if (owner.current.blood_volume > BLOOD_VOLUME_SAFE)
|
||||||
|
valuecolor = "#FFDDDD"
|
||||||
|
else if (owner.current.blood_volume > BLOOD_VOLUME_BAD)
|
||||||
|
valuecolor = "#FFAAAA"
|
||||||
|
owner.current.hud_used.blood_display.update_counter(owner.current.blood_volume, valuecolor)
|
||||||
|
|
||||||
|
// Update Rank Counter
|
||||||
|
if (owner.current.hud_used.vamprank_display)
|
||||||
|
var/valuecolor = vamplevel_unspent ? "#FFFF00" : "#FF0000"
|
||||||
|
owner.current.hud_used.vamprank_display.update_counter(vamplevel, valuecolor)
|
||||||
|
if (updateRank) // Only change icon on special request.
|
||||||
|
owner.current.hud_used.vamprank_display.icon_state = (vamplevel_unspent > 0) ? "rank_up" : "rank"
|
||||||
|
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker
|
||||||
|
invisibility = INVISIBILITY_ABSTRACT
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/proc/clear()
|
||||||
|
invisibility = INVISIBILITY_ABSTRACT
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/proc/update_counter(value, valuecolor)
|
||||||
|
invisibility = 0 // Make Visible
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/blood_counter // NOTE: Look up /obj/screen/devil/soul_counter in _onclick / hud / human.dm
|
||||||
|
icon = 'icons/mob/actions/bloodsucker.dmi'//'icons/mob/screen_gen.dmi'
|
||||||
|
name = "Blood Consumed"
|
||||||
|
icon_state = "blood_display"//"power_display"
|
||||||
|
screen_loc = ui_blood_display
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/blood_counter/update_counter(value, valuecolor)
|
||||||
|
..()
|
||||||
|
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round(value,1)]</font></div>"
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/rank_counter
|
||||||
|
name = "Bloodsucker Rank"
|
||||||
|
icon = 'icons/mob/actions/bloodsucker.dmi'
|
||||||
|
icon_state = "rank"
|
||||||
|
screen_loc = ui_vamprank_display
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/rank_counter/update_counter(value, valuecolor)
|
||||||
|
..()
|
||||||
|
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round(value,1)]</font></div>"
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/sunlight_counter
|
||||||
|
icon = 'icons/mob/actions/bloodsucker.dmi'
|
||||||
|
name = "Solar Flare Timer"
|
||||||
|
icon_state = "sunlight_night"
|
||||||
|
screen_loc = ui_sunlight_display
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/update_sunlight(value, amDay = FALSE)
|
||||||
|
// No Hud? Get out.
|
||||||
|
if (!owner.current.hud_used)
|
||||||
|
return
|
||||||
|
// Update Sun Time
|
||||||
|
if (owner.current.hud_used.sunlight_display)
|
||||||
|
var/valuecolor = "#BBBBFF"
|
||||||
|
if (amDay)
|
||||||
|
valuecolor = "#FF5555"
|
||||||
|
else if(value <= 25)
|
||||||
|
valuecolor = "#FFCCCC"
|
||||||
|
else if(value < 10)
|
||||||
|
valuecolor = "#FF5555"
|
||||||
|
var/value_string = (value >= 60) ? "[round(value / 60, 1)] m" : "[round(value,1)] s"
|
||||||
|
owner.current.hud_used.sunlight_display.update_counter( value_string, valuecolor )
|
||||||
|
owner.current.hud_used.sunlight_display.icon_state = "sunlight_" + (amDay ? "day":"night")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/screen/bloodsucker/sunlight_counter/update_counter(value, valuecolor)
|
||||||
|
..()
|
||||||
|
maptext = "<div align='center' valign='bottom' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[value]</font></div>"
|
||||||
303
code/modules/antagonists/bloodsucker/datum_hunter.dm
Normal file
@@ -0,0 +1,303 @@
|
|||||||
|
#define HUNTER_SCAN_MIN_DISTANCE 8
|
||||||
|
#define HUNTER_SCAN_MAX_DISTANCE 35
|
||||||
|
#define HUNTER_SCAN_PING_TIME 20 //5s update time.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/vamphunter
|
||||||
|
name = "Hunter"
|
||||||
|
roundend_category = "hunters"
|
||||||
|
antagpanel_category = "Monster Hunter"
|
||||||
|
job_rank = ROLE_MONSTERHUNTER
|
||||||
|
var/list/datum/action/powers = list()// Purchased powers
|
||||||
|
var/list/datum/objective/objectives_given = list() // For removal if needed.
|
||||||
|
var/datum/martial_art/my_kungfu // Hunters know a lil kung fu.
|
||||||
|
var/bad_dude = FALSE // Every first hunter spawned is a SHIT LORD.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/vamphunter/on_gain()
|
||||||
|
|
||||||
|
SSticker.mode.vamphunters |= owner // Add if not already in here (and you might be, if you were picked at round start)
|
||||||
|
|
||||||
|
// Hunter Pinpointer
|
||||||
|
//owner.current.apply_status_effect(/datum/status_effect/agent_pinpointer/hunter_edition)
|
||||||
|
|
||||||
|
// Give Hunter Power
|
||||||
|
var/datum/action/P = new /datum/action/bloodsucker/trackvamp
|
||||||
|
P.Grant(owner.current)
|
||||||
|
|
||||||
|
// Give Hunter Martial Arts
|
||||||
|
//if (rand(1,3) == 1)
|
||||||
|
// var/datum/martial_art/pick_type = pick (/datum/martial_art/cqc, /datum/martial_art/krav_maga, /datum/martial_art/cqc, /datum/martial_art/krav_maga, /datum/martial_art/wrestling) // /datum/martial_art/boxing <--- doesn't include grabbing, so don't use!
|
||||||
|
// my_kungfu = new pick_type //pick (/datum/martial_art/boxing, /datum/martial_art/cqc) // ick_type
|
||||||
|
// my_kungfu.teach(owner.current, 0)
|
||||||
|
|
||||||
|
// Give Hunter Objective
|
||||||
|
var/datum/objective/bloodsucker/monsterhunter/monsterhunter_objective = new
|
||||||
|
monsterhunter_objective.owner = owner
|
||||||
|
monsterhunter_objective.generate_objective()
|
||||||
|
objectives += monsterhunter_objective
|
||||||
|
objectives_given += monsterhunter_objective
|
||||||
|
// Badguy Hunter? (Give him BADGUY objectives)
|
||||||
|
if (bad_dude)
|
||||||
|
// Stolen DIRECTLY from datum_traitor.dm
|
||||||
|
if(prob(15) && !(locate(/datum/objective/download) in objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist")))
|
||||||
|
var/datum/objective/download/download_objective = new
|
||||||
|
download_objective.owner = owner
|
||||||
|
download_objective.gen_amount_goal()
|
||||||
|
objectives += download_objective
|
||||||
|
objectives_given += download_objective
|
||||||
|
else
|
||||||
|
var/datum/objective/steal/steal_objective = new
|
||||||
|
steal_objective.owner = owner
|
||||||
|
steal_objective.find_target()
|
||||||
|
objectives += steal_objective
|
||||||
|
objectives_given += steal_objective
|
||||||
|
|
||||||
|
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/datum/antagonist/vamphunter/on_removal()
|
||||||
|
|
||||||
|
SSticker.mode.vamphunters -= owner // Add if not already in here (and you might be, if you were picked at round start)
|
||||||
|
|
||||||
|
// Master Pinpointer
|
||||||
|
//owner.current.remove_status_effect(/datum/status_effect/agent_pinpointer/hunter_edition)
|
||||||
|
|
||||||
|
// Take Hunter Power
|
||||||
|
if (owner.current)
|
||||||
|
for (var/datum/action/bloodsucker/P in owner.current.actions)
|
||||||
|
P.Remove(owner.current)
|
||||||
|
|
||||||
|
// Take Hunter Martial Arts
|
||||||
|
//my_kungfu.remove(owner.current)
|
||||||
|
|
||||||
|
// Remove Hunter Objectives
|
||||||
|
for(var/O in objectives_given)
|
||||||
|
objectives -= O
|
||||||
|
qdel(O)
|
||||||
|
objectives_given = list()
|
||||||
|
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/datum/antagonist/vamphunter/greet()
|
||||||
|
var/vamp_hunter_greet = "<span class='userdanger'>You are a fearless Monster Hunter!</span>"
|
||||||
|
vamp_hunter_greet += "<span class='boldannounce'>You know there's one or more filthy creature onboard the station, though their identities elude you.<span>"
|
||||||
|
vamp_hunter_greet += "<span class='boldannounce'>It's your job to root them out, destroy their nests, and save the crew.<span>"
|
||||||
|
vamp_hunter_greet += "<span class='boldannounce'>Use <b>WHATEVER MEANS NECESSARY</b> to find these creatures...no matter who gets hurt or what you have to destroy to do it.</span>"
|
||||||
|
vamp_hunter_greet += "There are greater stakes at hand than the safety of the station!<span>"
|
||||||
|
vamp_hunter_greet += "<span class='boldannounce'>However, security may detain you if they discover your mission...<span>"
|
||||||
|
antag_memory += "You remember your training:<br>"
|
||||||
|
antag_memory += " -Bloodsuckers are weak to fire, or a stake to the heart. Removing their head or heart will also destroy them permanently.<br>"
|
||||||
|
antag_memory += " -Wooden stakes can be made from planks, and hardened by a welding tool. Your recipes list has ways of making them even stronger.<br>"
|
||||||
|
antag_memory += " -Changelings return to life unless their body is destroyed. Not even decapitation can stop them for long.<br>"
|
||||||
|
antag_memory += " -Cultists are weak to the Chaplain's holy water.<br>"
|
||||||
|
antag_memory += " -Wizards are notoriously hard to outmatch. Rob or steal whatever weapons you need to destroy them, and shoot before asking questions.<br><br>"
|
||||||
|
if (my_kungfu != null)
|
||||||
|
vamp_hunter_greet += "<span class='announce'>Hunter Tip: Use your [my_kungfu.name] techniques to give you an advantage over the enemy.</span><br>"
|
||||||
|
antag_memory += "You remember your training: You are skilled in the [my_kungfu.name] style of combat.<br>"
|
||||||
|
to_chat(owner, vamp_hunter_greet)
|
||||||
|
|
||||||
|
/datum/antagonist/vamphunter/farewell()
|
||||||
|
to_chat(owner, "<span class='userdanger'>Your hunt has ended: you are no longer a monster hunter!</span>")
|
||||||
|
|
||||||
|
|
||||||
|
// TAKEN FROM: /datum/action/changeling/pheromone_receptors // pheromone_receptors.dm for a version of tracking that Changelings have!
|
||||||
|
|
||||||
|
/*
|
||||||
|
/datum/status_effect/agent_pinpointer/hunter_edition
|
||||||
|
alert_type = /obj/screen/alert/status_effect/agent_pinpointer/hunter_edition
|
||||||
|
minimum_range = HUNTER_SCAN_MIN_DISTANCE
|
||||||
|
tick_interval = HUNTER_SCAN_PING_TIME
|
||||||
|
duration = 160 // Lasts 10s
|
||||||
|
range_fuzz_factor = 5//PINPOINTER_EXTRA_RANDOM_RANGE
|
||||||
|
|
||||||
|
/obj/screen/alert/status_effect/agent_pinpointer/hunter_edition
|
||||||
|
name = "Monster Tracking"
|
||||||
|
desc = "You always know where the hellspawn are."
|
||||||
|
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/hunter_edition/on_creation(mob/living/new_owner, ...)
|
||||||
|
..()
|
||||||
|
|
||||||
|
// Pick target
|
||||||
|
var/turf/my_loc = get_turf(owner)
|
||||||
|
var/list/mob/living/carbon/vamps = list()
|
||||||
|
|
||||||
|
for(var/datum/mind/M in SSticker.mode.bloodsuckers)
|
||||||
|
if (!M.current || M.current == owner || !get_turf(M.current) || !get_turf(new_owner))
|
||||||
|
continue
|
||||||
|
var/datum/antagonist/bloodsucker/antag_datum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if(!istype(antag_datum))
|
||||||
|
continue
|
||||||
|
var/their_loc = get_turf(M.current)
|
||||||
|
var/distance = get_dist_euclidian(my_loc, their_loc)
|
||||||
|
if (distance < HUNTER_SCAN_MAX_DISTANCE)
|
||||||
|
vamps[M.current] = (HUNTER_SCAN_MAX_DISTANCE ** 2) - (distance ** 2)
|
||||||
|
// Found one!
|
||||||
|
if(vamps.len)
|
||||||
|
scan_target = pickweight(vamps) //Point at a 'random' vamp, biasing heavily towards closer ones.
|
||||||
|
to_chat(owner, "<span class='warning'>You detect signs of monsters to the <b>[dir2text(get_dir(my_loc,get_turf(scan_target)))]!</b></span>")
|
||||||
|
// Will yield a "?"
|
||||||
|
else
|
||||||
|
to_chat(owner, "<span class='notice'>There are no monsters nearby.</span>")
|
||||||
|
// Force Point-To Immediately
|
||||||
|
point_to_target()
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/hunter_edition/scan_for_target()
|
||||||
|
// Lose target? Done. Otherwise, scan for target's current position.
|
||||||
|
if (!scan_target && owner)
|
||||||
|
owner.remove_status_effect(/datum/status_effect/agent_pinpointer/hunter_edition)
|
||||||
|
|
||||||
|
// NOTE: Do NOT run ..(), or else we'll remove our target.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/hunter_edition/Destroy()
|
||||||
|
if (scan_target)
|
||||||
|
to_chat(owner, "<span class='notice'>You've lost the trail.</span>")
|
||||||
|
..()
|
||||||
|
*/
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/trackvamp/
|
||||||
|
name = "Track Monster"//"Cellular Emporium"
|
||||||
|
desc = "Take a moment to look for clues of any nearby monsters.<br>These creatures are slippery, and often look like the crew."
|
||||||
|
button_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the BACKGROUND icon
|
||||||
|
background_icon_state = "vamp_power_off" //And this is the state for the background icon
|
||||||
|
icon_icon = 'icons/mob/actions/bloodsucker.dmi' //This is the file for the ACTION icon
|
||||||
|
button_icon_state = "power_hunter" //And this is the state for the action icon
|
||||||
|
|
||||||
|
// Action-Related
|
||||||
|
amToggle = FALSE
|
||||||
|
cooldown = 200 // 10 ticks, 1 second.
|
||||||
|
bloodcost = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/trackvamp/ActivatePower()
|
||||||
|
|
||||||
|
var/mob/living/user = owner
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>You look around, scanning your environment and discerning signs of any filthy, wretched affronts to the natural order.</span>")
|
||||||
|
|
||||||
|
if (!do_mob(user,owner,80))
|
||||||
|
return
|
||||||
|
|
||||||
|
// Add Power
|
||||||
|
// REMOVED //user.apply_status_effect(/datum/status_effect/agent_pinpointer/hunter_edition)
|
||||||
|
// We don't track direction anymore!
|
||||||
|
|
||||||
|
// Return text indicating direction
|
||||||
|
display_proximity()
|
||||||
|
|
||||||
|
// NOTE: DON'T DEACTIVATE!
|
||||||
|
//DeactivatePower()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/trackvamp/proc/display_proximity()
|
||||||
|
// Pick target
|
||||||
|
var/turf/my_loc = get_turf(owner)
|
||||||
|
//var/list/mob/living/carbon/vamps = list()
|
||||||
|
var/best_dist = 9999
|
||||||
|
var/mob/living/best_vamp
|
||||||
|
|
||||||
|
// Track ALL MONSTERS in Game Mode
|
||||||
|
var/list/datum/mind/monsters = list()
|
||||||
|
monsters += SSticker.mode.bloodsuckers
|
||||||
|
monsters += SSticker.mode.devils
|
||||||
|
monsters += SSticker.mode.cult
|
||||||
|
monsters += SSticker.mode.wizards
|
||||||
|
monsters += SSticker.mode.apprentices
|
||||||
|
monsters += SSticker.mode.servants_of_ratvar
|
||||||
|
//monsters += SSticker.mode.changelings Disabled anyways
|
||||||
|
//
|
||||||
|
for(var/datum/mind/M in monsters)
|
||||||
|
if (!M.current || M.current == owner)// || !get_turf(M.current) || !get_turf(owner))
|
||||||
|
continue
|
||||||
|
for(var/a in M.antag_datums)
|
||||||
|
var/datum/antagonist/antag_datum = a // var/datum/antagonist/antag_datum = M.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if(!istype(antag_datum) || antag_datum.AmFinalDeath())
|
||||||
|
continue
|
||||||
|
var/their_loc = get_turf(M.current)
|
||||||
|
var/distance = get_dist_euclidian(my_loc, their_loc)
|
||||||
|
// Found One: Closer than previous/max distance
|
||||||
|
if (distance < best_dist && distance <= HUNTER_SCAN_MAX_DISTANCE)
|
||||||
|
best_dist = distance
|
||||||
|
best_vamp = M.current
|
||||||
|
break // Stop searching through my antag datums and go to the next guy
|
||||||
|
|
||||||
|
// Found one!
|
||||||
|
if(best_vamp)
|
||||||
|
var/distString = best_dist <= HUNTER_SCAN_MAX_DISTANCE / 2 ? "<b>somewhere closeby!</b>" : "somewhere in the distance."
|
||||||
|
//to_chat(owner, "<span class='warning'>You detect signs of Bloodsuckers to the <b>[dir2text(get_dir(my_loc,get_turf(targetVamp)))]!</b></span>")
|
||||||
|
to_chat(owner, "<span class='warning'>You detect signs of monsters [distString]</span>")
|
||||||
|
|
||||||
|
// Will yield a "?"
|
||||||
|
else
|
||||||
|
to_chat(owner, "<span class='notice'>There are no monsters nearby.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// From martial.dm
|
||||||
|
|
||||||
|
/*
|
||||||
|
/datum/martial_art/hunter
|
||||||
|
name = "Hunter-Fu"
|
||||||
|
id = "MARTIALART_HUNTER" //ID, used by mind/has_martialart
|
||||||
|
//streak = ""
|
||||||
|
//max_streak_length = 6
|
||||||
|
//current_target
|
||||||
|
//datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary
|
||||||
|
//deflection_chance = 0 //Chance to deflect projectiles
|
||||||
|
//reroute_deflection = FALSE //Delete the bullet, or actually deflect it in some direction?
|
||||||
|
//block_chance = 0 //Chance to block melee attacks using items while on throw mode.
|
||||||
|
//restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not
|
||||||
|
//help_verb
|
||||||
|
//no_guns = FALSE
|
||||||
|
//allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/can_use(mob/living/carbon/human/H)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/add_to_streak(element,mob/living/carbon/human/D)
|
||||||
|
if(D != current_target)
|
||||||
|
current_target = D
|
||||||
|
streak = ""
|
||||||
|
restraining = 0
|
||||||
|
streak = streak+element
|
||||||
|
if(length(streak) > max_streak_length)
|
||||||
|
streak = copytext(streak,2)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/datum/martial_art/hunter/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D)
|
||||||
|
|
||||||
|
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||||
|
*/
|
||||||
151
code/modules/antagonists/bloodsucker/datum_vassal.dm
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
#define VASSAL_SCAN_MIN_DISTANCE 5
|
||||||
|
#define VASSAL_SCAN_MAX_DISTANCE 500
|
||||||
|
#define VASSAL_SCAN_PING_TIME 20 //2s update time.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/attempt_turn_vassal(mob/living/carbon/C)
|
||||||
|
return SSticker.mode.make_vassal(C,owner)
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/FreeAllVassals()
|
||||||
|
for (var/datum/antagonist/vassal/V in vassals)
|
||||||
|
SSticker.mode.remove_vassal(V.owner)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/vassal
|
||||||
|
name = "Vassal"//WARNING: DO NOT SELECT" // "Vassal"
|
||||||
|
roundend_category = "vassals"
|
||||||
|
antagpanel_category = "Bloodsucker"
|
||||||
|
job_rank = ROLE_BLOODSUCKER
|
||||||
|
var/datum/antagonist/bloodsucker/master // Who made me?
|
||||||
|
var/list/datum/action/powers = list()// Purchased powers
|
||||||
|
var/list/datum/objective/objectives_given = list() // For removal if needed.
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/can_be_owned(datum/mind/new_owner)
|
||||||
|
// If we weren't created by a bloodsucker, then we cannot be a vassal (assigned from antag panel)
|
||||||
|
if (!master)
|
||||||
|
return FALSE
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/on_gain()
|
||||||
|
|
||||||
|
SSticker.mode.vassals |= owner // Add if not already in here (and you might be, if you were picked at round start)
|
||||||
|
|
||||||
|
// Mindslave Add
|
||||||
|
if (master)
|
||||||
|
var/datum/antagonist/bloodsucker/B = master.owner.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (B)
|
||||||
|
B.vassals |= src
|
||||||
|
owner.enslave_mind_to_creator(master.owner.current)
|
||||||
|
|
||||||
|
// Master Pinpointer
|
||||||
|
owner.current.apply_status_effect(/datum/status_effect/agent_pinpointer/vassal_edition)
|
||||||
|
|
||||||
|
// Powers
|
||||||
|
var/datum/action/bloodsucker/vassal/recuperate/new_Recuperate = new ()
|
||||||
|
new_Recuperate.Grant(owner.current)
|
||||||
|
powers += new_Recuperate
|
||||||
|
|
||||||
|
// Give Vassal Objective
|
||||||
|
var/datum/objective/bloodsucker/vassal/vassal_objective = new
|
||||||
|
vassal_objective.owner = owner
|
||||||
|
vassal_objective.generate_objective()
|
||||||
|
objectives += vassal_objective
|
||||||
|
objectives_given += vassal_objective
|
||||||
|
|
||||||
|
// Add Antag HUD
|
||||||
|
update_vassal_icons_added(owner.current, "vassal")
|
||||||
|
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/on_removal()
|
||||||
|
|
||||||
|
SSticker.mode.vassals -= owner // Add if not already in here (and you might be, if you were picked at round start)
|
||||||
|
|
||||||
|
// Mindslave Remove
|
||||||
|
if (master && master.owner)
|
||||||
|
master.vassals -= src
|
||||||
|
if (owner.enslaved_to == master.owner.current)
|
||||||
|
owner.enslaved_to = null
|
||||||
|
|
||||||
|
// Master Pinpointer
|
||||||
|
owner.current.remove_status_effect(/datum/status_effect/agent_pinpointer/vassal_edition)
|
||||||
|
|
||||||
|
// Powers
|
||||||
|
while(powers.len)
|
||||||
|
var/datum/action/power = pick(powers)
|
||||||
|
powers -= power
|
||||||
|
power.Remove(owner.current)
|
||||||
|
|
||||||
|
// Remove Hunter Objectives
|
||||||
|
for(var/O in objectives_given)
|
||||||
|
objectives -= O
|
||||||
|
qdel(O)
|
||||||
|
objectives_given = list()
|
||||||
|
|
||||||
|
|
||||||
|
// Clear Antag HUD
|
||||||
|
update_vassal_icons_removed(owner.current)
|
||||||
|
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/greet()
|
||||||
|
to_chat(owner, "<span class='userdanger'>You are now the mortal servant of [master.owner.current], a bloodsucking vampire!</span>")
|
||||||
|
to_chat(owner, "<span class='boldannounce'>The power of [master.owner.current.p_their()] immortal blood compells you to obey [master.owner.current.p_them()] in all things, even offering your own life to prolong theirs.<br>\
|
||||||
|
You are not required to obey any other Bloodsucker, for only [master.owner.current] is your master. The laws of Nanotransen do not apply to you now; only your vampiric master's word must be obeyed.<span>")
|
||||||
|
// Effects...
|
||||||
|
owner.current.playsound_local(null, 'sound/magic/mutate.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||||
|
//owner.store_memory("You became the mortal servant of [master.owner.current], a bloodsucking vampire!")
|
||||||
|
antag_memory += "You became the mortal servant of <b>[master.owner.current]</b>, a bloodsucking vampire!<br>"
|
||||||
|
|
||||||
|
// And to your new Master...
|
||||||
|
to_chat(master.owner, "<span class='userdanger'>[owner.current] has become addicted to your immortal blood. [owner.current.p_they(TRUE)] [owner.current.p_are()] now your undying servant!</span>")
|
||||||
|
master.owner.current.playsound_local(null, 'sound/magic/mutate.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/farewell()
|
||||||
|
owner.current.visible_message("[owner.current]'s eyes dart feverishly from side to side, and then stop. [owner.current.p_they(TRUE)] seem[owner.current.p_s()] calm, \
|
||||||
|
like [owner.current.p_they()] [owner.current.p_have()] regained some lost part of [owner.current.p_them()]self.",\
|
||||||
|
"<span class='userdanger'><FONT size = 3>With a snap, you are no longer enslaved to [master.owner]! You breathe in heavily, having regained your free will.</FONT></span>")
|
||||||
|
owner.current.playsound_local(null, 'sound/magic/mutate.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||||
|
// And to your former Master...
|
||||||
|
//if (master && master.owner)
|
||||||
|
// to_chat(master.owner, "<span class='userdanger'>You feel the bond with your vassal [owner.current] has somehow been broken!</span>")
|
||||||
|
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/vassal_edition
|
||||||
|
id = "agent_pinpointer"
|
||||||
|
alert_type = /obj/screen/alert/status_effect/agent_pinpointer/vassal_edition
|
||||||
|
minimum_range = VASSAL_SCAN_MIN_DISTANCE
|
||||||
|
tick_interval = VASSAL_SCAN_PING_TIME
|
||||||
|
duration = -1 // runs out fast
|
||||||
|
range_fuzz_factor = 0
|
||||||
|
|
||||||
|
/obj/screen/alert/status_effect/agent_pinpointer/vassal_edition
|
||||||
|
name = "Blood Bond"
|
||||||
|
desc = "You always know where your master is."
|
||||||
|
//icon = 'icons/obj/device.dmi'
|
||||||
|
//icon_state = "pinon"
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/vassal_edition/on_creation(mob/living/new_owner, ...)
|
||||||
|
..()
|
||||||
|
|
||||||
|
var/datum/antagonist/vassal/antag_datum = new_owner.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
scan_target = antag_datum?.master?.owner?.current
|
||||||
|
|
||||||
|
/datum/status_effect/agent_pinpointer/vassal_edition/scan_for_target()
|
||||||
|
// DO NOTHING. We already have our target, and don't wanna do anything from agent_pinpointer
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/proc/update_vassal_icons_added(mob/living/vassal, icontype="vassal")
|
||||||
|
var/datum/atom_hud/antag/bloodsucker/hud = GLOB.huds[ANTAG_HUD_BLOODSUCKER]
|
||||||
|
hud.join_hud(vassal)
|
||||||
|
set_antag_hud(vassal, icontype) // Located in icons/mob/hud.dmi
|
||||||
|
owner.current.hud_list[ANTAG_HUD].icon = image('icons/mob/hud.dmi', owner.current, "bloodsucker")
|
||||||
|
|
||||||
|
/datum/antagonist/vassal/proc/update_vassal_icons_removed(mob/living/vassal)
|
||||||
|
var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_BLOODSUCKER]
|
||||||
|
hud.leave_hud(vassal)
|
||||||
|
set_antag_hud(vassal, null)
|
||||||
|
|
||||||
|
//Displayed at the start of roundend_category section, default to roundend_category header
|
||||||
|
/datum/antagonist/vassal/roundend_report_header()
|
||||||
|
return "<span class='header'>Loyal to their bloodsucking masters, the Vassals were:</span><br><br>"
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// For blood packs, etc. that need new functions for when they're used.
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// RECIPES: When crafting objects in craft.dm, we now record who made the item.
|
||||||
|
///atom/movable
|
||||||
|
// var/mob/crafter // Who made me? (via Craft skill) Used by Bloodsucker crypt furniture to know who gets to use the buildings.
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// BLOOD BAGS! Add ability to drank em
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/reagent_containers/blood/attack(mob/M, mob/user, def_zone)
|
||||||
|
|
||||||
|
if(user.a_intent == INTENT_HELP && reagents.total_volume > 0)
|
||||||
|
if (user != M)
|
||||||
|
user.visible_message("<span class='userdanger'>[user] forces [M] to drink from the [src].</span>", \
|
||||||
|
"<span class='notice'>You put the [src] up to [M]'s mouth.</span>")
|
||||||
|
if (!do_mob(user, M, 50))
|
||||||
|
return
|
||||||
|
else
|
||||||
|
if (!do_mob(user, M, 10))
|
||||||
|
return
|
||||||
|
user.visible_message("<span class='notice'>[user] puts the [src] up to their mouth.</span>", \
|
||||||
|
"<span class='notice'>You take a sip from the [src].</span>")
|
||||||
|
|
||||||
|
// Safety: In case you spam clicked the blood bag on yourself, and it is now empty (below will divide by zero)
|
||||||
|
if (reagents.total_volume <= 0)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Taken from drinks.dm //
|
||||||
|
var/gulp_size = 5
|
||||||
|
var/fraction = min(gulp_size / reagents.total_volume, 1)
|
||||||
|
//checkLiked(fraction, M) // Blood isn't food, sorry.
|
||||||
|
reagents.reaction(M, INGEST, fraction)
|
||||||
|
reagents.trans_to(M, gulp_size)
|
||||||
|
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/CheckVampOrgans()
|
||||||
|
// Do I have any parts that need replacing?
|
||||||
|
var/obj/item/organ/O
|
||||||
|
|
||||||
|
// Heart
|
||||||
|
O = owner.current.getorganslot(ORGAN_SLOT_HEART)
|
||||||
|
if (!istype(O, /obj/item/organ/heart/vampheart))
|
||||||
|
qdel(O)
|
||||||
|
var/obj/item/organ/heart/vampheart/H = new
|
||||||
|
H.Insert(owner.current)
|
||||||
|
H.Stop() // Now...stop beating!
|
||||||
|
|
||||||
|
// Eyes
|
||||||
|
O = owner.current.getorganslot(ORGAN_SLOT_EYES)
|
||||||
|
if (!istype(O, /obj/item/organ/eyes/vampeyes))
|
||||||
|
qdel(O)
|
||||||
|
var/obj/item/organ/eyes/vampeyes/E = new
|
||||||
|
E.Insert(owner.current)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/RemoveVampOrgans()
|
||||||
|
|
||||||
|
// Heart
|
||||||
|
var/obj/item/organ/heart/H = new
|
||||||
|
H.Insert(owner.current)
|
||||||
|
// Eyes
|
||||||
|
var/obj/item/organ/eyes/E = new
|
||||||
|
E.Insert(owner.current)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// HEART: OVERWRITE //
|
||||||
|
|
||||||
|
/obj/item/organ/heart/proc/HeartStrengthMessage()
|
||||||
|
if (beating)
|
||||||
|
return "a healthy"
|
||||||
|
return "<span class='danger'>an unstable</span>"
|
||||||
|
|
||||||
|
|
||||||
|
// HEART //
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart
|
||||||
|
beating = 0
|
||||||
|
var/fakingit = 0
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart/prepare_eat()
|
||||||
|
..()
|
||||||
|
// Do cool stuff for eating vamp heart?
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart/Restart()
|
||||||
|
beating = 0 // DONT run ..(). We don't want to start beating again.
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart/Stop()
|
||||||
|
fakingit = 0
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart/proc/FakeStart()
|
||||||
|
fakingit = 1 // We're pretending to beat, to fool people.
|
||||||
|
|
||||||
|
/obj/item/organ/heart/vampheart/HeartStrengthMessage()
|
||||||
|
if (fakingit)
|
||||||
|
return "a healthy"
|
||||||
|
return "<span class='danger'>no</span>" // Bloodsuckers don't have a heartbeat at all when stopped (default is "an unstable")
|
||||||
|
|
||||||
|
|
||||||
|
// EYES //
|
||||||
|
|
||||||
|
/obj/item/organ/eyes/vampeyes
|
||||||
|
lighting_alpha = 180 // LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE <--- This is too low a value at 128. We need to SEE what the darkness is so we can hide in it.
|
||||||
|
see_in_dark = 12
|
||||||
|
flash_protect = -1
|
||||||
|
//sight_flags = SEE_TURFS // Taken from augmented_eyesight.dm
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
// LIVER //
|
||||||
|
/obj/item/organ/liver/vampliver
|
||||||
|
// Livers run on_life(), which calls reagents.metabolize() in holder.dm, which calls on_mob_life.dm in the cheam (medicine_reagents.dm)
|
||||||
|
// Holder also calls reagents.reaction_mob for the moment it happens
|
||||||
|
|
||||||
|
/obj/item/organ/liver/vampliver/on_life()
|
||||||
|
var/mob/living/carbon/C = owner
|
||||||
|
|
||||||
|
if(!istype(C))
|
||||||
|
return
|
||||||
|
|
||||||
|
*/
|
||||||
218
code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// organ_internal.dm -- /obj/item/organ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Do I have a stake in my heart?
|
||||||
|
/mob/living/AmStaked()
|
||||||
|
var/obj/item/bodypart/BP = get_bodypart("chest")
|
||||||
|
if (!BP)
|
||||||
|
return FALSE
|
||||||
|
for(var/obj/item/I in BP.embedded_objects)
|
||||||
|
if (istype(I,/obj/item/stake/))
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
/mob/proc/AmStaked()
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/proc/StakeCanKillMe()
|
||||||
|
return IsSleeping() || stat >= UNCONSCIOUS || blood_volume <= 0 || HAS_TRAIT(src, TRAIT_DEATHCOMA) // NOTE: You can't go to sleep in a coffin with a stake in you.
|
||||||
|
|
||||||
|
|
||||||
|
///obj/item/weapon/melee/stake
|
||||||
|
/obj/item/stake/
|
||||||
|
name = "wooden stake"
|
||||||
|
desc = "A simple wooden stake carved to a sharp point."
|
||||||
|
icon = 'icons/obj/items_and_weapons.dmi'
|
||||||
|
icon_state = "wood" // Inventory Icon
|
||||||
|
item_state = "wood" // In-hand Icon
|
||||||
|
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' // File for in-hand icon
|
||||||
|
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||||
|
attack_verb = list("staked")
|
||||||
|
slot_flags = ITEM_SLOT_BELT
|
||||||
|
w_class = WEIGHT_CLASS_SMALL
|
||||||
|
|
||||||
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||||
|
force = 6
|
||||||
|
throwforce = 10
|
||||||
|
embedding = list("embed_chance" = 25, "embedded_fall_chance" = 0.5) // UPDATE 2/10/18 embedding_behavior.dm is how this is handled
|
||||||
|
//embed_chance = 25 // Look up "is_pointed" to see where we set stakes able to do this.
|
||||||
|
//embedded_fall_chance = 0.5 // Chance it will fall out.
|
||||||
|
obj_integrity = 30
|
||||||
|
max_integrity = 30
|
||||||
|
//embedded_fall_pain_multiplier
|
||||||
|
|
||||||
|
var/staketime = 120 // Time it takes to embed the stake into someone's chest.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/stake/basic
|
||||||
|
name = "wooden stake"
|
||||||
|
// This exists so Hardened/Silver Stake can't have a welding torch used on them.
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/stake/basic/attackby(obj/item/W, mob/user, params)
|
||||||
|
if (istype(W, /obj/item/weldingtool))
|
||||||
|
//if (amWelded)
|
||||||
|
// to_chat(user, "<span class='warning'>This stake has already been treated with fire.</span>")
|
||||||
|
// return
|
||||||
|
//amWelded = TRUE
|
||||||
|
// Weld it
|
||||||
|
var/obj/item/weldingtool/WT = W
|
||||||
|
if(WT.use(0))//remove_fuel(0,user))
|
||||||
|
user.visible_message("[user.name] scorched the pointy end of [src] with the welding tool.", \
|
||||||
|
"<span class='notice'>You scorch the pointy end of [src] with the welding tool.</span>", \
|
||||||
|
"<span class='italics'>You hear welding.</span>")
|
||||||
|
// 8 Second Timer
|
||||||
|
if (!do_mob(user, src, 80))
|
||||||
|
return
|
||||||
|
|
||||||
|
// Create the Stake
|
||||||
|
qdel(src)
|
||||||
|
var/obj/item/stake/hardened/new_item = new(usr.loc)
|
||||||
|
user.put_in_hands(new_item)
|
||||||
|
|
||||||
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/stake/afterattack(atom/target, mob/user, proximity)
|
||||||
|
//to_chat(world, "<span class='notice'>DEBUG: Staking </span>")
|
||||||
|
// Invalid Target, or not targetting chest with HARM intent?
|
||||||
|
if (!iscarbon(target) || check_zone(user.zone_selected) != "chest" || user.a_intent != INTENT_HARM)
|
||||||
|
return
|
||||||
|
var/mob/living/carbon/C = target
|
||||||
|
// Needs to be Down/Slipped in some way to Stake.
|
||||||
|
if (!C.can_be_staked())
|
||||||
|
return
|
||||||
|
// Oops! Can't.
|
||||||
|
if(HAS_TRAIT(C, TRAIT_PIERCEIMMUNE))
|
||||||
|
to_chat(user, "<span class='danger'>[target]'s chest resists the stake. It won't go in.</span>")
|
||||||
|
return
|
||||||
|
// Make Attempt...
|
||||||
|
to_chat(user, "<span class='notice'>You put all your weight into embedding the stake into [target]'s chest...</span>")
|
||||||
|
playsound(user, 'sound/magic/Demon_consume.ogg', 50, 1)
|
||||||
|
if (!do_mob(user, C, staketime, 0, 1, extra_checks=CALLBACK(C, /mob/living/carbon/proc/can_be_staked))) // user / target / time / uninterruptable / show progress bar / extra checks
|
||||||
|
return
|
||||||
|
|
||||||
|
// Drop & Embed Stake
|
||||||
|
user.visible_message("<span class='danger'>[user.name] drives the [src] into [target]'s chest!</span>", \
|
||||||
|
"<span class='danger'>You drive the [src] into [target]'s chest!</span>")
|
||||||
|
playsound(get_turf(target), 'sound/effects/splat.ogg', 40, 1)
|
||||||
|
|
||||||
|
user.dropItemToGround(src, TRUE) //user.drop_item() // "drop item" doesn't seem to exist anymore. New proc is user.dropItemToGround() but it doesn't seem like it's needed now?
|
||||||
|
|
||||||
|
var/obj/item/bodypart/B = C.get_bodypart("chest") // This was all taken from hitby() in human_defense.dm
|
||||||
|
B.embedded_objects |= src
|
||||||
|
add_mob_blood(target)//Place blood on the stake
|
||||||
|
loc = C // Put INSIDE the character
|
||||||
|
B.receive_damage(w_class * embedding.embedded_impact_pain_multiplier)
|
||||||
|
|
||||||
|
if (C.mind)
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsucker = C.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (bloodsucker)
|
||||||
|
// If DEAD or TORPID...kill vamp!
|
||||||
|
if (C.StakeCanKillMe()) // NOTE: This is the ONLY time a staked Torpid vamp dies.
|
||||||
|
bloodsucker.FinalDeath()
|
||||||
|
return
|
||||||
|
else
|
||||||
|
to_chat(target, "<span class='userdanger'>You have been staked! Your powers are useless, your death forever, while it remains in place.</span>")
|
||||||
|
to_chat(user, "<span class='warning'>You missed [C.p_their(TRUE)]'s heart! It would be easier if [C.p_they(TRUE)] weren't struggling so much.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Can this target be staked? If someone stands up before this is complete, it fails. Best used on someone stationary.
|
||||||
|
/mob/living/carbon/proc/can_be_staked()
|
||||||
|
//return resting || IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH)) || resting || IsStun() || IsFrozen() || (pulledby && pulledby.grab_state >= GRAB_NECK)
|
||||||
|
return !(src.canmove)
|
||||||
|
// ABOVE: Taken from update_mobility() in living.dm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
|
||||||
|
// Taken from /obj/item/stack/rods/attackby in [rods.dm]
|
||||||
|
if (W.get_sharpness())
|
||||||
|
user.visible_message("[user] begins whittling [src] into a pointy object.", \
|
||||||
|
"<span class='notice'>You begin whittling [src] into a sharp point at one end.</span>", \
|
||||||
|
"<span class='italics'>You hear wood carving.</span>")
|
||||||
|
// 8 Second Timer
|
||||||
|
if (!do_mob(user, src, 80))
|
||||||
|
return
|
||||||
|
// Make Stake
|
||||||
|
var/obj/item/stake/basic/new_item = new(usr.loc)
|
||||||
|
user.visible_message("[user] finishes carving a stake out of [src].", \
|
||||||
|
"<span class='notice'>You finish carving a stake out of [src].</span>")
|
||||||
|
// Prepare to Put in Hands (if holding wood)
|
||||||
|
var/obj/item/stack/sheet/mineral/wood/thisStack = src
|
||||||
|
var/replace = (user.get_inactive_held_item()==thisStack)
|
||||||
|
// Use Wood
|
||||||
|
thisStack.use(1)
|
||||||
|
// If stack depleted, put item in that hand (if it had one)
|
||||||
|
if (!thisStack && replace)
|
||||||
|
user.put_in_hands(new_item)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/stake/hardened
|
||||||
|
// Created by welding and acid-treating a simple stake.
|
||||||
|
name = "hardened stake"
|
||||||
|
desc = "A hardened wooden stake carved to a sharp point and scorched at the end."
|
||||||
|
icon_state = "hardened" // Inventory Icon
|
||||||
|
force = 8
|
||||||
|
throwforce = 12
|
||||||
|
armour_penetration = 10
|
||||||
|
embedding = list("embed_chance" = 50, "embedded_fall_chance" = 0) // UPDATE 2/10/18 embedding_behavior.dm is how this is handled
|
||||||
|
obj_integrity = 120
|
||||||
|
max_integrity = 120
|
||||||
|
|
||||||
|
staketime = 80
|
||||||
|
|
||||||
|
/obj/item/stake/hardened/silver
|
||||||
|
name = "silver stake"
|
||||||
|
desc = "Polished and sharp at the end. For when some mofo is always trying to iceskate uphill."
|
||||||
|
icon_state = "silver" // Inventory Icon
|
||||||
|
item_state = "silver" // In-hand Icon
|
||||||
|
siemens_coefficient = 1 //flags = CONDUCT // var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||||
|
force = 9
|
||||||
|
armour_penetration = 25
|
||||||
|
embedding = list("embed_chance" = 65) // UPDATE 2/10/18 embedding_behavior.dm is how this is handled
|
||||||
|
obj_integrity = 300
|
||||||
|
max_integrity = 300
|
||||||
|
|
||||||
|
staketime = 60
|
||||||
|
|
||||||
|
// Convert back to Silver
|
||||||
|
/obj/item/stake/hardened/silver/attackby(obj/item/I, mob/user, params)
|
||||||
|
if(istype(I, /obj/item/weldingtool))
|
||||||
|
var/obj/item/weldingtool/WT = I
|
||||||
|
if(WT.use(0))//remove_fuel(0, user))
|
||||||
|
var/obj/item/stack/sheet/mineral/silver/newsheet = new (user.loc)
|
||||||
|
for(var/obj/item/stack/sheet/mineral/silver/S in user.loc)
|
||||||
|
if(S == newsheet)
|
||||||
|
continue
|
||||||
|
if(S.amount >= S.max_amount)
|
||||||
|
continue
|
||||||
|
S.attackby(newsheet, user)
|
||||||
|
to_chat(user, "<span class='notice'>You melt down the stake and add it to the stack. It now contains [newsheet.amount] sheet\s.</span>")
|
||||||
|
qdel(src)
|
||||||
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
|
// Look up recipes.dm OR pneumaticCannon.dm
|
||||||
|
/datum/crafting_recipe/silver_stake
|
||||||
|
name = "Silver Stake"
|
||||||
|
result = /obj/item/stake/hardened/silver
|
||||||
|
tools = list(/obj/item/weldingtool)
|
||||||
|
reqs = list(/obj/item/stack/sheet/mineral/silver = 1,
|
||||||
|
/obj/item/stake/hardened = 1)
|
||||||
|
///obj/item/stack/packageWrap = 8,
|
||||||
|
///obj/item/pipe = 2)
|
||||||
|
time = 80
|
||||||
|
category = CAT_WEAPONRY
|
||||||
|
subcategory = CAT_WEAPON
|
||||||
@@ -0,0 +1,254 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// TRAIT_DEATHCOMA - Activate this when you're in your coffin to simulate sleep/death.
|
||||||
|
|
||||||
|
|
||||||
|
// Coffins...
|
||||||
|
// -heal all wounds, and quickly.
|
||||||
|
// -restore limbs & organs
|
||||||
|
//
|
||||||
|
|
||||||
|
// Without Coffins...
|
||||||
|
// -
|
||||||
|
// -limbs stay lost
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// To put to sleep: use owner.current.fakedeath("bloodsucker") but change name to "bloodsucker_coffin" so you continue to stay fakedeath despite healing in the main thread!
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/ClaimCoffin(obj/structure/closet/crate/claimed) // NOTE: This can be any "closet" that you are resting AND inside of.
|
||||||
|
// ALREADY CLAIMED
|
||||||
|
if (claimed.resident)
|
||||||
|
if (claimed.resident == owner.current)
|
||||||
|
to_chat(owner, "This is your [src].")
|
||||||
|
else
|
||||||
|
to_chat(owner, "This [src] has already been claimed by another.")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Bloodsucker Learns new Recipes!
|
||||||
|
owner.teach_crafting_recipe(/datum/crafting_recipe/bloodsucker/vassalrack)
|
||||||
|
owner.teach_crafting_recipe(/datum/crafting_recipe/bloodsucker/candelabrum)
|
||||||
|
|
||||||
|
// This is my Lair
|
||||||
|
coffin = claimed
|
||||||
|
lair = get_area(claimed)
|
||||||
|
// DONE
|
||||||
|
to_chat(owner, "<span class='userdanger'>You have claimed the [claimed] as your place of immortal rest! Your lair is now [lair].</span>")
|
||||||
|
to_chat(owner, "<span class='danger'>You have learned new construction recipes to improve your lair.</span>")
|
||||||
|
to_chat(owner, "<span class='announce'>Bloodsucker Tip: Find new lair recipes in the Structures tab of the <i>Crafting Menu</i> at the bottom of the screen, including the <i>Persuasion Rack</i> for converting crew into Vassals.</span><br><br>")
|
||||||
|
|
||||||
|
RunLair() // Start
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// crate.dm
|
||||||
|
/obj/structure/closet/crate
|
||||||
|
var/mob/living/resident // This lets bloodsuckers claim any "closet" as a Coffin, so long as they could get into it and close it. This locks it in place, too.
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin
|
||||||
|
var/pryLidTimer = 250
|
||||||
|
can_weld_shut = FALSE
|
||||||
|
breakout_time = 200
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/blackcoffin
|
||||||
|
name = "black coffin"
|
||||||
|
desc = "For those departed who are not so dear."
|
||||||
|
icon_state = "coffin"
|
||||||
|
icon = 'icons/obj/vamp_obj.dmi'
|
||||||
|
can_weld_shut = FALSE
|
||||||
|
resistance_flags = 0 // Start off with no bonuses.
|
||||||
|
open_sound = 'sound/bloodsucker/coffin_open.ogg'
|
||||||
|
close_sound = 'sound/bloodsucker/coffin_close.ogg'
|
||||||
|
breakout_time = 600
|
||||||
|
pryLidTimer = 400
|
||||||
|
resistance_flags = NONE
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/meatcoffin
|
||||||
|
name = "meat coffin"
|
||||||
|
desc = "When you're ready to meat your maker, the steaks can never be too high."
|
||||||
|
icon_state = "meatcoffin"
|
||||||
|
icon = 'icons/obj/vamp_obj.dmi'
|
||||||
|
can_weld_shut = FALSE
|
||||||
|
resistance_flags = 0 // Start off with no bonuses.
|
||||||
|
open_sound = 'sound/effects/footstep/slime1.ogg'
|
||||||
|
close_sound = 'sound/effects/footstep/slime1.ogg'
|
||||||
|
breakout_time = 200
|
||||||
|
pryLidTimer = 200
|
||||||
|
resistance_flags = NONE
|
||||||
|
material_drop = /obj/item/reagent_containers/food/snacks/meat/slab
|
||||||
|
material_drop_amount = 3
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/metalcoffin
|
||||||
|
name = "metal coffin"
|
||||||
|
desc = "A big metal sardine can inside of another big metal sardine can, in space."
|
||||||
|
icon_state = "metalcoffin"
|
||||||
|
icon = 'icons/obj/vamp_obj.dmi'
|
||||||
|
can_weld_shut = FALSE
|
||||||
|
resistance_flags = FIRE_PROOF | LAVA_PROOF
|
||||||
|
open_sound = 'sound/effects/pressureplate.ogg'
|
||||||
|
close_sound = 'sound/effects/pressureplate.ogg'
|
||||||
|
breakout_time = 300
|
||||||
|
pryLidTimer = 200
|
||||||
|
resistance_flags = NONE
|
||||||
|
material_drop = /obj/item/stack/sheet/metal
|
||||||
|
material_drop_amount = 5
|
||||||
|
|
||||||
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/proc/ClaimCoffin(mob/living/claimant) // NOTE: This can be any "closet" that you are resting AND inside of.
|
||||||
|
// Bloodsucker Claim
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = claimant.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (bloodsuckerdatum)
|
||||||
|
// Vamp Successfuly Claims Me?
|
||||||
|
if (bloodsuckerdatum.ClaimCoffin(src))
|
||||||
|
resident = claimant
|
||||||
|
anchored = 1 // No moving this
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/Destroy()
|
||||||
|
UnclaimCoffin()
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/proc/UnclaimCoffin()
|
||||||
|
if (resident)
|
||||||
|
// Vamp Un-Claim
|
||||||
|
if (resident.mind)
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = resident.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (bloodsuckerdatum && bloodsuckerdatum.coffin == src)
|
||||||
|
bloodsuckerdatum.coffin = null
|
||||||
|
bloodsuckerdatum.lair = null
|
||||||
|
to_chat(resident, "<span class='danger'><span class='italics'>You sense that the link with your coffin, your sacred place of rest, has been brokem! You will need to seek another.</span></span>")
|
||||||
|
resident = null // Remove resident. Because this object isnt removed from the game immediately (GC?) we need to give them a way to see they don't have a home anymore.
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/can_open(mob/living/user)
|
||||||
|
// You cannot lock in/out a coffin's owner. SORRY.
|
||||||
|
if (locked)
|
||||||
|
if(user == resident)
|
||||||
|
if (welded)
|
||||||
|
welded = FALSE
|
||||||
|
update_icon()
|
||||||
|
//to_chat(user, "<span class='notice'>You flip a secret latch and unlock [src].</span>") // Don't bother. We know it's unlocked.
|
||||||
|
locked = FALSE
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
playsound(get_turf(src), 'sound/machines/door_locked.ogg', 20, 1)
|
||||||
|
to_chat(user, "<span class='notice'>[src] is locked tight from the inside.</span>")
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/close(mob/living/user)
|
||||||
|
if (!..())
|
||||||
|
return FALSE
|
||||||
|
// Only the User can put themself into Torpor (if you're already in it, you'll start to heal)
|
||||||
|
if ((user in src))
|
||||||
|
// Bloodsucker Only
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (bloodsuckerdatum)
|
||||||
|
LockMe(user)
|
||||||
|
// Claim?
|
||||||
|
if (!bloodsuckerdatum.coffin && !resident)
|
||||||
|
switch(alert(user,"Do you wish to claim this as your coffin? [get_area(src)] will be your lair.","Claim Lair","Yes", "No"))
|
||||||
|
if("Yes")
|
||||||
|
ClaimCoffin(user)
|
||||||
|
// Stake? No Heal!
|
||||||
|
if (user.AmStaked())
|
||||||
|
to_chat(bloodsuckerdatum.owner.current, "<span class='userdanger'>You are staked! Remove the offending weapon from your heart before sleeping.</span>")
|
||||||
|
return
|
||||||
|
// Heal
|
||||||
|
if (bloodsuckerdatum.HandleHealing(0)) // Healing Mult 0 <--- We only want to check if healing is valid!
|
||||||
|
to_chat(bloodsuckerdatum.owner.current, "<span class='notice'>You enter the horrible slumber of deathless Torpor. You will heal until you are renewed.</span>")
|
||||||
|
bloodsuckerdatum.Torpor_Begin()
|
||||||
|
// Level Up?
|
||||||
|
bloodsuckerdatum.SpendRank() // Auto-Fails if not appropriate
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/attackby(obj/item/W, mob/user, params)
|
||||||
|
// You cannot weld or deconstruct an owned coffin. STILL NOT SORRY.
|
||||||
|
if (resident != null && user != resident) // Owner can destroy their own coffin.
|
||||||
|
if(opened)
|
||||||
|
if(istype(W, cutting_tool))
|
||||||
|
to_chat(user, "<span class='notice'>This is a much more complex mechanical structure than you thought. You don't know where to begin cutting [src].</span>")
|
||||||
|
return
|
||||||
|
else if (anchored && istype(W, /obj/item/wrench)) // Can't unanchor unless owner.
|
||||||
|
to_chat(user, "<span class='danger'>The coffin won't come unanchored from the floor.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
if(locked && istype(W, /obj/item/crowbar))
|
||||||
|
var/pry_time = pryLidTimer * W.toolspeed // Pry speed must be affected by the speed of the tool.
|
||||||
|
user.visible_message("<span class='notice'>[user] tries to pry the lid off of [src] with [W].</span>", \
|
||||||
|
"<span class='notice'>You begin prying the lid off of [src] with [W]. This should take about [DisplayTimeText(pry_time)].</span>")
|
||||||
|
if (!do_mob(user,src,pry_time))
|
||||||
|
return
|
||||||
|
bust_open()
|
||||||
|
user.visible_message("<span class='notice'>[user] snaps the door of [src] wide open.</span>", \
|
||||||
|
"<span class='notice'>The door of [src] snaps open.</span>")
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/coffin/AltClick(mob/user)
|
||||||
|
// Distance Check (Inside Of)
|
||||||
|
if (user in src) // user.Adjacent(src)
|
||||||
|
LockMe(user, !locked)
|
||||||
|
|
||||||
|
/obj/structure/closet/crate/proc/LockMe(mob/user, inLocked = TRUE)
|
||||||
|
// Lock
|
||||||
|
if (user == resident)
|
||||||
|
if (!broken)
|
||||||
|
locked = inLocked
|
||||||
|
to_chat(user, "<span class='notice'>You flip a secret latch and [locked?"":"un"]lock yourself inside [src].</span>")
|
||||||
|
else
|
||||||
|
to_chat(resident, "<span class='notice'>The secret latch to lock [src] from the inside is broken. You set it back into place...</span>")
|
||||||
|
if (do_mob(resident, src, 50))//sleep(10)
|
||||||
|
if (broken) // Spam Safety
|
||||||
|
to_chat(resident, "<span class='notice'>You fix the mechanism and lock it.</span>")
|
||||||
|
broken = FALSE
|
||||||
|
locked = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Look up recipes.dm OR pneumaticCannon.dm
|
||||||
|
/datum/crafting_recipe/bloodsucker/blackcoffin
|
||||||
|
name = "Black Coffin"
|
||||||
|
result = /obj/structure/closet/crate/coffin/blackcoffin
|
||||||
|
tools = list(/obj/item/weldingtool,
|
||||||
|
/obj/item/screwdriver)
|
||||||
|
reqs = list(/obj/item/stack/sheet/cloth = 1,
|
||||||
|
/obj/item/stack/sheet/mineral/wood = 5,
|
||||||
|
/obj/item/stack/sheet/metal = 1)
|
||||||
|
///obj/item/stack/packageWrap = 8,
|
||||||
|
///obj/item/pipe = 2)
|
||||||
|
time = 150
|
||||||
|
category = CAT_STRUCTURE
|
||||||
|
always_availible = TRUE
|
||||||
|
|
||||||
|
/datum/crafting_recipe/bloodsucker/meatcoffin
|
||||||
|
name = "Meat Coffin"
|
||||||
|
result =/obj/structure/closet/crate/coffin/meatcoffin
|
||||||
|
tools = list(/obj/item/kitchen/knife,
|
||||||
|
/obj/item/kitchen/rollingpin)
|
||||||
|
reqs = list(/obj/item/reagent_containers/food/snacks/meat/slab = 5,
|
||||||
|
/obj/item/restraints/handcuffs/cable = 1)
|
||||||
|
time = 150
|
||||||
|
category = CAT_STRUCTURE
|
||||||
|
always_availible = TRUE
|
||||||
|
|
||||||
|
/datum/crafting_recipe/bloodsucker/metalcoffin
|
||||||
|
name = "Metal Coffin"
|
||||||
|
result =/obj/structure/closet/crate/coffin/metalcoffin
|
||||||
|
tools = list(/obj/item/weldingtool,
|
||||||
|
/obj/item/screwdriver)
|
||||||
|
reqs = list(/obj/item/stack/sheet/metal = 5)
|
||||||
|
time = 100
|
||||||
|
category = CAT_STRUCTURE
|
||||||
|
always_availible = TRUE
|
||||||
@@ -0,0 +1,569 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// IDEAS --
|
||||||
|
// An object that disguises your coffin while you're in it!
|
||||||
|
//
|
||||||
|
// An object that lets your lair itself protect you from sunlight, like a coffin would (no healing tho)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Hide a random object somewhere on the station:
|
||||||
|
// var/turf/targetturf = get_random_station_turf()
|
||||||
|
// var/turf/targetturf = get_safe_random_station_turf()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CRYPT OBJECTS
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// PODIUM Stores your Relics
|
||||||
|
//
|
||||||
|
// ALTAR Transmute items into sacred items.
|
||||||
|
//
|
||||||
|
// PORTRAIT Gaze into your past to: restore mood boost?
|
||||||
|
//
|
||||||
|
// BOOKSHELF Discover secrets about crew and locations. Learn languages. Learn marial arts.
|
||||||
|
//
|
||||||
|
// BRAZER Burn rare ingredients to gleen insights.
|
||||||
|
//
|
||||||
|
// RUG Ornate, and creaks when stepped upon by any humanoid other than yourself and your vassals.
|
||||||
|
//
|
||||||
|
// X COFFIN (Handled elsewhere)
|
||||||
|
//
|
||||||
|
// X CANDELABRA (Handled elsewhere)
|
||||||
|
//
|
||||||
|
// THRONE Your mental powers work at any range on anyone inside your crypt.
|
||||||
|
//
|
||||||
|
// MIRROR Find any person
|
||||||
|
//
|
||||||
|
// BUST/STATUE Create terror, but looks just like you (maybe just in Examine?)
|
||||||
|
|
||||||
|
|
||||||
|
// RELICS
|
||||||
|
//
|
||||||
|
// RITUAL DAGGER
|
||||||
|
//
|
||||||
|
// SKULL
|
||||||
|
//
|
||||||
|
// VAMPIRIC SCROLL
|
||||||
|
//
|
||||||
|
// SAINTS BONES
|
||||||
|
//
|
||||||
|
// GRIMOIRE
|
||||||
|
|
||||||
|
|
||||||
|
// RARE INGREDIENTS
|
||||||
|
// Ore
|
||||||
|
// Books (Manuals)
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE: Look up AI and Sentient Disease to see how the game handles the selector logo that only one player is allowed to see. We could add hud for vamps to that?
|
||||||
|
// ALTERNATIVELY, use the Vamp Huds on relics to mark them, but only show to relevant vamps?
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker
|
||||||
|
var/mob/living/owner
|
||||||
|
|
||||||
|
/*
|
||||||
|
/obj/structure/bloodsucker/bloodthrone
|
||||||
|
name = "wicked throne"
|
||||||
|
desc = "Twisted metal shards jut from the arm rests. Very uncomfortable looking. It would take a sadistic sort to sit on this jagged piece of furniture."
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/bloodaltar
|
||||||
|
name = "bloody altar"
|
||||||
|
desc = "It is marble, lined with basalt, and radiates an unnerving chill that puts your skin on edge."
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/bloodstatue
|
||||||
|
name = "bloody countenance"
|
||||||
|
desc = "It looks upsettingly familiar..."
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/bloodportrait
|
||||||
|
name = "oil portrait"
|
||||||
|
desc = "A disturbingly familiar face stares back at you. On second thought, the reds don't seem to be painted in oil..."
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/bloodbrazer
|
||||||
|
name = "lit brazer"
|
||||||
|
desc = "It burns slowly, but doesn't radiate any heat."
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/bloodmirror
|
||||||
|
name = "faded mirror"
|
||||||
|
desc = "You get the sense that the foggy reflection looking back at you has an alien intelligence to it."
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack
|
||||||
|
name = "persuasion rack"
|
||||||
|
desc = "If this wasn't meant for torture, then someone has some fairly horrifying hobbies."
|
||||||
|
icon = 'icons/obj/vamp_obj.dmi'
|
||||||
|
icon_state = "vassalrack"
|
||||||
|
buckle_lying = FALSE
|
||||||
|
anchored = FALSE
|
||||||
|
density = TRUE // Start dense. Once fixed in place, go non-dense.
|
||||||
|
can_buckle = TRUE
|
||||||
|
var/useLock = FALSE // So we can't just keep dragging ppl on here.
|
||||||
|
var/mob/buckled
|
||||||
|
var/convert_progress = 2 // Resets on each new character to be added to the chair. Some effects should lower it...
|
||||||
|
var/disloyalty_confirm = FALSE // Command & Antags need to CONFIRM they are willing to lose their role (and will only do it if the Vassal'ing succeeds)
|
||||||
|
var/disloyalty_offered = FALSE // Has the popup been issued? Don't spam them.
|
||||||
|
var/convert_cost = 10
|
||||||
|
|
||||||
|
//obj/structure/kitchenspike/vassalrack/crowbar_act()
|
||||||
|
// // Do Nothing (Cancel crowbar deconstruct)
|
||||||
|
// return FALSE
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/deconstruct(disassembled = TRUE)
|
||||||
|
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||||
|
new /obj/item/stack/rods(loc, 4)
|
||||||
|
qdel(src)
|
||||||
|
|
||||||
|
/*
|
||||||
|
/obj/structure/closet/CtrlShiftClick(mob/living/user)
|
||||||
|
if(!user.has_trait(TRAIT_SKITTISH))
|
||||||
|
return ..()
|
||||||
|
if(!user.canUseTopic(src) || !isturf(user.loc))
|
||||||
|
return
|
||||||
|
dive_into(user)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// adding a STRAP on top of an icon: look at update_icon in closets.dm, and the use of overlays.dm cut_overlay() and add_overlay()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/MouseDrop_T(atom/movable/O, mob/user)
|
||||||
|
if (!O.Adjacent(src) || O == user || !isliving(O) || !isliving(user) || useLock || has_buckled_mobs() || user.incapacitated())
|
||||||
|
return
|
||||||
|
if (!anchored && user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
to_chat(user, "<span class='danger'>Until this rack is secured in place, it cannot serve its purpose.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
// PULL TARGET: Remember if I was pullin this guy, so we can restore this
|
||||||
|
var/waspulling = (O == owner.pulling)
|
||||||
|
var/wasgrabstate = owner.grab_state
|
||||||
|
// * MOVE! *
|
||||||
|
O.forceMove(drop_location())
|
||||||
|
// PULL TARGET: Restore?
|
||||||
|
if (waspulling)
|
||||||
|
owner.start_pulling(O, wasgrabstate, TRUE)
|
||||||
|
// NOTE: in bs_lunge.dm, we use [target.grabbedby(owner)], which simulates doing a grab action. We don't want that though...we're cutting directly back to where we were in a grab.
|
||||||
|
|
||||||
|
|
||||||
|
// Do Action!
|
||||||
|
useLock = TRUE
|
||||||
|
if(do_mob(user, O, 50))
|
||||||
|
attach_victim(O,user)
|
||||||
|
useLock = FALSE
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/AltClick(mob/user)
|
||||||
|
if (!has_buckled_mobs() || !isliving(user) || useLock)
|
||||||
|
return
|
||||||
|
// Attempt Release (Owner vs Non Owner)
|
||||||
|
var/mob/living/carbon/C = pick(buckled_mobs)
|
||||||
|
if (C)
|
||||||
|
if (user == owner)
|
||||||
|
unbuckle_mob(C)
|
||||||
|
else
|
||||||
|
user_unbuckle_mob(C,user)
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/attach_victim(mob/living/M, mob/living/user)
|
||||||
|
// Standard Buckle Check
|
||||||
|
if (!buckle_mob(M)) // force=TRUE))
|
||||||
|
return
|
||||||
|
// Attempt Buckle
|
||||||
|
user.visible_message("<span class='notice'>[user] straps [M] into the rack, immobilizing them.</span>", \
|
||||||
|
"<span class='boldnotice'>You secure [M] tightly in place. They won't escape you now.</span>")
|
||||||
|
|
||||||
|
playsound(src.loc, 'sound/effects/pop_expl.ogg', 25, 1)
|
||||||
|
//M.forceMove(drop_location()) <--- CANT DO! This cancels the buckle_mob() we JUST did (even if we foced the move)
|
||||||
|
M.setDir(2)
|
||||||
|
density = TRUE
|
||||||
|
var/matrix/m180 = matrix(M.transform)
|
||||||
|
m180.Turn(180)//90)//180
|
||||||
|
animate(M, transform = m180, time = 2)
|
||||||
|
M.pixel_y = -2 //M.get_standard_pixel_y_offset(120)//180)
|
||||||
|
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
// Torture Stuff
|
||||||
|
convert_progress = 2 // Goes down unless you start over.
|
||||||
|
disloyalty_confirm = FALSE // New guy gets the chance to say NO if he's special.
|
||||||
|
disloyalty_offered = FALSE // Prevents spamming torture window.
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/user_unbuckle_mob(mob/living/M, mob/user)
|
||||||
|
// Attempt Unbuckle
|
||||||
|
if (!user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
if (M == user)
|
||||||
|
M.visible_message("<span class='danger'>[user] tries to release themself from the rack!</span>",\
|
||||||
|
"<span class='danger'>You attempt to release yourself from the rack!</span>") // For sound if not seen --> "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||||
|
else
|
||||||
|
M.visible_message("<span class='danger'>[user] tries to pull [M] rack!</span>",\
|
||||||
|
"<span class='danger'>[user] attempts to release you from the rack!</span>") // For sound if not seen --> "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||||
|
if(!do_mob(user, M, 100))
|
||||||
|
return
|
||||||
|
// Did the time. Now try to do it.
|
||||||
|
..()
|
||||||
|
unbuckle_mob(M)
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/unbuckle_mob(mob/living/buckled_mob)//, force=FALSE)
|
||||||
|
if (!..())
|
||||||
|
return
|
||||||
|
var/matrix/m180 = matrix(buckled_mob.transform)
|
||||||
|
m180.Turn(180)//-90)//180
|
||||||
|
animate(buckled_mob, transform = m180, time = 2)
|
||||||
|
buckled_mob.pixel_y = buckled_mob.get_standard_pixel_y_offset(180)
|
||||||
|
src.visible_message(text("<span class='danger'>[buckled_mob][buckled_mob.stat==DEAD?"'s corpse":""] slides off of the rack.</span>"))
|
||||||
|
density = FALSE
|
||||||
|
buckled_mob.AdjustKnockdown(30)
|
||||||
|
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
useLock = FALSE // Failsafe
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/attackby(obj/item/W, mob/user, params)
|
||||||
|
if (has_buckled_mobs()) // Attack w/weapon vs guy standing there? Don't do an attack.
|
||||||
|
attack_hand(user)
|
||||||
|
return FALSE
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/attack_hand(mob/user)
|
||||||
|
//. = ..() // Taken from sacrificial altar in divine.dm
|
||||||
|
//if(.)
|
||||||
|
// return
|
||||||
|
|
||||||
|
// Go away. Torturing.
|
||||||
|
if (useLock)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
// CHECK ONE: Am I claiming this? Is it in the right place?
|
||||||
|
if (istype(bloodsuckerdatum) && !owner)
|
||||||
|
if (!bloodsuckerdatum.lair)
|
||||||
|
to_chat(user, "<span class='danger'>You don't have a lair. Claim a coffin to make that location your lair.</span>")
|
||||||
|
if (bloodsuckerdatum.lair != get_area(src))
|
||||||
|
to_chat(user, "<span class='danger'>You may only activate this structure in your lair: [bloodsuckerdatum.lair].</span>")
|
||||||
|
return
|
||||||
|
switch(alert(user,"Do you wish to afix this structure here?","Secure [src]","Yes", "No"))
|
||||||
|
if("Yes")
|
||||||
|
owner = user
|
||||||
|
density = FALSE
|
||||||
|
anchored = TRUE
|
||||||
|
return
|
||||||
|
|
||||||
|
// No One Home
|
||||||
|
if (!has_buckled_mobs())
|
||||||
|
return
|
||||||
|
|
||||||
|
// CHECK TWO: Am I a non-bloodsucker?
|
||||||
|
var/mob/living/carbon/C = pick(buckled_mobs)
|
||||||
|
if (!istype(bloodsuckerdatum))
|
||||||
|
// Try to release this guy
|
||||||
|
user_unbuckle_mob(C, user)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Bloodsucker Owner! Let the boy go.
|
||||||
|
if (C.mind)
|
||||||
|
var/datum/antagonist/vassal/vassaldatum = C.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||||
|
if (istype(vassaldatum) && vassaldatum.master == bloodsuckerdatum || C.stat >= DEAD)
|
||||||
|
unbuckle_mob(C)
|
||||||
|
useLock = FALSE // Failsafe
|
||||||
|
return
|
||||||
|
|
||||||
|
// Just torture the boy
|
||||||
|
torture_victim(user, C)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/torture_victim(mob/living/user, mob/living/target)
|
||||||
|
|
||||||
|
// Check Bloodmob/living/M, force = FALSE, check_loc = TRUE
|
||||||
|
if (user.blood_volume < convert_cost + 5)
|
||||||
|
to_chat(user, "<span class='notice'>You don't have enough blood to initiate the Dark Communion with [target].</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
// Prep...
|
||||||
|
useLock = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
// Step One: Tick Down Conversion from 3 to 0
|
||||||
|
// Step Two: Break mindshielding/antag (on approve)
|
||||||
|
// Step Three: Blood Ritual
|
||||||
|
|
||||||
|
// Conversion Process
|
||||||
|
if (convert_progress > 0)
|
||||||
|
to_chat(user, "<span class='notice'>You prepare to initiate [target] into your service.</span>")
|
||||||
|
if (!do_torture(user,target))
|
||||||
|
to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
|
||||||
|
else
|
||||||
|
convert_progress -- // Ouch. Stop. Don't.
|
||||||
|
// All done!
|
||||||
|
if (convert_progress <= 0)
|
||||||
|
// FAIL: Can't be Vassal
|
||||||
|
if (!SSticker.mode.can_make_vassal(target, user, display_warning=FALSE)) // If I'm an unconvertable Antag ONLY
|
||||||
|
to_chat(user, "<span class='danger'>[target] doesn't respond to your persuasion. It doesn't appear they can be converted to follow you. <i>\[ALT+click to release\]</span>")
|
||||||
|
convert_progress ++ // Pop it back up some. Avoids wasting Blood on a lost cause.
|
||||||
|
// SUCCESS: All done!
|
||||||
|
else
|
||||||
|
if (RequireDisloyalty(target))
|
||||||
|
to_chat(user, "<span class='boldwarning'>[target] has external loyalties! [target.p_they(TRUE)] will require more <i>persuasion</i> to break [target.p_them()] to your will!</span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>[target] looks ready for the <b>Dark Communion</b>.</span>")
|
||||||
|
// Still Need More Persuasion...
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>[target] could use [convert_progress == 1?"a little":"some"] more <i>persuasion</i>.</span>")
|
||||||
|
|
||||||
|
useLock = FALSE
|
||||||
|
return
|
||||||
|
|
||||||
|
// Check: Mindshield & Antag
|
||||||
|
if (!disloyalty_confirm && RequireDisloyalty(target))
|
||||||
|
if (!do_disloyalty(user,target))
|
||||||
|
to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
|
||||||
|
else if (!disloyalty_confirm)
|
||||||
|
to_chat(user, "<span class='danger'>[target] refuses to give into your persuasion. Perhaps a little more?</span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='notice'>[target] looks ready for the <b>Dark Communion</b>.</span>")
|
||||||
|
useLock = FALSE
|
||||||
|
return
|
||||||
|
|
||||||
|
// Check: Blood
|
||||||
|
if (user.blood_volume < convert_cost)
|
||||||
|
to_chat(user, "<span class='notice'>You don't have enough blood to initiate the Dark Communion with [target].</span>")
|
||||||
|
useLock = FALSE
|
||||||
|
return
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
bloodsuckerdatum.AddBloodVolume(-convert_cost)
|
||||||
|
target.add_mob_blood(user)
|
||||||
|
user.visible_message("<span class='notice'>[user] marks a bloody smear on [target]'s forehead and puts a wrist up to [target.p_their()] mouth!</span>", \
|
||||||
|
"<span class='notice'>You paint a bloody marking across [target]'s forehead, place your wrist to [target.p_their()] mouth, and subject [target.p_them()] to the Dark Communion.</span>")
|
||||||
|
if(!do_mob(user, src, 50))
|
||||||
|
to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
|
||||||
|
useLock = FALSE
|
||||||
|
return
|
||||||
|
|
||||||
|
// Convert to Vassal!
|
||||||
|
if (bloodsuckerdatum && bloodsuckerdatum.attempt_turn_vassal(target))
|
||||||
|
remove_loyalties(target) // In case of Mindshield, or appropriate Antag (Traitor, Internal, etc)
|
||||||
|
|
||||||
|
//if (!target.buckled)
|
||||||
|
// to_chat(user, "<span class='danger'><i>The ritual has been interrupted!</i></span>")
|
||||||
|
// useLock = FALSE
|
||||||
|
// return
|
||||||
|
user.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
target.playsound_local(null, 'sound/effects/explosion_distant.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
target.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
target.Jitter(25)
|
||||||
|
target.emote("laugh")
|
||||||
|
//remove_victim(target) // Remove on CLICK ONLY!
|
||||||
|
|
||||||
|
useLock = FALSE
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/do_torture(mob/living/user, mob/living/target, mult=1)
|
||||||
|
|
||||||
|
var/torture_time = 15 // Fifteen seconds if you aren't using anything. Shorter with weapons and such.
|
||||||
|
var/torture_dmg_brute = 2
|
||||||
|
var/torture_dmg_burn = 0
|
||||||
|
|
||||||
|
// Get Bodypart
|
||||||
|
var/target_string = ""
|
||||||
|
var/obj/item/bodypart/BP = null
|
||||||
|
if (iscarbon(target))
|
||||||
|
var/mob/living/carbon/C = target
|
||||||
|
BP = pick(C.bodyparts)
|
||||||
|
if (BP)
|
||||||
|
target_string += BP.name
|
||||||
|
|
||||||
|
// Get Weapon
|
||||||
|
var/obj/item/I = user.get_active_held_item()
|
||||||
|
if (!istype(I))
|
||||||
|
I = user.get_inactive_held_item()
|
||||||
|
// Create Strings
|
||||||
|
var/method_string = I?.attack_verb?.len ? pick(I.attack_verb) : pick("harmed","tortured","wrenched","twisted","scoured","beaten","lashed","scathed")
|
||||||
|
var/weapon_string = I ? I.name : pick("bare hands","hands","fingers","fists")
|
||||||
|
|
||||||
|
// Weapon Bonus + SFX
|
||||||
|
if (I)
|
||||||
|
torture_time -= I.force / 4
|
||||||
|
torture_dmg_brute += I.force / 4
|
||||||
|
//torture_dmg_burn += I.
|
||||||
|
if (I.sharpness == IS_SHARP)
|
||||||
|
torture_time -= 1
|
||||||
|
else if (I.sharpness == IS_SHARP_ACCURATE)
|
||||||
|
torture_time -= 2
|
||||||
|
if (istype(I, /obj/item/weldingtool))
|
||||||
|
var/obj/item/weldingtool/welder = I
|
||||||
|
welder.welding = TRUE
|
||||||
|
torture_time -= 5
|
||||||
|
torture_dmg_burn += 5
|
||||||
|
|
||||||
|
I.play_tool_sound(target)
|
||||||
|
torture_time = max(50, torture_time * 10) // Minimum 5 seconds.
|
||||||
|
|
||||||
|
// Now run process.
|
||||||
|
if (!do_mob(user, target, torture_time * mult))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// SUCCESS
|
||||||
|
if (I)
|
||||||
|
playsound(loc, I.hitsound, 30, 1, -1)
|
||||||
|
I.play_tool_sound(target)
|
||||||
|
|
||||||
|
target.visible_message("<span class='danger'>[user] has [method_string] [target]'s [target_string] with [user.p_their()] [weapon_string]!</span>", \
|
||||||
|
"<span class='userdanger'>[user] has [method_string] your [target_string] with [user.p_their()] [weapon_string]!</span>")
|
||||||
|
if (!target.is_muzzled())
|
||||||
|
target.emote("scream")
|
||||||
|
target.Jitter(5)
|
||||||
|
target.apply_damages(brute = torture_dmg_brute, burn = torture_dmg_burn, def_zone = (BP ? BP.body_zone : null)) // take_overall_damage(6,0)
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/do_disloyalty(mob/living/user, mob/living/target)
|
||||||
|
|
||||||
|
// OFFER YES/NO NOW!
|
||||||
|
spawn(10)
|
||||||
|
if (useLock && target && target.client) // Are we still torturing? Did we cancel? Are they still here?
|
||||||
|
to_chat(user, "<span class='notice'>[target] has been given the opportunity for servitude. You await their decision...</span>")
|
||||||
|
var/alert_text = "You are being tortured! Do you want to give in and pledge your undying loyalty to [user]?"
|
||||||
|
if (HAS_TRAIT(target, TRAIT_MINDSHIELD))
|
||||||
|
alert_text += "\n\nYou will no longer be loyal to the station!"
|
||||||
|
if (SSticker.mode.AmValidAntag(target.mind))
|
||||||
|
alert_text += "\n\nYou will not lose your current objectives, but they come second to the will of your new master!"
|
||||||
|
switch(alert(target, alert_text,"THE HORRIBLE PAIN! WHEN WILL IT END?!","Yes, Master!", "NEVER!"))
|
||||||
|
if("Yes, Master!")
|
||||||
|
disloyalty_accept(target)
|
||||||
|
else
|
||||||
|
disloyalty_refuse(target)
|
||||||
|
if (!do_torture(user,target, 2))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// NOTE: We only remove loyalties when we're CONVERTED!
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/RequireDisloyalty(mob/living/target)
|
||||||
|
return SSticker.mode.AmValidAntag(target.mind) || HAS_TRAIT(target, TRAIT_MINDSHIELD)
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/disloyalty_accept(mob/living/target)
|
||||||
|
// FAILSAFE: Still on the rack?
|
||||||
|
if (!(locate(target) in buckled_mobs))
|
||||||
|
return
|
||||||
|
|
||||||
|
// NOTE: You can say YES after torture. It'll apply to next time.
|
||||||
|
|
||||||
|
disloyalty_confirm = TRUE
|
||||||
|
|
||||||
|
if (HAS_TRAIT(target, TRAIT_MINDSHIELD))
|
||||||
|
to_chat(target, "<span class='boldnotice'>You give in to the will of your torturer. If they are successful, you will no longer be loyal to the station!</span>")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/disloyalty_refuse(mob/living/target)
|
||||||
|
// FAILSAFE: Still on the rack?
|
||||||
|
if (!(locate(target) in buckled_mobs))
|
||||||
|
return
|
||||||
|
// Failsafe: You already said YES.
|
||||||
|
if (disloyalty_confirm)
|
||||||
|
return
|
||||||
|
to_chat(target, "<span class='notice'>You refuse to give in! You <i>will not</i> break!</span>")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/vassalrack/proc/remove_loyalties(mob/living/target)
|
||||||
|
|
||||||
|
// Find Mind Implant & Destroy
|
||||||
|
if (HAS_TRAIT(target, TRAIT_MINDSHIELD))
|
||||||
|
for(var/obj/item/implant/I in target.implants)
|
||||||
|
if(I.type == /obj/item/implant/mindshield)
|
||||||
|
I.removed(target,silent=TRUE)
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/candelabrum
|
||||||
|
name = "candelabrum"
|
||||||
|
desc = "It burns slowly, but doesn't radiate any heat."
|
||||||
|
icon = 'icons/obj/vamp_obj.dmi'
|
||||||
|
icon_state = "candelabrum"
|
||||||
|
light_color = "#66FFFF"//LIGHT_COLOR_BLUEGREEN // lighting.dm
|
||||||
|
light_power = 3
|
||||||
|
light_range = 0 // to 2
|
||||||
|
density = FALSE
|
||||||
|
anchored = TRUE
|
||||||
|
var/lit = FALSE
|
||||||
|
|
||||||
|
///obj/structure/bloodsucker/candelabrum/is_hot() // candle.dm
|
||||||
|
//return FALSE
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/candelabrum/update_icon()
|
||||||
|
icon_state = "candelabrum[lit ? "_lit" : ""]"
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/candelabrum/attack_hand(mob/user)
|
||||||
|
// Unlight (only a Vamp can light it)
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum))
|
||||||
|
lit = !lit
|
||||||
|
if (lit)
|
||||||
|
set_light(2,3,"#66FFFF")
|
||||||
|
to_chat(user, "You wave your hand over the candelabrum. It springs to life.")
|
||||||
|
else
|
||||||
|
set_light(0)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/structure/bloodsucker/candelabrum/AltClick(mob/user)
|
||||||
|
// Bloodsuckers can turn their candles on from a distance. SPOOOOKY.
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (istype(bloodsuckerdatum))
|
||||||
|
attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/datum/crafting_recipe/bloodsucker/vassalrack
|
||||||
|
name = "Persuasion Rack"
|
||||||
|
//desc = "For converting crewmembers into loyal Vassals."
|
||||||
|
result = /obj/structure/bloodsucker/vassalrack
|
||||||
|
tools = list(/obj/item/weldingtool,
|
||||||
|
///obj/item/screwdriver,
|
||||||
|
/obj/item/wrench
|
||||||
|
)
|
||||||
|
reqs = list(/obj/item/stack/sheet/mineral/wood = 3,
|
||||||
|
/obj/item/stack/sheet/metal = 2,
|
||||||
|
/obj/item/restraints/handcuffs/cable = 2,
|
||||||
|
///obj/item/storage/belt = 1
|
||||||
|
///obj/item/stack/sheet/animalhide = 1, // /obj/item/stack/sheet/leather = 1,
|
||||||
|
///obj/item/stack/sheet/plasteel = 5
|
||||||
|
)
|
||||||
|
//parts = list(/obj/item/storage/belt = 1
|
||||||
|
// )
|
||||||
|
|
||||||
|
time = 150
|
||||||
|
category = CAT_STRUCTURE
|
||||||
|
always_availible = FALSE // Disabled til learned
|
||||||
|
|
||||||
|
|
||||||
|
/datum/crafting_recipe/bloodsucker/candelabrum
|
||||||
|
name = "Candelabrum"
|
||||||
|
//desc = "For converting crewmembers into loyal Vassals."
|
||||||
|
result = /obj/structure/bloodsucker/candelabrum
|
||||||
|
tools = list(/obj/item/weldingtool,
|
||||||
|
/obj/item/wrench
|
||||||
|
)
|
||||||
|
reqs = list(/obj/item/stack/sheet/metal = 3,
|
||||||
|
/obj/item/stack/rods = 1,
|
||||||
|
/obj/item/candle = 1
|
||||||
|
)
|
||||||
|
time = 100
|
||||||
|
category = CAT_STRUCTURE
|
||||||
|
always_availible = FALSE // Disabled til learned
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// OTHER THINGS TO USE: HUMAN BLOOD. /obj/effect/decal/cleanable/blood
|
||||||
105
code/modules/antagonists/bloodsucker/objects/bloodsucker_lair.dm
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
|
||||||
|
|
||||||
|
// Created by claiming a Coffin.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// THINGS TO SPAWN:
|
||||||
|
//
|
||||||
|
// /obj/effect/decal/cleanable/cobweb && /obj/effect/decal/cleanable/cobweb/cobweb2
|
||||||
|
// /obj/effect/decal/cleanable/generic
|
||||||
|
// /obj/effect/decal/cleanable/dirt/dust <-- Pretty cool, just stains the tile itself.
|
||||||
|
// /obj/effect/decal/cleanable/blood/old
|
||||||
|
|
||||||
|
/*
|
||||||
|
/area/
|
||||||
|
// All coffins assigned to this area
|
||||||
|
var/list/obj/structure/closet/crate/laircoffins = new list()
|
||||||
|
|
||||||
|
// Called by Coffin when an area is claimed as a vamp's lair
|
||||||
|
/area/proc/ClaimAsLair(/obj/structure/closet/crate/inClaimant)
|
||||||
|
set waitfor = FALSE // Don't make on_gain() wait for this function to finish. This lets this code run on the side.
|
||||||
|
|
||||||
|
laircoffins += laircoffins
|
||||||
|
sleep()
|
||||||
|
|
||||||
|
// Cancel!
|
||||||
|
if (laircoffins.len == 0)
|
||||||
|
return
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/antagonist/bloodsucker/proc/RunLair()
|
||||||
|
set waitfor = FALSE // Don't make on_gain() wait for this function to finish. This lets this code run on the side.
|
||||||
|
|
||||||
|
while (!AmFinalDeath() && coffin && lair)
|
||||||
|
|
||||||
|
// WAit 10 Sec and Repeat
|
||||||
|
sleep(100)
|
||||||
|
|
||||||
|
// Coffin Moved SOMEHOW?
|
||||||
|
if (lair != get_area(coffin))
|
||||||
|
if (coffin)
|
||||||
|
coffin.UnclaimCoffin()
|
||||||
|
//lair = get_area(coffin)
|
||||||
|
break // DONE
|
||||||
|
|
||||||
|
var/list/turf/area_turfs = get_area_turfs(lair)
|
||||||
|
|
||||||
|
|
||||||
|
// Create Dirt etc.
|
||||||
|
var/turf/T_Dirty = pick(area_turfs)
|
||||||
|
if (T_Dirty && !T_Dirty.density)
|
||||||
|
// Default: Dirt
|
||||||
|
|
||||||
|
// CHECK: Cobweb already there?
|
||||||
|
//if (!locate(var/obj/effect/decal/cleanable/cobweb) in T_Dirty) // REMOVED! Cleanables don't stack.
|
||||||
|
|
||||||
|
// STEP ONE: COBWEBS
|
||||||
|
|
||||||
|
// CHECK: Wall to North?
|
||||||
|
var/turf/check_N = get_step(T_Dirty, NORTH)
|
||||||
|
if (istype(check_N, /turf/closed/wall))
|
||||||
|
// CHECK: Wall to West?
|
||||||
|
var/turf/check_W = get_step(T_Dirty, WEST)
|
||||||
|
if (istype(check_W, /turf/closed/wall))
|
||||||
|
new /obj/effect/decal/cleanable/cobweb (T_Dirty)
|
||||||
|
// CHECK: Wall to East?
|
||||||
|
var/turf/check_E = get_step(T_Dirty, EAST)
|
||||||
|
if (istype(check_E, /turf/closed/wall))
|
||||||
|
new /obj/effect/decal/cleanable/cobweb/cobweb2 (T_Dirty)
|
||||||
|
|
||||||
|
// STEP TWO: DIRT
|
||||||
|
new /obj/effect/decal/cleanable/dirt (T_Dirty)
|
||||||
|
|
||||||
|
|
||||||
|
// Find Animals in Area
|
||||||
|
if (rand(0,2) == 0)
|
||||||
|
var/mobCount = 0
|
||||||
|
var/mobMax = CLAMP(area_turfs.len / 25, 1, 4)
|
||||||
|
for (var/turf/T in area_turfs)
|
||||||
|
if (!T) continue
|
||||||
|
var/mob/living/simple_animal/SA = locate() in T
|
||||||
|
if (SA)
|
||||||
|
mobCount ++
|
||||||
|
if (mobCount >= mobMax) // Already at max
|
||||||
|
break
|
||||||
|
// Spawn One
|
||||||
|
if (mobCount < mobMax)
|
||||||
|
// Seek Out Location
|
||||||
|
while (area_turfs.len > 0)
|
||||||
|
var/turf/T = pick(area_turfs) // We use while&pick instead of a for/loop so it's random, rather than from the top of the list.
|
||||||
|
if (T && !T.density)
|
||||||
|
var/mob/living/simple_animal/SA = /mob/living/simple_animal/mouse // pick(/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/retaliate/bat) //prob(300) /mob/living/simple_animal/mouse,
|
||||||
|
new SA (T)
|
||||||
|
break
|
||||||
|
area_turfs -= T
|
||||||
|
|
||||||
|
// NOTE: area_turfs is now cleared out!
|
||||||
|
if (coffin)
|
||||||
|
coffin.UnclaimCoffin()
|
||||||
|
|
||||||
|
// Done (somehow)
|
||||||
|
lair = null
|
||||||
187
code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn
|
||||||
|
name = "Brawn"//"Cellular Emporium"
|
||||||
|
desc = "Snap restraints with ease, or deal terrible damage with your bare hands."
|
||||||
|
button_icon_state = "power_strength"
|
||||||
|
bloodcost = 8
|
||||||
|
cooldown = 100
|
||||||
|
target_range = 1
|
||||||
|
power_activates_immediately = TRUE
|
||||||
|
message_Trigger = ""//"Whom will you subvert to your will?"
|
||||||
|
must_be_capacitated = TRUE
|
||||||
|
can_be_immobilized = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
// Level Up
|
||||||
|
var/upgrade_canLocker = FALSE
|
||||||
|
var/upgrade_canDoor = FALSE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
. = TRUE
|
||||||
|
// Break Out of Restraints! (And then cancel)
|
||||||
|
if (CheckBreakRestraints())
|
||||||
|
//PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!DEACTIVATE!
|
||||||
|
. = FALSE //return FALSE
|
||||||
|
// Throw Off Attacker! (And then cancel)
|
||||||
|
if (CheckEscapePuller())
|
||||||
|
//PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!DEACTIVATE!
|
||||||
|
. = FALSE //return FALSE
|
||||||
|
// Did we successfuly use power to BREAK CUFFS and/or ESCAPE PULLER?
|
||||||
|
// Then PAY COST!
|
||||||
|
if (. == FALSE)
|
||||||
|
PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!DEACTIVATE!
|
||||||
|
|
||||||
|
// NOTE: We use . = FALSE so that we can break cuffs AND throw off our attacker in one use!
|
||||||
|
//return TRUE
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/CheckValidTarget(atom/A)
|
||||||
|
return isliving(A) || istype(A, /obj/machinery/door) || istype(A, /obj/structure/closet)
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/CheckCanTarget(atom/A, display_error)
|
||||||
|
// DEFAULT CHECKS (Distance)
|
||||||
|
if (!..()) // Disable range notice for Brawn.
|
||||||
|
return FALSE
|
||||||
|
// Must outside Closet to target anyone!
|
||||||
|
if (!isturf(owner.loc))
|
||||||
|
return FALSE
|
||||||
|
// Check: Self
|
||||||
|
if (A == owner)
|
||||||
|
return FALSE
|
||||||
|
// Target Type: Living
|
||||||
|
if (isliving(A))
|
||||||
|
return TRUE
|
||||||
|
// Target Type: Door
|
||||||
|
else if (upgrade_canDoor && istype(A, /obj/machinery/door))
|
||||||
|
return TRUE
|
||||||
|
// Target Type: Closet
|
||||||
|
else if (upgrade_canLocker && istype(A, /obj/structure/closet))
|
||||||
|
return TRUE
|
||||||
|
return ..() // yes, FALSE! You failed if you got here! BAD TARGET
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/FireTargetedPower(atom/A)
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||||
|
|
||||||
|
var/mob/living/carbon/target = A
|
||||||
|
var/mob/living/user = owner
|
||||||
|
|
||||||
|
// Target Type: Mob
|
||||||
|
if (isliving(target))
|
||||||
|
var/mob/living/carbon/user_C = user
|
||||||
|
var/hitStrength = user_C.dna.species.punchdamagehigh * 1.25 + 2
|
||||||
|
|
||||||
|
// Knockdown!
|
||||||
|
var/powerlevel = min(7, 1 + level_current)
|
||||||
|
if (rand(10 + powerlevel) >= 5)
|
||||||
|
target.visible_message("<span class='danger'>[user] has knocked [target] down!</span>", \
|
||||||
|
"<span class='userdanger'>[user] has knocked you down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||||
|
|
||||||
|
target.Knockdown( min(5, rand(10, 10 * powerlevel)) )
|
||||||
|
// Chance of KO
|
||||||
|
if (rand(5 + powerlevel) >= 5 && target.stat <= UNCONSCIOUS)
|
||||||
|
target.Unconscious(40)
|
||||||
|
|
||||||
|
// Attack!
|
||||||
|
playsound(get_turf(target), 'sound/weapons/punch4.ogg', 60, 1, -1)
|
||||||
|
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
|
||||||
|
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(target.zone_selected))
|
||||||
|
target.apply_damage(hitStrength, BRUTE, affecting)
|
||||||
|
|
||||||
|
// Knockback
|
||||||
|
var/send_dir = get_dir(owner, target)
|
||||||
|
var/turf/T = get_ranged_target_turf(target, send_dir, powerlevel)
|
||||||
|
owner.newtonian_move(send_dir) // Bounce back in 0 G
|
||||||
|
target.throw_at(T, powerlevel, TRUE, owner) //new /datum/forced_movement(target, get_ranged_target_turf(target, send_dir, (hitStrength / 4)), 1, FALSE)
|
||||||
|
|
||||||
|
// Target Type: Door
|
||||||
|
else if (upgrade_canDoor && istype(target, /obj/machinery/door))
|
||||||
|
playsound(get_turf(usr), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1)
|
||||||
|
if (do_mob(usr,target,25))
|
||||||
|
var/obj/machinery/door/D = target
|
||||||
|
if (D.Adjacent(user))
|
||||||
|
to_chat(user, "<span class='notice'>You prepare to tear open [D].</span>")
|
||||||
|
user.Stun(10)
|
||||||
|
user.do_attack_animation(D, ATTACK_EFFECT_SMASH)
|
||||||
|
playsound(get_turf(D), 'sound/effects/bang.ogg', 30, 1, -1)
|
||||||
|
D.open(2) // open(2) is like a crowbar or jaws of life.
|
||||||
|
|
||||||
|
// Target Type: Closet
|
||||||
|
else if (upgrade_canLocker && istype(target, /obj/structure/closet))
|
||||||
|
playsound(get_turf(usr), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1)
|
||||||
|
if (do_mob(usr,target,25))
|
||||||
|
var/obj/structure/closet/C = target
|
||||||
|
to_chat(user, "<span class='notice'>You prepare to tear open the [C].</span>")
|
||||||
|
user.Stun(10)
|
||||||
|
user.do_attack_animation(C, ATTACK_EFFECT_SMASH)
|
||||||
|
playsound(get_turf(C), 'sound/effects/bang.ogg', 30, 1, -1)
|
||||||
|
C.bust_open()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/proc/CheckBreakRestraints()
|
||||||
|
|
||||||
|
if (!iscarbon(owner)) // || !owner.restrained()
|
||||||
|
return FALSE
|
||||||
|
// (NOTE: Just like biodegrade.dm, we only remove one thing per use //
|
||||||
|
// Destroy Cuffs
|
||||||
|
var/mob/living/carbon/user_C = owner
|
||||||
|
//message_admins("DEBUG3: attempt_cast() [name] / [user_C.handcuffed] ")
|
||||||
|
if(user_C.handcuffed)
|
||||||
|
var/obj/O = user_C.get_item_by_slot(SLOT_HANDCUFFED)
|
||||||
|
if(istype(O))
|
||||||
|
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
|
||||||
|
// "<span class='warning'>You snap [O] like it's nothing!</span>")
|
||||||
|
user_C.clear_cuffs(O,TRUE)
|
||||||
|
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// Destroy Straightjacket
|
||||||
|
if (ishuman(owner))
|
||||||
|
var/mob/living/carbon/human/user_H = owner
|
||||||
|
if(user_H.wear_suit && user_H.wear_suit.breakouttime)
|
||||||
|
var/obj/item/clothing/suit/S = user_H.get_item_by_slot(ITEM_SLOT_ICLOTHING)
|
||||||
|
if(istype(S))
|
||||||
|
user_C.visible_message("<span class='warning'>[user_C] attempts to remove [S]!</span>", \
|
||||||
|
"<span class='warning'>You rip through [S] like it's nothing!</span>")
|
||||||
|
user_C.clear_cuffs(S,TRUE)
|
||||||
|
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// Destroy Leg Cuffs
|
||||||
|
if(user_C.legcuffed)
|
||||||
|
var/obj/O = user_C.get_item_by_slot(SLOT_LEGCUFFED)
|
||||||
|
if(istype(O))
|
||||||
|
//user_C.visible_message("<span class='warning'>[user_C] attempts to remove [O]!</span>", \
|
||||||
|
// "<span class='warning'>You snap [O] like it's nothing!</span>")
|
||||||
|
user_C.clear_cuffs(O,TRUE)
|
||||||
|
playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/brawn/proc/CheckEscapePuller()
|
||||||
|
if (!owner.pulledby)// || owner.pulledby.grab_state <= GRAB_PASSIVE)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
var/mob/M = owner.pulledby
|
||||||
|
var/pull_power = M.grab_state
|
||||||
|
playsound(get_turf(M), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||||
|
|
||||||
|
// Knock Down (if Living)
|
||||||
|
if (isliving(M))
|
||||||
|
var/mob/living/L = M
|
||||||
|
L.Knockdown(pull_power * 10 + 20)
|
||||||
|
|
||||||
|
// Knock Back (before Knockdown, which probably cancels pull)
|
||||||
|
var/send_dir = get_dir(owner, M)
|
||||||
|
var/turf/T = get_ranged_target_turf(M, send_dir, pull_power)
|
||||||
|
owner.newtonian_move(send_dir) // Bounce back in 0 G
|
||||||
|
M.throw_at(T, pull_power, TRUE, owner, FALSE) // Throw distance based on grab state! Harder grabs punished more aggressively.
|
||||||
|
|
||||||
|
|
||||||
|
// /proc/log_combat(atom/user, atom/target, what_done, atom/object=null, addition=null)
|
||||||
|
log_combat(owner, M, "used Brawn power")
|
||||||
|
|
||||||
|
owner.visible_message("<span class='warning'>[owner] tears free of [M]'s grasp!</span>", \
|
||||||
|
"<span class='warning'>You shrug off [M]'s grasp!</span>")
|
||||||
|
owner.pulledby = null // It's already done, but JUST IN CASE.
|
||||||
|
return TRUE
|
||||||
68
code/modules/antagonists/bloodsucker/powers/bs_cloak.dm
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/cloak
|
||||||
|
name = "Cloak of Darkness"
|
||||||
|
desc = "Blend into the shadows and become invisible to the untrained eye."
|
||||||
|
button_icon_state = "power_cloak"
|
||||||
|
bloodcost = 5
|
||||||
|
cooldown = 50
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
amToggle = TRUE
|
||||||
|
warn_constant_cost = TRUE
|
||||||
|
|
||||||
|
var/light_min = 0.5 // If lum is above this, no good.
|
||||||
|
var/remember_start_loc // Where this power was activated, so it can be checked from ContinueActive
|
||||||
|
// Level Up
|
||||||
|
var/upgrade_canMove = FALSE // Can I move around with this power?
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/cloak/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
// Must be Dark
|
||||||
|
var/turf/T = owner.loc
|
||||||
|
if(istype(T) && T.get_lumcount() > light_min)
|
||||||
|
to_chat(owner, "<span class='warning'>This area is not dark enough to blend in</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/cloak/ActivatePower()
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
var/mob/living/user = owner
|
||||||
|
remember_start_loc = user.loc
|
||||||
|
|
||||||
|
// Freeze in Place (so you don't auto-cancel)
|
||||||
|
//user.mobility_flags &= ~MOBILITY_MOVE
|
||||||
|
while (bloodsuckerdatum && ContinueActive(user))
|
||||||
|
|
||||||
|
//if (!do_mob(user, user, 10, 0, 0, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
|
||||||
|
// return
|
||||||
|
|
||||||
|
// Fade from sight
|
||||||
|
owner.alpha = max(0, owner.alpha - min(75, 20 + 15 * level_current))
|
||||||
|
bloodsuckerdatum.AddBloodVolume(-0.2)
|
||||||
|
|
||||||
|
sleep(5)
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/cloak/ContinueActive(mob/living/user, mob/living/target)
|
||||||
|
if (!..())
|
||||||
|
return FALSE
|
||||||
|
// Must be CONSCIOUS
|
||||||
|
if(user.stat == !CONSCIOUS)
|
||||||
|
to_chat(owner, "<span class='warning'>Your cloak failed due to you falling unconcious! </span>")
|
||||||
|
return FALSE
|
||||||
|
// Must be SAME LOCATION
|
||||||
|
var/turf/T = owner.loc
|
||||||
|
if (!upgrade_canMove && T != remember_start_loc)
|
||||||
|
to_chat(owner, "<span class='warning'>Your cloak is not yet powerfull enough to allow you to move!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Must be DARK
|
||||||
|
if(istype(T) && T.get_lumcount() > light_min)
|
||||||
|
to_chat(owner, "<span class='warning'>Your cloak failed due to there being too much light!</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/cloak/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..()
|
||||||
|
user.alpha = 255
|
||||||
342
code/modules/antagonists/bloodsucker/powers/bs_feed.dm
Normal file
@@ -0,0 +1,342 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed
|
||||||
|
name = "Feed"
|
||||||
|
desc = "Draw the heartsblood of living victims in your grasp.<br><b>None/Passive:</b> Feed silently and unnoticed by your victim.<br><b>Aggressive: </b>Subdue your target quickly."
|
||||||
|
button_icon_state = "power_feed"
|
||||||
|
|
||||||
|
bloodcost = 0
|
||||||
|
cooldown = 30
|
||||||
|
amToggle = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
can_be_staked = TRUE
|
||||||
|
cooldown_static = TRUE
|
||||||
|
|
||||||
|
var/notice_range = 2 // Distance before silent feeding is noticed.
|
||||||
|
var/mob/living/feed_target // So we can validate more than just the guy we're grappling.
|
||||||
|
var/target_grappled = FALSE // If you started grappled, then ending it will end your Feed.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Wearing mask
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if (L.is_mouth_covered())
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You cannot feed with your mouth covered! Remove your mask.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Find my Target!
|
||||||
|
if (!FindMyTarget(display_error)) // Sets feed_target within after Validating
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Not in correct state
|
||||||
|
//if (owner.grab_state < GRAB_PASSIVE)//GRAB_AGGRESSIVEs)
|
||||||
|
// to_chat(owner, "<span class='warning'>You aren't grabbing anyone!</span>")
|
||||||
|
// return FALSE
|
||||||
|
|
||||||
|
// DONE!
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/proc/ValidateTarget(mob/living/target, display_error) // Called twice: validating a subtle victim, or validating your grapple victim.
|
||||||
|
// Bloodsuckers + Animals MUST be grabbed aggressively!
|
||||||
|
if (!owner.pulling || target == owner.pulling && owner.grab_state < GRAB_AGGRESSIVE)
|
||||||
|
// NOTE: It's OKAY that we are checking if(!target) below, AFTER animals here. We want passive check vs animal to warn you first, THEN the standard warning.
|
||||||
|
// Animals:
|
||||||
|
if (isliving(target) && !iscarbon(target))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Lesser beings require a tighter grip.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Bloodsuckers:
|
||||||
|
else if (iscarbon(target) && target.mind && target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Other Bloodsuckers will not fall for your subtle approach.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Must have Target
|
||||||
|
if (!target) // || !ismob(target)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You must be next to or grabbing a victim to feed from them.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Not even living!
|
||||||
|
if (!isliving(target) || issilicon(target))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You may only feed from living beings.</span>")
|
||||||
|
return FALSE
|
||||||
|
if (target.blood_volume <= 0)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your victim has no blood to take.</span>")
|
||||||
|
return FALSE
|
||||||
|
if (ishuman(target))
|
||||||
|
var/mob/living/carbon/human/H = target
|
||||||
|
if(NOBLOOD in H.dna.species.species_traits)// || owner.get_blood_id() != target.get_blood_id())
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your victim's blood is not suitable for you to take.</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// If I'm not grabbing someone, find me someone nearby.
|
||||||
|
/datum/action/bloodsucker/feed/proc/FindMyTarget(display_error)
|
||||||
|
// Default
|
||||||
|
feed_target = null
|
||||||
|
target_grappled = FALSE
|
||||||
|
|
||||||
|
// If you are pulling a mob, that's your target. If you don't like it, then release them.
|
||||||
|
if (owner.pulling && ismob(owner.pulling))
|
||||||
|
// Check grapple target Valid
|
||||||
|
if (!ValidateTarget(owner.pulling, display_error)) // Grabbed targets display error.
|
||||||
|
return FALSE
|
||||||
|
target_grappled = TRUE
|
||||||
|
feed_target = owner.pulling
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
// Find Targets
|
||||||
|
var/list/mob/living/seen_targets = view(1, owner)
|
||||||
|
var/list/mob/living/seen_mobs = list()
|
||||||
|
for(var/mob/living/M in seen_targets)
|
||||||
|
if (isliving(M) && M != owner)
|
||||||
|
seen_mobs += M
|
||||||
|
|
||||||
|
// None Seen!
|
||||||
|
if (seen_mobs.len == 0)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You must be next to or grabbing a victim to feed from them.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
// Check Valids...
|
||||||
|
var/list/targets_valid = list()
|
||||||
|
var/list/targets_dead = list()
|
||||||
|
for(var/mob/living/M in seen_mobs)
|
||||||
|
// Check adjecent Valid target
|
||||||
|
if (M != owner && ValidateTarget(M, display_error = FALSE)) // Do NOT display errors. We'll be doing this again in CheckCanUse(), which will rule out grabbed targets.
|
||||||
|
// Prioritize living, but remember dead as backup
|
||||||
|
if (M.stat < DEAD)
|
||||||
|
targets_valid += M
|
||||||
|
else
|
||||||
|
targets_dead += M
|
||||||
|
|
||||||
|
// No Living? Try dead.
|
||||||
|
if (targets_valid.len == 0 && targets_dead.len > 0)
|
||||||
|
targets_valid = targets_dead
|
||||||
|
// No Targets
|
||||||
|
if (targets_valid.len == 0)
|
||||||
|
// Did I see targets? Then display at least one error
|
||||||
|
if (seen_mobs.len > 1)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>None of these are valid targets to feed from subtly.</span>")
|
||||||
|
else
|
||||||
|
ValidateTarget(seen_mobs[1], display_error)
|
||||||
|
return FALSE
|
||||||
|
// Too Many Targets
|
||||||
|
//else if (targets.len > 1)
|
||||||
|
// if (display_error)
|
||||||
|
// to_chat(owner, "<span class='warning'>You are adjecent to too many witnesses. Either grab your victim or move away.</span>")
|
||||||
|
// return FALSE
|
||||||
|
// One Target!
|
||||||
|
else
|
||||||
|
feed_target = pick(targets_valid)//targets[1]
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/ActivatePower()
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up Activate(), so Deactivate() can happen after.
|
||||||
|
|
||||||
|
var/mob/living/target = feed_target // Stored during CheckCanUse(). Can be a grabbed OR adjecent character.
|
||||||
|
var/mob/living/user = owner
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
// Am I SECRET or LOUD? It stays this way the whole time! I must END IT to try it the other way.
|
||||||
|
var/amSilent = (!target_grappled || owner.grab_state <= GRAB_PASSIVE) // && iscarbon(target) // Non-carbons (animals) not passive. They go straight into aggressive.
|
||||||
|
|
||||||
|
// Initial Wait
|
||||||
|
var/feed_time = (amSilent ? 45 : 25) - (2.5 * level_current)
|
||||||
|
feed_time = max(15, feed_time)
|
||||||
|
if (amSilent)
|
||||||
|
to_chat(user, "<span class='notice'>You lean quietly toward [target] and secretly draw out your fangs...</span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='warning'>You pull [target] close to you and draw out your fangs...</span>")
|
||||||
|
if (!do_mob(user, target, feed_time,0,1,extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))//sleep(10)
|
||||||
|
to_chat(user, "<span class='warning'>Your feeding was interrupted.</span>")
|
||||||
|
//DeactivatePower(user,target)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Put target to Sleep (Bloodsuckers are immune to their own bite's sleep effect)
|
||||||
|
if (!amSilent)
|
||||||
|
ApplyVictimEffects(target) // Sleep, paralysis, immobile, unconscious, and mute
|
||||||
|
if(target.stat <= UNCONSCIOUS)
|
||||||
|
sleep(1)
|
||||||
|
// Wait, then Cancel if Invalid
|
||||||
|
if (!ContinueActive(user,target)) // Cancel. They're gone.
|
||||||
|
//DeactivatePower(user,target)
|
||||||
|
return
|
||||||
|
// Pull Target Close
|
||||||
|
if (!target.density) // Pull target to you if they don't take up space.
|
||||||
|
target.Move(user.loc)
|
||||||
|
|
||||||
|
// Broadcast Message
|
||||||
|
if (amSilent)
|
||||||
|
//if (!iscarbon(target))
|
||||||
|
// user.visible_message("<span class='notice'>[user] shifts [target] closer to [user.p_their()] mouth.</span>", \
|
||||||
|
// "<span class='notice'>You secretly slip your fangs into [target]'s flesh.</span>", \
|
||||||
|
// vision_distance = 2, ignored_mobs=target) // Only people who AREN'T the target will notice this action.
|
||||||
|
//else
|
||||||
|
var/deadmessage = target.stat == DEAD ? "" : " <i>[target.p_they(TRUE)] looks dazed, and will not remember this.</i>"
|
||||||
|
user.visible_message("<span class='notice'>[user] puts [target]'s wrist up to [user.p_their()] mouth.</span>", \
|
||||||
|
"<span class='notice'>You secretly slip your fangs into [target]'s wrist.[deadmessage]</span>", \
|
||||||
|
vision_distance = notice_range, ignored_mobs=target) // Only people who AREN'T the target will notice this action.
|
||||||
|
// Warn Feeder about Witnesses...
|
||||||
|
var/was_unnoticed = TRUE
|
||||||
|
for(var/mob/living/M in viewers(notice_range, owner))
|
||||||
|
if(M != owner && M != target && iscarbon(M) && M.mind && !M.has_unlimited_silicon_privilege && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
was_unnoticed = FALSE
|
||||||
|
break
|
||||||
|
if (was_unnoticed)
|
||||||
|
to_chat(user, "<span class='notice'>You think no one saw you...</span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='warning'>Someone may have noticed...</span>")
|
||||||
|
|
||||||
|
else // /atom/proc/visible_message(message, self_message, blind_message, vision_distance, ignored_mobs)
|
||||||
|
user.visible_message("<span class='warning'>[user] closes [user.p_their()] mouth around [target]'s neck!</span>", \
|
||||||
|
"<span class='warning'>You sink your fangs into [target]'s neck.</span>")
|
||||||
|
|
||||||
|
// My mouth is full!
|
||||||
|
ADD_TRAIT(user, TRAIT_MUTE, "bloodsucker_feed")
|
||||||
|
|
||||||
|
// Begin Feed Loop
|
||||||
|
var/warning_target_inhuman = FALSE
|
||||||
|
var/warning_target_dead = FALSE
|
||||||
|
var/warning_full = FALSE
|
||||||
|
var/warning_target_bloodvol = 99999
|
||||||
|
var/amount_taken = 0
|
||||||
|
var/blood_take_mult = amSilent ? 0.3 : 1 // Quantity to take per tick, based on Silent or not.
|
||||||
|
var/was_alive = target.stat < DEAD && ishuman(target)
|
||||||
|
// Activate Effects
|
||||||
|
//target.add_trait(TRAIT_MUTE, "bloodsucker_victim") // <----- Make mute a power you buy?
|
||||||
|
|
||||||
|
// FEEEEEEEEED!!! //
|
||||||
|
bloodsuckerdatum.poweron_feed = TRUE
|
||||||
|
while (bloodsuckerdatum && target && active)
|
||||||
|
//user.mobility_flags &= ~MOBILITY_MOVE // user.canmove = 0 // Prevents spilling blood accidentally.
|
||||||
|
|
||||||
|
// Abort? A bloody mistake.
|
||||||
|
if (!do_mob(user, target, 20, 0, 0, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
|
||||||
|
// May have disabled Feed during do_mob
|
||||||
|
if (!active || !ContinueActive(user, target))
|
||||||
|
break
|
||||||
|
|
||||||
|
if (amSilent)
|
||||||
|
to_chat(user, "<span class='warning'>Your feeding has been interrupted...but [target.p_they()] didn't seem to notice you.<span>")
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='warning'>Your feeding has been interrupted!</span>")
|
||||||
|
user.visible_message("<span class='danger'>[user] is ripped from [target]'s throat. [target.p_their(TRUE)] blood sprays everywhere!</span>", \
|
||||||
|
"<span class='userdanger'>Your teeth are ripped from [target]'s throat. [target.p_their(TRUE)] blood sprays everywhere!</span>")
|
||||||
|
|
||||||
|
// Deal Damage to Target (should have been more careful!)
|
||||||
|
if (iscarbon(target))
|
||||||
|
var/mob/living/carbon/C = target
|
||||||
|
C.bleed(15)
|
||||||
|
playsound(get_turf(target), 'sound/effects/splat.ogg', 40, 1)
|
||||||
|
if (ishuman(target))
|
||||||
|
var/mob/living/carbon/human/H = target
|
||||||
|
H.bleed_rate += 5
|
||||||
|
target.add_splatter_floor(get_turf(target))
|
||||||
|
user.add_mob_blood(target) // Put target's blood on us. The donor goes in the ( )
|
||||||
|
target.add_mob_blood(target)
|
||||||
|
target.take_overall_damage(10,0)
|
||||||
|
target.emote("scream")
|
||||||
|
|
||||||
|
// Killed Target?
|
||||||
|
if (was_alive)
|
||||||
|
CheckKilledTarget(user,target)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Handle Feeding! User & Victim Effects (per tick)
|
||||||
|
bloodsuckerdatum.HandleFeeding(target, blood_take_mult)
|
||||||
|
amount_taken += amSilent ? 0.3 : 1
|
||||||
|
if (!amSilent)
|
||||||
|
ApplyVictimEffects(target) // Sleep, paralysis, immobile, unconscious, and mute
|
||||||
|
if (amount_taken > 5 && target.stat < DEAD && ishuman(target))
|
||||||
|
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "drankblood", /datum/mood_event/drankblood) // GOOD // in bloodsucker_life.dm
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Not Human?
|
||||||
|
if (!ishuman(target))
|
||||||
|
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "drankblood", /datum/mood_event/drankblood_bad) // BAD // in bloodsucker_life.dm
|
||||||
|
if (!warning_target_inhuman)
|
||||||
|
to_chat(user, "<span class='notice'>You recoil at the taste of a lesser lifeform.</span>")
|
||||||
|
warning_target_inhuman = TRUE
|
||||||
|
// Dead Blood?
|
||||||
|
if (target.stat >= DEAD)
|
||||||
|
if (ishuman(target))
|
||||||
|
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "drankblood", /datum/mood_event/drankblood_dead) // BAD // in bloodsucker_life.dm
|
||||||
|
if (!warning_target_dead)
|
||||||
|
to_chat(user, "<span class='notice'>Your victim is dead. [target.p_their(TRUE)] blood barely nourishes you.</span>")
|
||||||
|
warning_target_dead = TRUE
|
||||||
|
// Full?
|
||||||
|
if (!warning_full && user.blood_volume >= bloodsuckerdatum.maxBloodVolume)
|
||||||
|
to_chat(user, "<span class='notice'>You are full. Further blood will be wasted.</span>")
|
||||||
|
warning_full = TRUE
|
||||||
|
// Blood Remaining? (Carbons/Humans only)
|
||||||
|
if (iscarbon(target) && !target.AmBloodsucker(1))
|
||||||
|
if (target.blood_volume <= BLOOD_VOLUME_BAD && warning_target_bloodvol > BLOOD_VOLUME_BAD)
|
||||||
|
to_chat(user, "<span class='warning'>Your victim's blood volume is fatally low!</span>")
|
||||||
|
else if (target.blood_volume <= BLOOD_VOLUME_OKAY && warning_target_bloodvol > BLOOD_VOLUME_OKAY)
|
||||||
|
to_chat(user, "<span class='warning'>Your victim's blood volume is dangerously low.</span>")
|
||||||
|
else if (target.blood_volume <= BLOOD_VOLUME_SAFE && warning_target_bloodvol > BLOOD_VOLUME_SAFE)
|
||||||
|
to_chat(user, "<span class='notice'>Your victim's blood is at an unsafe level.</span>")
|
||||||
|
warning_target_bloodvol = target.blood_volume // If we had a warning to give, it's been given by now.
|
||||||
|
// Done?
|
||||||
|
if (target.blood_volume <= 0)
|
||||||
|
to_chat(user, "<span class='notice'>You have bled your victim dry.</span>")
|
||||||
|
break
|
||||||
|
|
||||||
|
// Blood Gulp Sound
|
||||||
|
owner.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||||
|
|
||||||
|
// DONE!
|
||||||
|
//DeactivatePower(user,target)
|
||||||
|
if (amSilent)
|
||||||
|
to_chat(user, "<span class='notice'>You slowly release [target]'s wrist." + (target.stat == 0 ? " [target.p_their(TRUE)] face lacks expression, like you've already been forgotten.</span>" : ""))
|
||||||
|
else
|
||||||
|
user.visible_message("<span class='warning'>[user] unclenches their teeth from [target]'s neck.</span>", \
|
||||||
|
"<span class='warning'>You retract your fangs and release [target] from your bite.</span>")
|
||||||
|
|
||||||
|
// /proc/log_combat(atom/user, atom/target, what_done, atom/object=null, addition=null)
|
||||||
|
log_combat(owner, target, "fed on blood", addition="(and took [amount_taken] blood)")
|
||||||
|
|
||||||
|
// Killed Target?
|
||||||
|
if (was_alive)
|
||||||
|
CheckKilledTarget(user,target)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/proc/CheckKilledTarget(mob/living/user, mob/living/target)
|
||||||
|
// Bad Vampire. You shouldn't do that.
|
||||||
|
if (target && target.stat >= DEAD && ishuman(target))
|
||||||
|
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "drankkilled", /datum/mood_event/drankkilled) // BAD // in bloodsucker_life.dm
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/ContinueActive(mob/living/user, mob/living/target)
|
||||||
|
return ..() && target && (!target_grappled || user.pulling == target)// Active, and still Antag,
|
||||||
|
// NOTE: We only care about pulling if target started off that way. Mostly only important for Aggressive feed.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/proc/ApplyVictimEffects(mob/living/target)
|
||||||
|
// Bloodsuckers not affected by "the Kiss" of another vampire
|
||||||
|
if (!target.mind || !target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
target.Unconscious(50,0)
|
||||||
|
target.Knockdown(40 + 5 * level_current,1)
|
||||||
|
// NOTE: THis is based on level of power!
|
||||||
|
if (ishuman(target))
|
||||||
|
target.adjustStaminaLoss(5, forced = TRUE)// Base Stamina Damage
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/feed/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..() // activate = FALSE
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
// No longer Feeding
|
||||||
|
if (bloodsuckerdatum)
|
||||||
|
bloodsuckerdatum.poweron_feed = FALSE
|
||||||
|
feed_target = null
|
||||||
|
// My mouth is no longer full
|
||||||
|
REMOVE_TRAIT(owner, TRAIT_MUTE, "bloodsucker_feed")
|
||||||
|
// Let me move immediately
|
||||||
|
user.update_canmove()
|
||||||
63
code/modules/antagonists/bloodsucker/powers/bs_fortitude.dm
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/fortitude
|
||||||
|
name = "Fortitude"//"Cellular Emporium"
|
||||||
|
desc = "Withstand egregious physical wounds and walk away from attacks that would stun, pierce, and dismember lesser beings. You cannot run while active."
|
||||||
|
button_icon_state = "power_fortitude"
|
||||||
|
bloodcost = 5
|
||||||
|
cooldown = 40
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
amToggle = TRUE
|
||||||
|
warn_constant_cost = TRUE
|
||||||
|
|
||||||
|
var/this_resist // So we can raise and lower your brute resist based on what your level_current WAS.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/fortitude/ActivatePower()
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
var/mob/living/user = owner
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>Your flesh, skin, and muscles become as steel.</span>")
|
||||||
|
|
||||||
|
// Traits & Effects
|
||||||
|
ADD_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||||
|
ADD_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||||
|
ADD_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||||
|
ADD_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||||
|
if (ishuman(owner))
|
||||||
|
var/mob/living/carbon/human/H = owner
|
||||||
|
this_resist = max(0.3, 0.7 - level_current * 0.1)
|
||||||
|
H.physiology.brute_mod *= this_resist//0.5
|
||||||
|
H.physiology.burn_mod *= this_resist//0.5
|
||||||
|
|
||||||
|
// Stop Running (Taken from /datum/quirk/nyctophobia in negative.dm)
|
||||||
|
var/was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||||
|
if (was_running)
|
||||||
|
user.toggle_move_intent()
|
||||||
|
|
||||||
|
while(bloodsuckerdatum && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||||
|
|
||||||
|
// Pay Blood Toll (if awake)
|
||||||
|
if (user.stat == CONSCIOUS)
|
||||||
|
bloodsuckerdatum.AddBloodVolume(-0.5) // Used to be 0.3 blood per 2 seconds, but we're making it more expensive to keep on.
|
||||||
|
|
||||||
|
sleep(20) // Check every few ticks that we haven't disabled this power
|
||||||
|
|
||||||
|
// Return to Running (if you were before)
|
||||||
|
if (was_running && user.m_intent != MOVE_INTENT_RUN)
|
||||||
|
user.toggle_move_intent()
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/fortitude/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..()
|
||||||
|
|
||||||
|
// Restore Traits & Effects
|
||||||
|
REMOVE_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||||
|
REMOVE_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||||
|
REMOVE_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||||
|
REMOVE_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||||
|
if (ishuman(owner))
|
||||||
|
var/mob/living/carbon/human/H = owner
|
||||||
|
H.physiology.brute_mod /= this_resist//0.5
|
||||||
|
H.physiology.burn_mod /= this_resist//0.5
|
||||||
140
code/modules/antagonists/bloodsucker/powers/bs_gohome.dm
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/gohome
|
||||||
|
name = "Vanishing Act"
|
||||||
|
desc = "As dawn aproaches, disperse into mist and return directly to your Lair.<br><b>WARNING:</b> You will drop <b>ALL</b> of your possessions if observed by mortals."
|
||||||
|
button_icon_state = "power_gohome"
|
||||||
|
background_icon_state_on = "vamp_power_off_oneshot" // Even though this never goes off.
|
||||||
|
background_icon_state_off = "vamp_power_off_oneshot"
|
||||||
|
|
||||||
|
bloodcost = 25
|
||||||
|
cooldown = 99999 // It'll never come back.
|
||||||
|
amToggle = FALSE
|
||||||
|
amSingleUse = TRUE
|
||||||
|
|
||||||
|
bloodsucker_can_buy = FALSE // You only get this if you've claimed a lair, and only just before sunrise.
|
||||||
|
can_use_in_torpor = TRUE
|
||||||
|
must_be_capacitated = TRUE
|
||||||
|
can_be_immobilized = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/gohome/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
// Have No Lair (NOTE: You only got this power if you had a lair, so this means it's destroyed)
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
if (!istype(bloodsuckerdatum) || !bloodsuckerdatum.coffin)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your coffin has been destroyed!</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/gohome/ActivatePower()
|
||||||
|
|
||||||
|
var/mob/living/carbon/user = owner
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
|
||||||
|
// IMPORTANT: Check for lair at every step! It might get destroyed.
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>You focus on separating your consciousness from your physical form...</span>")
|
||||||
|
|
||||||
|
|
||||||
|
// STEP ONE: Flicker Lights
|
||||||
|
|
||||||
|
// From statue.dm
|
||||||
|
for(var/obj/machinery/light/L in view(3, get_turf(owner))) // /obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
|
L.flicker(5)
|
||||||
|
playsound(get_turf(owner), 'sound/effects/singlebeat.ogg', 20, 1)
|
||||||
|
|
||||||
|
sleep(50)
|
||||||
|
|
||||||
|
for(var/obj/machinery/light/L in view(3, get_turf(owner))) // /obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
|
L.flicker(5)
|
||||||
|
playsound(get_turf(owner), 'sound/effects/singlebeat.ogg', 40, 1)
|
||||||
|
|
||||||
|
sleep(50)
|
||||||
|
|
||||||
|
for(var/obj/machinery/light/L in view(6, get_turf(owner))) // /obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
|
L.flicker(5)
|
||||||
|
playsound(get_turf(owner), 'sound/effects/singlebeat.ogg', 60, 1)
|
||||||
|
|
||||||
|
|
||||||
|
// ( STEP TWO: Lights OFF? )
|
||||||
|
|
||||||
|
// CHECK: Still have Coffin?
|
||||||
|
if (!istype(bloodsuckerdatum) || !bloodsuckerdatum.coffin)
|
||||||
|
to_chat(user, "<span class='warning'>Your coffin has been destroyed! You no longer have a destination.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if (!owner)
|
||||||
|
return
|
||||||
|
|
||||||
|
// SEEN?: (effects ONLY if there are witnesses! Otherwise you just POOF)
|
||||||
|
// NOTE: Stolen directly from statue.dm, thanks guys!
|
||||||
|
var/am_seen = FALSE // Do Effects (seen by anyone)
|
||||||
|
var/drop_item = FALSE // Drop Stuff (seen by non-vamp)
|
||||||
|
if (isturf(owner.loc)) // Only check if I'm not in a Locker or something.
|
||||||
|
// A) Check for Darkness (we can just leave)
|
||||||
|
var/turf/T = get_turf(user)
|
||||||
|
if(T && T.lighting_object && T.get_lumcount()>= 0.1)
|
||||||
|
// B) Check for Viewers
|
||||||
|
for(var/mob/living/M in viewers(owner))
|
||||||
|
if(M != owner && isliving(M) && M.mind && !M.has_unlimited_silicon_privilege && !M.eye_blind) // M.client <--- add this in after testing!
|
||||||
|
am_seen = TRUE
|
||||||
|
if (!M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
drop_item = TRUE
|
||||||
|
break
|
||||||
|
|
||||||
|
// LOSE CUFFS
|
||||||
|
if(user.handcuffed)
|
||||||
|
var/obj/O = user.handcuffed
|
||||||
|
user.dropItemToGround(O)
|
||||||
|
if(user.legcuffed)
|
||||||
|
var/obj/O = user.legcuffed
|
||||||
|
user.dropItemToGround(O)
|
||||||
|
|
||||||
|
// SEEN!
|
||||||
|
if (drop_item)
|
||||||
|
// DROP: Clothes, held items, and cuffs etc
|
||||||
|
// NOTE: Taken from unequip_everything() in inventory.dm. We need to
|
||||||
|
// *force* all items to drop, so we had to just gut the code out of it.
|
||||||
|
var/list/items = list()
|
||||||
|
items |= user.get_equipped_items()
|
||||||
|
for(var/I in items)
|
||||||
|
user.dropItemToGround(I,TRUE)
|
||||||
|
for(var/obj/item/I in owner.held_items) // drop_all_held_items()
|
||||||
|
user.dropItemToGround(I, TRUE)
|
||||||
|
if (am_seen)
|
||||||
|
// POOF EFFECTS
|
||||||
|
playsound(get_turf(owner), 'sound/magic/summon_karp.ogg', 60, 1)
|
||||||
|
var/datum/effect_system/steam_spread/puff = new /datum/effect_system/steam_spread/()
|
||||||
|
puff.effect_type = /obj/effect/particle_effect/smoke/vampsmoke
|
||||||
|
puff.set_up(3, 0, get_turf(owner))
|
||||||
|
puff.start()
|
||||||
|
|
||||||
|
// TELEPORT: Move to Coffin & Close it!
|
||||||
|
do_teleport(owner, bloodsuckerdatum.coffin, no_effects=TRUE) // in teleport.dm?
|
||||||
|
// SLEEP
|
||||||
|
user.resting = TRUE
|
||||||
|
//user.Unconscious(30,0)
|
||||||
|
user.Stun(30,1)
|
||||||
|
// CLOSE LID: If fail, force me in.
|
||||||
|
if (!bloodsuckerdatum.coffin.close(owner))
|
||||||
|
bloodsuckerdatum.coffin.insert(owner) // Puts me inside.
|
||||||
|
// The following was taken from close() proc in closets.dm
|
||||||
|
// (but we had to do it this way because there is no way to force entry)
|
||||||
|
playsound(bloodsuckerdatum.coffin.loc, bloodsuckerdatum.coffin.close_sound, 15, 1, -3)
|
||||||
|
bloodsuckerdatum.coffin.opened = FALSE
|
||||||
|
bloodsuckerdatum.coffin.density = TRUE
|
||||||
|
bloodsuckerdatum.coffin.update_icon()
|
||||||
|
// Lock Coffin
|
||||||
|
bloodsuckerdatum.coffin.LockMe(owner)
|
||||||
|
|
||||||
|
|
||||||
|
// ( STEP FIVE: Create animal at prev location? )
|
||||||
|
//var/mob/living/simple_animal/SA = /mob/living/simple_animal/hostile/retaliate/bat // pick(/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse,/mob/living/simple_animal/mouse, /mob/living/simple_animal/hostile/retaliate/bat) //prob(300) /mob/living/simple_animal/mouse,
|
||||||
|
//new SA (owner.loc)
|
||||||
92
code/modules/antagonists/bloodsucker/powers/bs_haste.dm
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
|
||||||
|
// Level 1: Speed to location
|
||||||
|
// Level 2: Dodge Bullets
|
||||||
|
// Level 3: Stun People Passed
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste
|
||||||
|
name = "Immortal Haste"
|
||||||
|
desc = "Sprint anywhere in the blink of an eye, slipping past open doors. Those nearby may be knocked away, stunned, or left empty-handed."
|
||||||
|
button_icon_state = "power_speed"
|
||||||
|
bloodcost = 6
|
||||||
|
cooldown = 30
|
||||||
|
target_range = 15
|
||||||
|
power_activates_immediately = TRUE
|
||||||
|
message_Trigger = ""//"Whom will you subvert to your will?"
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
must_be_capacitated = TRUE
|
||||||
|
//var/datum/martial_art/vamphaste/haste_cqc // Assign this when
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
// Being Grabbed
|
||||||
|
if (owner.pulledby && owner.pulledby.grab_state >= GRAB_AGGRESSIVE)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You're being grabbed!</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste/CheckValidTarget(atom/A)
|
||||||
|
return isturf(A) || A.loc != owner.loc // Anything will do, if it's not me or my square
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste/CheckCanTarget(atom/A, display_error)
|
||||||
|
// DEFAULT CHECKS (Distance)
|
||||||
|
if (!..())
|
||||||
|
return FALSE
|
||||||
|
// Check: Range
|
||||||
|
//if (!(A in view(target_range, get_turf(owner))))
|
||||||
|
// return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste/FireTargetedPower(atom/A)
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||||
|
var/mob/living/user = owner
|
||||||
|
var/turf/T = isturf(A) ? A : get_turf(A)
|
||||||
|
// Pulled? Not anymore.
|
||||||
|
owner.pulledby = null
|
||||||
|
// Step One: Heatseek toward Target's Turf
|
||||||
|
walk_to(owner, T, 0, 0.01, 20) // NOTE: this runs in the background! to cancel it, you need to use walk(owner.current,0), or give them a new path.
|
||||||
|
playsound(get_turf(owner), 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||||
|
var/safety = 20
|
||||||
|
while(get_turf(owner) != T && safety > 0 && !(isliving(target) && target.Adjacent(owner)))
|
||||||
|
user.canmove = FALSE //Dont move while doing the thing, or itll break
|
||||||
|
safety --
|
||||||
|
|
||||||
|
// Did I get knocked down?
|
||||||
|
if (owner && owner.incapacitated(ignore_restraints=TRUE,ignore_grab=TRUE))// owner.incapacitated())
|
||||||
|
// We're gonna cancel. But am I on the ground? Spin me!
|
||||||
|
if (user.lying)
|
||||||
|
var/send_dir = get_dir(owner, T)
|
||||||
|
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
|
||||||
|
owner.spin(10)
|
||||||
|
break
|
||||||
|
|
||||||
|
// Spin/Stun people we pass.
|
||||||
|
//var/mob/living/newtarget = locate(/mob/living) in oview(1, owner)
|
||||||
|
var/list/mob/living/foundtargets = list()
|
||||||
|
for (var/mob/living/newtarget in oview(1, owner))
|
||||||
|
if (newtarget && newtarget != target && !(newtarget in foundtargets))//!newtarget.IsKnockdown())
|
||||||
|
if (rand(0, 5) < level_current)
|
||||||
|
playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
|
||||||
|
newtarget.Knockdown(10 + level_current * 5)
|
||||||
|
newtarget.Stun(5 + level_current * 2)
|
||||||
|
if(newtarget.IsStun())
|
||||||
|
newtarget.spin(10,1)
|
||||||
|
if (rand(0,4))
|
||||||
|
newtarget.drop_all_held_items()
|
||||||
|
foundtargets += newtarget
|
||||||
|
sleep(1)
|
||||||
|
if (user)
|
||||||
|
user.update_canmove() //Let the poor guy move again
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/haste/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..() // activate = FALSE
|
||||||
|
user.update_canmove()
|
||||||
102
code/modules/antagonists/bloodsucker/powers/bs_lunge.dm
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
|
||||||
|
// Level 1: Grapple level 2
|
||||||
|
// Level 2: Grapple 3 from Behind
|
||||||
|
// Level 3: Grapple 3 from Shadows
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge
|
||||||
|
name = "Predatory Lunge"
|
||||||
|
desc = "Spring at your target and aggressively grapple them without warning. Attacks from concealment or the rear may even knock them down."
|
||||||
|
button_icon_state = "power_lunge"
|
||||||
|
bloodcost = 10
|
||||||
|
cooldown = 100
|
||||||
|
target_range = 3
|
||||||
|
power_activates_immediately = TRUE
|
||||||
|
message_Trigger = ""//"Whom will you subvert to your will?"
|
||||||
|
must_be_capacitated = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
// Being Grabbed
|
||||||
|
if (owner.pulledby && owner.pulledby.grab_state >= GRAB_AGGRESSIVE)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You're being grabbed!</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge/CheckValidTarget(atom/A)
|
||||||
|
return isliving(A)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge/CheckCanTarget(atom/A, display_error)
|
||||||
|
// Check: Self
|
||||||
|
if (target == owner)
|
||||||
|
return FALSE
|
||||||
|
// Check: Range
|
||||||
|
//if (!(target in view(target_range, get_turf(owner))))
|
||||||
|
// if (display_error)
|
||||||
|
// to_chat(owner, "<span class='warning'>Your victim is too far away.</span>")
|
||||||
|
// return FALSE
|
||||||
|
// DEFAULT CHECKS (Distance)
|
||||||
|
if (!..())
|
||||||
|
return FALSE
|
||||||
|
// Check: Turf
|
||||||
|
var/mob/living/L = A
|
||||||
|
if (!isturf(L.loc))
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge/FireTargetedPower(atom/A)
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||||
|
|
||||||
|
var/mob/living/user = owner
|
||||||
|
var/mob/living/carbon/target = A
|
||||||
|
var/turf/T = get_turf(target)
|
||||||
|
|
||||||
|
// Clear Vars
|
||||||
|
owner.pulling = null
|
||||||
|
|
||||||
|
// Will we Knock them Down?
|
||||||
|
var/do_knockdown = !is_A_facing_B(target,owner) || owner.alpha <= 0 || istype(owner.loc, /obj/structure/closet)
|
||||||
|
// CAUSES: Target has their back to me, I'm invisible, or I'm in a Closet
|
||||||
|
|
||||||
|
// Step One: Heatseek toward Target's Turf
|
||||||
|
walk_towards(owner, T, 0.1, 10) // NOTE: this runs in the background! to cancel it, you need to use walk(owner.current,0), or give them a new path.
|
||||||
|
var/safety = 10
|
||||||
|
while(get_turf(owner) != T && safety > 0 && !(isliving(target) && target.Adjacent(owner)))
|
||||||
|
if(owner.incapacitated())
|
||||||
|
sleep(1)
|
||||||
|
safety --
|
||||||
|
|
||||||
|
// Did I get knocked down?
|
||||||
|
if (owner && owner.incapacitated())
|
||||||
|
if (user.lying)
|
||||||
|
var/send_dir = get_dir(owner, T)
|
||||||
|
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
|
||||||
|
owner.spin(10)
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
|
// Step Two: Check if I'm at/adjectent to Target's CURRENT turf (not original...that was just a destination)
|
||||||
|
if (target.Adjacent(owner))
|
||||||
|
// LEVEL 2: If behind target, mute or unconscious!
|
||||||
|
if (do_knockdown) // && level_current >= 1)
|
||||||
|
target.Knockdown(15 + 10 * level_current,1)
|
||||||
|
// Cancel Walk (we were close enough to contact them)
|
||||||
|
walk(owner,0)
|
||||||
|
//target.Paralyze(10,1)
|
||||||
|
target.grabbedby(owner) // Taken from mutations.dm under changelings
|
||||||
|
target.grippedby(owner, instant = TRUE) //instant aggro grab
|
||||||
|
|
||||||
|
// UNCONSCIOUS or MUTE!
|
||||||
|
//owner.start_pulling(target,GRAB_AGGRESSIVE) // GRAB_PASSIVE, GRAB_AGGRESSIVE, GRAB_NECK, GRAB_KILL
|
||||||
|
|
||||||
|
//DeactivatePower()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..() // activate = FALSE
|
||||||
|
user.update_canmove()
|
||||||
98
code/modules/antagonists/bloodsucker/powers/bs_masquerade.dm
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// WITHOUT THIS POWER:
|
||||||
|
//
|
||||||
|
// - Mid-Blood: SHOW AS PALE
|
||||||
|
// - Low-Blood: SHOW AS DEAD
|
||||||
|
// - No Heartbeat
|
||||||
|
// - Examine shows actual blood
|
||||||
|
// - Thermal homeostasis (ColdBlooded)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// WITH THIS POWER:
|
||||||
|
// - Normal body temp -- remove Cold Blooded (return on deactivate)
|
||||||
|
// -
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/masquerade
|
||||||
|
name = "Masquerade"
|
||||||
|
desc = "Feign the vital signs of a mortal, and escape both casual and medical notice as the monster you truly are."
|
||||||
|
button_icon_state = "power_human"
|
||||||
|
bloodcost = 10
|
||||||
|
cooldown = 50
|
||||||
|
amToggle = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
warn_constant_cost = TRUE
|
||||||
|
can_use_in_torpor = TRUE // Masquerade is maybe the only one that can do this. It stops your healing.
|
||||||
|
cooldown_static = TRUE
|
||||||
|
|
||||||
|
// NOTE: Firing off vulgar powers disables your Masquerade!
|
||||||
|
|
||||||
|
|
||||||
|
/*/datum/action/bloodsucker/masquerade/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
// DONE!
|
||||||
|
return TRUE
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/masquerade/ActivatePower()
|
||||||
|
|
||||||
|
var/mob/living/user = owner
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>Your heart beats falsely within your lifeless chest. You may yet pass for a mortal.</span>")
|
||||||
|
to_chat(user, "<span class='warning'>Your vampiric healing is halted while imitating life.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
// Remove ColdBlooded & Hard/SoftCrit
|
||||||
|
REMOVE_TRAIT(user, TRAIT_COLDBLOODED, "bloodsucker")
|
||||||
|
REMOVE_TRAIT(user, TRAIT_NOHARDCRIT, "bloodsucker")
|
||||||
|
REMOVE_TRAIT(user, TRAIT_NOSOFTCRIT, "bloodsucker")
|
||||||
|
var/obj/item/organ/heart/vampheart/H = user.getorganslot(ORGAN_SLOT_HEART)
|
||||||
|
|
||||||
|
// WE ARE ALIVE! //
|
||||||
|
bloodsuckerdatum.poweron_masquerade = TRUE
|
||||||
|
while(bloodsuckerdatum && ContinueActive(user))
|
||||||
|
|
||||||
|
// HEART
|
||||||
|
if (istype(H))
|
||||||
|
H.FakeStart()
|
||||||
|
|
||||||
|
// PASSIVE (done from LIFE)
|
||||||
|
// Don't Show Pale/Dead on low blood
|
||||||
|
// Don't vomit food
|
||||||
|
// Don't Heal
|
||||||
|
|
||||||
|
// Pay Blood Toll (if awake)
|
||||||
|
if (user.stat == CONSCIOUS)
|
||||||
|
bloodsuckerdatum.AddBloodVolume(-0.2)
|
||||||
|
|
||||||
|
sleep(20) // Check every few ticks that we haven't disabled this power
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/masquerade/ContinueActive(mob/living/user)
|
||||||
|
// Disable if unable to use power anymore.
|
||||||
|
//if (user.stat == DEAD || user.blood_volume <= 0) // not conscious or soft critor uncon, just dead
|
||||||
|
// return FALSE
|
||||||
|
return ..() // Active, and still Antag
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/masquerade/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..() // activate = FALSE
|
||||||
|
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
bloodsuckerdatum.poweron_masquerade = FALSE
|
||||||
|
|
||||||
|
ADD_TRAIT(user, TRAIT_COLDBLOODED, "bloodsucker")
|
||||||
|
ADD_TRAIT(user, TRAIT_NOHARDCRIT, "bloodsucker")
|
||||||
|
ADD_TRAIT(user, TRAIT_NOSOFTCRIT, "bloodsucker")
|
||||||
|
|
||||||
|
// HEART
|
||||||
|
var/obj/item/organ/heart/H = user.getorganslot(ORGAN_SLOT_HEART)
|
||||||
|
H.Stop()
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>Your heart beats one final time, while your skin dries out and your icy pallor returns.</span>")
|
||||||
114
code/modules/antagonists/bloodsucker/powers/bs_mesmerize.dm
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
|
||||||
|
// * MEZMERIZE
|
||||||
|
// LOVE: Target falls in love with you. Being harmed directly causes them harm if they see it?
|
||||||
|
// STAY: Target will do everything they can to stand in the same place.
|
||||||
|
// FOLLOW: Target follows you, spouting random phrases from their history (or maybe Poly's or NPC's vocab?)
|
||||||
|
// ATTACK: Target finds a nearby non-Bloodsucker victim to attack.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize
|
||||||
|
name = "Mesmerize"
|
||||||
|
desc = "Dominate the mind of a mortal who can see your eyes."
|
||||||
|
button_icon_state = "power_mez"
|
||||||
|
bloodcost = 30
|
||||||
|
cooldown = 200
|
||||||
|
target_range = 5
|
||||||
|
power_activates_immediately = FALSE
|
||||||
|
message_Trigger = "Whom will you subvert to your will?"
|
||||||
|
must_be_capacitated = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
if (!owner.getorganslot(ORGAN_SLOT_EYES))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You have no eyes with which to mesmerize.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Eyes covered?
|
||||||
|
var/mob/living/L = owner
|
||||||
|
if (istype(L) && L.is_eyes_covered() || !isturf(owner.loc))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your eyes are concealed from sight.</span>")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize/CheckValidTarget(atom/A)
|
||||||
|
return iscarbon(A)
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize/CheckCanTarget(atom/A,display_error)
|
||||||
|
// Check: Self
|
||||||
|
if (A == owner)
|
||||||
|
return FALSE
|
||||||
|
var/mob/living/carbon/target = A // We already know it's carbon due to CheckValidTarget()
|
||||||
|
// Bloodsucker
|
||||||
|
if (target.mind && target.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Bloodsuckers are immune to [src].</span>")
|
||||||
|
return FALSE
|
||||||
|
// Dead/Unconscious
|
||||||
|
if (target.stat > CONSCIOUS)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your victim is not [(target.stat == DEAD || HAS_TRAIT(target, TRAIT_FAKEDEATH))?"alive":"conscious"].</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Target has eyes?
|
||||||
|
if (!target.getorganslot("heart"))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>They have no eyes!</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Target blind?
|
||||||
|
if (target.eye_blind > 0)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your victim's eyes are glazed over. They cannot perceive you.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Target See Me? (behind wall)
|
||||||
|
if (!(owner in view(target_range, get_turf(target))))
|
||||||
|
// Sub-Check: GET CLOSER
|
||||||
|
//if (!(owner in range(target_range, get_turf(target)))
|
||||||
|
// if (display_error)
|
||||||
|
// to_chat(owner, "<span class='warning'>You're too far from your victim.</span>")
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You're too far outside your victim's view.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Facing target?
|
||||||
|
if (!is_A_facing_B(owner,target)) // in unsorted.dm
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>You must be facing your victim.</span>")
|
||||||
|
return FALSE
|
||||||
|
// Check: Target facing me?
|
||||||
|
if (!target.lying && !is_A_facing_B(target,owner))
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "<span class='warning'>Your victim must be facing you to see into your eyes.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize/FireTargetedPower(atom/A)
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||||
|
|
||||||
|
var/mob/living/carbon/target = A
|
||||||
|
var/mob/living/user = owner
|
||||||
|
|
||||||
|
if (istype(target))
|
||||||
|
ADD_TRAIT(target, TRAIT_MUTE, "bloodsucker_mesmerize")
|
||||||
|
|
||||||
|
if (do_mob(user, target, 40, 0, TRUE, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
|
||||||
|
PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!
|
||||||
|
var/power_time = 90 + level_current * 15
|
||||||
|
to_chat(user, "<span class='notice'>[target] is fixed in place by your hypnotic gaze.</span>")
|
||||||
|
target.Stun(power_time)
|
||||||
|
//target.silent += power_time / 10 // Silent isn't based on ticks.
|
||||||
|
target.next_move = world.time + power_time // <--- Use direct change instead. We want an unmodified delay to their next move // target.changeNext_move(power_time) // check click.dm
|
||||||
|
target.notransform = TRUE // <--- Fuck it. We tried using next_move, but they could STILL resist. We're just doing a hard freeze.
|
||||||
|
spawn(power_time)
|
||||||
|
if (istype(target))
|
||||||
|
target.notransform = FALSE
|
||||||
|
REMOVE_TRAIT(target, TRAIT_MUTE, "bloodsucker_mesmerize")
|
||||||
|
// They Woke Up! (Notice if within view)
|
||||||
|
if (istype(user) && target.stat == CONSCIOUS && (target in view(10, get_turf(user))) )
|
||||||
|
to_chat(user, "<span class='warning'>[target] has snapped out of their trance.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/mesmerize/ContinueActive(mob/living/user, mob/living/target)
|
||||||
|
return ..() && CheckCanUse() && CheckCanTarget(target)
|
||||||
123
code/modules/antagonists/bloodsucker/powers/bs_trespass.dm
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/trespass
|
||||||
|
name = "Trespass"
|
||||||
|
desc = "Become mist and advance two tiles in one direction, ignoring all obstacles except for walls. Useful for skipping past doors and barricades."
|
||||||
|
button_icon_state = "power_tres"
|
||||||
|
|
||||||
|
bloodcost = 10
|
||||||
|
cooldown = 60
|
||||||
|
amToggle = FALSE
|
||||||
|
//target_range = 2
|
||||||
|
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
must_be_capacitated = FALSE
|
||||||
|
can_be_immobilized = TRUE
|
||||||
|
|
||||||
|
var/turf/target_turf // We need to decide where we're going based on where we clicked. It's not actually the tile we clicked.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/trespass/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
if(owner.notransform || !get_turf(owner))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/trespass/CheckValidTarget(atom/A)
|
||||||
|
// Can't target my tile
|
||||||
|
if (A == get_turf(owner) || get_turf(A) == get_turf(owner))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE // All we care about is destination. Anything you click is fine.
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/trespass/CheckCanTarget(atom/A, display_error)
|
||||||
|
// NOTE: Do NOT use ..()! We don't want to check distance or anything.
|
||||||
|
|
||||||
|
// Get clicked tile
|
||||||
|
var/final_turf = isturf(A) ? A : get_turf(A)
|
||||||
|
|
||||||
|
// Are either tiles WALLS?
|
||||||
|
var/turf/from_turf = get_turf(owner)
|
||||||
|
var/this_dir // = get_dir(from_turf, target_turf)
|
||||||
|
for (var/i=1 to 2)
|
||||||
|
// Keep Prev Direction if we've reached final turf
|
||||||
|
if (from_turf != final_turf)
|
||||||
|
this_dir = get_dir(from_turf, final_turf) // Recalculate dir so we don't overshoot on a diagonal.
|
||||||
|
from_turf = get_step(from_turf, this_dir)
|
||||||
|
// ERROR! Wall!
|
||||||
|
if (iswallturf(from_turf))
|
||||||
|
if (display_error)
|
||||||
|
var/wallwarning = (i == 1) ? "in the way" : "at your destination"
|
||||||
|
to_chat(owner, "<span class='warning'>There is a solid wall [wallwarning].</span>")
|
||||||
|
return FALSE
|
||||||
|
// Done
|
||||||
|
target_turf = from_turf
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/targeted/trespass/FireTargetedPower(atom/A)
|
||||||
|
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||||
|
|
||||||
|
// Find target turf, at or below Atom
|
||||||
|
var/mob/living/carbon/user = owner
|
||||||
|
var/turf/my_turf = get_turf(owner)
|
||||||
|
|
||||||
|
user.visible_message("<span class='warning'>[user]'s form dissipates into a cloud of mist!</span>", \
|
||||||
|
"<span class='notice'>You disspiate into formless mist.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
// Effect Origin
|
||||||
|
playsound(get_turf(owner), 'sound/magic/summon_karp.ogg', 60, 1)
|
||||||
|
var/datum/effect_system/steam_spread/puff = new /datum/effect_system/steam_spread/()
|
||||||
|
puff.effect_type = /obj/effect/particle_effect/smoke/vampsmoke
|
||||||
|
puff.set_up(3, 0, my_turf)
|
||||||
|
puff.start()
|
||||||
|
|
||||||
|
var/mist_delay = max(5, 20 - level_current * 2.5) // Level up and do this faster.
|
||||||
|
|
||||||
|
// Freeze Me
|
||||||
|
user.next_move = world.time + mist_delay
|
||||||
|
user.Stun(mist_delay, ignore_canstun = TRUE)
|
||||||
|
user.notransform = TRUE
|
||||||
|
user.density = 0
|
||||||
|
var/invis_was = user.invisibility
|
||||||
|
user.invisibility = INVISIBILITY_MAXIMUM
|
||||||
|
|
||||||
|
// LOSE CUFFS
|
||||||
|
if(user.handcuffed)
|
||||||
|
var/obj/O = user.handcuffed
|
||||||
|
user.dropItemToGround(O)
|
||||||
|
if(user.legcuffed)
|
||||||
|
var/obj/O = user.legcuffed
|
||||||
|
user.dropItemToGround(O)
|
||||||
|
|
||||||
|
// Wait...
|
||||||
|
sleep(mist_delay / 2)
|
||||||
|
|
||||||
|
// Move & Freeze
|
||||||
|
if (isturf(target_turf))
|
||||||
|
do_teleport(owner, target_turf, no_effects=TRUE) // in teleport.dm?
|
||||||
|
user.next_move = world.time + mist_delay / 2
|
||||||
|
user.Stun(mist_delay / 2, ignore_canstun = TRUE)
|
||||||
|
|
||||||
|
// Wait...
|
||||||
|
sleep(mist_delay / 2)
|
||||||
|
|
||||||
|
// Un-Hide & Freeze
|
||||||
|
user.dir = get_dir(my_turf, target_turf)
|
||||||
|
user.next_move = world.time + mist_delay / 2
|
||||||
|
user.Stun(mist_delay / 2, ignore_canstun = TRUE)
|
||||||
|
user.notransform = FALSE
|
||||||
|
user.density = 1
|
||||||
|
user.invisibility = invis_was
|
||||||
|
|
||||||
|
// Effect Destination
|
||||||
|
playsound(get_turf(owner), 'sound/magic/summon_karp.ogg', 60, 1)
|
||||||
|
puff = new /datum/effect_system/steam_spread/()
|
||||||
|
puff.effect_type = /obj/effect/particle_effect/smoke/vampsmoke
|
||||||
|
puff.set_up(3, 0, target_turf)
|
||||||
|
puff.start()
|
||||||
165
code/modules/antagonists/bloodsucker/powers/bs_veil.dm
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil
|
||||||
|
name = "Veil of Many Faces"
|
||||||
|
desc = "Disguise yourself in the illusion of another identity."
|
||||||
|
button_icon_state = "power_veil"
|
||||||
|
bloodcost = 15
|
||||||
|
cooldown = 100
|
||||||
|
amToggle = TRUE
|
||||||
|
bloodsucker_can_buy = TRUE
|
||||||
|
warn_constant_cost = TRUE
|
||||||
|
|
||||||
|
// Outfit Vars
|
||||||
|
var/list/original_items = list()
|
||||||
|
|
||||||
|
// Identity Vars
|
||||||
|
var/prev_gender
|
||||||
|
var/prev_skin_tone
|
||||||
|
var/prev_hair_style
|
||||||
|
var/prev_facial_hair_style
|
||||||
|
var/prev_hair_color
|
||||||
|
var/prev_facial_hair_color
|
||||||
|
var/prev_underwear
|
||||||
|
var/prev_undershirt
|
||||||
|
var/prev_socks
|
||||||
|
var/prev_disfigured
|
||||||
|
var/list/prev_features // For lizards and such
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil/ActivatePower()
|
||||||
|
|
||||||
|
cast_effect() // POOF
|
||||||
|
|
||||||
|
//if (blahblahblah)
|
||||||
|
// Disguise_Outfit()
|
||||||
|
|
||||||
|
Disguise_FaceName()
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil/proc/Disguise_Outfit()
|
||||||
|
|
||||||
|
// Step One: Back up original items
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil/proc/Disguise_FaceName()
|
||||||
|
|
||||||
|
// Change Name/Voice
|
||||||
|
var/mob/living/carbon/human/H = owner
|
||||||
|
H.name_override = H.dna.species.random_name(H.gender)
|
||||||
|
H.name = H.name_override
|
||||||
|
H.SetSpecialVoice(H.name_override)
|
||||||
|
to_chat(owner, "<span class='warning'>You mystify the air around your person. Your identity is now altered.</span>")
|
||||||
|
|
||||||
|
// Store Prev Appearance
|
||||||
|
prev_gender = H.gender
|
||||||
|
prev_skin_tone = H.skin_tone
|
||||||
|
prev_hair_style = H.hair_style
|
||||||
|
prev_facial_hair_style = H.facial_hair_style
|
||||||
|
prev_hair_color = H.hair_color
|
||||||
|
prev_facial_hair_color = H.facial_hair_color
|
||||||
|
prev_underwear = H.underwear
|
||||||
|
prev_undershirt = H.undershirt
|
||||||
|
prev_socks = H.socks
|
||||||
|
//prev_eye_color
|
||||||
|
prev_disfigured = HAS_TRAIT(H, TRAIT_DISFIGURED) // I was disfigured! //prev_disabilities = H.disabilities
|
||||||
|
prev_features = H.dna.features
|
||||||
|
|
||||||
|
// Change Appearance
|
||||||
|
H.gender = pick(MALE, FEMALE)
|
||||||
|
H.skin_tone = random_skin_tone()
|
||||||
|
H.hair_style = random_hair_style(H.gender)
|
||||||
|
H.facial_hair_style = pick(random_facial_hair_style(H.gender),"Shaved")
|
||||||
|
H.hair_color = random_short_color()
|
||||||
|
H.facial_hair_color = H.hair_color
|
||||||
|
H.underwear = random_underwear(H.gender)
|
||||||
|
H.undershirt = random_undershirt(H.gender)
|
||||||
|
H.socks = random_socks(H.gender)
|
||||||
|
//H.eye_color = random_eye_color()
|
||||||
|
REMOVE_TRAIT(H, TRAIT_DISFIGURED, null) //
|
||||||
|
H.dna.features = random_features()
|
||||||
|
|
||||||
|
// Apply Appearance
|
||||||
|
H.update_body() // Outfit and underware, also body.
|
||||||
|
//H.update_mutant_bodyparts() // Lizard tails etc
|
||||||
|
H.update_hair()
|
||||||
|
H.update_body_parts()
|
||||||
|
|
||||||
|
// Wait here til we deactivate power or go unconscious
|
||||||
|
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||||
|
while (ContinueActive(owner) && istype(bloodsuckerdatum))//active && owner && owner.stat == CONSCIOUS)
|
||||||
|
bloodsuckerdatum.AddBloodVolume(-0.2)
|
||||||
|
sleep(10)
|
||||||
|
|
||||||
|
// Wait for a moment if you fell unconscious...
|
||||||
|
if (owner && owner.stat > CONSCIOUS)
|
||||||
|
sleep(50)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/veil/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||||
|
..()
|
||||||
|
if (ishuman(user))
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
|
||||||
|
// Revert Identity
|
||||||
|
H.UnsetSpecialVoice()
|
||||||
|
H.name_override = null
|
||||||
|
H.name = H.real_name
|
||||||
|
|
||||||
|
// Revert Appearance
|
||||||
|
H.gender = prev_gender
|
||||||
|
H.skin_tone = prev_skin_tone
|
||||||
|
H.hair_style = prev_hair_style
|
||||||
|
H.facial_hair_style = prev_facial_hair_style
|
||||||
|
H.hair_color = prev_hair_color
|
||||||
|
H.facial_hair_color = prev_facial_hair_color
|
||||||
|
H.underwear = prev_underwear
|
||||||
|
H.undershirt = prev_undershirt
|
||||||
|
H.socks = prev_socks
|
||||||
|
|
||||||
|
//H.disabilities = prev_disabilities // Restore HUSK, CLUMSY, etc.
|
||||||
|
if (prev_disfigured)
|
||||||
|
ADD_TRAIT(H, TRAIT_DISFIGURED, "husk") // NOTE: We are ASSUMING husk. // H.status_flags |= DISFIGURED // Restore "Unknown" disfigurement
|
||||||
|
H.dna.features = prev_features
|
||||||
|
|
||||||
|
// Apply Appearance
|
||||||
|
H.update_body() // Outfit and underware, also body.
|
||||||
|
H.update_hair()
|
||||||
|
H.update_body_parts() // Body itself, maybe skin color?
|
||||||
|
|
||||||
|
cast_effect() // POOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// CAST EFFECT // // General effect (poof, splat, etc) when you cast. Doesn't happen automatically!
|
||||||
|
/datum/action/bloodsucker/veil/proc/cast_effect()
|
||||||
|
// Effect
|
||||||
|
playsound(get_turf(owner), 'sound/magic/smoke.ogg', 20, 1)
|
||||||
|
var/datum/effect_system/steam_spread/puff = new /datum/effect_system/steam_spread/()
|
||||||
|
puff.effect_type = /obj/effect/particle_effect/smoke/vampsmoke
|
||||||
|
puff.set_up(3, 0, get_turf(owner))
|
||||||
|
puff.attach(owner) // OPTIONAL
|
||||||
|
puff.start()
|
||||||
|
owner.spin(8, 1) // Spin around like a loon.
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/effect/particle_effect/smoke/vampsmoke
|
||||||
|
opaque = FALSE
|
||||||
|
amount = 0
|
||||||
|
lifetime = 0
|
||||||
|
/obj/effect/particle_effect/smoke/vampsmoke/fade_out(frames = 6)
|
||||||
|
..(frames)
|
||||||
13
code/modules/antagonists/bloodsucker/powers/v_distress.dm
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
/datum/action/bloodsucker/vassal/distress
|
||||||
|
name = "Distress"
|
||||||
|
desc = "Call out to your master and other vassals for aid"
|
||||||
|
button_icon_state = "power_recup"
|
||||||
|
amToggle = TRUE
|
||||||
|
bloodcost = 10
|
||||||
|
cooldown = 100
|
||||||
|
not_bloodsucker = TRUE
|
||||||
|
*/
|
||||||
57
code/modules/antagonists/bloodsucker/powers/v_recuperate.dm
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/vassal/recuperate
|
||||||
|
name = "Sanguine Recuperation"
|
||||||
|
desc = "Slowly heal brute damage while active. This process is exhausting, and requires some of your tainted blood."
|
||||||
|
button_icon_state = "power_recup"
|
||||||
|
amToggle = TRUE
|
||||||
|
bloodcost = 5
|
||||||
|
cooldown = 100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Deal STAMINA damage over time, trickle down blood, and heal wounds.
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/vassal/recuperate/CheckCanUse(display_error)
|
||||||
|
if(!..(display_error))// DEFAULT CHECKS
|
||||||
|
return FALSE
|
||||||
|
if (owner.stat >= DEAD)
|
||||||
|
return FALSE
|
||||||
|
var/mob/living/carbon/C = owner
|
||||||
|
if (C.getBruteLoss() <= 0)
|
||||||
|
if (display_error)
|
||||||
|
to_chat(owner, "You have no brute damage to recover from.")
|
||||||
|
return FALSE
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/vassal/recuperate/ActivatePower()
|
||||||
|
to_chat(owner, "<span class='notice'>Your muscles clench and your skin crawls as your master's immortal blood knits your wounds and gives you stamina.</span>")
|
||||||
|
|
||||||
|
var/mob/living/carbon/C = owner
|
||||||
|
var/mob/living/carbon/human/H
|
||||||
|
if (ishuman(owner))
|
||||||
|
H = owner
|
||||||
|
|
||||||
|
while (ContinueActive(owner))
|
||||||
|
var/bruteheal = min(C.getBruteLoss(), 1.5)
|
||||||
|
C.heal_overall_damage(bruteheal)
|
||||||
|
C.blood_volume -= 0.6
|
||||||
|
if (C.getStaminaLoss() < 60)
|
||||||
|
C.adjustStaminaLoss(25, forced = TRUE)
|
||||||
|
// Stop Bleeding
|
||||||
|
if (istype(H) && H.bleed_rate > 0 && rand(20) == 0)
|
||||||
|
H.bleed_rate --
|
||||||
|
|
||||||
|
C.Jitter(5)
|
||||||
|
|
||||||
|
|
||||||
|
sleep(20)
|
||||||
|
|
||||||
|
// DONE!
|
||||||
|
//DeactivatePower(owner)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/action/bloodsucker/vassal/recuperate/ContinueActive(mob/living/user, mob/living/target)
|
||||||
|
return ..() && user.stat <= DEAD && user.blood_volume > 0 && user.getBruteLoss() > 0
|
||||||
@@ -66,7 +66,9 @@
|
|||||||
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
|
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
|
||||||
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
|
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
|
||||||
|
|
||||||
if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH))))
|
if (!do_mob(user,M,60)) // Stethoscope should take a moment to listen
|
||||||
|
return // FAIL
|
||||||
|
if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH)) || (HAS_TRAIT(M, TRAIT_NOPULSE))))
|
||||||
if(heart && istype(heart))
|
if(heart && istype(heart))
|
||||||
heart_strength = "<span class='danger'>an unstable</span>"
|
heart_strength = "<span class='danger'>an unstable</span>"
|
||||||
if(heart.beating)
|
if(heart.beating)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
CAT_WEAPONRY,
|
CAT_WEAPONRY,
|
||||||
CAT_ROBOT,
|
CAT_ROBOT,
|
||||||
CAT_MISC,
|
CAT_MISC,
|
||||||
|
CAT_STRUCTURE,
|
||||||
CAT_PRIMAL,
|
CAT_PRIMAL,
|
||||||
CAT_FOOD,
|
CAT_FOOD,
|
||||||
CAT_CLOTHING)
|
CAT_CLOTHING)
|
||||||
@@ -439,4 +440,4 @@
|
|||||||
/datum/mind/proc/teach_crafting_recipe(R)
|
/datum/mind/proc/teach_crafting_recipe(R)
|
||||||
if(!learned_recipes)
|
if(!learned_recipes)
|
||||||
learned_recipes = list()
|
learned_recipes = list()
|
||||||
learned_recipes |= R
|
learned_recipes |= R
|
||||||
|
|||||||
27
code/modules/language/vampiric.dm
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// VAMPIRE LANGUAGE //
|
||||||
|
|
||||||
|
/datum/language/vampiric
|
||||||
|
name = "Blah-Sucker"
|
||||||
|
desc = "The native language of the Bloodsucker elders, learned intuitively by Fledglings as they pass from death into immortality."
|
||||||
|
speech_verb = "growls"
|
||||||
|
ask_verb = "growls"
|
||||||
|
exclaim_verb = "snarls"
|
||||||
|
whisper_verb = "hisses"
|
||||||
|
key = "b"
|
||||||
|
space_chance = 40
|
||||||
|
default_priority = 90
|
||||||
|
|
||||||
|
flags = TONGUELESS_SPEECH | LANGUAGE_HIDE_ICON_IF_NOT_UNDERSTOOD // Hide the icon next to your text if someone doesn't know this language.
|
||||||
|
syllables = list(
|
||||||
|
"luk","cha","no","kra","pru","chi","busi","tam","pol","spu","och", // Start: Vampiric
|
||||||
|
"umf","ora","stu","si","ri","li","ka","red","ani","lup","ala","pro",
|
||||||
|
"to","siz","nu","pra","ga","ump","ort","a","ya","yach","tu","lit",
|
||||||
|
"wa","mabo","mati","anta","tat","tana","prol",
|
||||||
|
"tsa","si","tra","te","ele","fa","inz", // Start: Romanian
|
||||||
|
"nza","est","sti","ra","pral","tsu","ago","esch","chi","kys","praz", // Start: Custom
|
||||||
|
"froz","etz","tzil",
|
||||||
|
"t'","k'","t'","k'","th'","tz'"
|
||||||
|
)
|
||||||
|
|
||||||
|
icon_state = "bloodsucker"
|
||||||
|
icon = 'icons/mob/hud.dmi'
|
||||||
@@ -36,6 +36,9 @@
|
|||||||
if(bleed_rate <= 0)
|
if(bleed_rate <= 0)
|
||||||
bleed_rate = 0
|
bleed_rate = 0
|
||||||
|
|
||||||
|
if (HAS_TRAIT(src, TRAIT_NOPULSE)) //Bloodsuckers don't need to be here.
|
||||||
|
return
|
||||||
|
|
||||||
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
|
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
|
||||||
|
|
||||||
//Blood regeneration if there is some space
|
//Blood regeneration if there is some space
|
||||||
|
|||||||
@@ -65,6 +65,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
/mob/living/carbon/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||||
|
if (!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL))
|
||||||
|
return FALSE
|
||||||
if(!forced && (status_flags & GODMODE))
|
if(!forced && (status_flags & GODMODE))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
@@ -74,6 +76,8 @@
|
|||||||
return amount
|
return amount
|
||||||
|
|
||||||
/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||||
|
if (!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL)) // FULPSTATION 5/8/19 - Vamps don't heal naturally.
|
||||||
|
return FALSE
|
||||||
if(!forced && (status_flags & GODMODE))
|
if(!forced && (status_flags & GODMODE))
|
||||||
return FALSE
|
return FALSE
|
||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
. = list("<span class='info'>*---------*\nThis is <EM>[!obscure_name ? name : "Unknown"]</EM>!")
|
. = list("<span class='info'>*---------*\nThis is <EM>[!obscure_name ? name : "Unknown"]</EM>!")
|
||||||
|
|
||||||
|
var/vampDesc = ReturnVampExamine(user) // Vamps recognize the names of other vamps.
|
||||||
|
var/vassDesc = ReturnVassalExamine(user) // Vassals recognize each other's marks.
|
||||||
|
if (vampDesc != "") // If we don't do it this way, we add a blank space to the string...something to do with this --> . += ""
|
||||||
|
. += vampDesc
|
||||||
|
if (vassDesc != "")
|
||||||
|
. += vassDesc
|
||||||
|
|
||||||
var/list/obscured = check_obscured_slots()
|
var/list/obscured = check_obscured_slots()
|
||||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||||
|
|
||||||
@@ -237,7 +244,7 @@
|
|||||||
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
|
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
|
||||||
msg += "[t_He] look[p_s()] extremely disgusted.\n"
|
msg += "[t_He] look[p_s()] extremely disgusted.\n"
|
||||||
|
|
||||||
if(blood_volume < (BLOOD_VOLUME_SAFE*blood_ratio))
|
if(ShowAsPaleExamine())
|
||||||
msg += "[t_He] [t_has] pale skin.\n"
|
msg += "[t_He] [t_has] pale skin.\n"
|
||||||
|
|
||||||
if(bleedsuppress)
|
if(bleedsuppress)
|
||||||
|
|||||||
@@ -1279,6 +1279,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
|||||||
////////
|
////////
|
||||||
|
|
||||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||||
|
return //hunger is for BABIES
|
||||||
|
|
||||||
//The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
//The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||||
if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder.
|
if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder.
|
||||||
|
|||||||
@@ -659,6 +659,9 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
|
|||||||
|
|
||||||
//used in human and monkey handle_environment()
|
//used in human and monkey handle_environment()
|
||||||
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
|
/mob/living/carbon/proc/natural_bodytemperature_stabilization()
|
||||||
|
if (HAS_TRAIT(src, TRAIT_COLDBLOODED))
|
||||||
|
return 0 //Return 0 as your natural temperature. Species proc handle_environment() will adjust your temperature based on this.
|
||||||
|
|
||||||
var/body_temperature_difference = BODYTEMP_NORMAL - bodytemperature
|
var/body_temperature_difference = BODYTEMP_NORMAL - bodytemperature
|
||||||
switch(bodytemperature)
|
switch(bodytemperature)
|
||||||
if(-INFINITY to BODYTEMP_COLD_DAMAGE_LIMIT) //Cold damage limit is 50 below the default, the temperature where you start to feel effects.
|
if(-INFINITY to BODYTEMP_COLD_DAMAGE_LIMIT) //Cold damage limit is 50 below the default, the temperature where you start to feel effects.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
desc = "This station is just crawling with bugs."
|
desc = "This station is just crawling with bugs."
|
||||||
icon_state = "cockroach"
|
icon_state = "cockroach"
|
||||||
icon_dead = "cockroach"
|
icon_dead = "cockroach"
|
||||||
|
blood_volume = 50
|
||||||
health = 1
|
health = 1
|
||||||
maxHealth = 1
|
maxHealth = 1
|
||||||
turns_per_move = 5
|
turns_per_move = 5
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
speak_emote = list("clicks")
|
speak_emote = list("clicks")
|
||||||
emote_hear = list("clicks.")
|
emote_hear = list("clicks.")
|
||||||
emote_see = list("clacks.")
|
emote_see = list("clacks.")
|
||||||
|
blood_volume = 350
|
||||||
speak_chance = 1
|
speak_chance = 1
|
||||||
turns_per_move = 5
|
turns_per_move = 5
|
||||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1)
|
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
emote_see = list("runs in a circle.", "shakes.")
|
emote_see = list("runs in a circle.", "shakes.")
|
||||||
speak_chance = 1
|
speak_chance = 1
|
||||||
turns_per_move = 5
|
turns_per_move = 5
|
||||||
|
blood_volume = 250
|
||||||
see_in_dark = 6
|
see_in_dark = 6
|
||||||
maxHealth = 5
|
maxHealth = 5
|
||||||
health = 5
|
health = 5
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
icon_dead = "bat_dead"
|
icon_dead = "bat_dead"
|
||||||
icon_gib = "bat_dead"
|
icon_gib = "bat_dead"
|
||||||
turns_per_move = 1
|
turns_per_move = 1
|
||||||
|
blood_volume = 250
|
||||||
response_help = "brushes aside"
|
response_help = "brushes aside"
|
||||||
response_disarm = "flails at"
|
response_disarm = "flails at"
|
||||||
response_harm = "hits"
|
response_harm = "hits"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
health = 20
|
health = 20
|
||||||
maxHealth = 20
|
maxHealth = 20
|
||||||
gender = PLURAL //placeholder
|
gender = PLURAL //placeholder
|
||||||
|
blood_volume = 550 //How much blud it has for bloodsucking
|
||||||
|
|
||||||
status_flags = CANPUSH
|
status_flags = CANPUSH
|
||||||
|
|
||||||
|
|||||||
@@ -366,6 +366,9 @@
|
|||||||
if(m_intent == MOVE_INTENT_RUN)
|
if(m_intent == MOVE_INTENT_RUN)
|
||||||
m_intent = MOVE_INTENT_WALK
|
m_intent = MOVE_INTENT_WALK
|
||||||
else
|
else
|
||||||
|
if (HAS_TRAIT(src,TRAIT_NORUNNING)) // FULPSTATION 7/10/19 So you can't run during fortitude.
|
||||||
|
to_chat(src, "You find yourself unable to run.")
|
||||||
|
return FALSE
|
||||||
m_intent = MOVE_INTENT_RUN
|
m_intent = MOVE_INTENT_RUN
|
||||||
if(hud_used && hud_used.static_inventory)
|
if(hud_used && hud_used.static_inventory)
|
||||||
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
|
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
|
||||||
@@ -401,4 +404,4 @@
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/mob/proc/canZMove(direction, turf/target)
|
/mob/proc/canZMove(direction, turf/target)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
/datum/language/ratvar,
|
/datum/language/ratvar,
|
||||||
/datum/language/aphasia,
|
/datum/language/aphasia,
|
||||||
/datum/language/slime,
|
/datum/language/slime,
|
||||||
|
/datum/language/vampiric,
|
||||||
))
|
))
|
||||||
healing_factor = STANDARD_ORGAN_HEALING*5 //Fast!!
|
healing_factor = STANDARD_ORGAN_HEALING*5 //Fast!!
|
||||||
decay_factor = STANDARD_ORGAN_DECAY/2
|
decay_factor = STANDARD_ORGAN_DECAY/2
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ PROBABILITY SECRET_EXTENDED 0
|
|||||||
PROBABILITY DEVIL 0
|
PROBABILITY DEVIL 0
|
||||||
PROBABILITY DEVIL_AGENTS 0
|
PROBABILITY DEVIL_AGENTS 0
|
||||||
PROBABILITY CLOWNOPS 0
|
PROBABILITY CLOWNOPS 0
|
||||||
|
PROBABILITY BLOODSUCKER 0
|
||||||
|
|
||||||
## You probably want to keep sandbox off by default for secret and random.
|
## You probably want to keep sandbox off by default for secret and random.
|
||||||
PROBABILITY SANDBOX 0
|
PROBABILITY SANDBOX 0
|
||||||
@@ -114,6 +115,7 @@ CONTINUOUS CLOCKWORK_CULT
|
|||||||
CONTINUOUS CHANGELING
|
CONTINUOUS CHANGELING
|
||||||
CONTINUOUS WIZARD
|
CONTINUOUS WIZARD
|
||||||
#CONTINUOUS MONKEY
|
#CONTINUOUS MONKEY
|
||||||
|
CONTINUOUS BLOODSUCKER
|
||||||
|
|
||||||
##Note: do not toggle continuous off for these modes, as they have no antagonists and would thus end immediately!
|
##Note: do not toggle continuous off for these modes, as they have no antagonists and would thus end immediately!
|
||||||
|
|
||||||
|
|||||||
BIN
icons/mob/actions/bloodsucker.dmi
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 126 KiB |
BIN
icons/obj/stake.dmi
Normal file
|
After Width: | Height: | Size: 866 B |
BIN
icons/obj/vamp_obj.dmi
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
sound/bloodsucker/BloodsuckerAlert.ogg
Normal file
BIN
sound/bloodsucker/coffin_close.ogg
Normal file
BIN
sound/bloodsucker/coffin_open.ogg
Normal file
@@ -25,6 +25,7 @@
|
|||||||
#include "code\__DEFINES\antagonists.dm"
|
#include "code\__DEFINES\antagonists.dm"
|
||||||
#include "code\__DEFINES\atmospherics.dm"
|
#include "code\__DEFINES\atmospherics.dm"
|
||||||
#include "code\__DEFINES\atom_hud.dm"
|
#include "code\__DEFINES\atom_hud.dm"
|
||||||
|
#include "code\__DEFINES\bloodsucker.dm"
|
||||||
#include "code\__DEFINES\bsql.config.dm"
|
#include "code\__DEFINES\bsql.config.dm"
|
||||||
#include "code\__DEFINES\bsql.dm"
|
#include "code\__DEFINES\bsql.dm"
|
||||||
#include "code\__DEFINES\callbacks.dm"
|
#include "code\__DEFINES\callbacks.dm"
|
||||||
@@ -554,6 +555,8 @@
|
|||||||
#include "code\game\gamemodes\game_mode.dm"
|
#include "code\game\gamemodes\game_mode.dm"
|
||||||
#include "code\game\gamemodes\objective.dm"
|
#include "code\game\gamemodes\objective.dm"
|
||||||
#include "code\game\gamemodes\objective_items.dm"
|
#include "code\game\gamemodes\objective_items.dm"
|
||||||
|
#include "code\game\gamemodes\bloodsucker\bloodsucker.dm"
|
||||||
|
#include "code\game\gamemodes\bloodsucker\hunter.dm"
|
||||||
#include "code\game\gamemodes\brother\traitor_bro.dm"
|
#include "code\game\gamemodes\brother\traitor_bro.dm"
|
||||||
#include "code\game\gamemodes\changeling\changeling.dm"
|
#include "code\game\gamemodes\changeling\changeling.dm"
|
||||||
#include "code\game\gamemodes\changeling\traitor_chan.dm"
|
#include "code\game\gamemodes\changeling\traitor_chan.dm"
|
||||||
@@ -1213,6 +1216,35 @@
|
|||||||
#include "code\modules\antagonists\blob\blob\blobs\resource.dm"
|
#include "code\modules\antagonists\blob\blob\blobs\resource.dm"
|
||||||
#include "code\modules\antagonists\blob\blob\blobs\shield.dm"
|
#include "code\modules\antagonists\blob\blob\blobs\shield.dm"
|
||||||
#include "code\modules\antagonists\blood_contract\blood_contract.dm"
|
#include "code\modules\antagonists\blood_contract\blood_contract.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_flaws.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_integration.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_life.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_objectives.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_powers.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_sunlight.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\bloodsucker_ui.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\datum_bloodsucker.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\datum_hunter.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\datum_vassal.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\items\bloodsucker_items.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\items\bloodsucker_organs.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\items\bloodsucker_stake.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\objects\bloodsucker_coffin.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\objects\bloodsucker_crypt.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\objects\bloodsucker_lair.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_brawn.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_cloak.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_feed.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_fortitude.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_gohome.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_haste.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_lunge.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_masquerade.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_mesmerize.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_trespass.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\bs_veil.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\v_distress.dm"
|
||||||
|
#include "code\modules\antagonists\bloodsucker\powers\v_recuperate.dm"
|
||||||
#include "code\modules\antagonists\brainwashing\brainwashing.dm"
|
#include "code\modules\antagonists\brainwashing\brainwashing.dm"
|
||||||
#include "code\modules\antagonists\brother\brother.dm"
|
#include "code\modules\antagonists\brother\brother.dm"
|
||||||
#include "code\modules\antagonists\changeling\cellular_emporium.dm"
|
#include "code\modules\antagonists\changeling\cellular_emporium.dm"
|
||||||
@@ -1918,6 +1950,7 @@
|
|||||||
#include "code\modules\language\ratvarian.dm"
|
#include "code\modules\language\ratvarian.dm"
|
||||||
#include "code\modules\language\slime.dm"
|
#include "code\modules\language\slime.dm"
|
||||||
#include "code\modules\language\swarmer.dm"
|
#include "code\modules\language\swarmer.dm"
|
||||||
|
#include "code\modules\language\vampiric.dm"
|
||||||
#include "code\modules\language\xenocommon.dm"
|
#include "code\modules\language\xenocommon.dm"
|
||||||
#include "code\modules\library\lib_codex_gigas.dm"
|
#include "code\modules\library\lib_codex_gigas.dm"
|
||||||
#include "code\modules\library\lib_items.dm"
|
#include "code\modules\library\lib_items.dm"
|
||||||
|
|||||||