mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-05 07:02:36 +00:00
Adds an easier method of editing vampires using the admin traitor panel window (#17885)
* easier vampire editing * force full power * documentation fixes * charlie review * remove_all_powers * Update code/datums/mind.dm Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
This commit is contained in:
@@ -90,8 +90,7 @@
|
||||
|
||||
/datum/antagonist/vampire/remove_innate_effects(mob/living/mob_override)
|
||||
mob_override = ..()
|
||||
for(var/P in powers)
|
||||
remove_ability(P)
|
||||
remove_all_powers()
|
||||
var/datum/hud/hud = mob_override.hud_used
|
||||
if(hud?.vampire_blood_display)
|
||||
hud.remove_vampire_hud()
|
||||
@@ -154,6 +153,39 @@
|
||||
|
||||
#undef BLOOD_GAINED_MODIFIER
|
||||
|
||||
/**
|
||||
* Remove the vampire's current subclass and add the specified one.
|
||||
*
|
||||
* Arguments:
|
||||
* * new_subclass_type - a [/datum/vampire_subclass] typepath
|
||||
*/
|
||||
/datum/antagonist/vampire/proc/change_subclass(new_subclass_type)
|
||||
if(isnull(new_subclass_type))
|
||||
return
|
||||
clear_subclass(FALSE)
|
||||
add_subclass(new_subclass_type, log_choice = FALSE)
|
||||
|
||||
/**
|
||||
* Remove and delete the vampire's current subclass and all associated abilities.
|
||||
*
|
||||
* Arguments:
|
||||
* * give_specialize_power - if the [specialize][/obj/effect/proc_holder/spell/vampire/self/specialize] power should be given back or not
|
||||
*/
|
||||
/datum/antagonist/vampire/proc/clear_subclass(give_specialize_power = TRUE)
|
||||
if(give_specialize_power)
|
||||
// Choosing a subclass in the first place removes this from `upgrade_tiers`, so add it back if needed.
|
||||
upgrade_tiers[/obj/effect/proc_holder/spell/vampire/self/specialize] = 150
|
||||
remove_all_powers()
|
||||
QDEL_NULL(subclass)
|
||||
check_vampire_upgrade()
|
||||
|
||||
/**
|
||||
* Removes all of the vampire's current powers.
|
||||
*/
|
||||
/datum/antagonist/vampire/proc/remove_all_powers()
|
||||
for(var/power in powers)
|
||||
remove_ability(power)
|
||||
|
||||
/datum/antagonist/vampire/proc/check_vampire_upgrade(announce = TRUE)
|
||||
var/list/old_powers = powers.Copy()
|
||||
|
||||
@@ -173,7 +205,7 @@
|
||||
|
||||
|
||||
/datum/antagonist/vampire/proc/check_full_power_upgrade()
|
||||
if(subclass.full_power_overide || (length(drained_humans) >= FULLPOWER_DRAINED_REQUIREMENT && bloodtotal >= FULLPOWER_BLOODTOTAL_REQUIREMENT))
|
||||
if(subclass.full_power_override || (length(drained_humans) >= FULLPOWER_DRAINED_REQUIREMENT && bloodtotal >= FULLPOWER_BLOODTOTAL_REQUIREMENT))
|
||||
subclass.add_full_power_abilities(src)
|
||||
|
||||
|
||||
|
||||
@@ -143,11 +143,12 @@
|
||||
vamp.remove_ability(src)
|
||||
|
||||
|
||||
/datum/antagonist/vampire/proc/add_subclass(subclass_to_add, announce = TRUE)
|
||||
/datum/antagonist/vampire/proc/add_subclass(subclass_to_add, announce = TRUE, log_choice = TRUE)
|
||||
var/datum/vampire_subclass/new_subclass = new subclass_to_add
|
||||
subclass = new_subclass
|
||||
check_vampire_upgrade(announce)
|
||||
SSblackbox.record_feedback("nested tally", "vampire_subclasses", 1, list("[new_subclass.name]"))
|
||||
if(log_choice)
|
||||
SSblackbox.record_feedback("nested tally", "vampire_subclasses", 1, list("[new_subclass.name]"))
|
||||
|
||||
/obj/effect/proc_holder/spell/vampire/glare
|
||||
name = "Glare"
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
var/improved_rejuv_healing = FALSE
|
||||
/// maximun number of thralls a vampire may have at a time. incremented as they grow stronger, up to a cap at full power.
|
||||
var/thrall_cap = 1
|
||||
var/full_power_overide = FALSE
|
||||
/// If true, lets the vampire have access to their full power abilities without meeting the blood requirement, or needing a certain number of drained humans.
|
||||
var/full_power_override = FALSE
|
||||
|
||||
/datum/vampire_subclass/proc/add_subclass_ability(datum/antagonist/vampire/vamp)
|
||||
for(var/thing in standard_powers)
|
||||
|
||||
Reference in New Issue
Block a user