mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Spells update. I'm still waiting for that emp_act(), muskets, so I can finish the base spells.
Traps framework complete. Two sample traps. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@885 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/list/spells = list(/obj/spell/blind,/obj/spell/blink,/obj/spell/disintegrate,/obj/spell/ethereal_jaunt,/obj/spell/fireball,/obj/spell/forcewall,/obj/spell/knock,/obj/spell/magic_missile,/obj/spell/mutate,/obj/spell/teleport) //needed for the badmin verb for now
|
||||
var/list/spells = list(/obj/spell/blind,/obj/spell/blink,/obj/spell/conjure,/obj/spell/disintegrate,/obj/spell/ethereal_jaunt,/obj/spell/fireball,/obj/spell/forcewall,/obj/spell/knock,/obj/spell/magic_missile,/obj/spell/mutate,/obj/spell/teleport) //needed for the badmin verb for now
|
||||
|
||||
/obj/spell
|
||||
name = "Spell"
|
||||
@@ -7,6 +7,7 @@ var/list/spells = list(/obj/spell/blind,/obj/spell/blink,/obj/spell/disintegrate
|
||||
var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
|
||||
var/recharge = 100 //recharge time in deciseconds
|
||||
var/clothes_req = 1 //see if it requires clothes
|
||||
var/stat_allowed = 0 //see if it requires being conscious
|
||||
var/invocation = "HURP DURP" //what is uttered when the wizard casts the spell
|
||||
var/invocation_type = "none" //can be none, whisper and shout
|
||||
var/range = 7 //the range of the spell
|
||||
@@ -20,7 +21,7 @@ var/list/spells = list(/obj/spell/blind,/obj/spell/blink,/obj/spell/disintegrate
|
||||
if(cast)
|
||||
usr << "[name] is still recharging."
|
||||
return 0
|
||||
if(usr.stat)
|
||||
if(usr.stat && !stat_allowed)
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
if(clothes_req) //clothes check
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/obj/spell/conjure
|
||||
name = "Summon Bigger Carp"
|
||||
desc = "This spell conjures an elite carp."
|
||||
|
||||
school = "conjuration"
|
||||
recharge = 1200
|
||||
clothes_req = 1
|
||||
invocation = "NOUK FHUNMM SACP RISSKA"
|
||||
invocation_type = "shout"
|
||||
range = 1 //radius in which objects are randomly summoned
|
||||
var/list/summon_type = list("/obj/livestock/spesscarp/elite") //determines what exactly will be summoned
|
||||
var/summon_duration = 0 // 0=permanent, any other time in deciseconds
|
||||
var/summon_amt = 1 //amount of objects summoned
|
||||
var/summon_ignore_density = 0 //if set to 1, adds dense tiles to possible spawn places
|
||||
var/summon_ignore_prev_spawn_points = 0 //if set to 1, each new object is summoned on a new spawn point
|
||||
|
||||
/obj/spell/conjure/Click()
|
||||
..()
|
||||
|
||||
if(!cast_check())
|
||||
return
|
||||
|
||||
invocation()
|
||||
|
||||
var/list/possible_spawn_points = list()
|
||||
|
||||
for(var/turf/T in oview(usr,range))
|
||||
if(!T.density || summon_ignore_density)
|
||||
possible_spawn_points += T
|
||||
|
||||
for(var/i=0,i<summon_amt,i++)
|
||||
if(!possible_spawn_points.len)
|
||||
break
|
||||
var/summoned_object_type = text2path(pick(summon_type))
|
||||
var/spawn_place = pick(possible_spawn_points)
|
||||
if(summon_ignore_prev_spawn_points)
|
||||
possible_spawn_points -= spawn_place
|
||||
var/summoned_object = new summoned_object_type(spawn_place)
|
||||
if(summon_duration)
|
||||
spawn(summon_duration)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
|
||||
return
|
||||
@@ -34,14 +34,26 @@
|
||||
if("gib")
|
||||
M.gib()
|
||||
if("kill")
|
||||
for(var/i=0,i<damage_amount,i++)
|
||||
for(var/i=0,i<abs(damage_amount),i++)
|
||||
sleep(0) //to avoid troubles with instantly applying lots of damage, it seems to be buggy
|
||||
switch(damage_type)
|
||||
if("brute")
|
||||
M.bruteloss++
|
||||
if(damage_amount>0)
|
||||
M.bruteloss++
|
||||
else
|
||||
M.bruteloss--
|
||||
if("toxin")
|
||||
M.toxloss++
|
||||
if(damage_amount>0)
|
||||
M.toxloss++
|
||||
else
|
||||
M.toxloss--
|
||||
if("oxygen")
|
||||
M.oxyloss++
|
||||
if(damage_amount>0)
|
||||
M.oxyloss++
|
||||
else
|
||||
M.oxyloss--
|
||||
if("fire")
|
||||
M.fireloss++
|
||||
if(damage_amount>0)
|
||||
M.fireloss++
|
||||
else
|
||||
M.fireloss--
|
||||
@@ -25,6 +25,8 @@
|
||||
forcefields += new /obj/forcefield(T)
|
||||
|
||||
spawn (wall_lifespan)
|
||||
del (forcefields)
|
||||
for(var/obj/forcefield/F in forcefields)
|
||||
del(F)
|
||||
del(forcefields)
|
||||
|
||||
return
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
var/area/thearea = teleportlocs[A]
|
||||
|
||||
usr.say("SCYAR NILA [uppertext(A)]")
|
||||
usr.say("[invocation] [uppertext(A)]")
|
||||
if(usr.gender=="male")
|
||||
playsound(usr.loc, pick('vs_chant_conj_hm.wav','vs_chant_conj_lm.wav','vs_chant_ench_hm.wav','vs_chant_ench_lm.wav','vs_chant_evoc_hm.wav','vs_chant_evoc_lm.wav','vs_chant_illu_hm.wav','vs_chant_illu_lm.wav','vs_chant_necr_hm.wav','vs_chant_necr_lm.wav'), 100, 1)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user