mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Bay wizard port/rework (#1635)
Ports the newest bay wizard version, with some additions and changes. General changes: -ported the newest bay wizard -wizards can select some school of magic, which also changes their spell selection as whole. -added several new spells, like raise dead, contracts that bind the person with the wizard, and more. -added wands, limited sources of certain types of effects/spell, also with their own bad effects for non wizards -changed the wizard checks to a faction check instead of a mind check -fixed wizards without certain slots due to race being fucked over due to it -added new artifacts -balanced some spells like the emp -added a lot of new sounds to spell, mostly from tg -remove horse mask from spell selection, also, you can melt the mask with acid now -wizard's spell are now displayed at round end like traitors and what they did buy -also fixes vaurca, and vox, antags spawning without a mask by default
This commit is contained in:
@@ -3,6 +3,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
/spell
|
||||
var/name = "Spell"
|
||||
var/desc = "A spell"
|
||||
var/feedback = "" //what gets sent if this spell gets chosen by the spellbook.
|
||||
parent_type = /datum
|
||||
var/panel = "Spells"//What panel the proc holder needs to go on.
|
||||
|
||||
@@ -15,6 +16,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
var/still_recharging_msg = "<span class='notice'>The spell is still recharging.</span>"
|
||||
|
||||
var/silenced = 0 //not a binary - the length of time we can't cast this for
|
||||
var/processing = 0 //are we processing already? Mainly used so that silencing a spell doesn't call process() again. (and inadvertedly making it run twice as fast)
|
||||
|
||||
var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
|
||||
var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
|
||||
@@ -65,9 +67,20 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
charge_counter = charge_max
|
||||
|
||||
/spell/proc/process()
|
||||
spawn while(charge_counter < charge_max)
|
||||
charge_counter++
|
||||
sleep(1)
|
||||
if(processing)
|
||||
return
|
||||
processing = 1
|
||||
spawn(0)
|
||||
while(charge_counter < charge_max || silenced > 0)
|
||||
charge_counter = min(charge_max,charge_counter+1)
|
||||
silenced = max(0,silenced-1)
|
||||
sleep(1)
|
||||
if(connected_button)
|
||||
var/obj/screen/spell/S = connected_button
|
||||
if(!istype(S))
|
||||
return
|
||||
S.update_charge(1)
|
||||
processing = 0
|
||||
return
|
||||
|
||||
/////////////////
|
||||
@@ -85,7 +98,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(cast_delay && !spell_do_after(user, cast_delay))
|
||||
return
|
||||
var/list/targets = choose_targets(user)
|
||||
if(targets && targets.len)
|
||||
if(targets && targets.len && cast_check(1,user))
|
||||
invocation(user, targets)
|
||||
take_charge(user, skipcharge)
|
||||
|
||||
@@ -94,6 +107,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(prob(critfailchance))
|
||||
critfail(targets, user)
|
||||
else
|
||||
playsound(get_turf(user), cast_sound, 50, 1)
|
||||
cast(targets, user)
|
||||
after_cast(targets) //generates the sparks, smoke, target messages etc.
|
||||
|
||||
@@ -114,6 +128,8 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
target.adjustToxLoss(amount)
|
||||
if("oxyloss")
|
||||
target.adjustOxyLoss(amount)
|
||||
if("brainloss")
|
||||
target.adjustBrainLoss(amount)
|
||||
if("stunned")
|
||||
target.AdjustStunned(amount)
|
||||
if("weakened")
|
||||
@@ -277,14 +293,19 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
|
||||
if(level_max[Sp_TOTAL] <= ( spell_levels[Sp_SPEED] + spell_levels[Sp_POWER] )) //too many levels, can't do it
|
||||
return 0
|
||||
|
||||
if(upgrade_type && upgrade_type in spell_levels && upgrade_type in level_max)
|
||||
if(spell_levels[upgrade_type] >= level_max[upgrade_type])
|
||||
return 0
|
||||
//if(upgrade_type && spell_levels[upgrade_type] && level_max[upgrade_type])
|
||||
if(upgrade_type && spell_levels[upgrade_type] >= level_max[upgrade_type])
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/spell/proc/empower_spell()
|
||||
return
|
||||
if(!can_improve(Sp_POWER))
|
||||
return 0
|
||||
|
||||
spell_levels[Sp_POWER]++
|
||||
|
||||
return 1
|
||||
|
||||
/spell/proc/quicken_spell()
|
||||
if(!can_improve(Sp_SPEED))
|
||||
|
||||
Reference in New Issue
Block a user