mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Glorious comeback update.
Object spells - fixed two minor bugs. Added the possibility of making a critical failure effect for the spells. Singularity beacon - added to traitor spawn list. Must be screwdrivered to the floor before you can activate it. Singularity - optimised the code a bit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1709 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -31,6 +31,8 @@ var/list/spells = typesof(/obj/proc_holder/spell) //needed for the badmin verb f
|
||||
var/smoke_spread = 0 //1 - harmless, 2 - harmful
|
||||
var/smoke_amt = 0 //cropped at 10
|
||||
|
||||
var/critfailchance = 0
|
||||
|
||||
/obj/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
|
||||
|
||||
if(!(src in usr.spell_list))
|
||||
@@ -111,7 +113,10 @@ var/list/spells = typesof(/obj/proc_holder/spell) //needed for the badmin verb f
|
||||
spawn(0)
|
||||
if(charge_type == "recharge" && recharge)
|
||||
start_recharge()
|
||||
cast(targets)
|
||||
if(prob(critfailchance))
|
||||
critfail(targets)
|
||||
else
|
||||
cast(targets)
|
||||
after_cast(targets)
|
||||
|
||||
/obj/proc_holder/spell/proc/before_cast(list/targets)
|
||||
@@ -156,6 +161,9 @@ var/list/spells = typesof(/obj/proc_holder/spell) //needed for the badmin verb f
|
||||
/obj/proc_holder/spell/proc/cast(list/targets)
|
||||
return
|
||||
|
||||
/obj/proc_holder/spell/proc/critfail(list/targets)
|
||||
return
|
||||
|
||||
/obj/proc_holder/spell/proc/revert_cast() //resets recharge or readds a charge
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
continue
|
||||
//damage
|
||||
if(amt_dam_brute > 0)
|
||||
if(amt_dam_fire > 0)
|
||||
if(amt_dam_fire >= 0)
|
||||
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
else if (amt_dam_fire < 0)
|
||||
target.take_overall_damage(amt_dam_brute,0)
|
||||
@@ -38,7 +38,7 @@
|
||||
if(amt_dam_fire > 0)
|
||||
target.take_overall_damage(0,amt_dam_fire)
|
||||
target.heal_overall_damage(amt_dam_brute,0)
|
||||
else if (amt_dam_fire < 0)
|
||||
else if (amt_dam_fire <= 0)
|
||||
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
target.toxloss += amt_dam_tox
|
||||
target.oxyloss += amt_dam_oxy
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
if(proj_homing)
|
||||
if(proj_insubstantial)
|
||||
projectile.dir = get_dir(projectile,target)
|
||||
projectile.loc = get_step_to(projectile,target)
|
||||
else
|
||||
step_to(projectile,target)
|
||||
|
||||
Reference in New Issue
Block a user