Merge pull request #10954 from Citadel-Station-13/kevinz000-patch-9
repulse sanity
This commit is contained in:
@@ -248,6 +248,7 @@
|
|||||||
mutations = list(BLINDMUT)
|
mutations = list(BLINDMUT)
|
||||||
duration = 300
|
duration = 300
|
||||||
sound = 'sound/magic/blind.ogg'
|
sound = 'sound/magic/blind.ogg'
|
||||||
|
|
||||||
/obj/effect/proc_holder/spell/aoe_turf/repulse
|
/obj/effect/proc_holder/spell/aoe_turf/repulse
|
||||||
name = "Repulse"
|
name = "Repulse"
|
||||||
desc = "This spell throws everything around the user away."
|
desc = "This spell throws everything around the user away."
|
||||||
@@ -266,15 +267,22 @@
|
|||||||
action_icon_state = "repulse"
|
action_icon_state = "repulse"
|
||||||
|
|
||||||
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets,mob/user = usr, stun_amt = 50)
|
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets,mob/user = usr, stun_amt = 50)
|
||||||
|
var/list/mobs = list()
|
||||||
|
var/list/objs = list()
|
||||||
var/list/thrownatoms = list()
|
var/list/thrownatoms = list()
|
||||||
var/atom/throwtarget
|
var/atom/throwtarget
|
||||||
var/distfromcaster
|
var/distfromcaster
|
||||||
playMagSound()
|
playMagSound()
|
||||||
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
|
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
|
||||||
for(var/atom/movable/AM in T)
|
for(var/mob/M in T)
|
||||||
thrownatoms += AM
|
mobs += M
|
||||||
|
for(var/obj/O in T)
|
||||||
|
objs += O
|
||||||
|
thrownatoms = mobs + objs //mobs first
|
||||||
|
var/safety = 50
|
||||||
for(var/am in thrownatoms)
|
for(var/am in thrownatoms)
|
||||||
|
if(!safety)
|
||||||
|
break
|
||||||
var/atom/movable/AM = am
|
var/atom/movable/AM = am
|
||||||
if(AM == user || AM.anchored)
|
if(AM == user || AM.anchored)
|
||||||
continue
|
continue
|
||||||
@@ -299,6 +307,7 @@
|
|||||||
M.Knockdown(stun_amt, override_hardstun = stun_amt * 0.2)
|
M.Knockdown(stun_amt, override_hardstun = stun_amt * 0.2)
|
||||||
to_chat(M, "<span class='userdanger'>You're thrown back by [user]!</span>")
|
to_chat(M, "<span class='userdanger'>You're thrown back by [user]!</span>")
|
||||||
AM.throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
|
AM.throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
|
||||||
|
safety--
|
||||||
|
|
||||||
/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?!
|
/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?!
|
||||||
name = "Tail Sweep"
|
name = "Tail Sweep"
|
||||||
|
|||||||
Reference in New Issue
Block a user