mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] Completely removes proc_holders from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. [MDB IGNORE] (#14666)
* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. * our changes * yes * 0 * Update blackmesa.dmm Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
MrMelbert
Gandalf
parent
f507824ee7
commit
c68fea7cba
@@ -1,4 +1,5 @@
|
||||
//in this file: Various events that directly aid the wizard. This is the "lets entice the wizard to use summon events!" file.
|
||||
// Various events that directly aid the wizard.
|
||||
// This is the "lets entice the wizard to use summon events!" file.
|
||||
|
||||
/datum/round_event_control/wizard/robelesscasting //EI NUDTH!
|
||||
name = "Robeless Casting"
|
||||
@@ -9,16 +10,19 @@
|
||||
|
||||
/datum/round_event/wizard/robelesscasting/start()
|
||||
|
||||
for(var/i in GLOB.mob_living_list) //Hey if a corgi has magic missle he should get the same benifit as anyone
|
||||
var/mob/living/L = i
|
||||
if(L.mind && L.mind.spell_list.len != 0)
|
||||
var/spell_improved = FALSE
|
||||
for(var/obj/effect/proc_holder/spell/S in L.mind.spell_list)
|
||||
if(S.clothes_req)
|
||||
S.clothes_req = 0
|
||||
spell_improved = TRUE
|
||||
if(spell_improved)
|
||||
to_chat(L, span_notice("You suddenly feel like you never needed those garish robes in the first place..."))
|
||||
// Hey, if a corgi has magic missle, he should get the same benefit as anyone
|
||||
for(var/mob/living/caster as anything in GLOB.mob_living_list)
|
||||
if(!length(caster.actions))
|
||||
continue
|
||||
|
||||
var/spell_improved = FALSE
|
||||
for(var/datum/action/cooldown/spell/spell in caster.actions)
|
||||
if(spell.spell_requirements & SPELL_REQUIRES_WIZARD_GARB)
|
||||
spell.spell_requirements &= ~SPELL_REQUIRES_WIZARD_GARB
|
||||
spell_improved = TRUE
|
||||
|
||||
if(spell_improved)
|
||||
to_chat(caster, span_notice("You suddenly feel like you never needed those garish robes in the first place..."))
|
||||
|
||||
//--//
|
||||
|
||||
@@ -30,29 +34,16 @@
|
||||
earliest_start = 0 MINUTES
|
||||
|
||||
/datum/round_event/wizard/improvedcasting/start()
|
||||
for(var/i in GLOB.mob_living_list)
|
||||
var/mob/living/L = i
|
||||
if(L.mind && L.mind.spell_list.len != 0)
|
||||
for(var/obj/effect/proc_holder/spell/S in L.mind.spell_list)
|
||||
S.name = initial(S.name)
|
||||
S.spell_level++
|
||||
if(S.spell_level >= 6 || S.charge_max <= 0) //Badmin checks, these should never be a problem in normal play
|
||||
continue
|
||||
if(S.level_max <= 0)
|
||||
continue
|
||||
S.charge_max = round(initial(S.charge_max) - S.spell_level * (initial(S.charge_max) - S.cooldown_min) / S.level_max)
|
||||
if(S.charge_max < S.charge_counter)
|
||||
S.charge_counter = S.charge_max
|
||||
switch(S.spell_level)
|
||||
if(1)
|
||||
S.name = "Efficient [S.name]"
|
||||
if(2)
|
||||
S.name = "Quickened [S.name]"
|
||||
if(3)
|
||||
S.name = "Free [S.name]"
|
||||
if(4)
|
||||
S.name = "Instant [S.name]"
|
||||
if(5)
|
||||
S.name = "Ludicrous [S.name]"
|
||||
for(var/mob/living/caster as anything in GLOB.mob_living_list)
|
||||
if(!length(caster.actions))
|
||||
continue
|
||||
|
||||
to_chat(L, span_notice("You suddenly feel more competent with your casting!"))
|
||||
var/upgraded_a_spell = FALSE
|
||||
for(var/datum/action/cooldown/spell/spell in caster.actions)
|
||||
// If improved casting has already boosted this spell further beyond, go no further
|
||||
if(spell.spell_level >= spell.spell_max_level + 1)
|
||||
continue
|
||||
upgraded_a_spell = spell.level_spell(TRUE)
|
||||
|
||||
if(upgraded_a_spell)
|
||||
to_chat(caster, span_notice("You suddenly feel more competent with your casting!"))
|
||||
|
||||
@@ -79,26 +79,29 @@
|
||||
earliest_start = 0 MINUTES
|
||||
|
||||
/datum/round_event/wizard/shuffleminds/start()
|
||||
var/list/mobs = list()
|
||||
var/list/mobs_to_swap = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(H.stat || !H.mind || IS_WIZARD(H))
|
||||
for(var/mob/living/carbon/human/alive_human in GLOB.alive_mob_list)
|
||||
if(alive_human.stat != CONSCIOUS || !alive_human.mind || IS_WIZARD(alive_human))
|
||||
continue //the wizard(s) are spared on this one
|
||||
mobs += H
|
||||
mobs_to_swap += alive_human
|
||||
|
||||
if(!mobs)
|
||||
if(!length(mobs_to_swap))
|
||||
return
|
||||
|
||||
shuffle_inplace(mobs)
|
||||
mobs_to_swap = shuffle(mobs_to_swap)
|
||||
|
||||
var/obj/effect/proc_holder/spell/pointed/mind_transfer/swapper = new
|
||||
while(mobs.len > 1)
|
||||
var/mob/living/carbon/human/victim = pick(mobs)
|
||||
mobs -= victim
|
||||
swapper.cast(list(victim), mobs[mobs.len], TRUE)
|
||||
mobs -= mobs[mobs.len]
|
||||
var/datum/action/cooldown/spell/pointed/mind_transfer/swapper = new()
|
||||
|
||||
for(var/mob/living/carbon/human/victim in GLOB.alive_mob_list)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(0, holder = victim, location = victim.loc)
|
||||
while(mobs_to_swap.len > 1)
|
||||
var/mob/living/swap_to = pick_n_take(mobs_to_swap)
|
||||
var/mob/living/swap_from = pick_n_take(mobs_to_swap)
|
||||
|
||||
swapper.swap_minds(swap_to, swap_from)
|
||||
|
||||
qdel(swapper)
|
||||
|
||||
for(var/mob/living/carbon/human/alive_human in GLOB.alive_mob_list)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new()
|
||||
smoke.set_up(0, holder = alive_human, location = alive_human.loc)
|
||||
smoke.start()
|
||||
|
||||
Reference in New Issue
Block a user