mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-01 13:12:23 +00:00
* datumized spells * finished * last changes * conflict * Update code/datums/spells/alien_spells/transfer_plasma.dm * conflicts * shitty runtime fix until i get to this tomorrow * Update code/datums/spell.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spell_handler/alien_spell_handler.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/alien_spells/regurgitate.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/alien_spells/regurgitate.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/bloodcrawl.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/bloodcrawl.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/awaymissions/mission_code/ruins/wizardcrash.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/research/xenobiology/xenobiology.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/modules/mob/living/carbon/superheroes.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/conjure.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/ethereal_jaunt.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/emplosion.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/turf_teleport.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/dna/mutations/mutation_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/datums/spells/wizard_spells.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/dna/mutations/mutation_powers.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/gamemodes/miniantags/revenant/revenant_abilities.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * guess who just rework the entire malf ai actionsf ai * gc better --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
/datum/spell/genetic
|
|
desc = "This spell inflicts a set of mutations and disabilities upon the target."
|
|
|
|
var/list/active_on = list()
|
|
var/list/traits = list() // traits
|
|
var/list/mutations = list() // mutation defines. Set these in Initialize. Refactor this nonsense one day
|
|
var/duration = 10 SECONDS
|
|
|
|
/datum/spell/genetic/cast(list/targets, mob/user = usr)
|
|
for(var/mob/living/target in targets)
|
|
if(!target.dna)
|
|
continue
|
|
for(var/A in mutations)
|
|
target.dna.SetSEState(A, TRUE)
|
|
singlemutcheck(target, A, MUTCHK_FORCED)
|
|
for(var/A in traits)
|
|
ADD_TRAIT(target, A, MAGIC_TRAIT)
|
|
active_on += target
|
|
target.regenerate_icons()
|
|
do_additional_effects(target)
|
|
if(duration < base_cooldown)
|
|
addtimer(CALLBACK(src, PROC_REF(remove), target), duration, TIMER_OVERRIDE|TIMER_UNIQUE)
|
|
|
|
/datum/spell/genetic/proc/do_additional_effects(mob/target)
|
|
return
|
|
|
|
/datum/spell/genetic/Destroy()
|
|
for(var/V in active_on)
|
|
remove(V)
|
|
return ..()
|
|
|
|
/datum/spell/genetic/proc/remove(mob/living/carbon/target)
|
|
active_on -= target
|
|
if(!QDELETED(target))
|
|
for(var/A in mutations)
|
|
target.dna.SetSEState(A, FALSE)
|
|
singlemutcheck(target, A, MUTCHK_FORCED)
|
|
for(var/A in traits)
|
|
REMOVE_TRAIT(target, A, MAGIC_TRAIT)
|
|
target.regenerate_icons()
|