From 6cf018d5a23c81ed0bb7e3ea230bac215c4d1606 Mon Sep 17 00:00:00 2001 From: Incoming Date: Sat, 14 Sep 2013 17:50:34 -0400 Subject: [PATCH] Reworked the equation so that you gain a constant cooldown reduction per rank Additionally all spells can now use all 5 spell points now (though the functionality to have spells that don't follow this rule is still there). The new variable "cooldown_min" defines (in deciseconds) what the cooldown should be if all 5 spell points are used on it. For example if you had a 100 charge_max and a 60 cooldown_min, every rank used on that spell would reduce charge_max by 10 Specifics of how the cooldown is affected for each spell has been commented in --- code/datums/spell.dm | 5 +++-- code/datums/spells/ethereal_jaunt.dm | 2 +- code/datums/spells/horsemask.dm | 2 +- code/datums/spells/knock.dm | 2 +- code/datums/spells/mind_transfer.dm | 2 +- code/datums/spells/wizard.dm | 22 ++++++++++++---------- code/game/gamemodes/wizard/spellbook.dm | 10 +++++----- 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 8aea82bec35..bd8c65af521 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -26,8 +26,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin var/range = 7 //the range of the spell; outer radius for aoe spells var/message = "" //whatever it says to the guy affected by it var/selection_type = "view" //can be "range" or "view" - var/spell_level = 1 //if a spell can be taken multiple times, this raises - var/level_max = 1 //The max possible level_max is 5, but most spells cap lower for balancing reasons + var/spell_level = 0 //if a spell can be taken multiple times, this raises + var/level_max = 4 //The max possible level_max is 4 + var/cooldown_min = 0 //This defines what spell quickened four timeshas as a cooldown. Make sure to set this for every spell var/overlay = 0 var/overlay_icon = 'icons/obj/wizard.dmi' diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm index 2cdd62b8121..b43cb6309f5 100644 --- a/code/datums/spells/ethereal_jaunt.dm +++ b/code/datums/spells/ethereal_jaunt.dm @@ -8,7 +8,7 @@ invocation = "none" invocation_type = "none" range = -1 - level_max = 3 + cooldown_min = 100 //50 deciseconds reduction per rank include_user = 1 centcom_cancast = 0 //Prevent people from getting to centcom diff --git a/code/datums/spells/horsemask.dm b/code/datums/spells/horsemask.dm index 1c3edf6d162..30ddb9b1577 100644 --- a/code/datums/spells/horsemask.dm +++ b/code/datums/spells/horsemask.dm @@ -10,7 +10,7 @@ invocation = "KN'A FTAGHU, PUCK 'BTHNK!" invocation_type = "shout" range = 7 - level_max = 5 + cooldown_min = 30 //30 deciseconds reduction per rank selection_type = "range" var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey) diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm index 654bf30b0c1..b96c96455a8 100644 --- a/code/datums/spells/knock.dm +++ b/code/datums/spells/knock.dm @@ -8,7 +8,7 @@ invocation = "AULIE OXIN FIERA" invocation_type = "whisper" range = 3 - level_max = 2 + cooldown_min = 20 //20 deciseconds reduction per rank /obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets) for(var/turf/T in targets) diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm index d8999e53abc..7284ec29e09 100644 --- a/code/datums/spells/mind_transfer.dm +++ b/code/datums/spells/mind_transfer.dm @@ -8,7 +8,7 @@ invocation = "GIN'YU CAPAN" invocation_type = "whisper" range = 1 - level_max = 3 + cooldown_min = 200 //100 deciseconds reduction per rank var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell var/list/compatible_mobs = list(/mob/living/carbon/human,/mob/living/carbon/monkey) //which types of mobs are affected by the spell. NOTE: change at your own risk var/base_spell_loss_chance = 20 //base probability of the wizard losing a spell in the process diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index 2a761250176..fa8226cd95b 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -8,7 +8,7 @@ invocation = "FORTI GY AMA" invocation_type = "shout" range = 7 - level_max = 2 + cooldown_min = 75 //19 deciseconds reduction per rank max_targets = 0 @@ -43,6 +43,7 @@ mutations = list(LASER, HULK) duration = 300 + cooldown_min = 300 //25 deciseconds reduction per rank /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate name = "Disintegrate" @@ -54,7 +55,7 @@ invocation = "EI NATH" invocation_type = "shout" range = 1 - level_max = 3 + cooldown_min = 200 //100 deciseconds reduction per rank destroys = "gib_brain" @@ -72,7 +73,7 @@ invocation_type = "none" range = -1 include_user = 1 - level_max = 5 + cooldown_min = 20 //25 deciseconds reduction per rank smoke_spread = 2 smoke_amt = 10 @@ -86,7 +87,7 @@ invocation_type = "shout" range = -1 include_user = 1 - level_max = 4 + cooldown_min = 200 //50 deciseconds reduction per rank emp_heavy = 6 emp_light = 10 @@ -102,7 +103,8 @@ invocation_type = "none" range = -1 include_user = 1 - level_max = 5 + cooldown_min = 5 //4 deciseconds reduction per rank + smoke_spread = 1 smoke_amt = 10 @@ -123,7 +125,7 @@ invocation_type = "shout" range = -1 include_user = 1 - level_max = 3 + cooldown_min = 200 //100 deciseconds reduction per rank smoke_spread = 1 smoke_amt = 5 @@ -138,7 +140,7 @@ invocation = "TARCOL MINTI ZHERI" invocation_type = "whisper" range = 0 - level_max = 5 + cooldown_min = 50 //12 deciseconds reduction per rank summon_type = list("/obj/effect/forcefield") summon_lifespan = 300 @@ -196,7 +198,7 @@ invocation = "STI KALY" invocation_type = "whisper" message = "\blue Your eyes cry out in pain!" - level_max = 5 + cooldown_min = 50 //12 deciseconds reduction per rank starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind") @@ -219,7 +221,7 @@ invocation = "STAUN EI" invocation_type = "shout" amt_stunned = 2//just exists to make sure the statue "catches" them - level_max = 4 + cooldown_min = 100 //125 deciseconds reduction per rank summon_type = "/obj/structure/closet/statue" @@ -233,7 +235,7 @@ invocation = "ONI SOMA" invocation_type = "shout" range = 20 - level_max = 3 + cooldown_min = 20 //10 deciseconds reduction per rank proj_icon_state = "fireball" proj_name = "a fireball" diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index e7fd6a5d247..156554d486d 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -162,20 +162,20 @@ else aspell.name = initial(aspell.name) aspell.spell_level++ - aspell.charge_max = initial(aspell.charge_max) / aspell.spell_level + aspell.charge_max = round(initial(aspell.charge_max) - aspell.spell_level * (initial(aspell.charge_max) - aspell.cooldown_min)/ aspell.level_max) if(aspell.charge_max < aspell.charge_counter) aspell.charge_counter = aspell.charge_max switch(aspell.spell_level) - if(2) + if(1) temp = "You have improved [aspell.name] into Efficient [aspell.name]." aspell.name = "Efficient [aspell.name]" - if(3) + if(2) temp = "You have further improved [aspell.name] into Quickened [aspell.name]." aspell.name = "Quickened [aspell.name]" - if(4) + if(3) temp = "You have further improved [aspell.name] into Free [aspell.name]." aspell.name = "Free [aspell.name]" - if(5) + if(4) temp = "You have further improved [aspell.name] into Instant [aspell.name]." aspell.name = "Instant [aspell.name]" if(aspell.spell_level >= aspell.level_max)