mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Vampire Re-write: Block 1
The largest chunk of this rewrite. Reworks the vampire powers, and makes them completely modular, as with changeling. Also adds a few powers, and so on. A massive list of TO-DOs remains.
This commit is contained in:
@@ -241,6 +241,7 @@
|
||||
#include "code\game\antagonist\station\renegade.dm"
|
||||
#include "code\game\antagonist\station\revolutionary.dm"
|
||||
#include "code\game\antagonist\station\rogue_ai.dm"
|
||||
#include "code\game\antagonist\station\thrall.dm"
|
||||
#include "code\game\antagonist\station\traitor.dm"
|
||||
#include "code\game\antagonist\station\vampire.dm"
|
||||
#include "code\game\area\ai_monitored.dm"
|
||||
@@ -312,7 +313,10 @@
|
||||
#include "code\game\gamemodes\nuclear\pinpointer.dm"
|
||||
#include "code\game\gamemodes\revolution\revolution.dm"
|
||||
#include "code\game\gamemodes\traitor\traitor.dm"
|
||||
#include "code\game\gamemodes\vampire\modular_vampire.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire_datum.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire_helpers.dm"
|
||||
#include "code\game\gamemodes\vampire\vampire_powers.dm"
|
||||
#include "code\game\gamemodes\wizard\wizard.dm"
|
||||
#include "code\game\jobs\access.dm"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
var/datum/antagonist/thrall/vampire_thrall = null
|
||||
|
||||
/datum/antagonist/thrall
|
||||
id = MODE_THRALL
|
||||
role_type = BE_VAMPIRE
|
||||
role_text = "thrall"
|
||||
role_text_plural = "thralls"
|
||||
bantype = "vampires"
|
||||
feedback_tag = "thrall_objective"
|
||||
restricted_jobs = list("AI", "Cyborg", "Chaplain")
|
||||
protected_jobs = list()
|
||||
restricted_species = list("Machine")
|
||||
welcome_text = "You are a vampire's thrall: a pawn to be commanded by them at will."
|
||||
flags = 0
|
||||
antaghud_indicator = "" // #TODO: Assign HUD indicator
|
||||
|
||||
/datum/antagonist/thrall/New()
|
||||
..()
|
||||
|
||||
vampire_thrall = src
|
||||
|
||||
/datum/antagonist/thrall/update_antag_mob(var/datum/mind/player)
|
||||
..()
|
||||
player.current.vampire_make_thrall()
|
||||
@@ -1,11 +1,6 @@
|
||||
var/datum/antagonist/vampire/vamp
|
||||
|
||||
/proc/isvampire(var/mob/player)
|
||||
if(!vamp || !player.mind)
|
||||
return 0
|
||||
if(player.mind in vamp.current_antagonists)
|
||||
return 1
|
||||
var/datum/antagonist/vampire/vamp = null
|
||||
|
||||
// #TODO: Update vampire antagonist datum.
|
||||
/datum/antagonist/vampire
|
||||
id = MODE_VAMPIRE
|
||||
role_type = BE_VAMPIRE
|
||||
@@ -18,7 +13,12 @@ var/datum/antagonist/vampire/vamp
|
||||
restricted_species = list("Machine")
|
||||
welcome_text = "You are a Vampire! Use harm intent and aim for the head to drink blood! Stay away from the Chaplain, and use the darkness to your advantage."
|
||||
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
|
||||
antaghud_indicator = "hudchangeling" //NEEDS TO BE CHANGED
|
||||
antaghud_indicator = "hudchangeling"
|
||||
|
||||
/datum/antagonist/vampire/New()
|
||||
..()
|
||||
|
||||
vamp = src
|
||||
|
||||
/datum/antagonist/vampire/update_antag_mob(var/datum/mind/player)
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
var/list/datum/power/vampire/vampirepowers = typesof(/datum/power/vampire) - /datum/power/vampire
|
||||
|
||||
/datum/power/vampire
|
||||
var/total_cost = 0
|
||||
@@ -0,0 +1,22 @@
|
||||
// Vampire and thrall datums. Contains the necessary information about a vampire.
|
||||
// Must be attached to a /datum/mind.
|
||||
/datum/vampire
|
||||
var/list/thralls = list() // A list of thralls that obey the vamire.
|
||||
var/blood_total = 0 // How much total blood do we have?
|
||||
var/blood_usable = 0 // How much usable blood do we have?
|
||||
var/blood_vamp = 0 // How much vampire blood do we have?
|
||||
var/is_draining = 0 // Is the vampire currently sucking on a victim?
|
||||
var/is_healing = 0 // Is the vampire currently healing?
|
||||
var/using_presence = 0 // Is the vampire using presence?
|
||||
var/full_power = 0 // Is the vampire at full power?
|
||||
var/list/datum/power/vampire/purchased_powers = list() // List of power datums available for use.
|
||||
var/holder = null // The veil_walk dummy.
|
||||
var/is_thrall = 0 // Are we dealing with a thrall or a master vampire?
|
||||
var/frenzy = 0
|
||||
var/mob/living/carbon/human/master = null // The vampire/thrall's master.
|
||||
|
||||
/datum/vampire/thrall
|
||||
is_thrall = 1
|
||||
|
||||
/datum/vampire/proc/add_power(var/datum/mind/vampire, var/datum/power/vampire/power, var/announce = 0)
|
||||
return
|
||||
@@ -0,0 +1,122 @@
|
||||
// Make a vampire, add initial powers.
|
||||
/mob/proc/make_vampire()
|
||||
if (!mind)
|
||||
return
|
||||
|
||||
if (!mind.vampire)
|
||||
mind.vampire = new /datum/vampire()
|
||||
|
||||
for (var/datum/power/vampire/P in vampirepowers)
|
||||
if (!P.total_cost)
|
||||
if (!(P in mind.vampire.purchased_powers))
|
||||
mind.vampire.add_power(mind, P, 0)
|
||||
|
||||
for (var/datum/power/vampire/P in mind.vampire.purchased_powers)
|
||||
if (P.isVerb)
|
||||
if (!(P in verbs))
|
||||
verbs += P.verbpath
|
||||
|
||||
return 1
|
||||
|
||||
// Checks the vampire's bloodlevel and unlocks new powers based on that.
|
||||
/mob/proc/check_vampire_upgrade()
|
||||
if (!mind.vampire)
|
||||
return
|
||||
|
||||
var/datum/vampire/vampire = mind.vampire
|
||||
|
||||
for (var/datum/power/vampire/P in vampirepowers)
|
||||
if (P.total_cost <= vampire.blood_total)
|
||||
if (!(P in vampire.purchased_powers))
|
||||
vampire.add_power(mind, P, 1)
|
||||
|
||||
// Runs the checks for whether or not we can use a power.
|
||||
/mob/proc/vampire_power(var/required_blood = 0, var/max_stat = 0, var/ignore_holder = 0, var/disrupt_healing = 1, var/required_vampire_blood = 0)
|
||||
if (!mind)
|
||||
return
|
||||
|
||||
if (!ishuman(src))
|
||||
return
|
||||
|
||||
var/datum/vampire/vampire = mind.vampire
|
||||
if (!vampire)
|
||||
log_debug("[src] has a vampire power but is not a vampire.")
|
||||
return
|
||||
|
||||
if (vampire.holder && !ignore_holder)
|
||||
src << "<span class='warning'>You cannot use this power while walking through the Veil.</span>"
|
||||
return
|
||||
|
||||
if (stat > max_stat)
|
||||
src << "<span class='warning'>You are incapacitated.</span>"
|
||||
return
|
||||
|
||||
if (required_blood > vampire.blood_usable)
|
||||
src << "<span class='warning'>You do not have enough usable blood. [required_blood] needed.</span>"
|
||||
return
|
||||
|
||||
if (vampire.is_healing && disrupt_healing)
|
||||
vampire.is_healing = 0
|
||||
|
||||
return vampire
|
||||
|
||||
// Checks whether or not the target can be affected by a vampire's abilities.
|
||||
/mob/proc/vampire_can_affect_target(var/mob/living/carbon/human/T)
|
||||
if (!T || !istype(T))
|
||||
return 0
|
||||
|
||||
// How did you even get here?
|
||||
if (!mind.vampire)
|
||||
return 0
|
||||
|
||||
if (mind.vampire.full_power == 1 && !(T.mind.vampire && T.mind.vampire.full_power))
|
||||
return 1
|
||||
|
||||
if (T.mind && (T.mind.assigned_role == "Chaplain" || T.mind.vampire))
|
||||
return 0
|
||||
|
||||
if (T.get_species() == "Machine")
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
// Plays the vampire phase in animation.
|
||||
/mob/proc/vampire_phase_in(var/turf/T = null)
|
||||
if (!T)
|
||||
return
|
||||
|
||||
anim(T, src, 'icons/mob/mob.dmi', , "bloodify_in", , dir)
|
||||
|
||||
// Plays the vampire phase out animation.
|
||||
/mob/proc/vampire_phase_out(var/turf/T = null)
|
||||
if (!T)
|
||||
return
|
||||
|
||||
anim(T, src, 'icons/mob/mob.dmi', , "bloodify_out", , dir)
|
||||
|
||||
// Make a vampire thrall
|
||||
/mob/proc/vampire_make_thrall()
|
||||
|
||||
if (!mind)
|
||||
return
|
||||
|
||||
var/datum/vampire/thrall/thrall = new()
|
||||
|
||||
mind.vampire = thrall
|
||||
|
||||
// #TODO: Finish vampire_check_frenzy and implement frenzy.
|
||||
/mob/proc/vampire_check_frenzy()
|
||||
return
|
||||
|
||||
// Removes all vampire powers.
|
||||
/mob/proc/remove_vampire_powers()
|
||||
if (!mind || !mind.vampire)
|
||||
return
|
||||
|
||||
for (var/datum/power/vampire/P in mind.vampire.purchased_powers)
|
||||
if (P.isVerb)
|
||||
verbs -= P.verbpath
|
||||
|
||||
// #TODO: Finish handle_vampire()
|
||||
/mob/proc/handle_vampire()
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,11 +65,6 @@
|
||||
else
|
||||
user.visible_message("\red [user]'s concentration is broken!", "\red Your concentration is broken! You and your target need to stay uninterrupted for longer!")
|
||||
return
|
||||
else if(M.mind && M.mind.vampire)
|
||||
if(!(VAMP_FULL in M.mind.vampire.powers))
|
||||
user << "\red The rod burns cold in your hand, filling you with grim determination. You feel the creature's power weaken."
|
||||
M << "<span class='warning'>The nullrod's power interferes with your own! They are on to you!</span>"
|
||||
M.mind.vampire.nullified = max(8, M.mind.vampire.nullified + 8)
|
||||
else if(prob(10))
|
||||
user << "<span class='danger'>The rod slips in your hand.</span>"
|
||||
..()
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
|
||||
if(mind)
|
||||
if(mind.vampire)
|
||||
stat("Blood", mind.vampire.bloodusable)
|
||||
stat("Usable Blood", mind.vampire.blood_usable)
|
||||
stat("Total Blood", mind.vampire.blood_total)
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", mind.changeling.chem_charges)
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
|
||||
@@ -144,32 +144,6 @@
|
||||
return 1
|
||||
|
||||
if(I_HURT)
|
||||
//Vampire code
|
||||
if(H.zone_sel && M.zone_sel.selecting == "head")
|
||||
if(H.mind && H.mind.vampire && !H.mind.vampire.draining)
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\red Remove their mask!"
|
||||
return 0
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\red Remove your mask!"
|
||||
return 0
|
||||
if(mind && mind.vampire)
|
||||
H << "\red Your fangs fail to pierce [src.name]'s cold flesh"
|
||||
return 0
|
||||
if(get_species() == "Machine")
|
||||
H << "\red They have no blood"
|
||||
return 0
|
||||
//we're good to suck the blood, blaah
|
||||
//and leave an attack log
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>Bit [src.name] ([src.ckey]) in the neck and draining their blood</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been bit in the neck by [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name_admin(H)] bit [key_name_admin(src)] in the neck - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
|
||||
H.handle_bloodsucking(src)
|
||||
// var/datum/organ/external/affecting = get_organ(src.zone_sel.selecting)
|
||||
// affecting.take_damage(10,0,1,0,"dual puncture marks") //this does not work and causes runtimes.
|
||||
return
|
||||
//end vampire codes
|
||||
|
||||
if(!istype(H))
|
||||
attack_generic(H,rand(1,3),"punched")
|
||||
return
|
||||
|
||||
@@ -1261,14 +1261,6 @@
|
||||
see_in_dark = species.darksight
|
||||
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING
|
||||
|
||||
if(mind && mind.vampire)
|
||||
if((VAMP_VISION in mind.vampire.powers) && !(VAMP_FULL in mind.vampire.powers))
|
||||
sight |= SEE_MOBS
|
||||
if((VAMP_FULL in mind.vampire.powers))
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
|
||||
if(XRAY in mutations)
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
|
||||
@@ -208,18 +208,7 @@
|
||||
|
||||
/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
if(ishuman(M)) // Any location
|
||||
if(M.mind && cult.is_antagonist(M.mind) && prob(10))
|
||||
cult.remove_antagonist(M.mind)
|
||||
if(M.mind.vampire && (!(VAMP_FULL in M.mind.vampire.powers)))
|
||||
if(!M) M = holder.my_atom
|
||||
M.adjustFireLoss(6)
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
//M.take_organ_damage(0, 1*REM)
|
||||
if(prob(20))
|
||||
for (var/mob/V in viewers(src))
|
||||
V.show_message(text("\red []'s skin sizzles and burns.", M), 1)
|
||||
//#TODO: holy water adds frenzy
|
||||
|
||||
/datum/reagent/water/holywater/touch_turf(var/turf/T)
|
||||
if(volume >= 5)
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
need_to_break = 1
|
||||
|
||||
reagents.remove_reagent("blood", blood_taken)
|
||||
user.mind.vampire.bloodtotal += blood_taken
|
||||
user.mind.vampire.blood_total += blood_taken
|
||||
user.check_vampire_upgrade(user.mind)
|
||||
|
||||
if (blood_taken)
|
||||
user << "\blue <b>You have accumulated [user.mind.vampire.bloodtotal] [user.mind.vampire.bloodtotal > 1 ? "units" : "unit"] of blood and have [user.mind.vampire.bloodusable] left to use."
|
||||
user << "\blue <b>You have accumulated [user.mind.vampire.blood_total] [user.mind.vampire.blood_total > 1 ? "units" : "unit"] of blood and have [user.mind.vampire.blood_usable] left to use."
|
||||
|
||||
if (need_to_break)
|
||||
break
|
||||
|
||||
@@ -870,6 +870,7 @@ var/list/be_special_flags = list(
|
||||
#define MODE_LOYALIST "loyalist"
|
||||
#define MODE_MALFUNCTION "malf"
|
||||
#define MODE_TRAITOR "traitor"
|
||||
#define MODE_THRALL "thrall"
|
||||
|
||||
#define MIN_SUPPLIED_LAW_NUMBER 15
|
||||
#define MAX_SUPPLIED_LAW_NUMBER 50
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 195 KiB |
Reference in New Issue
Block a user