mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Ports Vampire to role_datums. (#17937)
* Ports Vampire to role_datums. * Spells * Spells r dum * A lot of stuff * tgstat * I dun get it * to_chat(world) madness * Stash * Fixes a few things * Enthrall, more fixes * Changes * (Almost) all spells ! * Almost done * Final touch. * Cleaning up review comments, real objectives. * What a dummy. * Adds ling intro sound, adds gamemode orphaned role process handling, adds role process handling to factions. Changeling the changeling HUD to show how much genetic damage you have sustained, changes the changeling greeting. (#17713) * [Cult 3.0] mostly Cult Altar related stuff (#17723) * cultaltar * cultaltar 2 * cultaltar 3 * cultaltar 4 * Adds rev to role datums (#17873) * Ports Vampire to role_datums. * Spells * Spells r dum * A lot of stuff * tgstat * Role datums tator, double agents, and nuclear operatives (#17935) * It's not calling things on members for some reason. * there's probably a to_chat(world in here somewhere * double agents * nuke ops tomorrow. Tonight we gondola * nuke ops bois * Almost forgot the objective * I dun get it * to_chat(world) madness * Stash * Fixes a few things * Enthrall, more fixes * Changes * (Almost) all spells ! * Almost done * Final touch. * Cleaning up review comments, real objectives. * What a dummy. * Haha * Update acquire_blood.dm * Change the orders of things * Redundant * I can't believe I didnd't fix that sooner It's probably because I'm retarded lmao
This commit is contained in:
committed by
MadmanMartian
parent
e48a07d23b
commit
42433ee4d3
@@ -144,11 +144,11 @@ What is the naming convention for planes or layers?
|
|||||||
|
|
||||||
#define HUMAN_PLANE 9 // For Humans that are standing up.
|
#define HUMAN_PLANE 9 // For Humans that are standing up.
|
||||||
|
|
||||||
//#define THIS_SPACE_FOR_RENT! 10
|
#define VAMP_ANTAG_HUD_PLANE 10
|
||||||
|
|
||||||
//#define THIS_SPACE_FOR_RENT! 11
|
//#define THIS_SPACE_FOR_RENT! 11
|
||||||
|
|
||||||
#define ANTAG_HUD_PLANE 12
|
#define ANTAG_HUD_PLANE 12
|
||||||
|
|
||||||
//#define THIS_SPACE_FOR_RENT! 13
|
//#define THIS_SPACE_FOR_RENT! 13
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ var/list/factions_with_hud_icons = list()
|
|||||||
return dat
|
return dat
|
||||||
|
|
||||||
/datum/faction/proc/process()
|
/datum/faction/proc/process()
|
||||||
for(var/datum/role/R in members)
|
for (var/datum/role/R in members)
|
||||||
R.process()
|
R.process()
|
||||||
|
|
||||||
/datum/faction/proc/check_win()
|
/datum/faction/proc/check_win()
|
||||||
|
|||||||
@@ -7,6 +7,14 @@
|
|||||||
late_role = VAMPIRE // Vampires do not change their role.
|
late_role = VAMPIRE // Vampires do not change their role.
|
||||||
roletype = /datum/role/vampire
|
roletype = /datum/role/vampire
|
||||||
logo_state = "vampire-logo"
|
logo_state = "vampire-logo"
|
||||||
|
hud_icons = list("vampire-logo", "thrall-logo")
|
||||||
|
|
||||||
|
/datum/faction/vampire/proc/addMaster(var/datum/role/vampire/V)
|
||||||
|
if (!leader)
|
||||||
|
leader = V
|
||||||
|
members += V
|
||||||
|
V.faction = src
|
||||||
|
V.antag.faction = src
|
||||||
|
|
||||||
/datum/faction/vampire/can_setup()
|
/datum/faction/vampire/can_setup()
|
||||||
// TODO : check if the number of players > 10, if we have at least 2 players with vamp enabled.
|
// TODO : check if the number of players > 10, if we have at least 2 players with vamp enabled.
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/datum/gamemode/proc/CreateNumOfRoles(var/datum/role/R, var/num)
|
/datum/gamemode/proc/CreateNumOfRoles(var/datum/role/R, var/num)
|
||||||
|
. = list()
|
||||||
var/list/available_players = get_ready_players()
|
var/list/available_players = get_ready_players()
|
||||||
for(var/mob/new_player/P in available_players)
|
for(var/mob/new_player/P in available_players)
|
||||||
if(!P.client || !P.mind)
|
if(!P.client || !P.mind)
|
||||||
@@ -114,7 +115,8 @@
|
|||||||
WARNING("We've gone through all available players, there's nobody to make an antag!")
|
WARNING("We've gone through all available players, there's nobody to make an antag!")
|
||||||
break
|
break
|
||||||
shuffle(available_players)
|
shuffle(available_players)
|
||||||
var/datum/role/newRole = new R
|
var/datum/role/newRole = createBasicRole(R)
|
||||||
|
. += newRole // Get the roles we created
|
||||||
if(!newRole)
|
if(!newRole)
|
||||||
WARNING("Role killed itself or was otherwise missing!")
|
WARNING("Role killed itself or was otherwise missing!")
|
||||||
return 0
|
return 0
|
||||||
@@ -126,8 +128,8 @@
|
|||||||
i--
|
i--
|
||||||
continue
|
continue
|
||||||
|
|
||||||
return 1
|
/datum/gamemode/proc/createBasicRole(var/type_role)
|
||||||
|
return new type_role
|
||||||
|
|
||||||
|
|
||||||
/datum/gamemode/proc/latespawn(var/mob/mob) //Check factions, see if anyone wants a latejoiner
|
/datum/gamemode/proc/latespawn(var/mob/mob) //Check factions, see if anyone wants a latejoiner
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
/datum/objective/acquire_blood
|
/datum/objective/acquire_blood
|
||||||
var/blood_objective = 500 // -- I don't remember the actual blood count needed, this is a placeholder.
|
var/blood_objective = 150 // -- I don't remember the actual blood count needed, this is a placeholder.
|
||||||
explanation_text = "Acquire 500 units of blood."
|
explanation_text = "Acquire 150 units of blood."
|
||||||
name = "(vampire) Acquire blood"
|
name = "(vampire) Acquire blood"
|
||||||
|
|
||||||
|
/datum/objective/acquire_blood/New()
|
||||||
|
blood_objective = round(rand(3, 8)) * 50 // Between 150 and 400.
|
||||||
|
explanation_text = "Acquire [blood_objective] units of blood."
|
||||||
|
|
||||||
/datum/objective/acquire_blood/IsFulfilled()
|
/datum/objective/acquire_blood/IsFulfilled()
|
||||||
if (..())
|
if (..())
|
||||||
return TRUE
|
return TRUE
|
||||||
var/datum/role/vampire/V = owner.GetRole(VAMPIRE)
|
var/datum/role/vampire/V = isvampire(owner.current)
|
||||||
if (!V)
|
if (!V)
|
||||||
message_admins("BUG: [owner.current] was given a vampire objective but is not a vampire.")
|
message_admins("BUG: [owner.current] was given a vampire objective but is not a vampire.")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
/datum/objective/protect_master
|
/datum/objective/protect_master
|
||||||
var/datum/role/master
|
var/datum/role/master
|
||||||
explanation_text = "Protect and serve your master at all costs."
|
explanation_text = "Protect and serve your master at all costs."
|
||||||
|
name = "Protect your master"
|
||||||
|
|
||||||
/datum/objective/protect_master/New(var/datum/role/master)
|
/datum/objective/protect_master/New(var/list/arguments)
|
||||||
src.master = master
|
var/datum/role/master = arguments["master"]
|
||||||
|
if (istype(master))
|
||||||
|
src.master = master
|
||||||
|
|
||||||
/datum/objective/protect_master/IsFulfilled()
|
/datum/objective/protect_master/IsFulfilled()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
var/wikiroute
|
var/wikiroute
|
||||||
|
|
||||||
/datum/role/New(var/datum/mind/M, var/datum/faction/fac=null, var/new_id)
|
/datum/role/New(var/datum/mind/M, var/datum/faction/fac=null, var/new_id, var/override = FALSE)
|
||||||
// Link faction.
|
// Link faction.
|
||||||
faction=fac
|
faction=fac
|
||||||
if(!faction)
|
if(!faction)
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
if(new_id)
|
if(new_id)
|
||||||
id = new_id
|
id = new_id
|
||||||
|
|
||||||
if(M && !AssignToRole(M))
|
if(M && !AssignToRole(M, override))
|
||||||
Drop()
|
Drop()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -212,12 +212,12 @@
|
|||||||
/datum/role/proc/ForgeObjectives()
|
/datum/role/proc/ForgeObjectives()
|
||||||
return
|
return
|
||||||
|
|
||||||
/datum/role/proc/AppendObjective(var/objective_type,var/duplicates=0,var/text=null)
|
/datum/role/proc/AppendObjective(var/objective_type,var/duplicates=0, var/list/arguments = null)
|
||||||
if(!duplicates && locate(objective_type) in objectives)
|
if(!duplicates && locate(objective_type) in objectives)
|
||||||
return FALSE
|
return FALSE
|
||||||
var/datum/objective/O
|
var/datum/objective/O
|
||||||
if(text)
|
if(arguments)
|
||||||
O = new objective_type(text)
|
O = new objective_type(arguments)
|
||||||
else
|
else
|
||||||
O = new objective_type()
|
O = new objective_type()
|
||||||
if(O.PostAppend())
|
if(O.PostAppend())
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
-- Vampires --
|
-- Vampires --
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/datum/role/vampire
|
/datum/role/vampire
|
||||||
id = VAMPIRE
|
id = VAMPIRE
|
||||||
name = "Vampire"
|
name = VAMPIRE
|
||||||
special_role = "vampire"
|
special_role = ROLE_VAMPIRE
|
||||||
disallow_job = FALSE
|
disallow_job = FALSE
|
||||||
restricted_jobs = list("AI", "Cyborg", "Mobile MMI", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain")
|
restricted_jobs = list("AI", "Cyborg", "Mobile MMI", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain")
|
||||||
logo_state = "vampire-logo"
|
logo_state = "vampire-logo"
|
||||||
greets = list("default","custom","admintoggle")
|
greets = list("default","custom","admintoggle")
|
||||||
|
required_pref = ROLE_VAMPIRE
|
||||||
|
|
||||||
// -- Vampire mechanics --
|
// -- Vampire mechanics --
|
||||||
var/list/datum/role/thrall/thralls = list()
|
var/list/datum/role/thrall/thralls = list()
|
||||||
@@ -29,8 +28,11 @@
|
|||||||
|
|
||||||
var/static/list/roundstart_powers = list(/datum/power/vampire/hypnotise, /datum/power/vampire/glare, /datum/power/vampire/rejuvenate)
|
var/static/list/roundstart_powers = list(/datum/power/vampire/hypnotise, /datum/power/vampire/glare, /datum/power/vampire/rejuvenate)
|
||||||
|
|
||||||
/datum/role/vampire/New(var/datum/mind/M, var/datum/faction/fac=null, var/new_id)
|
/datum/role/vampire/New(var/datum/mind/M, var/datum/faction/fac=null, var/new_id, var/override = FALSE)
|
||||||
..()
|
..()
|
||||||
|
if (istype(fac, /datum/faction/vampire))
|
||||||
|
var/datum/faction/vampire/vamp_fac = fac
|
||||||
|
vamp_fac.addMaster(src)
|
||||||
wikiroute = role_wiki[ROLE_VAMPIRE]
|
wikiroute = role_wiki[ROLE_VAMPIRE]
|
||||||
|
|
||||||
/datum/role/vampire/Greet(var/greeting,var/custom)
|
/datum/role/vampire/Greet(var/greeting,var/custom)
|
||||||
@@ -65,7 +67,7 @@
|
|||||||
/datum/role/vampire/RemoveFromRole(var/datum/mind/M)
|
/datum/role/vampire/RemoveFromRole(var/datum/mind/M)
|
||||||
var/list/vamp_spells = getAllVampSpells()
|
var/list/vamp_spells = getAllVampSpells()
|
||||||
for(var/spell/spell in antag.current.spell_list)
|
for(var/spell/spell in antag.current.spell_list)
|
||||||
if (is_type_in_list(spell, vamp_spells))//TODO: HAVE A LIST WITH EVERY VAMPIRE SPELLS
|
if (is_type_in_list(spell, vamp_spells))
|
||||||
antag.current.remove_spell(spell)
|
antag.current.remove_spell(spell)
|
||||||
if(antag.current.client && antag.current.hud_used)
|
if(antag.current.client && antag.current.hud_used)
|
||||||
if(antag.current.hud_used.vampire_blood_display)
|
if(antag.current.hud_used.vampire_blood_display)
|
||||||
@@ -92,9 +94,21 @@
|
|||||||
. += T.GetScoreboard()
|
. += T.GetScoreboard()
|
||||||
|
|
||||||
/datum/role/vampire/ForgeObjectives()
|
/datum/role/vampire/ForgeObjectives()
|
||||||
// -- Vampires objectives : acquire blood, assassinate.
|
|
||||||
objectives.AddObjective(new /datum/objective/acquire_blood, src.antag)
|
AppendObjective(/datum/objective/acquire_blood)
|
||||||
objectives.AddObjective(new /datum/objective/target/assassinate, src.antag)
|
|
||||||
|
AppendObjective(/datum/objective/target/assassinate)
|
||||||
|
|
||||||
|
AppendObjective(/datum/objective/target/steal)
|
||||||
|
|
||||||
|
switch(rand(1,100))
|
||||||
|
if(1 to 80)
|
||||||
|
if (!(locate(/datum/objective/escape) in objectives.objectives)) // Objectives (the objective holder).objectives (the objective list)
|
||||||
|
AppendObjective(/datum/objective/escape)
|
||||||
|
else
|
||||||
|
if (!(locate(/datum/objective/survive) in objectives.objectives))
|
||||||
|
AppendObjective(/datum/objective/survive)
|
||||||
|
return
|
||||||
|
|
||||||
// -- Vampire mechanics --
|
// -- Vampire mechanics --
|
||||||
|
|
||||||
@@ -149,7 +163,7 @@
|
|||||||
if(!target.mind)
|
if(!target.mind)
|
||||||
to_chat(assailant, "<span class='warning'>This blood is lifeless and has no power.</span>")
|
to_chat(assailant, "<span class='warning'>This blood is lifeless and has no power.</span>")
|
||||||
draining = null
|
draining = null
|
||||||
return 0
|
return FALSE
|
||||||
if(!target.vessel.get_reagent_amount(BLOOD))
|
if(!target.vessel.get_reagent_amount(BLOOD))
|
||||||
to_chat(assailant, "<span class='warning'>They've got no blood left to give.</span>")
|
to_chat(assailant, "<span class='warning'>They've got no blood left to give.</span>")
|
||||||
break
|
break
|
||||||
@@ -157,7 +171,6 @@
|
|||||||
blood = min(10, target.vessel.get_reagent_amount(BLOOD)) // if they have less than 10 blood, give them the remnant else they get 10 blood
|
blood = min(10, target.vessel.get_reagent_amount(BLOOD)) // if they have less than 10 blood, give them the remnant else they get 10 blood
|
||||||
blood_total += blood
|
blood_total += blood
|
||||||
blood_usable += blood
|
blood_usable += blood
|
||||||
update_vamp_hud()
|
|
||||||
target.adjustCloneLoss(10) // beep boop 10 damage
|
target.adjustCloneLoss(10) // beep boop 10 damage
|
||||||
else
|
else
|
||||||
blood = min(5, target.vessel.get_reagent_amount(BLOOD)) // The dead only give 5 bloods
|
blood = min(5, target.vessel.get_reagent_amount(BLOOD)) // The dead only give 5 bloods
|
||||||
@@ -166,76 +179,26 @@
|
|||||||
to_chat(assailant, "<span class='notice'>You have accumulated [blood_total] [blood_total > 1 ? "units" : "unit"] of blood[blood_usable_before != blood_usable ?", and have [blood_usable] left to use." : "."]</span>")
|
to_chat(assailant, "<span class='notice'>You have accumulated [blood_total] [blood_total > 1 ? "units" : "unit"] of blood[blood_usable_before != blood_usable ?", and have [blood_usable] left to use." : "."]</span>")
|
||||||
check_vampire_upgrade()
|
check_vampire_upgrade()
|
||||||
target.vessel.remove_reagent(BLOOD,25)
|
target.vessel.remove_reagent(BLOOD,25)
|
||||||
|
update_vamp_hud()
|
||||||
|
|
||||||
draining = null
|
draining = null
|
||||||
to_chat(assailant, "<span class='notice'>You stop draining \the [target] of blood.</span>")
|
to_chat(assailant, "<span class='notice'>You stop draining \the [target] of blood.</span>")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/datum/role/vampire/proc/check_vampire_upgrade()
|
/datum/role/vampire/proc/check_vampire_upgrade()
|
||||||
var/list/old_powers = powers.Copy()
|
|
||||||
|
|
||||||
for (var/i in subtypesof(/datum/power/vampire))
|
for (var/i in subtypesof(/datum/power/vampire))
|
||||||
var/datum/power/vampire/VP_type = i
|
var/datum/power/vampire/VP_type = i
|
||||||
if (blood_total > initial(VP_type.blood_threeshold) && !(initial(VP_type.id) in powers))
|
if (blood_total > initial(VP_type.blood_threeshold) && !(initial(VP_type.id) in powers))
|
||||||
var/datum/power/vampire/VP = new VP_type
|
var/datum/power/vampire/VP = new VP_type
|
||||||
VP.Give(src)
|
if (!(VP.id in powers))
|
||||||
|
VP.Give(src)
|
||||||
announce_new_powers(old_powers, powers)
|
|
||||||
|
|
||||||
/datum/role/vampire/proc/announce_new_powers(var/old_powers, var/new_powers)
|
|
||||||
var/msg = ""
|
|
||||||
var/mob/M = antag.current
|
|
||||||
for(var/n in new_powers)
|
|
||||||
if(!(n in old_powers))
|
|
||||||
switch(n)
|
|
||||||
if(VAMP_SHAPE)
|
|
||||||
msg = "<span class='notice'>You have gained the shapeshifting ability, at the cost of stored blood you can change your form permanently.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_VISION)
|
|
||||||
msg = "<span class='notice'>Your vampiric vision has improved.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
antag.store_memory("<font size = 1>[msg]</font>")
|
|
||||||
if(VAMP_DISEASE)
|
|
||||||
msg = "<span class='notice'>You have gained the Diseased Touch ability which causes those you touch to die shortly after unless treated medically.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_CLOAK)
|
|
||||||
msg = "<span class='notice'>You have gained the Cloak of Darkness ability which when toggled makes you near invisible in the shroud of darkness.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_BATS)
|
|
||||||
msg = "<span class='notice'>You have gained the Summon Bats ability which allows you to summon a trio of angry space bats.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_SCREAM)
|
|
||||||
msg = "<span class='notice'>You have gained the Chiroptean Screech ability which stuns anything with ears in a large radius and shatters glass in the process.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_HEAL)
|
|
||||||
msg = "<span class=notice'>Your rejuvination abilities have improved and will now heal you over time when used.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
antag.store_memory("<font size = 1>[msg]</font>")
|
|
||||||
if(VAMP_JAUNT)
|
|
||||||
msg = "<span class='notice'>You have gained the Mist Form ability which allows you to take on the form of mist for a short period and pass over any obstacle in your path.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_SLAVE)
|
|
||||||
msg = "<span class='notice'>You have gained the Enthrall ability which at a heavy blood cost allows you to enslave a human that is not loyal to any other for a random period of time.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_BLINK)
|
|
||||||
msg = "<span class='notice'>You have gained the ability to shadowstep, which makes you disappear into nearby shadows at the cost of blood.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_MATURE)
|
|
||||||
msg = "<span class='sinister'>You have reached physical maturity. You are more resistant to holy things, and your vision has been improved greatly.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
antag.store_memory("<font size = 1>[msg]</font>")
|
|
||||||
if(VAMP_SHADOW)
|
|
||||||
msg = "<span class='notice'>You have gained mastery over the shadows. In the dark, you can mask your identity, instantly terrify non-vampires who approach you, and enter the chapel for a longer period of time.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
if(VAMP_CHARISMA)
|
|
||||||
msg = "<span class='sinister'>You develop an uncanny charismatic aura that makes you difficult to disobey. Hypnotise and Enthrall take less time to perform, and Enthrall works on implanted targets.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
antag.store_memory("<font size = 1>[msg]</font>")
|
|
||||||
if(VAMP_UNDYING)
|
|
||||||
msg = "<span class='sinister'>You have reached the absolute peak of your power. Your abilities cannot be nullified very easily, and you may return from the grave so long as your body is not burned, destroyed or sanctified. You can also spawn a rather nice cape.</span>"
|
|
||||||
to_chat(M, "[msg]")
|
|
||||||
antag.store_memory("<font size = 1>[msg]</font>")
|
|
||||||
|
|
||||||
|
/datum/role/vampire/proc/handle_enthrall(var/datum/mind/M)
|
||||||
|
if (!istype(M))
|
||||||
|
return FALSE
|
||||||
|
var/datum/role/thrall/T = new(thrall = M, master = src) // Creating a new thrall
|
||||||
|
thralls += T
|
||||||
/*
|
/*
|
||||||
-- Life() related procs --
|
-- Life() related procs --
|
||||||
*/
|
*/
|
||||||
@@ -265,9 +228,19 @@
|
|||||||
I.status &= ~ORGAN_BLEEDING
|
I.status &= ~ORGAN_BLEEDING
|
||||||
nullified = max(0, nullified - 1)
|
nullified = max(0, nullified - 1)
|
||||||
|
|
||||||
|
if (!H.druggy)
|
||||||
|
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||||
|
|
||||||
|
if (VAMP_MATURE in powers)
|
||||||
|
H.change_sight(adding = SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||||
|
H.see_in_dark = 8
|
||||||
|
H.see_invisible = SEE_INVISIBLE_MINIMUM
|
||||||
|
|
||||||
|
else if (VAMP_VISION in powers)
|
||||||
|
antag.current.change_sight(adding = SEE_MOBS)
|
||||||
|
|
||||||
/datum/role/vampire/proc/handle_cloak(var/mob/living/carbon/human/H)
|
/datum/role/vampire/proc/handle_cloak(var/mob/living/carbon/human/H)
|
||||||
var/turf/T = get_turf(H)
|
var/turf/T = get_turf(H)
|
||||||
|
|
||||||
if(!iscloaking)
|
if(!iscloaking)
|
||||||
H.alphas["vampire_cloak"] = 255
|
H.alphas["vampire_cloak"] = 255
|
||||||
H.color = "#FFFFFF"
|
H.color = "#FFFFFF"
|
||||||
@@ -295,7 +268,10 @@
|
|||||||
ismenacing = 0
|
ismenacing = 0
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
for(var/mob/living/carbon/C in oview(6))
|
var/mob/M = antag.current
|
||||||
|
var/radius = 6
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/C in oviewers(radius, M))
|
||||||
if(prob(35))
|
if(prob(35))
|
||||||
continue //to prevent fearspam
|
continue //to prevent fearspam
|
||||||
if(!C.vampire_affected(antag))
|
if(!C.vampire_affected(antag))
|
||||||
@@ -386,6 +362,7 @@
|
|||||||
-- Helpers --
|
-- Helpers --
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// ! - need to handle thrall removing
|
||||||
/datum/role/vampire/proc/update_vamp_hud()
|
/datum/role/vampire/proc/update_vamp_hud()
|
||||||
var/mob/M = antag.current
|
var/mob/M = antag.current
|
||||||
if(M.hud_used)
|
if(M.hud_used)
|
||||||
@@ -446,8 +423,21 @@
|
|||||||
name = "thrall"
|
name = "thrall"
|
||||||
special_role = "thrall"
|
special_role = "thrall"
|
||||||
logo_state = "thrall-logo"
|
logo_state = "thrall-logo"
|
||||||
|
|
||||||
var/datum/role/vampire/master
|
var/datum/role/vampire/master
|
||||||
|
|
||||||
|
/datum/role/thrall/New(var/datum/mind/thrall, var/datum/role/vampire/master)
|
||||||
|
. = ..()
|
||||||
|
if(!istype(master))
|
||||||
|
return FALSE
|
||||||
|
src.master = master
|
||||||
|
master.faction.members += src
|
||||||
|
faction = master.faction
|
||||||
|
antag.faction = master.faction
|
||||||
|
antag = thrall
|
||||||
|
update_faction_icons()
|
||||||
|
OnPostSetup()
|
||||||
|
|
||||||
/datum/role/thrall/Greet(var/you_are = TRUE)
|
/datum/role/thrall/Greet(var/you_are = TRUE)
|
||||||
var/dat
|
var/dat
|
||||||
if (you_are)
|
if (you_are)
|
||||||
@@ -458,4 +448,16 @@
|
|||||||
antag.current << sound('sound/effects/vampire_intro.ogg')
|
antag.current << sound('sound/effects/vampire_intro.ogg')
|
||||||
|
|
||||||
/datum/role/thrall/ForgeObjectives()
|
/datum/role/thrall/ForgeObjectives()
|
||||||
objectives.AddObjective(new /datum/objective/protect_master(master), src.antag)
|
var/list/parameters = list(
|
||||||
|
"master" = master
|
||||||
|
)
|
||||||
|
AppendObjective(/datum/objective/protect_master, arguments = parameters)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/role/thrall/Drop(var/deconverted = FALSE)
|
||||||
|
master.thralls -= src
|
||||||
|
var/mob/M = antag.current
|
||||||
|
M.visible_message("<span class='big danger'>[M] suddenly becomes calm and collected again, \his eyes clear up.</span>",
|
||||||
|
"<span class='big notice'>Your blood cools down and you are inhabited by a sensation of untold calmness.</span>")
|
||||||
|
update_faction_icons()
|
||||||
|
return ..()
|
||||||
@@ -3,22 +3,55 @@
|
|||||||
name = "Vampire"
|
name = "Vampire"
|
||||||
factions_allowed = list(/datum/faction/vampire)
|
factions_allowed = list(/datum/faction/vampire)
|
||||||
|
|
||||||
|
roles_allowed = 1 // Per factions
|
||||||
|
|
||||||
|
var/number_of_vamps
|
||||||
|
|
||||||
|
/datum/gamemode/vampire/CreateFactions()
|
||||||
|
number_of_vamps = max(1, round(get_player_count()/10))
|
||||||
|
for (var/i = 1 to number_of_vamps)
|
||||||
|
. += CreateFaction(/datum/faction/vampire)
|
||||||
|
|
||||||
|
/datum/gamemode/vampire/CreateRoles()
|
||||||
|
var/list/datum/role/vampire/vampires = list()
|
||||||
|
vampires = CreateNumOfRoles(/datum/role/vampire, number_of_vamps)
|
||||||
|
if (!vampires)
|
||||||
|
WARNING("Unable to create enough roles!")
|
||||||
|
return FALSE
|
||||||
|
for (var/i = 1 to number_of_vamps)
|
||||||
|
var/datum/faction/vampire/v_fac = factions[i]
|
||||||
|
if (istype(v_fac))
|
||||||
|
v_fac.addMaster(vampires[i])
|
||||||
|
v_fac.name = "Vampire force #[i]"
|
||||||
|
return vampires
|
||||||
|
|
||||||
|
/datum/gamemode/vampire/createBasicRole(var/type_role)
|
||||||
|
for (var/datum/faction/F in factions)
|
||||||
|
if (!F.members.len) // First empty fac
|
||||||
|
return new type_role(fac = F)
|
||||||
|
|
||||||
|
|
||||||
|
/datum/gamemode/vampire/PopulateFactions()
|
||||||
|
// Void - we do that in CreateRoles()
|
||||||
|
|
||||||
// -- Vampire powers
|
// -- Vampire powers
|
||||||
|
|
||||||
/datum/power/vampire
|
/datum/power/vampire
|
||||||
name = "Power"
|
name = "Power"
|
||||||
desc = "Placeholder"
|
desc = "Placeholder"
|
||||||
helptext = "No help text for vamps."
|
helptext = "" // Displays the helptext if needed
|
||||||
isVerb = 0 // Is it an active power, or passive?
|
isVerb = 0 // Is it an active power, or passive?
|
||||||
verbpath = null // Vampires have no verbs
|
verbpath = null // Vampires have no verbs
|
||||||
|
|
||||||
var/blood_threeshold = 0
|
var/blood_threeshold = 0
|
||||||
var/spell_path
|
var/spell_path
|
||||||
var/id
|
var/id
|
||||||
|
var/store_in_memory = FALSE
|
||||||
|
|
||||||
/datum/power/vampire/proc/Give(var/datum/role/vampire/V)
|
/datum/power/vampire/proc/Give(var/datum/role/vampire/V)
|
||||||
if (!istype(V))
|
if (!istype(V))
|
||||||
message_admins("Error: trying to give a vampire power to a non-vampire.")
|
message_admins("Error: trying to give a vampire power to a non-vampire.")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
if (spell_path)
|
if (spell_path)
|
||||||
var/spell/S = new spell_path
|
var/spell/S = new spell_path
|
||||||
@@ -26,6 +59,12 @@
|
|||||||
|
|
||||||
V.powers |= id
|
V.powers |= id
|
||||||
|
|
||||||
|
if (helptext)
|
||||||
|
to_chat(V.antag.current, "<span class = 'notice'>[helptext]</span>")
|
||||||
|
|
||||||
|
if (store_in_memory)
|
||||||
|
V.antag.store_memory("<font size = '1'>[helptext]</font>")
|
||||||
|
|
||||||
// -- List of all vampire spells
|
// -- List of all vampire spells
|
||||||
|
|
||||||
/* Tier 0 : roundstart */
|
/* Tier 0 : roundstart */
|
||||||
@@ -33,6 +72,7 @@
|
|||||||
blood_threeshold = 0
|
blood_threeshold = 0
|
||||||
id = VAMP_REJUV
|
id = VAMP_REJUV
|
||||||
spell_path = /spell/rejuvenate
|
spell_path = /spell/rejuvenate
|
||||||
|
helptext = "You have gained the ability to rejuvnate your body and clean yourself of all incapacitating effects."
|
||||||
|
|
||||||
/datum/power/vampire/glare
|
/datum/power/vampire/glare
|
||||||
blood_threeshold = 0
|
blood_threeshold = 0
|
||||||
@@ -49,74 +89,92 @@
|
|||||||
blood_threeshold = 100
|
blood_threeshold = 100
|
||||||
id = VAMP_SHAPE
|
id = VAMP_SHAPE
|
||||||
spell_path = /spell/shapeshift
|
spell_path = /spell/shapeshift
|
||||||
|
helptext = "You have gained the shapeshifting ability, at the cost of stored blood you can change your form permanently."
|
||||||
|
|
||||||
/datum/power/vampire/vision
|
/datum/power/vampire/vision
|
||||||
blood_threeshold = 100
|
blood_threeshold = 100
|
||||||
id = VAMP_VISION
|
id = VAMP_VISION
|
||||||
spell_path = null // TODO
|
spell_path = null // No spell for night vision.
|
||||||
|
helptext = "Your vampiric vision has improved."
|
||||||
|
store_in_memory = TRUE
|
||||||
|
|
||||||
/* Tier 2 */
|
/* Tier 2 */
|
||||||
/datum/power/vampire/disease
|
/datum/power/vampire/disease
|
||||||
blood_threeshold = 150
|
blood_threeshold = 150
|
||||||
id = VAMP_DISEASE
|
id = VAMP_DISEASE
|
||||||
spell_path = /spell/targeted/disease
|
spell_path = /spell/targeted/disease
|
||||||
|
helptext = "You have gained the Diseased Touch ability which causes those you touch to die shortly after unless treated medically."
|
||||||
|
|
||||||
/datum/power/vampire/cloak
|
/datum/power/vampire/cloak
|
||||||
blood_threeshold = 150
|
blood_threeshold = 150
|
||||||
id = VAMP_CLOAK
|
id = VAMP_CLOAK
|
||||||
spell_path = null // TODO
|
spell_path = /spell/cloak
|
||||||
|
helptext = "You have gained the Cloak of Darkness ability which when toggled makes you near invisible in the shroud of darkness."
|
||||||
|
|
||||||
/* Tier 3 */
|
/* Tier 3 */
|
||||||
/datum/power/vampire/bats
|
/datum/power/vampire/bats
|
||||||
blood_threeshold = 200
|
blood_threeshold = 200
|
||||||
id = VAMP_BATS
|
id = VAMP_BATS
|
||||||
spell_path = null // TODO
|
spell_path = /spell/aoe_turf/conjure/bats
|
||||||
|
helptext = "You have gained the Summon Bats ability which allows you to summon a trio of angry space bats."
|
||||||
|
|
||||||
/datum/power/vampire/scream
|
/datum/power/vampire/scream
|
||||||
blood_threeshold = 200
|
blood_threeshold = 200
|
||||||
id = VAMP_SCREAM
|
id = VAMP_SCREAM
|
||||||
spell_path = null // TODO
|
spell_path = /spell/aoe_turf/screech
|
||||||
|
helptext = "You have gained the Chiroptean Screech ability which stuns anything with ears in a large radius and shatters glass in the process."
|
||||||
|
|
||||||
/datum/power/vampire/heal
|
/datum/power/vampire/heal
|
||||||
blood_threeshold = 200
|
blood_threeshold = 200
|
||||||
id = VAMP_HEAL
|
id = VAMP_HEAL
|
||||||
|
helptext = "Your rejuvination abilities have improved and will now heal you over time when used."
|
||||||
|
store_in_memory = TRUE
|
||||||
|
|
||||||
/* Tier 3.5 (/vg/) */
|
/* Tier 3.5 (/vg/) */
|
||||||
/datum/power/vampire/jaunt
|
/datum/power/vampire/jaunt
|
||||||
blood_threeshold = 250
|
blood_threeshold = 250
|
||||||
id = VAMP_JAUNT
|
id = VAMP_JAUNT
|
||||||
spell_path = null // TODO
|
spell_path = /spell/targeted/ethereal_jaunt/vamp
|
||||||
|
helptext = "You have gained the Mist Form ability which allows you to take on the form of mist for a short period and pass over any obstacle in your path."
|
||||||
|
|
||||||
/* Tier 4 */
|
/* Tier 4 */
|
||||||
/datum/power/vampire/slave
|
/datum/power/vampire/slave
|
||||||
blood_threeshold = 300
|
blood_threeshold = 300
|
||||||
id = VAMP_SLAVE
|
id = VAMP_SLAVE
|
||||||
spell_path = null // TODO
|
spell_path = /spell/targeted/enthrall
|
||||||
|
helptext = "You have gained the Enthrall ability which at a heavy blood cost allows you to enslave a human that is not loyal to any other, forever."
|
||||||
|
|
||||||
/datum/power/vampire/blink
|
/datum/power/vampire/blink
|
||||||
blood_threeshold = 300
|
blood_threeshold = 300
|
||||||
id = VAMP_BLINK
|
id = VAMP_BLINK
|
||||||
spell_path = null // TODO
|
spell_path = /spell/aoe_turf/blink/vamp
|
||||||
|
helptext = "You have gained the ability to shadowstep, which makes you disappear into nearby shadows at the cost of blood."
|
||||||
|
|
||||||
/* Tier 5 (/vg/) */
|
/* Tier 5 (/vg/) */
|
||||||
/datum/power/vampire/mature
|
/datum/power/vampire/mature
|
||||||
blood_threeshold = 400
|
blood_threeshold = 400
|
||||||
id = VAMP_MATURE
|
id = VAMP_MATURE
|
||||||
|
helptext = "You have reached physical maturity. You are more resistant to holy things, and your vision has been improved greatly."
|
||||||
|
store_in_memory = TRUE
|
||||||
|
|
||||||
/* Tier 6 (/vg/) */
|
/* Tier 6 (/vg/) */
|
||||||
/datum/power/vampire/shadow
|
/datum/power/vampire/shadow
|
||||||
blood_threeshold = 450
|
blood_threeshold = 450
|
||||||
id = VAMP_SHADOW
|
id = VAMP_SHADOW
|
||||||
spell_path = null // TODO
|
spell_path = /spell/menace
|
||||||
|
helptext = "You have gained mastery over the shadows. In the dark, you can mask your identity, instantly terrify non-vampires who approach you, and enter the chapel for a longer period of time."
|
||||||
|
|
||||||
/* Tier 66 (/vg/) */
|
/* Tier 66 (/vg/) */
|
||||||
/datum/power/vampire/charisma
|
/datum/power/vampire/charisma // Passive
|
||||||
blood_threeshold = 500
|
blood_threeshold = 500
|
||||||
id = VAMP_CHARISMA
|
id = VAMP_CHARISMA
|
||||||
spell_path = null // TODO
|
helptext = "You develop an uncanny charismatic aura that makes you difficult to disobey. Hypnotise and Enthrall take less time to perform, and Enthrall works on implanted targets."
|
||||||
|
store_in_memory = TRUE
|
||||||
|
|
||||||
/* Tier 666 (/vg/) */
|
/* Tier 666 (/vg/) */
|
||||||
/datum/power/vampire/undying
|
/datum/power/vampire/undying
|
||||||
blood_threeshold = 666
|
blood_threeshold = 666
|
||||||
id = VAMP_UNDYING
|
id = VAMP_UNDYING
|
||||||
spell_path = null // TODO
|
spell_path = /spell/undeath
|
||||||
|
helptext = "You have reached the absolute peak of your power. Your abilities cannot be nullified very easily, and you may return from the grave so long as your body is not burned, destroyed or sanctified. You can also spawn a rather nice cape."
|
||||||
|
store_in_memory = TRUE
|
||||||
|
|||||||
@@ -355,6 +355,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
|||||||
if(VAMP_UNDYING)
|
if(VAMP_UNDYING)
|
||||||
verbs += /client/proc/vampire_undeath
|
verbs += /client/proc/vampire_undeath
|
||||||
verbs += /client/proc/vampire_spawncape
|
verbs += /client/proc/vampire_spawncape
|
||||||
|
|
||||||
/mob/proc/remove_vampire_powers()
|
/mob/proc/remove_vampire_powers()
|
||||||
for(var/handler in typesof(/client/proc))
|
for(var/handler in typesof(/client/proc))
|
||||||
if(findtext("[handler]","vampire_"))
|
if(findtext("[handler]","vampire_"))
|
||||||
|
|||||||
@@ -117,8 +117,6 @@
|
|||||||
var/datum/role/thrall/T = isthrall(H)
|
var/datum/role/thrall/T = isthrall(H)
|
||||||
if(T && isChaplain(user))
|
if(T && isChaplain(user))
|
||||||
T.Drop() // Remove the thrall using the Drop() function to leave the role.
|
T.Drop() // Remove the thrall using the Drop() function to leave the role.
|
||||||
H.visible_message("<span class='big danger'>[H] suddenly becomes calm and collected again, \his eyes clear up.</span>",
|
|
||||||
"<span class='big notice'>Your blood cools down and you are inhabited by a sensation of untold calmness.</span>")
|
|
||||||
return 1 //That's it, game over
|
return 1 //That's it, game over
|
||||||
|
|
||||||
bless_mob(user, H) //Let's outsource the healing code, because we can
|
bless_mob(user, H) //Let's outsource the healing code, because we can
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
/obj/item/clothing/mask/stone/equipped(mob/M as mob, wear_mask)
|
/obj/item/clothing/mask/stone/equipped(mob/M as mob, wear_mask)
|
||||||
if(!istype(M, /mob/living/carbon/human)) //just in case a non-human somehow manages to equip it
|
if(!istype(M, /mob/living/carbon/human)) //just in case a non-human somehow manages to equip it
|
||||||
forceMove(M.loc)
|
forceMove(M.loc)
|
||||||
|
spikes()
|
||||||
|
|
||||||
/obj/item/clothing/mask/stone/proc/spikes()
|
/obj/item/clothing/mask/stone/proc/spikes()
|
||||||
icon_state = "stone_spikes"
|
icon_state = "stone_spikes"
|
||||||
@@ -44,19 +45,11 @@
|
|||||||
var/datum/role/vampire/V = isvampire(H)
|
var/datum/role/vampire/V = isvampire(H)
|
||||||
if(!V) //They are not already a vampire
|
if(!V) //They are not already a vampire
|
||||||
to_chat(H, "<span class='danger'>The mask's stone spikes pierce your skull and enter your brain!</span>")
|
to_chat(H, "<span class='danger'>The mask's stone spikes pierce your skull and enter your brain!</span>")
|
||||||
var/datum/role/vampire/vamp = new(H.mind) // Creates a vamp.
|
if (makeLateVampire(H, blood_to_give)) // If we could create them
|
||||||
vamp.OnPostSetup() // TODO rolefix ! This should be part of a bigger makeNewAntag() proc.
|
log_admin("[H] has become a vampire using a stone mask.")
|
||||||
log_admin("[H] has become a vampire using a stone mask.")
|
if (!infinite)
|
||||||
spawn(10) //Unlocking their abilities produces a lot of text, I want to give them a chance to see that they have objectives
|
crumble()
|
||||||
vamp.blood_total = blood_to_give
|
return
|
||||||
vamp.blood_usable = blood_to_give
|
|
||||||
to_chat(H, "<span class='notice'>You have accumulated [vamp.blood_total] [vamp.blood_total > 1 ? "units" : "unit"] of blood and have [vamp.blood_usable] left to use.</span>")
|
|
||||||
vamp.check_vampire_upgrade()
|
|
||||||
vamp.update_vamp_hud()
|
|
||||||
if(!infinite)
|
|
||||||
crumble()
|
|
||||||
return
|
|
||||||
|
|
||||||
else
|
else
|
||||||
to_chat(H, "<span class='notice'>The stone spikes pierce your skull, but nothing happens. Perhaps vampires cannot benefit further from use of the mask.</span>")
|
to_chat(H, "<span class='notice'>The stone spikes pierce your skull, but nothing happens. Perhaps vampires cannot benefit further from use of the mask.</span>")
|
||||||
else
|
else
|
||||||
@@ -82,3 +75,19 @@
|
|||||||
|
|
||||||
/obj/item/clothing/mask/stone/infinite //this mask can be used any number of times
|
/obj/item/clothing/mask/stone/infinite //this mask can be used any number of times
|
||||||
infinite = 1
|
infinite = 1
|
||||||
|
|
||||||
|
/proc/makeLateVampire(var/mob/living/carbon/human/H, var/blood_to_give)
|
||||||
|
var/datum/faction/vampire/Fac_vamp = new
|
||||||
|
var/datum/role/vampire/vamp = new(H.mind, Fac_vamp, override = TRUE)
|
||||||
|
if (!vamp || !Fac_vamp)
|
||||||
|
return FALSE
|
||||||
|
ticker.mode.factions += Fac_vamp
|
||||||
|
vamp.OnPostSetup()
|
||||||
|
update_faction_icons()
|
||||||
|
spawn(10) //Unlocking their abilities produces a lot of text, I want to give them a chance to see that they have objectives
|
||||||
|
vamp.blood_total = blood_to_give
|
||||||
|
vamp.blood_usable = blood_to_give
|
||||||
|
to_chat(H, "<span class='notice'>You have accumulated [vamp.blood_total] [vamp.blood_total > 1 ? "units" : "unit"] of blood and have [vamp.blood_usable] left to use.</span>")
|
||||||
|
vamp.check_vampire_upgrade()
|
||||||
|
vamp.update_vamp_hud()
|
||||||
|
return TRUE
|
||||||
@@ -40,30 +40,31 @@
|
|||||||
size = SIZE_TINY
|
size = SIZE_TINY
|
||||||
|
|
||||||
faction = "scarybat"
|
faction = "scarybat"
|
||||||
var/mob/living/owner
|
var/datum/faction/vamp_fac
|
||||||
held_items = list()
|
held_items = list()
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/New(loc, mob/living/L as mob)
|
|
||||||
..()
|
|
||||||
if(istype(L))
|
|
||||||
owner = L
|
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(var/check_drift = 0)
|
/mob/living/simple_animal/hostile/scarybat/Process_Spacemove(var/check_drift = 0)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/CanAttack(var/atom/the_target)
|
/mob/living/simple_animal/hostile/scarybat/CanAttack(var/atom/the_target)
|
||||||
if(the_target == owner)
|
if (!istype(the_target, /mob/living))
|
||||||
return 0
|
return ..()
|
||||||
return ..(the_target)
|
var/mob/living/L = the_target
|
||||||
|
if (L.mind && L.mind.faction == vamp_fac)
|
||||||
|
return FALSE
|
||||||
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/FindTarget()
|
/mob/living/simple_animal/hostile/scarybat/FindTarget()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
emote("flutters towards [.]")
|
emote("flutters towards [.]")
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/Found(var/atom/A)//This is here as a potential override to pick a specific target if available
|
/mob/living/simple_animal/hostile/scarybat/Found(var/atom/A) //This is here as a potential override to pick a specific target if available
|
||||||
if(istype(A) && A == owner)
|
if(!istype(A, /mob/living))
|
||||||
return 0
|
return FALSE
|
||||||
|
var/mob/living/L = A
|
||||||
|
if (L.mind && L.mind.faction == vamp_fac)
|
||||||
|
return FALSE
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/scarybat/AttackingTarget()
|
/mob/living/simple_animal/hostile/scarybat/AttackingTarget()
|
||||||
|
|||||||
@@ -932,7 +932,8 @@
|
|||||||
V.smitecounter += 2 //Basically nothing, unless you drank multiple bottles of holy water (250 units to catch on fire !)
|
V.smitecounter += 2 //Basically nothing, unless you drank multiple bottles of holy water (250 units to catch on fire !)
|
||||||
var/datum/role/thrall/T = isthrall(H)
|
var/datum/role/thrall/T = isthrall(H)
|
||||||
if(T)
|
if(T)
|
||||||
T.Drop()
|
if (prob(35)) // 35% chance of dethralling
|
||||||
|
T.Drop()
|
||||||
|
|
||||||
/datum/reagent/holywater/reaction_mob(var/mob/living/M, var/method = TOUCH, var/volume)//Splashing people with water can help put them out!
|
/datum/reagent/holywater/reaction_mob(var/mob/living/M, var/method = TOUCH, var/volume)//Splashing people with water can help put them out!
|
||||||
|
|
||||||
|
|||||||
@@ -25,12 +25,51 @@
|
|||||||
user.unlock_from()
|
user.unlock_from()
|
||||||
user.forceMove(T)
|
user.forceMove(T)
|
||||||
|
|
||||||
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
|
makeAnimation(T, starting)
|
||||||
smoke.set_up(3, 0, starting)
|
|
||||||
smoke.start()
|
|
||||||
|
|
||||||
smoke = new()
|
|
||||||
smoke.set_up(3, 0, T)
|
|
||||||
smoke.start()
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/proc/makeAnimation(var/turf/T, var/turf/starting)
|
||||||
|
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
|
||||||
|
smoke.set_up(3, 0, starting)
|
||||||
|
smoke.start()
|
||||||
|
|
||||||
|
smoke = new()
|
||||||
|
smoke.set_up(3, 0, T)
|
||||||
|
smoke.start()
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/vamp
|
||||||
|
name = "Shadowstep (10)"
|
||||||
|
desc = "Vanish into the shadows."
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_blink"
|
||||||
|
|
||||||
|
charge_max = 20 SECONDS
|
||||||
|
cooldown_min = 20 SECONDS
|
||||||
|
|
||||||
|
var/max_lum = 1
|
||||||
|
var/blood_cost = 10
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/vamp/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/vamp/choose_targets()
|
||||||
|
var/turfs = ..()
|
||||||
|
for (var/turf/T in turfs)
|
||||||
|
if (T.get_lumcount() * 10 > 2)
|
||||||
|
turfs -= T
|
||||||
|
return turfs
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/vamp/cast(var/list/targets, var/mob/user)
|
||||||
|
. = ..()
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (V)
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
|
|
||||||
|
/spell/aoe_turf/blink/vamp/makeAnimation(var/turf/T, var/turf/starting)
|
||||||
|
starting.turf_animation('icons/effects/effects.dmi',"shadowstep")
|
||||||
52
code/modules/spells/aoe_turf/conjure/bats.dm
Normal file
52
code/modules/spells/aoe_turf/conjure/bats.dm
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/spell/aoe_turf/conjure/bats
|
||||||
|
name = "Bats (50)"
|
||||||
|
desc = "You summon a trio of space bats who attack nearby targets until they or their target is dead. (50)"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
summon_type = list(/mob/living/simple_animal/hostile/scarybat)
|
||||||
|
summon_amt = 3
|
||||||
|
|
||||||
|
charge_max = 2 MINUTES
|
||||||
|
cooldown_min = 2 MINUTES
|
||||||
|
invocation = ""
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
|
||||||
|
hud_state = "vampire_bats"
|
||||||
|
|
||||||
|
var/blood_cost = 50
|
||||||
|
|
||||||
|
/spell/aoe_turf/conjure/bats/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.)
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, 0))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/aoe_turf/conjure/bats/choose_targets(var/mob/user = usr)
|
||||||
|
|
||||||
|
var/list/turf/locs = new
|
||||||
|
|
||||||
|
for(var/direction in alldirs) //looking for bat spawns
|
||||||
|
if(locs.len >= 3) //we found 3 locations and thats all we need
|
||||||
|
break
|
||||||
|
var/turf/T = get_step(user, direction) //getting a loc in that direction
|
||||||
|
if(AStar(user.loc, T, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 1)) // if a path exists, so no dense objects in the way its valid salid
|
||||||
|
locs += T
|
||||||
|
else
|
||||||
|
|
||||||
|
if(locs.len < 3) //if we only found one location, spawn more on top of our tile so we dont get stacked bats
|
||||||
|
locs += user.loc
|
||||||
|
|
||||||
|
return locs
|
||||||
|
|
||||||
|
/spell/aoe_turf/conjure/bats/before_cast(list/targets, user)
|
||||||
|
return targets
|
||||||
|
|
||||||
|
/spell/aoe_turf/conjure/bats/on_creation(atom/movable/AM, mob/user)
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
var/mob/living/simple_animal/hostile/scarybat/SB = AM
|
||||||
|
if (V && V.faction)
|
||||||
|
SB.vamp_fac = V.faction
|
||||||
|
V.faction.members += SB
|
||||||
@@ -21,12 +21,13 @@
|
|||||||
var/blood_cost = 1
|
var/blood_cost = 1
|
||||||
|
|
||||||
/spell/aoe_turf/glare/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
/spell/aoe_turf/glare/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
if (!user.vampire_power(blood_cost, 0))
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
return FALSE
|
return FALSE
|
||||||
if (istype(user.get_item_by_slot(slot_glasses), /obj/item/clothing/glasses/sunglasses/blindfold))
|
if (istype(user.get_item_by_slot(slot_glasses), /obj/item/clothing/glasses/sunglasses/blindfold))
|
||||||
to_chat(user, "<span class='warning'>You're blindfolded!</span>")
|
to_chat(user, "<span class='warning'>You're blindfolded!</span>")
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
|
||||||
|
|
||||||
/spell/aoe_turf/glare/choose_targets(var/mob/user = usr)
|
/spell/aoe_turf/glare/choose_targets(var/mob/user = usr)
|
||||||
var/list/targets = list()
|
var/list/targets = list()
|
||||||
@@ -34,10 +35,17 @@
|
|||||||
if(!C.vampire_affected(user.mind))
|
if(!C.vampire_affected(user.mind))
|
||||||
continue
|
continue
|
||||||
targets += C
|
targets += C
|
||||||
|
|
||||||
|
if (!targets.len)
|
||||||
|
to_chat(user, "<span class='warning'>There are no targets.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
return targets
|
return targets
|
||||||
|
|
||||||
/spell/aoe_turf/glare/cast(var/list/targets, var/mob/user)
|
/spell/aoe_turf/glare/cast(var/list/targets, var/mob/user)
|
||||||
var/datum/role/vampire/V = isvampire(user) // Shouldn't ever be null, as cast_check checks if we're a vamp.
|
var/datum/role/vampire/V = isvampire(user) // Shouldn't ever be null, as cast_check checks if we're a vamp.
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
user.visible_message("<span class='danger'>\The [user]'s eyes emit a blinding flash!</span>")
|
user.visible_message("<span class='danger'>\The [user]'s eyes emit a blinding flash!</span>")
|
||||||
for (var/T in targets)
|
for (var/T in targets)
|
||||||
var/mob/living/carbon/C = T
|
var/mob/living/carbon/C = T
|
||||||
@@ -58,3 +66,4 @@
|
|||||||
C.blinded = 1
|
C.blinded = 1
|
||||||
C.blinded += max(1, distance_value)
|
C.blinded += max(1, distance_value)
|
||||||
to_chat(C, "<span class='warning'>You are blinded by [user]'s glare</span>")
|
to_chat(C, "<span class='warning'>You are blinded by [user]'s glare</span>")
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
65
code/modules/spells/aoe_turf/screech.dm
Normal file
65
code/modules/spells/aoe_turf/screech.dm
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/spell/aoe_turf/screech
|
||||||
|
name = "Screech (30)"
|
||||||
|
desc = "An extremely loud shriek that stuns nearby humans and breaks windows as well."
|
||||||
|
abbreviation = "CK"
|
||||||
|
|
||||||
|
school = "vampire"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
charge_type = Sp_RECHARGE
|
||||||
|
charge_max = 5 MINUTES
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = 4
|
||||||
|
spell_flags = STATALLOWED | NEEDSHUMAN
|
||||||
|
cooldown_min = 5 MINUTES
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_screech"
|
||||||
|
|
||||||
|
var/blood_cost = 30
|
||||||
|
|
||||||
|
/spell/aoe_turf/screech/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, 0, FALSE))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/aoe_turf/screech/choose_targets(var/mob/user = usr)
|
||||||
|
|
||||||
|
var/list/targets = list()
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/C in hearers(user, 4))
|
||||||
|
if(C == user)
|
||||||
|
continue
|
||||||
|
if(ishuman(C))
|
||||||
|
var/mob/living/carbon/human/H = C
|
||||||
|
if(H.earprot())
|
||||||
|
continue
|
||||||
|
if(!C.vampire_affected(user.mind))
|
||||||
|
continue
|
||||||
|
targets += C
|
||||||
|
|
||||||
|
if (!targets.len)
|
||||||
|
to_chat(user, "<span class='warning'>There are no targets.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return targets
|
||||||
|
|
||||||
|
/spell/aoe_turf/screech/cast(var/list/targets, var/mob/user)
|
||||||
|
for (var/T in targets)
|
||||||
|
var/mob/living/carbon/C = T
|
||||||
|
to_chat(C, "<span class='danger'><font size='3'>You hear a ear piercing shriek and your senses dull!</font></span>")
|
||||||
|
C.Knockdown(8)
|
||||||
|
C.ear_deaf = 20
|
||||||
|
C.stuttering = 20
|
||||||
|
C.Stun(8)
|
||||||
|
C.Jitter(150)
|
||||||
|
for(var/obj/structure/window/W in view(4))
|
||||||
|
W.Destroy(brokenup = 1)
|
||||||
|
|
||||||
|
playsound(user, 'sound/effects/creepyshriek.ogg', 100, 1)
|
||||||
|
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (V)
|
||||||
|
return FALSE
|
||||||
36
code/modules/spells/general/cloak.dm
Normal file
36
code/modules/spells/general/cloak.dm
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
/spell/cloak
|
||||||
|
name = "Cloak of Darkness (toggle)"
|
||||||
|
desc = "Toggles whether you are currently cloaking yourself in darkness."
|
||||||
|
abbreviation = "CK"
|
||||||
|
|
||||||
|
school = "vampire"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
charge_type = Sp_RECHARGE
|
||||||
|
charge_max = 1 SECONDS
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = 0
|
||||||
|
spell_flags = STATALLOWED | NEEDSHUMAN
|
||||||
|
cooldown_min = 1 SECONDS
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_cloak"
|
||||||
|
|
||||||
|
var/blood_cost = 0
|
||||||
|
|
||||||
|
/spell/cloak/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/cloak/choose_targets(var/mob/user = usr)
|
||||||
|
return list(user) // Self-cast
|
||||||
|
|
||||||
|
/spell/cloak/cast(var/list/targets, var/mob/user)
|
||||||
|
var/datum/role/vampire/V = isvampire(user) // Shouldn't ever be null, as cast_check checks if we're a vamp.
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
|
V.iscloaking = !V.iscloaking
|
||||||
|
to_chat(user, "<span class='notice'>You will now be [V.iscloaking ? "hidden" : "seen"] in darkness.</span>")
|
||||||
37
code/modules/spells/general/menace.dm
Normal file
37
code/modules/spells/general/menace.dm
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/spell/menace
|
||||||
|
name = "Shadowy Menace (toggle)"
|
||||||
|
desc = "Terrify anyone who looks at you in the dark."
|
||||||
|
abbreviation = "CK"
|
||||||
|
|
||||||
|
school = "vampire"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
charge_type = Sp_RECHARGE
|
||||||
|
charge_max = 1 SECONDS
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = 0
|
||||||
|
spell_flags = STATALLOWED | NEEDSHUMAN
|
||||||
|
cooldown_min = 1 SECONDS
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_cloack"
|
||||||
|
|
||||||
|
var/blood_cost = 0
|
||||||
|
|
||||||
|
/spell/menace/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/menace/choose_targets(var/mob/user = usr)
|
||||||
|
return list(user) // Self-cast
|
||||||
|
|
||||||
|
/spell/menace/cast(var/list/targets, var/mob/user)
|
||||||
|
var/datum/role/vampire/V = isvampire(user) // Shouldn't ever be null, as cast_check checks if we're a vamp.
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
|
V.ismenacing = !V.ismenacing
|
||||||
|
to_chat(user, "<span class='notice'>You will [V.ismenacing ? "now" : "no longer"] terrify those who see you the in dark.</span>")
|
||||||
@@ -19,9 +19,11 @@
|
|||||||
var/blood_cost = 1
|
var/blood_cost = 1
|
||||||
|
|
||||||
/spell/rejuvenate/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
/spell/rejuvenate/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
if (!user.vampire_power(blood_cost, 0))
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
|
||||||
|
|
||||||
/spell/rejuvenate/choose_targets(var/mob/user = usr)
|
/spell/rejuvenate/choose_targets(var/mob/user = usr)
|
||||||
return list(user) // Self-cast
|
return list(user) // Self-cast
|
||||||
@@ -42,3 +44,4 @@
|
|||||||
H.adjustToxLoss(-2)
|
H.adjustToxLoss(-2)
|
||||||
H.adjustFireLoss(-2)
|
H.adjustFireLoss(-2)
|
||||||
sleep(3.5 SECONDS) // Before the next healing tick
|
sleep(3.5 SECONDS) // Before the next healing tick
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
@@ -19,9 +19,11 @@
|
|||||||
var/blood_cost = 1
|
var/blood_cost = 1
|
||||||
|
|
||||||
/spell/shapeshift/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
/spell/shapeshift/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
if (!user.vampire_power(blood_cost, 0))
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
|
||||||
|
|
||||||
/spell/shapeshift/choose_targets(var/mob/user = usr)
|
/spell/shapeshift/choose_targets(var/mob/user = usr)
|
||||||
return list(user) // Self-cast
|
return list(user) // Self-cast
|
||||||
@@ -33,3 +35,6 @@
|
|||||||
user.client.prefs.real_name = user.generate_name() //random_name(M.current.gender)
|
user.client.prefs.real_name = user.generate_name() //random_name(M.current.gender)
|
||||||
user.client.prefs.randomize_appearance_for(user)
|
user.client.prefs.randomize_appearance_for(user)
|
||||||
user.regenerate_icons()
|
user.regenerate_icons()
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (V)
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
66
code/modules/spells/general/undeath.dm
Normal file
66
code/modules/spells/general/undeath.dm
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/spell/undeath
|
||||||
|
name = "Cheat Death"
|
||||||
|
desc = "Instantly return to un-life."
|
||||||
|
abbreviation = "UD"
|
||||||
|
|
||||||
|
school = "vampire"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
charge_type = Sp_RECHARGE
|
||||||
|
charge_max = 1 SECONDS
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = 0
|
||||||
|
spell_flags = STATALLOWED | NEEDSHUMAN
|
||||||
|
cooldown_min = 45 SECONDS
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_undeath"
|
||||||
|
|
||||||
|
var/blood_cost = 0
|
||||||
|
|
||||||
|
/spell/undeath/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, DEAD))
|
||||||
|
return FALSE
|
||||||
|
if (!user.isDead())
|
||||||
|
to_chat(user, "<span class='warning'>You need to be dead to do that. Well, you're already dead; undead to be precise, but you need to be DEAD dead to use it.</span>")
|
||||||
|
return FALSE
|
||||||
|
if(user.on_fire || V && V.smitecounter)
|
||||||
|
to_chat(user, "span class='warning'>Your corpse has been sanctified!</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/undeath/choose_targets(var/mob/user = usr)
|
||||||
|
return list(user) // Self-cast
|
||||||
|
|
||||||
|
/spell/undeath/cast(var/list/targets, var/mob/user)
|
||||||
|
var/mob/living/carbon/human/H = user
|
||||||
|
to_chat(H, "You attempt to recover. This may take between 30 and 45 seconds.")
|
||||||
|
var/delay = rand(30 SECONDS, 45 SECONDS)
|
||||||
|
|
||||||
|
spawn()
|
||||||
|
user.update_canmove()
|
||||||
|
sleep(delay)
|
||||||
|
if (H.client && cast_check()) // If he didn't log out + if we didn't get revived/smitted in the meantime already
|
||||||
|
to_chat(H, "<span class='sinister'>Your corpse twitches slightly. It's safe to assume nobody noticed.</span>")
|
||||||
|
to_chat(H, "<span class = 'notice'>Click the action button to revive.</span>")
|
||||||
|
var/datum/action/undeath/undeath_action = new()
|
||||||
|
undeath_action.Grant(H)
|
||||||
|
|
||||||
|
// Action button for actual revival
|
||||||
|
|
||||||
|
/datum/action/undeath
|
||||||
|
name = "Return to unlife"
|
||||||
|
desc = "Allows you to walk among the living once more."
|
||||||
|
// Need spiters
|
||||||
|
|
||||||
|
/datum/action/undeath/Trigger()
|
||||||
|
var/mob/living/M = owner
|
||||||
|
var/datum/role/vampire/V = isvampire(M)
|
||||||
|
M.revive(FALSE)
|
||||||
|
V.remove_blood(V.blood_usable)
|
||||||
|
V.check_vampire_upgrade()
|
||||||
|
to_chat(M, "<span class='sinister'>You awaken, ready to strike fear into the hearts of mortals once again.</span>")
|
||||||
|
Remove(owner)
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
var/blood_cost = 50
|
var/blood_cost = 50
|
||||||
|
|
||||||
/spell/targeted/disease/cast_check(skipcharge = 0,mob/user = usr)
|
/spell/targeted/disease/cast_check(skipcharge = 0,mob/user = usr)
|
||||||
if (!user.vampire_power(blood_cost, 0, 1))
|
. = ..()
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
|
||||||
|
|
||||||
/spell/targeted/disease/is_valid_target(var/target, var/mob/user, var/list/options)
|
/spell/targeted/disease/is_valid_target(var/target, var/mob/user, var/list/options)
|
||||||
if (!ismob(target))
|
if (!ismob(target))
|
||||||
@@ -58,4 +58,6 @@
|
|||||||
infect_virus2(target,shutdown,0)
|
infect_virus2(target,shutdown,0)
|
||||||
|
|
||||||
var/datum/role/vampire/V = isvampire(user)
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
V.remove_blood(50)
|
if(!V)
|
||||||
|
return FALSE
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
64
code/modules/spells/targeted/enthrall.dm
Normal file
64
code/modules/spells/targeted/enthrall.dm
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
/spell/targeted/enthrall
|
||||||
|
name = "Enthrall (150)"
|
||||||
|
desc = "You use a large portion of your power to sway those loyal to none to be loyal to you only."
|
||||||
|
abbreviation = "HN"
|
||||||
|
|
||||||
|
school = "vampire"
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
charge_type = Sp_RECHARGE
|
||||||
|
charge_max = 3 MINUTES
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = 1
|
||||||
|
max_targets = 1
|
||||||
|
spell_flags = WAIT_FOR_CLICK | NEEDSHUMAN
|
||||||
|
cooldown_min = 3 MINUTES
|
||||||
|
selection_type = "range"
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_enthrall"
|
||||||
|
|
||||||
|
var/blood_cost = 150
|
||||||
|
|
||||||
|
/spell/targeted/enthrall/cast_check(skipcharge = 0,mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/targeted/enthrall/is_valid_target(var/target, var/mob/user, var/list/options)
|
||||||
|
if (!ismob(target)) // Can only enthrall humans
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
var/mob/M = target
|
||||||
|
|
||||||
|
if (!M.vampire_affected(user.mind))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if (!user.can_enthrall(target))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
|
||||||
|
/spell/targeted/enthrall/cast(var/list/targets, var/mob/user)
|
||||||
|
if (targets.len > 1)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
var/mob/living/target = targets[1]
|
||||||
|
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
user.visible_message("<span class='warning'>[user] bites \the [target]'s neck!</span>", "<span class='warning'>You bite \the [target]'s neck and begin the flow of power.</span>")
|
||||||
|
to_chat(target, "<span class='sinister'>You feel the tendrils of evil [(VAMP_CHARISMA in V.powers) ? "aggressively" : "slowly"] invade your mind.</span>")
|
||||||
|
|
||||||
|
if(do_mob(user, target, (VAMP_CHARISMA in V.powers) ? 150 : 300))
|
||||||
|
if(user.vampire_power(blood_cost, 0)) // recheck
|
||||||
|
V.handle_enthrall(target.mind)
|
||||||
|
else
|
||||||
|
to_chat(user, "<span class='warning'>Either you or your target moved, and you couldn't finish enthralling them!</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
@@ -138,3 +138,38 @@
|
|||||||
enteranim = "phase_shift"
|
enteranim = "phase_shift"
|
||||||
exitanim = "phase_shift2"
|
exitanim = "phase_shift2"
|
||||||
mist = 0
|
mist = 0
|
||||||
|
|
||||||
|
/spell/targeted/ethereal_jaunt/vamp
|
||||||
|
name = "Mist Form"
|
||||||
|
desc = "This spell allows you to pass through walls and other dense objects."
|
||||||
|
user_type = USER_TYPE_VAMPIRE
|
||||||
|
|
||||||
|
spell_flags = Z2NOCAST | INCLUDEUSER
|
||||||
|
|
||||||
|
charge_max = 5 MINUTES
|
||||||
|
invocation_type = SpI_NONE
|
||||||
|
range = SELFCAST
|
||||||
|
duration = 50 //in deciseconds
|
||||||
|
|
||||||
|
override_base = "vamp"
|
||||||
|
hud_state = "vampire_jaunt"
|
||||||
|
|
||||||
|
enteranim = "batify"
|
||||||
|
exitanim = "debatify"
|
||||||
|
mist = TRUE
|
||||||
|
|
||||||
|
var/blood_cost = 20
|
||||||
|
|
||||||
|
/spell/targeted/ethereal_jaunt/vamp/cast_check(var/skipcharge = 0, var/mob/user = usr)
|
||||||
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
|
return FALSE
|
||||||
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/spell/targeted/ethereal_jaunt/vamp/cast(list/targets, var/mob/user)
|
||||||
|
..()
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
@@ -23,13 +23,15 @@
|
|||||||
|
|
||||||
var/blood_cost = 10
|
var/blood_cost = 10
|
||||||
|
|
||||||
/spell/targeted/hypnotise/cast_check(skipcharge = 0,mob/user = usr)
|
/spell/targeted/hypnotise/cast_check(skipcharge = 0, mob/user = usr)
|
||||||
if (!user.vampire_power(blood_cost, 0))
|
. = ..()
|
||||||
|
if (!.) // No need to go further.
|
||||||
return FALSE
|
return FALSE
|
||||||
if (istype(user.get_item_by_slot(slot_glasses), /obj/item/clothing/glasses/sunglasses/blindfold))
|
if (istype(user.get_item_by_slot(slot_glasses), /obj/item/clothing/glasses/sunglasses/blindfold))
|
||||||
to_chat(user, "<span class='warning'>You're blindfolded!</span>")
|
to_chat(user, "<span class='warning'>You're blindfolded!</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
if (!user.vampire_power(blood_cost, CONSCIOUS))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
/spell/targeted/hypnotise/is_valid_target(var/target, var/mob/user, var/list/options)
|
/spell/targeted/hypnotise/is_valid_target(var/target, var/mob/user, var/list/options)
|
||||||
if (!ismob(target))
|
if (!ismob(target))
|
||||||
@@ -55,3 +57,8 @@
|
|||||||
apply_spell_damage(target)
|
apply_spell_damage(target)
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='warning'>You broke your gaze.</span>")
|
to_chat(user, "<span class='warning'>You broke your gaze.</span>")
|
||||||
|
return FALSE
|
||||||
|
var/datum/role/vampire/V = isvampire(user)
|
||||||
|
if (!V)
|
||||||
|
return FALSE
|
||||||
|
V.remove_blood(blood_cost)
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
// -- Helpers for vampires spells.
|
// -- Helpers for vampires spells.
|
||||||
|
|
||||||
|
// --- TO BE CLEANED UP AND MOVED TO ROLE PROCS ! ---
|
||||||
|
|
||||||
/mob/proc/vampire_power(var/required_blood = 0, var/max_stat = 0)
|
/mob/proc/vampire_power(var/required_blood = 0, var/max_stat = 0)
|
||||||
|
|
||||||
@@ -32,8 +33,46 @@
|
|||||||
if((T.get_lumcount() * 10) > 2)
|
if((T.get_lumcount() * 10) > 2)
|
||||||
to_chat(src, "<span class='warning'>This ground has been blessed and illuminated, suppressing your abilities.</span>")
|
to_chat(src, "<span class='warning'>This ground has been blessed and illuminated, suppressing your abilities.</span>")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/mob/proc/can_enthrall(var/mob/living/carbon/human/H)
|
||||||
|
var/implanted = 0
|
||||||
|
var/datum/role/vampire/V = isvampire(src)
|
||||||
|
if(restrained())
|
||||||
|
to_chat(src, "<span class ='warning'> You cannot do this while restrained! </span>")
|
||||||
|
return 0
|
||||||
|
if(!(VAMP_CHARISMA in V.powers)) //Charisma allows implanted targets to be enthralled.
|
||||||
|
for(var/obj/item/weapon/implant/loyalty/L in H)
|
||||||
|
if(L && L.implanted)
|
||||||
|
implanted = TRUE
|
||||||
|
break
|
||||||
|
/* Greytide implantes - to fix
|
||||||
|
for(var/obj/item/weapon/implant/traitor/T in H)
|
||||||
|
if(T && T.implanted)
|
||||||
|
enthrall_safe = TRUE
|
||||||
|
break
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(!istype(H))
|
||||||
|
to_chat(src, "<span class='warning'>You can only enthrall humanoids!</span>")
|
||||||
|
return 0
|
||||||
|
if(!H)
|
||||||
|
message_admins("Error during enthralling: no target. Mob is [src], (<A HREF='?_src_=holder;adminplayerobservejump=\ref[src]&mob=\ref[src]'>JMP</A>)")
|
||||||
|
return FALSE
|
||||||
|
if(!H.mind)
|
||||||
|
to_chat(src, "<span class='warning'>[H]'s mind is not there for you to enthrall.</span>")
|
||||||
|
return FALSE
|
||||||
|
if(isvampire(H) || isthrall(H))
|
||||||
|
H.visible_message("<span class='warning'>[H] seems to resist the takeover!</span>", "<span class='notice'>You feel a familiar sensation in your skull that quickly dissipates.</span>")
|
||||||
|
return FALSE
|
||||||
|
if (implanted)
|
||||||
|
H.visible_message("<span class='warning'>[H] seems to resist the takeover!</span>", "<span class='notice'>You feel a strange sensation in your skull that quickly dissipates.</span>")
|
||||||
|
return FALSE
|
||||||
|
if(!H.vampire_affected(mind))
|
||||||
|
H.visible_message("<span class='warning'>[H] seems to resist the takeover!</span>", "<span class='notice'>Your faith of [ticker.Bible_deity_name] has kept your mind clear of all evil!</span>")
|
||||||
|
return TRUE
|
||||||
|
|
||||||
/mob/proc/vampire_affected(var/datum/mind/M) // M is the attacker, src is the target.
|
/mob/proc/vampire_affected(var/datum/mind/M) // M is the attacker, src is the target.
|
||||||
//Other vampires aren't affected
|
//Other vampires aren't affected
|
||||||
if(mind && mind.GetRole(VAMPIRE))
|
if(mind && mind.GetRole(VAMPIRE))
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
@@ -2151,9 +2151,11 @@
|
|||||||
#include "code\modules\spells\aoe_turf\fall.dm"
|
#include "code\modules\spells\aoe_turf\fall.dm"
|
||||||
#include "code\modules\spells\aoe_turf\glare.dm"
|
#include "code\modules\spells\aoe_turf\glare.dm"
|
||||||
#include "code\modules\spells\aoe_turf\knock.dm"
|
#include "code\modules\spells\aoe_turf\knock.dm"
|
||||||
|
#include "code\modules\spells\aoe_turf\screech.dm"
|
||||||
#include "code\modules\spells\aoe_turf\smoke.dm"
|
#include "code\modules\spells\aoe_turf\smoke.dm"
|
||||||
#include "code\modules\spells\aoe_turf\summons.dm"
|
#include "code\modules\spells\aoe_turf\summons.dm"
|
||||||
#include "code\modules\spells\aoe_turf\conjure\arcane_golem.dm"
|
#include "code\modules\spells\aoe_turf\conjure\arcane_golem.dm"
|
||||||
|
#include "code\modules\spells\aoe_turf\conjure\bats.dm"
|
||||||
#include "code\modules\spells\aoe_turf\conjure\conjure.dm"
|
#include "code\modules\spells\aoe_turf\conjure\conjure.dm"
|
||||||
#include "code\modules\spells\aoe_turf\conjure\construct.dm"
|
#include "code\modules\spells\aoe_turf\conjure\construct.dm"
|
||||||
#include "code\modules\spells\aoe_turf\conjure\doppelganger.dm"
|
#include "code\modules\spells\aoe_turf\conjure\doppelganger.dm"
|
||||||
@@ -2163,17 +2165,21 @@
|
|||||||
#include "code\modules\spells\aoe_turf\conjure\snowmobile.dm"
|
#include "code\modules\spells\aoe_turf\conjure\snowmobile.dm"
|
||||||
#include "code\modules\spells\aoe_turf\conjure\spares.dm"
|
#include "code\modules\spells\aoe_turf\conjure\spares.dm"
|
||||||
#include "code\modules\spells\general\area_teleport.dm"
|
#include "code\modules\spells\general\area_teleport.dm"
|
||||||
|
#include "code\modules\spells\general\cloak.dm"
|
||||||
#include "code\modules\spells\general\lightning.dm"
|
#include "code\modules\spells\general\lightning.dm"
|
||||||
|
#include "code\modules\spells\general\menace.dm"
|
||||||
#include "code\modules\spells\general\reflect_pain.dm"
|
#include "code\modules\spells\general\reflect_pain.dm"
|
||||||
#include "code\modules\spells\general\rejuvenate.dm"
|
#include "code\modules\spells\general\rejuvenate.dm"
|
||||||
#include "code\modules\spells\general\ring_of_fire.dm"
|
#include "code\modules\spells\general\ring_of_fire.dm"
|
||||||
#include "code\modules\spells\general\rune_write.dm"
|
#include "code\modules\spells\general\rune_write.dm"
|
||||||
#include "code\modules\spells\general\shapeshift.dm"
|
#include "code\modules\spells\general\shapeshift.dm"
|
||||||
|
#include "code\modules\spells\general\undeath.dm"
|
||||||
#include "code\modules\spells\targeted\balefulmutate.dm"
|
#include "code\modules\spells\targeted\balefulmutate.dm"
|
||||||
#include "code\modules\spells\targeted\buttbots_revenge.dm"
|
#include "code\modules\spells\targeted\buttbots_revenge.dm"
|
||||||
#include "code\modules\spells\targeted\disease.dm"
|
#include "code\modules\spells\targeted\disease.dm"
|
||||||
#include "code\modules\spells\targeted\disintegrate.dm"
|
#include "code\modules\spells\targeted\disintegrate.dm"
|
||||||
#include "code\modules\spells\targeted\disorient.dm"
|
#include "code\modules\spells\targeted\disorient.dm"
|
||||||
|
#include "code\modules\spells\targeted\enthrall.dm"
|
||||||
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
|
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
|
||||||
#include "code\modules\spells\targeted\feint.dm"
|
#include "code\modules\spells\targeted\feint.dm"
|
||||||
#include "code\modules\spells\targeted\fist.dm"
|
#include "code\modules\spells\targeted\fist.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user