mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Datumized vampires (#17166)
Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: dearmochi <1496804+dearmochi@users.noreply.github.com>
This commit is contained in:
co-authored by
Farie82
dearmochi
parent
b2704e06b2
commit
a0e5d6df44
+16
-37
@@ -53,7 +53,6 @@
|
||||
var/list/antag_datums
|
||||
var/datum/changeling/changeling //changeling holder
|
||||
var/linglink
|
||||
var/datum/vampire/vampire //vampire holder
|
||||
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
|
||||
@@ -116,8 +115,6 @@
|
||||
for(var/a in antag_datums) //Makes sure all antag datums effects are applied in the new body
|
||||
var/datum/antagonist/A = a
|
||||
A.on_body_transfer(old_current, current)
|
||||
if(vampire)
|
||||
vampire.update_owner(new_character)
|
||||
transfer_antag_huds(hud_to_transfer) //inherit the antag HUD
|
||||
transfer_actions(new_character)
|
||||
if(martial_art)
|
||||
@@ -294,7 +291,7 @@
|
||||
|
||||
/datum/mind/proc/memory_edit_vampire(mob/living/carbon/human/H)
|
||||
. = _memory_edit_header("vampire", list("traitorvamp"))
|
||||
if(src in SSticker.mode.vampires)
|
||||
if(has_antag_datum(/datum/antagonist/vampire))
|
||||
. += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
|
||||
if(objectives.len==0)
|
||||
. += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
|
||||
@@ -304,7 +301,7 @@
|
||||
. += _memory_edit_role_enabled(ROLE_VAMPIRE)
|
||||
/** Enthralled ***/
|
||||
. += "<br><b><i>enthralled</i></b>: "
|
||||
if(src in SSticker.mode.vampire_enthralled)
|
||||
if(has_antag_datum(/datum/antagonist/mindslave/thrall))
|
||||
. += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
|
||||
else
|
||||
. += "thrall|<b>NO</b>"
|
||||
@@ -404,7 +401,7 @@
|
||||
. += "<b>NO</b>"
|
||||
// Mindslave
|
||||
. += "<br><b><i>mindslaved</i></b>: "
|
||||
if(has_antag_datum(/datum/antagonist/mindslave))
|
||||
if(has_antag_datum(/datum/antagonist/mindslave, FALSE))
|
||||
. += "<b><font color='red'>MINDSLAVE</font></b>|<a href='?src=[UID()];mindslave=clear'>no</a>"
|
||||
else
|
||||
. += "mindslave|<b>NO</b>"
|
||||
@@ -1005,33 +1002,21 @@
|
||||
else if(href_list["vampire"])
|
||||
switch(href_list["vampire"])
|
||||
if("clear")
|
||||
if(src in SSticker.mode.vampires)
|
||||
SSticker.mode.vampires -= src
|
||||
special_role = null
|
||||
if(vampire)
|
||||
vampire.remove_vampire_powers()
|
||||
qdel(vampire)
|
||||
vampire = null
|
||||
SSticker.mode.update_vampire_icons_removed(src)
|
||||
if(has_antag_datum(/datum/antagonist/vampire))
|
||||
remove_antag_datum(/datum/antagonist/vampire)
|
||||
to_chat(current, "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a vampire and are stuck in your current form!</B></FONT>")
|
||||
log_admin("[key_name(usr)] has de-vampired [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has de-vampired [key_name_admin(current)]")
|
||||
if("vampire")
|
||||
if(!(src in SSticker.mode.vampires))
|
||||
SSticker.mode.vampires += src
|
||||
SSticker.mode.grant_vampire_powers(current)
|
||||
SSticker.mode.update_vampire_icons_added(src)
|
||||
var/datum/mindslaves/slaved = new()
|
||||
slaved.masters += src
|
||||
som = slaved //we MIGT want to mindslave someone
|
||||
special_role = SPECIAL_ROLE_VAMPIRE
|
||||
SEND_SOUND(current, sound('sound/ambience/antag/vampalert.ogg'))
|
||||
if(!has_antag_datum(/datum/antagonist/vampire))
|
||||
add_antag_datum(/datum/antagonist/vampire)
|
||||
to_chat(current, "<B><font color='red'>Your powers have awoken. Your lust for blood grows... You are a Vampire!</font></B>")
|
||||
log_admin("[key_name(usr)] has vampired [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has vampired [key_name_admin(current)]")
|
||||
|
||||
if("autoobjectives")
|
||||
SSticker.mode.forge_vampire_objectives(src)
|
||||
var/datum/antagonist/vampire/V = has_antag_datum(/datum/antagonist/vampire)
|
||||
V.give_objectives()
|
||||
to_chat(usr, "<span class='notice'>The objectives for vampire [key] have been generated. You can edit them and announce manually.</span>")
|
||||
log_admin("[key_name(usr)] has automatically forged objectives for [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has automatically forged objectives for [key_name_admin(current)]")
|
||||
@@ -1039,8 +1024,8 @@
|
||||
else if(href_list["vampthrall"])
|
||||
switch(href_list["vampthrall"])
|
||||
if("clear")
|
||||
if(src in SSticker.mode.vampire_enthralled)
|
||||
SSticker.mode.remove_vampire_mind(src)
|
||||
if(has_antag_datum(/datum/antagonist/mindslave/thrall))
|
||||
remove_antag_datum(/datum/antagonist/mindslave/thrall)
|
||||
log_admin("[key_name(usr)] has de-vampthralled [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has de-vampthralled [key_name_admin(current)]")
|
||||
|
||||
@@ -1345,7 +1330,7 @@
|
||||
else if(href_list["mindslave"])
|
||||
switch(href_list["mindslave"])
|
||||
if("clear")
|
||||
if(has_antag_datum(/datum/antagonist/mindslave))
|
||||
if(has_antag_datum(/datum/antagonist/mindslave, FALSE))
|
||||
var/mob/living/carbon/human/H = current
|
||||
for(var/i in H.contents)
|
||||
if(istype(i, /obj/item/implant/traitor))
|
||||
@@ -1530,7 +1515,7 @@
|
||||
|
||||
/datum/mind/proc/has_antag_datum(datum_type, check_subtypes = TRUE)
|
||||
if(!datum_type)
|
||||
return
|
||||
return FALSE
|
||||
. = FALSE
|
||||
for(var/a in antag_datums)
|
||||
var/datum/antagonist/A = a
|
||||
@@ -1592,15 +1577,9 @@
|
||||
|
||||
SSticker.mode.equip_syndicate(current)
|
||||
|
||||
/datum/mind/proc/make_vampire(ancient_vampire = FALSE)
|
||||
if(!(src in SSticker.mode.vampires))
|
||||
SSticker.mode.vampires += src
|
||||
SSticker.mode.grant_vampire_powers(current)
|
||||
special_role = SPECIAL_ROLE_VAMPIRE
|
||||
SSticker.mode.greet_vampire(src)
|
||||
SSticker.mode.update_vampire_icons_added(src)
|
||||
if(!ancient_vampire)
|
||||
SSticker.mode.forge_vampire_objectives(src)
|
||||
/datum/mind/proc/make_vampire()
|
||||
if(!has_antag_datum(/datum/antagonist/vampire))
|
||||
add_antag_datum(/datum/antagonist/vampire)
|
||||
|
||||
/datum/mind/proc/make_Changeling()
|
||||
if(!(src in SSticker.mode.changelings))
|
||||
|
||||
@@ -1095,12 +1095,13 @@
|
||||
apply_to_card(I, H, get_all_accesses(), "Ancient One", "data")
|
||||
|
||||
if(H.mind)
|
||||
if(!H.mind.vampire)
|
||||
if(!H.mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
H.mind.make_vampire(TRUE)
|
||||
H.mind.vampire.bloodusable = 9999
|
||||
H.mind.vampire.bloodtotal = 9999
|
||||
var/datum/antagonist/vampire/V = H.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
V.bloodusable = 9999
|
||||
V.bloodtotal = 9999
|
||||
H.mind.offstation_role = TRUE
|
||||
H.mind.vampire.add_subclass(SUBCLASS_ANCIENT, FALSE)
|
||||
V.add_subclass(SUBCLASS_ANCIENT, FALSE)
|
||||
H.dna.SetSEState(GLOB.jumpblock, TRUE)
|
||||
singlemutcheck(H, GLOB.jumpblock, MUTCHK_FORCED)
|
||||
H.update_mutations()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/deduct_blood_on_cast = TRUE
|
||||
|
||||
/datum/spell_handler/vampire/can_cast(mob/user, charge_check, show_message, obj/effect/proc_holder/spell/spell)
|
||||
var/datum/vampire/vampire = user.mind.vampire
|
||||
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
|
||||
if(!vampire)
|
||||
return FALSE
|
||||
@@ -35,11 +35,11 @@
|
||||
if(!required_blood || !deduct_blood_on_cast) //don't take the blood yet if this is false!
|
||||
return
|
||||
|
||||
var/datum/vampire/vampire = user.mind.vampire
|
||||
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
|
||||
vampire.bloodusable -= calculate_blood_cost(vampire)
|
||||
|
||||
/datum/spell_handler/vampire/proc/calculate_blood_cost(datum/vampire/vampire)
|
||||
/datum/spell_handler/vampire/proc/calculate_blood_cost(datum/antagonist/vampire/vampire)
|
||||
var/blood_cost_modifier = 1 + vampire.nullified / 100
|
||||
var/blood_cost = round(required_blood * blood_cost_modifier)
|
||||
return blood_cost
|
||||
@@ -47,7 +47,7 @@
|
||||
/datum/spell_handler/vampire/after_cast(list/targets, mob/user, obj/effect/proc_holder/spell/spell)
|
||||
if(!required_blood)
|
||||
return
|
||||
var/datum/vampire/vampire = user.mind.vampire
|
||||
var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
to_chat(user, "<span class='boldnotice'>You have [vampire.bloodusable] left to use.</span>")
|
||||
SSblackbox.record_feedback("tally", "vampire_powers_used", 1, "[spell]") // Only log abilities which require blood
|
||||
|
||||
|
||||
@@ -157,7 +157,8 @@
|
||||
H.physiology.burn_mod *= 0.8
|
||||
H.physiology.stamina_mod *= 0.5
|
||||
H.physiology.stun_mod *= 0.5
|
||||
if(owner.mind.vampire.get_ability(/datum/vampire_passive/blood_swell_upgrade))
|
||||
var/datum/antagonist/vampire/V = owner.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V.get_ability(/datum/vampire_passive/blood_swell_upgrade))
|
||||
bonus_damage_applied = TRUE
|
||||
H.physiology.melee_bonus += 10
|
||||
H.dna.species.punchstunthreshold += 8 //higher chance to stun but not 100%
|
||||
|
||||
@@ -1745,7 +1745,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
else if(!AT)
|
||||
to_chat(usr, "<span class='warning'>Error: Embedded Syndicate credentials not found.</span>")
|
||||
return
|
||||
else if(mind.changeling || mind.vampire)
|
||||
else if(mind.changeling || mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
to_chat(usr, "<span class='warning'>Error: Embedded Syndicate credentials contain an abnormal signature. Aborting.</span>")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user