Merge pull request #10011 from Arturlang/Bloodsuckers
Bloodsuckers, or, yknow, vampires.
This commit is contained in:
84
code/modules/antagonists/bloodsucker/bloodsucker_flaws.dm
Normal file
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
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(ORGAN_SLOT_HEART))
|
||||
if(displaymessage != "")
|
||||
to_chat(src, "<span class='warning'>Without a heart, you are incapable of [displaymessage].</span>")
|
||||
return FALSE
|
||||
if(!get_bodypart(BODY_ZONE_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
|
||||
|
||||
/mob/living/carbon
|
||||
// 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/misc/language.dmi', world, "bloodsucker")]"
|
||||
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/misc/language.dmi', world, "bloodsucker")]"
|
||||
|
||||
// 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/misc/mark_icons.dmi', world, "vassal")]"
|
||||
// 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/misc/mark_icons.dmi', world, "vassal_grey")]"
|
||||
// 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/misc/mark_icons.dmi', world, "vassal")]"
|
||||
// You serve a different Master than I do.
|
||||
else
|
||||
returnString += "[p_they(TRUE)] bears the mark of another Bloodsucker"
|
||||
returnIcon = "[icon2html('icons/misc/mark_icons.dmi', world, "vassal_grey")]"
|
||||
|
||||
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 * blood_ratio)
|
||||
|
||||
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 * blood_ratio) // && !(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
|
||||
361
code/modules/antagonists/bloodsucker/bloodsucker_life.dm
Normal file
361
code/modules/antagonists/bloodsucker/bloodsucker_life.dm
Normal file
@@ -0,0 +1,361 @@
|
||||
|
||||
|
||||
// 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, but will be an utter pain to move
|
||||
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
|
||||
if(owner.current.stat == CONSCIOUS && !poweron_feed && !HAS_TRAIT(owner.current, TRAIT_DEATHCOMA)) // Deduct Blood
|
||||
AddBloodVolume(-0.1) // -.15 (before tick went from 10 to 30, but we also charge more for faking life now)
|
||||
if(HandleHealing(1)) // Heal
|
||||
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)
|
||||
FreeAllVassals() // Free my Vassals! (if I haven't yet)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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) // 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.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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(-2 + (regenRate * -10) * 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)
|
||||
// No Bleeding
|
||||
if(ishuman(owner.current)) //NOTE Current bleeding is horrible, not to count the amount of blood ballistics delete.
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
H.bleed_rate = 0
|
||||
if(iscarbon(owner.current)) // Damage Heal: Do I have damage to ANY bodypart?
|
||||
var/mob/living/carbon/C = owner.current
|
||||
var/costMult = 1 // Coffin makes it cheaper
|
||||
var/fireheal = 0 // BURN: Heal in Coffin while Fakedeath, or when damage above maxhealth (you can never fully heal fire)
|
||||
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
|
||||
C.ExtinguishMob()
|
||||
CureDisabilities() // Extinguish Fire
|
||||
C.remove_all_embedded_objects() // Remove Embedded!
|
||||
owner.current.regenerate_organs() // Heal Organs (will respawn original eyes etc. but we replace right away, next)
|
||||
CheckVampOrgans() // Heart, Eyes
|
||||
else
|
||||
if(owner.current.blood_volume <= 0) // No Blood? Lower Mult
|
||||
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)
|
||||
var/toxinheal = min(C.getToxLoss(), regenRate)
|
||||
// Heal if Damaged
|
||||
if(bruteheal + fireheal + toxinheal > 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.adjustToxLoss(-toxinheal * mult * 2, forced = TRUE) //Toxin healing because vamps arent immune
|
||||
//C.heal_overall_damage(bruteheal * mult, fireheal * mult) // REMOVED: We need to FORCE this, because otherwise, vamps won't heal EVER. Swapped to above.
|
||||
AddBloodVolume((bruteheal * -0.5 + fireheal * -1) / mult * costMult) // Costs blood to heal
|
||||
return TRUE // Healed! Done for this tick.
|
||||
if(amInCoffinWhileTorpor) // Limbs? (And I have no other healing)
|
||||
var/list/missing = owner.current.get_missing_limbs() // Heal Missing
|
||||
if (missing.len) // Cycle through ALL limbs and regen them!
|
||||
for (var/targetLimbZone in missing) // 1) Find ONE Limb and regenerate it.
|
||||
owner.current.regenerate_limb(targetLimbZone, 0) // regenerate_limbs() <--- If you want to EXCLUDE certain parts, do it like this ----> regenerate_limbs(0, list("head"))
|
||||
var/obj/item/bodypart/L = owner.current.get_bodypart( targetLimbZone ) // 2) Limb returns Damaged
|
||||
AddBloodVolume(50 * 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.*/
|
||||
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 thirsty for blud!
|
||||
/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_toxloss = owner.current.getToxLoss() //This is neater than just putting it in total_damage
|
||||
var/total_damage = total_brute + total_burn + total_toxloss
|
||||
// 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 toxin healed AND brute healed and NOT in coffin (since you cannot heal burn)
|
||||
if (total_damage <= 0 || total_toxloss <= 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
|
||||
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
|
||||
REMOVE_TRAIT(owner.current, TRAIT_NODEATH, "bloodsucker")
|
||||
REMOVE_TRAIT(owner.current, TRAIT_RESISTHIGHPRESSURE, "bloodsucker")
|
||||
REMOVE_TRAIT(owner.current, TRAIT_RESISTLOWPRESSURE, "bloodsucker")
|
||||
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()
|
||||
if(!iscarbon(owner.current)) //Check for non carbons.
|
||||
owner.current.gib()
|
||||
return
|
||||
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, but they dont stay dead because brains can be cloned!
|
||||
// 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(TRUE, FALSE, FALSE)//Brain cloning is wierd and allows hellbounds. Lets destroy the brain for safety.
|
||||
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 ++
|
||||
351
code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
Normal file
351
code/modules/antagonists/bloodsucker/bloodsucker_objectives.dm
Normal file
@@ -0,0 +1,351 @@
|
||||
|
||||
|
||||
// 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, and protect it until the end of the shift"// 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 Personnel",
|
||||
"Research Director",
|
||||
"Chief Engineer",
|
||||
"Chief Medical Officer",
|
||||
"Quartermaster"
|
||||
)
|
||||
var/list/departs = list(
|
||||
"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("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(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
|
||||
284
code/modules/antagonists/bloodsucker/bloodsucker_powers.dm
Normal file
284
code/modules/antagonists/bloodsucker/bloodsucker_powers.dm
Normal file
@@ -0,0 +1,284 @@
|
||||
/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>")
|
||||
return FALSE
|
||||
// Incap?
|
||||
if(must_be_capacitated)
|
||||
var/mob/living/L = owner
|
||||
if (L.incapacitated(TRUE, TRUE) || L.resting && !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(force = FALSE)
|
||||
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
|
||||
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()
|
||||
|
||||
// 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 ..()
|
||||
// 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()
|
||||
|
||||
/obj/effect/proc_holder/bloodsucker/InterceptClickOn(mob/living/caller, params, atom/A)
|
||||
return linked_power.ClickWithPower(A)
|
||||
195
code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
Normal file
195
code/modules/antagonists/bloodsucker/bloodsucker_sunlight.dm
Normal file
@@ -0,0 +1,195 @@
|
||||
#define TIME_BLOODSUCKER_NIGHT 900 // 15 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
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()
|
||||
*/
|
||||
765
code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
Normal file
765
code/modules/antagonists/bloodsucker/datum_bloodsucker.dm
Normal file
@@ -0,0 +1,765 @@
|
||||
/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.
|
||||
var/had_toxlover = FALSE
|
||||
// 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, TRAIT_NOCLONE)
|
||||
// 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>"
|
||||
vamp_greet += "<span class='announce'>Bloodsucker Tip: You wont loose blood if you are unconcious or sleeping. Use this to your advantage to conserve blood.</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)
|
||||
BuyPower(new /datum/action/bloodsucker/veil)
|
||||
// Traits
|
||||
for (var/T in defaultTraits)
|
||||
ADD_TRAIT(owner.current, T, "bloodsucker")
|
||||
if(HAS_TRAIT(owner.current, TRAIT_TOXINLOVER)) //No slime bonuses here, no thank you
|
||||
had_toxlover = TRUE
|
||||
REMOVE_TRAIT(owner.current, TRAIT_TOXINLOVER, "species")
|
||||
// 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 // <-------------------- Start small, but burn mod increases based on rank!
|
||||
S.coldmod = 0
|
||||
S.stunmod *= 0.25
|
||||
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")
|
||||
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 Causes wierd stuff
|
||||
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")
|
||||
if(had_toxlover == TRUE)
|
||||
ADD_TRAIT(owner.current, TRAIT_TOXINLOVER, "species")
|
||||
|
||||
// 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
|
||||
//TODO: Make this into a radial
|
||||
// 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>")
|
||||
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: Not yet done
|
||||
// - 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>"
|
||||
295
code/modules/antagonists/bloodsucker/datum_hunter.dm
Normal file
295
code/modules/antagonists/bloodsucker/datum_hunter.dm
Normal file
@@ -0,0 +1,295 @@
|
||||
/*
|
||||
#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
|
||||
amToggle = FALSE // Action-Related
|
||||
cooldown = 300 // 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
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)
|
||||
C.silent = 0
|
||||
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
|
||||
give_thrall_eyes()
|
||||
owner.current.grant_language(/datum/language/vampiric)
|
||||
// Add Antag HUD
|
||||
update_vassal_icons_added(owner.current, "vassal")
|
||||
. = ..()
|
||||
|
||||
/datum/antagonist/vassal/proc/give_thrall_eyes()
|
||||
var/obj/item/organ/eyes/vassal/E = new
|
||||
E.Insert(owner.current)
|
||||
|
||||
/obj/item/organ/eyes/vassal/
|
||||
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 //These eyes are weaker to flashes, but let you see in the dark
|
||||
|
||||
/datum/antagonist/vassal/proc/remove_thrall_eyes()
|
||||
var/obj/item/organ/eyes/E = new
|
||||
E.Insert(owner.current)
|
||||
|
||||
/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()
|
||||
remove_thrall_eyes()
|
||||
owner.current.remove_language(/datum/language/vampiric)
|
||||
// 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,70 @@
|
||||
|
||||
|
||||
/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/vassal/bloodsucker))
|
||||
qdel(O)
|
||||
var/obj/item/organ/eyes/vassal/bloodsucker/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 //
|
||||
// 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/vassal/bloodsucker
|
||||
flash_protect = 2 //Eye healing isnt working properly
|
||||
sight_flags = SEE_MOBS // 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
|
||||
|
||||
*/
|
||||
176
code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm
Normal file
176
code/modules/antagonists/bloodsucker/items/bloodsucker_stake.dm
Normal file
@@ -0,0 +1,176 @@
|
||||
|
||||
|
||||
// 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() || target == user)
|
||||
to_chat(user, "<span class='danger'>You cant stake [target] when they are moving moving about! They have to be laying down!</span>")
|
||||
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.resting || src.lying)
|
||||
// ABOVE: Taken from update_mobility() in living.dm
|
||||
|
||||
/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,242 @@
|
||||
|
||||
|
||||
// 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 misc 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)
|
||||
var/turf/Turf = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
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)
|
||||
Turf = get_turf(user) //we may have moved. adjust as needed...
|
||||
A = get_area(src)
|
||||
// Claim?
|
||||
if(!bloodsuckerdatum.coffin && !resident && (is_station_level(Turf.z) || !A.map_name == "Space"))
|
||||
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)
|
||||
if (user.AmStaked()) // Stake? No Heal!
|
||||
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_MISC
|
||||
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_MISC
|
||||
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_MISC
|
||||
always_availible = TRUE
|
||||
@@ -0,0 +1,497 @@
|
||||
|
||||
|
||||
|
||||
// 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 = 3 // 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 = 100
|
||||
|
||||
/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/bloodsucker/vassalrack/examine(mob/user)
|
||||
. = ..()
|
||||
if((user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) || isobserver(user))
|
||||
. += {"<span class='cult'>This is the vassal rack, which allows you to thrall crewmembers into loyal minions in your service.</span>"}
|
||||
. += {"<span class='cult'>You need to first secure the vassal rack by clicking on it while it is in your lair.</span>"}
|
||||
. += {"<span class='cult'>Simply click and hold on a victim, and then drag their sprite on the vassal rack.</span>"}
|
||||
. += {"<span class='cult'>Make sure that the victim is handcuffed, or else they can simply run away or resist, as the process is not instant.</span>"}
|
||||
. += {"<span class='cult'>To convert the victim, simply click on the vassal rack itself. Sharp weapons work faster than other tools.</span>"}
|
||||
/* if(user.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
. += {"<span class='cult'>This is the vassal rack, which allows your master to thrall crewmembers into his minions.\n
|
||||
Aid your master in bringing their victims here and keeping them secure.\n
|
||||
You can secure victims to the vassal rack by click dragging the victim onto the rack while it is secured</span>"} */
|
||||
|
||||
/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? Be aware you wont be able to unsecure it anymore","Secure [src]","Yes", "No"))
|
||||
if("Yes")
|
||||
owner = user
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
return //No, you cant move this ever again
|
||||
// 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) && HAS_TRAIT(target, TRAIT_MINDSHIELD)) // 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, they either have a mindshield or their external loyalties are too difficult for you to break.<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 = FALSE
|
||||
var/lit = FALSE
|
||||
///obj/structure/bloodsucker/candelabrum/is_hot() // candle.dm
|
||||
//return FALSE
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/update_icon()
|
||||
icon_state = "candelabrum[lit ? "_lit" : ""]"
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/examine(mob/user)
|
||||
. = ..()
|
||||
if((user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)) || isobserver(user))
|
||||
. += {"<span class='cult'>This is a magical candle which drains at the sanity of mortals who are not under your command while it is active.</span>"}
|
||||
. += {"<span class='cult'>You can alt click on it from any range to turn it on remotely, or simply be next to it and click on it to turn it on and off normally.</span>"}
|
||||
/* if(user.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
. += {"<span class='cult'>This is a magical candle which drains at the sanity of the fools who havent yet accepted your master, as long as it is active.\n
|
||||
You can turn it on and off by clicking on it while you are next to it</span>"} */
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/attack_hand(mob/user)
|
||||
var/datum/antagonist/bloodsucker/V = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) //I wish there was a better way to do this
|
||||
var/datum/antagonist/vassal/T = user.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
if(istype(V) || istype(T))
|
||||
toggle()
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/AltClick(mob/user)
|
||||
var/datum/antagonist/bloodsucker/V = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
// Bloodsuckers can turn their candles on from a distance. SPOOOOKY.
|
||||
if(istype(V))
|
||||
toggle()
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/proc/toggle(mob/user)
|
||||
lit = !lit
|
||||
if(lit)
|
||||
set_light(2, 3, "#66FFFF")
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bloodsucker/candelabrum/process()
|
||||
if(lit)
|
||||
for(var/mob/living/carbon/human/H in viewers(7, src))
|
||||
var/datum/antagonist/vassal/T = H.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
var/datum/antagonist/bloodsucker/V = H.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
if(V || T) //We dont want vassals or vampires affected by this
|
||||
return
|
||||
H.hallucination = 20
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "vampcandle", /datum/mood_event/vampcandle)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OTHER THINGS TO USE: HUMAN BLOOD. /obj/effect/decal/cleanable/blood
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/bloodsucker
|
||||
@@ -0,0 +1,88 @@
|
||||
|
||||
|
||||
// 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 2 min and Repeat
|
||||
sleep(120)
|
||||
// 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
|
||||
174
code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
Normal file
174
code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
Normal file
@@ -0,0 +1,174 @@
|
||||
|
||||
|
||||
/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 = 10
|
||||
cooldown = 130
|
||||
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(!.)
|
||||
return
|
||||
. = 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
|
||||
/*if(CheckBreakLocker())
|
||||
.= FALSE */
|
||||
// Did we successfuly use power to BREAK CUFFS and/or ESCAPE PULLER and/or escape from a locker?
|
||||
// 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)
|
||||
|
||||
/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(istype(A, /obj/machinery/door))
|
||||
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.3 + 5
|
||||
// Knockdown!
|
||||
var/powerlevel = min(5, 1 + level_current)
|
||||
if(rand(5 + powerlevel) >= 5)
|
||||
target.visible_message("<span class='danger'>[user] lands a vicious punch, sending [target] away!</span>", \
|
||||
"<span class='userdanger'>[user] has landed a horrifying punch on you, sending you flying!!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.Knockdown(min(5, rand(10, 10 * powerlevel)) )
|
||||
// Chance of KO
|
||||
if(rand(6 + powerlevel) >= 6 && 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(istype(target, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = target
|
||||
playsound(get_turf(usr), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1)
|
||||
to_chat(user, "<span class='notice'>You prepare to tear open [D].</span>")
|
||||
if(do_mob(usr,target,25))
|
||||
if (D.Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>You tear open the [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
|
||||
|
||||
/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
|
||||
/* Doesnt work
|
||||
// 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/straight_jacket/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
|
||||
/* Doesnt work
|
||||
/datum/action/bloodsucker/targeted/brawn/proc/CheckBreakLocker()
|
||||
if(!istype(owner.loc, /obj/structure/closet))
|
||||
return FALSE
|
||||
playsound(get_turf(owner), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1)
|
||||
if(do_mob(owner ,target, 25))
|
||||
var/obj/structure/closet/C = owner.loc
|
||||
to_chat(owner, "<span class='notice'>You prepare to tear open the [C].</span>")
|
||||
owner.do_attack_animation(C, ATTACK_EFFECT_SMASH)
|
||||
playsound(get_turf(C), 'sound/effects/bang.ogg', 30, 1, -1)
|
||||
C.bust_open()
|
||||
return TRUE
|
||||
*/
|
||||
57
code/modules/antagonists/bloodsucker/powers/bs_cloak.dm
Normal file
57
code/modules/antagonists/bloodsucker/powers/bs_cloak.dm
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
|
||||
/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.
|
||||
|
||||
/datum/action/bloodsucker/cloak/CheckCanUse(display_error)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
// 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
|
||||
var/was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||
if(was_running)
|
||||
user.toggle_move_intent()
|
||||
ADD_TRAIT(user, TRAIT_NORUNNING, "cloak of darkness")
|
||||
while(bloodsuckerdatum && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||
// Pay Blood Toll (if awake)
|
||||
owner.alpha = max(0, owner.alpha - min(75, 20 + 15 * level_current))
|
||||
bloodsuckerdatum.AddBloodVolume(-0.2)
|
||||
sleep(5) // 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/cloak/ContinueActive(mob/living/user, mob/living/target)
|
||||
if (!..())
|
||||
return FALSE
|
||||
if(user.stat == !CONSCIOUS) // Must be CONSCIOUS
|
||||
to_chat(owner, "<span class='warning'>Your cloak failed due to you falling unconcious! </span>")
|
||||
return FALSE
|
||||
var/turf/T = owner.loc // 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)
|
||||
..()
|
||||
REMOVE_TRAIT(user, TRAIT_NORUNNING, "cloak of darkness")
|
||||
user.alpha = 255
|
||||
324
code/modules/antagonists/bloodsucker/powers/bs_feed.dm
Normal file
324
code/modules/antagonists/bloodsucker/powers/bs_feed.dm
Normal file
@@ -0,0 +1,324 @@
|
||||
|
||||
|
||||
/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(!.)
|
||||
return
|
||||
// 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
|
||||
// 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()
|
||||
54
code/modules/antagonists/bloodsucker/powers/bs_fortitude.dm
Normal file
54
code/modules/antagonists/bloodsucker/powers/bs_fortitude.dm
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/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 = 80
|
||||
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
|
||||
115
code/modules/antagonists/bloodsucker/powers/bs_gohome.dm
Normal file
115
code/modules/antagonists/bloodsucker/powers/bs_gohome.dm
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
|
||||
/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(!.)
|
||||
return
|
||||
// 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
|
||||
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, forced = TRUE, channel = TELEPORT_CHANNEL_QUANTUM) // 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)
|
||||
85
code/modules/antagonists/bloodsucker/powers/bs_haste.dm
Normal file
85
code/modules/antagonists/bloodsucker/powers/bs_haste.dm
Normal file
@@ -0,0 +1,85 @@
|
||||
|
||||
// Level 1: Speed to location
|
||||
// Level 2: Dodge Bullets
|
||||
// Level 3: Stun People Passed
|
||||
|
||||
/datum/action/bloodsucker/targeted/haste
|
||||
name = "Immortal Haste"
|
||||
desc = "Dash somewhere with supernatural speed. 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
|
||||
|
||||
/datum/action/bloodsucker/targeted/haste/CheckCanUse(display_error)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
// 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
|
||||
if(!owner.has_gravity(owner.loc)) //We dont want people to be able to use this to fly around in space
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You cant dash while floating!</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.resting)
|
||||
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)
|
||||
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()
|
||||
83
code/modules/antagonists/bloodsucker/powers/bs_lunge.dm
Normal file
83
code/modules/antagonists/bloodsucker/powers/bs_lunge.dm
Normal file
@@ -0,0 +1,83 @@
|
||||
// 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
|
||||
if(!owner.has_gravity(owner.loc))//TODO figure out how to check if theyre able to move while in nograv
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You cant lunge while floating!</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/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.
|
||||
addtimer(CALLBACK(owner, .proc/_walk, 0), 2 SECONDS)
|
||||
if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && owner.resting)
|
||||
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)
|
||||
// Step Two: Check if I'm at/adjectent to Target's CURRENT turf (not original...that was just a destination)
|
||||
sleep(1)
|
||||
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)
|
||||
target.adjustStaminaLoss(40 + 10 * level_current)
|
||||
// Cancel Walk (we were close enough to contact them)
|
||||
walk(owner, 0)
|
||||
target.Stun(10,1) //Without this the victim can just walk away
|
||||
target.grabbedby(owner) // Taken from mutations.dm under changelings
|
||||
target.grippedby(owner, instant = TRUE) //instant aggro grab
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..() // activate = FALSE
|
||||
user.update_canmove()
|
||||
97
code/modules/antagonists/bloodsucker/powers/bs_masquerade.dm
Normal file
97
code/modules/antagonists/bloodsucker/powers/bs_masquerade.dm
Normal file
@@ -0,0 +1,97 @@
|
||||
|
||||
|
||||
|
||||
// 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
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 = 1
|
||||
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(!.)
|
||||
return
|
||||
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(ORGAN_SLOT_EYES))
|
||||
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.resting && !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))
|
||||
target.Stun(40) //Utterly useless without this, its okay since there are so many checks to go through
|
||||
target.silent = 45 //Shhhh little lamb
|
||||
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 45) //So you cant rotate with combat mode, plus fancy status alert
|
||||
|
||||
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 * 12
|
||||
target.silent = power_time + 20
|
||||
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 100 + 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
|
||||
// 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)
|
||||
124
code/modules/antagonists/bloodsucker/powers/bs_trespass.dm
Normal file
124
code/modules/antagonists/bloodsucker/powers/bs_trespass.dm
Normal file
@@ -0,0 +1,124 @@
|
||||
|
||||
|
||||
/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(!.)
|
||||
return
|
||||
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, channel = TELEPORT_CHANNEL_QUANTUM) // 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()
|
||||
163
code/modules/antagonists/bloodsucker/powers/bs_veil.dm
Normal file
163
code/modules/antagonists/bloodsucker/powers/bs_veil.dm
Normal file
@@ -0,0 +1,163 @@
|
||||
|
||||
/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_undie_color
|
||||
var/prev_undershirt
|
||||
var/prev_shirt_color
|
||||
var/prev_socks
|
||||
var/prev_socks_color
|
||||
var/prev_disfigured
|
||||
var/list/prev_features // For lizards and such
|
||||
|
||||
|
||||
/datum/action/bloodsucker/veil/CheckCanUse(display_error)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
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_undie_color = H.undie_color
|
||||
prev_undershirt = H.undershirt
|
||||
prev_shirt_color = H.shirt_color
|
||||
prev_socks = H.socks
|
||||
prev_socks_color = H.socks_color
|
||||
//prev_eye_color
|
||||
prev_disfigured = HAS_TRAIT(H, TRAIT_DISFIGURED) // I was disfigured! //prev_disabilities = H.disabilities
|
||||
prev_features = H.dna.features
|
||||
|
||||
// Change Appearance, not randomizing clothes colour, itll just be janky
|
||||
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.undie_color = prev_undie_color
|
||||
H.undershirt = prev_undershirt
|
||||
H.shirt_color = prev_shirt_color
|
||||
H.socks = prev_socks
|
||||
H.socks_color = prev_socks_color
|
||||
|
||||
//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
|
||||
lifetime = 0
|
||||
/obj/effect/particle_effect/smoke/vampsmoke/fade_out(frames = 6)
|
||||
..(frames)
|
||||
38
code/modules/antagonists/bloodsucker/powers/v_recuperate.dm
Normal file
38
code/modules/antagonists/bloodsucker/powers/v_recuperate.dm
Normal file
@@ -0,0 +1,38 @@
|
||||
/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
|
||||
|
||||
/datum/action/bloodsucker/vassal/recuperate/CheckCanUse(display_error)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if (owner.stat >= DEAD)
|
||||
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))
|
||||
C.adjustBruteLoss(-1.5)
|
||||
C.adjustFireLoss(-0.5)
|
||||
C.adjustToxLoss(-2, forced = TRUE)
|
||||
C.blood_volume -= 0.2
|
||||
C.adjustStaminaLoss(-15)
|
||||
// Stop Bleeding
|
||||
if(istype(H) && H.bleed_rate > 0 && rand(20) == 0)
|
||||
H.bleed_rate --
|
||||
C.Jitter(5)
|
||||
sleep(10)
|
||||
// DONE!
|
||||
//DeactivatePower(owner)
|
||||
|
||||
/datum/action/bloodsucker/vassal/recuperate/ContinueActive(mob/living/user, mob/living/target)
|
||||
return ..() && user.stat <= DEAD && user.blood_volume > 500
|
||||
@@ -33,6 +33,7 @@
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
see_in_dark = 8
|
||||
blood_volume = 0 //No bleeding on getting shot, for skeddadles
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
bloodcrawl = BLOODCRAWL_EAT
|
||||
var/playstyle_string = "<span class='big bold'>You are a slaughter demon,</span><B> a terrible creature from another realm. You have a single desire: To kill. \
|
||||
|
||||
@@ -66,7 +66,9 @@
|
||||
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
|
||||
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))
|
||||
heart_strength = "<span class='danger'>an unstable</span>"
|
||||
if(heart.beating)
|
||||
|
||||
@@ -439,4 +439,4 @@
|
||||
/datum/mind/proc/teach_crafting_recipe(R)
|
||||
if(!learned_recipes)
|
||||
learned_recipes = list()
|
||||
learned_recipes |= R
|
||||
learned_recipes |= R
|
||||
|
||||
@@ -320,3 +320,41 @@
|
||||
reqs = list(/obj/item/stack/rods = 2,
|
||||
/obj/item/clothing/under/rank/security = 1)
|
||||
category = CAT_MISC
|
||||
|
||||
/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_MISC
|
||||
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_MISC
|
||||
always_availible = FALSE // Disabled til learned
|
||||
|
||||
25
code/modules/language/vampiric.dm
Normal file
25
code/modules/language/vampiric.dm
Normal file
@@ -0,0 +1,25 @@
|
||||
// VAMPIRE LANGUAGE //
|
||||
|
||||
/datum/language/vampiric
|
||||
name = "Blah-Sucker"
|
||||
desc = "The native language of the Bloodsucker elders, learned intuitively by Fledglings and as they pass from death into immortality. Thralls are also given the ability to speak this as apart of their conversion ritual."
|
||||
speech_verb = "growls"
|
||||
ask_verb = "growls"
|
||||
exclaim_verb = "snarls"
|
||||
whisper_verb = "hisses"
|
||||
key = "b"
|
||||
space_chance = 40
|
||||
default_priority = 90
|
||||
icon_state = "bloodsucker"
|
||||
|
||||
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'"
|
||||
)
|
||||
@@ -36,6 +36,9 @@
|
||||
if(bleed_rate <= 0)
|
||||
bleed_rate = 0
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_NOMARROW)) //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.
|
||||
|
||||
//Blood regeneration if there is some space
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
|
||||
|
||||
/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))
|
||||
return FALSE
|
||||
if(amount > 0)
|
||||
@@ -74,6 +76,8 @@
|
||||
return amount
|
||||
|
||||
/mob/living/carbon/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if (!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL)) //Vamps don't heal naturally.
|
||||
return FALSE
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
if(amount > 0)
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
|
||||
. = 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/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
|
||||
@@ -237,7 +244,7 @@
|
||||
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
|
||||
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"
|
||||
|
||||
if(bleedsuppress)
|
||||
|
||||
@@ -1279,6 +1279,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
////////
|
||||
|
||||
/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
|
||||
if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder.
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
C.faction |= "slime"
|
||||
|
||||
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
|
||||
if(H.stat == DEAD || HAS_TRAIT(H, TRAIT_NOMARROW)) //can't farm slime jelly from a dead slime/jelly person indefinitely, and no regeneration for vampires
|
||||
return
|
||||
if(!H.blood_volume)
|
||||
H.blood_volume += 5
|
||||
@@ -177,6 +177,8 @@
|
||||
bodies = old_species.bodies
|
||||
|
||||
/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H)
|
||||
if((HAS_TRAIT(H, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
|
||||
if(prob(5))
|
||||
to_chat(H, "<span class='notice'>You feel very bloated!</span>")
|
||||
|
||||
@@ -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()
|
||||
/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
|
||||
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.
|
||||
|
||||
@@ -4,4 +4,7 @@
|
||||
var/datum/antagonist/rev/rev = mind.has_antag_datum(/datum/antagonist/rev)
|
||||
if(rev)
|
||||
rev.remove_revolutionary(TRUE)
|
||||
var/datum/antagonist/bloodsucker/V = mind.has_antag_datum(/datum/antagonist/bloodsucker)
|
||||
if(V)
|
||||
mind.remove_antag_datum(V)
|
||||
..()
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
unsuitable_atmos_damage = 0
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 100000
|
||||
blood_volume = 0
|
||||
|
||||
/mob/living/simple_animal/astral/death()
|
||||
icon_state = "shade_dead"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
maxbodytemp = INFINITY
|
||||
minbodytemp = 0
|
||||
blood_volume = 0
|
||||
has_unlimited_silicon_privilege = 1
|
||||
sentience_type = SENTIENCE_ARTIFICIAL
|
||||
status_flags = NONE //no default canpush
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
initial_language_holder = /datum/language_holder/construct
|
||||
deathmessage = "collapses in a shattered heap."
|
||||
hud_type = /datum/hud/constructs
|
||||
blood_volume = 0
|
||||
var/list/construct_spells = list()
|
||||
var/playstyle_string = "<span class='big bold'>You are a generic construct!</span><b> Your job is to not exist, and you should probably adminhelp this.</b>"
|
||||
var/master = null
|
||||
@@ -459,4 +460,3 @@
|
||||
hud_used.healths.icon_state = "[icon_state]_health5"
|
||||
else
|
||||
hud_used.healths.icon_state = "[icon_state]_health6"
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "This station is just crawling with bugs."
|
||||
icon_state = "cockroach"
|
||||
icon_dead = "cockroach"
|
||||
blood_volume = 50
|
||||
health = 1
|
||||
maxHealth = 1
|
||||
turns_per_move = 5
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks.")
|
||||
emote_see = list("clacks.")
|
||||
blood_volume = 350
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 1)
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
dextrous_hud_type = /datum/hud/dextrous/drone
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
see_in_dark = 7
|
||||
blood_volume = 0
|
||||
can_be_held = TRUE
|
||||
held_items = list(null, null)
|
||||
var/staticChoice = "static"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
emote_see = list("runs in a circle.", "shakes.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
blood_volume = 250
|
||||
see_in_dark = 6
|
||||
maxHealth = 5
|
||||
health = 5
|
||||
|
||||
@@ -20,6 +20,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
icon_living = "magicOrange"
|
||||
icon_dead = "magicOrange"
|
||||
speed = 0
|
||||
blood_volume = 0
|
||||
a_intent = INTENT_HARM
|
||||
stop_automated_movement = 1
|
||||
movement_type = FLYING // Immunity to chasms and landmines, etc.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
spacewalk = TRUE
|
||||
stat_attack = UNCONSCIOUS
|
||||
robust_searching = 1
|
||||
blood_volume = 0
|
||||
|
||||
harm_intent_damage = 10
|
||||
obj_damage = 50
|
||||
@@ -42,4 +43,4 @@
|
||||
var/mob/living/carbon/C = target
|
||||
C.Knockdown(60)
|
||||
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
"<span class='userdanger'>\The [src] knocks you down!</span>")
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
gold_core_spawnable = HOSTILE_SPAWN
|
||||
del_on_death = 1
|
||||
loot = list(/obj/effect/decal/cleanable/robot_debris)
|
||||
blood_volume = 0
|
||||
|
||||
do_footstep = TRUE
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
robust_searching = TRUE
|
||||
stat_attack = UNCONSCIOUS
|
||||
anchored = TRUE
|
||||
blood_volume = 0
|
||||
var/combatant_state = SEEDLING_STATE_NEUTRAL
|
||||
var/obj/seedling_weakpoint/weak_point
|
||||
var/mob/living/beam_debuff_target
|
||||
|
||||
@@ -50,6 +50,7 @@ Difficulty: Normal
|
||||
armour_penetration = 75
|
||||
melee_damage_lower = 15
|
||||
melee_damage_upper = 20
|
||||
blood_volume = 0
|
||||
speed = 1
|
||||
move_to_delay = 11
|
||||
ranged = 1
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
sentience_type = SENTIENCE_BOSS
|
||||
layer = LARGE_MOB_LAYER
|
||||
blood_volume = 0
|
||||
var/doing_move_loop = FALSE
|
||||
var/mob/living/set_target
|
||||
var/timerid
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_dead = "bat_dead"
|
||||
icon_gib = "bat_dead"
|
||||
turns_per_move = 1
|
||||
blood_volume = 250
|
||||
response_help = "brushes aside"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "hits"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
movement_type = FLYING
|
||||
pressure_resistance = 300
|
||||
gold_core_spawnable = NO_SPAWN //too spooky for science
|
||||
blood_volume = 0
|
||||
var/ghost_hair_style
|
||||
var/ghost_hair_color
|
||||
var/mutable_appearance/ghost_hair
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
emote_see = list("rattles")
|
||||
a_intent = INTENT_HARM
|
||||
maxHealth = 40
|
||||
blood_volume = 0
|
||||
health = 40
|
||||
speed = 1
|
||||
harm_intent_damage = 5
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
maxHealth = 50000
|
||||
health = 50000
|
||||
healable = 0
|
||||
blood_volume = 0
|
||||
|
||||
harm_intent_damage = 10
|
||||
obj_damage = 100
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
response_disarm = "shoves"
|
||||
response_harm = "hits"
|
||||
speed = 0
|
||||
blood_volume = 0
|
||||
stat_attack = UNCONSCIOUS
|
||||
robust_searching = 1
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
loot = list(/obj/item/ectoplasm)
|
||||
del_on_death = TRUE
|
||||
initial_language_holder = /datum/language_holder/construct
|
||||
blood_volume = 0
|
||||
|
||||
/mob/living/simple_animal/shade/death()
|
||||
deathmessage = "lets out a contented sigh as [p_their()] form unwinds."
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
health = 20
|
||||
maxHealth = 20
|
||||
gender = PLURAL //placeholder
|
||||
blood_volume = 550 //How much blud it has for bloodsucking
|
||||
|
||||
status_flags = CANPUSH
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
health = 150
|
||||
healable = 0
|
||||
gender = NEUTER
|
||||
blood_volume = 0 //Until someome reworks for them to have slime jelly
|
||||
|
||||
see_in_dark = 8
|
||||
|
||||
|
||||
@@ -366,6 +366,9 @@
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
m_intent = MOVE_INTENT_WALK
|
||||
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
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
|
||||
@@ -401,4 +404,4 @@
|
||||
return TRUE
|
||||
|
||||
/mob/proc/canZMove(direction, turf/target)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target_loca, splatter_dir, bloodtype_to_color())
|
||||
|
||||
if(iscarbon(L))
|
||||
if(iscarbon(L) && !HAS_TRAIT(L, TRAIT_NOMARROW))
|
||||
var/mob/living/carbon/C = L
|
||||
C.bleed(damage)
|
||||
else
|
||||
|
||||
@@ -610,6 +610,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
value = 1.3
|
||||
|
||||
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
..()
|
||||
|
||||
@@ -355,6 +355,8 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
value = 1
|
||||
|
||||
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/carbon/M)
|
||||
if((HAS_TRAIT(M, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(last_added)
|
||||
M.blood_volume -= last_added
|
||||
last_added = 0
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
var/blood_id = C.get_blood_id()
|
||||
if((blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW) || blood_id == "blood" || blood_id == "jellyblood") && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
|
||||
C.blood_volume = min(C.blood_volume + round(reac_volume, 0.1), BLOOD_VOLUME_MAXIMUM * C.blood_ratio)
|
||||
// we don't care about bloodtype here, we're just refilling the mob
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
L.add_blood_DNA(list(data["blood_DNA"] = data["blood_type"]))
|
||||
|
||||
/datum/reagent/blood/on_mob_life(mob/living/carbon/C) //Because lethals are preferred over stamina. damnifino.
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return //We dont want vampires getting toxed from blood
|
||||
var/blood_id = C.get_blood_id()
|
||||
if((blood_id == "blood" || blood_id == "jellyblood"))
|
||||
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) //we only care about bloodtype here because this is where the poisoning should be
|
||||
@@ -1116,6 +1118,8 @@
|
||||
color = "#c2391d"
|
||||
|
||||
/datum/reagent/iron/on_mob_life(mob/living/carbon/C)
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume += 0.01 //we'll have synthetics from medbay.
|
||||
..()
|
||||
|
||||
@@ -107,8 +107,29 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/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)
|
||||
to_chat(user, "<span class='notice'>You force [M] to drink from the [src]</span>")
|
||||
user.visible_message("<span class='userdanger'>[user] forces [M] to drink from the [src].</span>")
|
||||
if(!do_mob(user, M, 50))
|
||||
return
|
||||
else
|
||||
if(!do_mob(user, M, 10))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You take a sip from the [src].</span>")
|
||||
user.visible_message("<span class='notice'>[user] puts the [src] up to their mouth.</span>")
|
||||
if(reagents.total_volume <= 0) // Safety: In case you spam clicked the blood bag on yourself, and it is now empty (below will divide by zero)
|
||||
return
|
||||
var/gulp_size = 5
|
||||
var/fraction = min(gulp_size / reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction) //checkLiked(fraction, M) // Blood isn't food, sorry.
|
||||
reagents.trans_to(M, gulp_size)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/blood/bluespace
|
||||
name = "bluespace blood pack"
|
||||
desc = "Contains blood used for transfusion, this one has been made with bluespace technology to hold much more blood. Must be attached to an IV drip."
|
||||
icon_state = "bsbloodpack"
|
||||
volume = 600 //its a blood bath!
|
||||
volume = 600 //its a blood bath!
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
/datum/nanite_program/blood_restoring/check_conditions()
|
||||
if(iscarbon(host_mob))
|
||||
var/mob/living/carbon/C = host_mob
|
||||
if(C.blood_volume >= (BLOOD_VOLUME_SAFE*C.blood_ratio))
|
||||
if(C.blood_volume >= (BLOOD_VOLUME_SAFE*C.blood_ratio) || (HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return FALSE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/organ/heart/proc/HeartStrengthMessage()
|
||||
if(beating)
|
||||
return "a healthy"
|
||||
return "<span class='danger'>an unstable</span>"
|
||||
|
||||
/obj/item/organ/heart/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
S.icon_state = "[icon_base]-off"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
/datum/language/ratvar,
|
||||
/datum/language/aphasia,
|
||||
/datum/language/slime,
|
||||
/datum/language/vampiric,
|
||||
))
|
||||
healing_factor = STANDARD_ORGAN_HEALING*5 //Fast!!
|
||||
decay_factor = STANDARD_ORGAN_DECAY/2
|
||||
|
||||
Reference in New Issue
Block a user