Lay groundwork for megafauna, and add Ashdragon.

Includes a refactor for gun turrets (merged into portable turrets), hostile simple_animal behaviour, spells (sounds have been added) and poi_list items.
This commit is contained in:
Markolie
2016-10-23 23:15:57 +02:00
parent f110b9e6a5
commit 2e711d1337
122 changed files with 1650 additions and 776 deletions
+6
View File
@@ -1,5 +1,11 @@
// reference: /client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
/datum
var/var_edited = 0 //Warrenty void if seal is broken
/datum/proc/on_varedit(modified_var) //called whenever a var is edited
var_edited = 1
/client/proc/debug_variables(datum/D in world)
set category = "Debug"
set name = "View Variables"
+9
View File
@@ -54,6 +54,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/action_icon = 'icons/mob/actions.dmi'
var/action_icon_state = "spell_default"
var/action_background_icon_state = "bg_spell"
var/sound = null //The sound the spell makes when it is cast
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0, mob/living/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
@@ -130,6 +132,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if("emote")
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
/obj/effect/proc_holder/spell/proc/playMagSound()
playsound(get_turf(usr), sound,50,1)
/obj/effect/proc_holder/spell/New()
..()
action = new(src)
@@ -166,6 +171,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
if(sound)
playMagSound()
if(prob(critfailchance))
critfail(targets)
else
+8 -2
View File
@@ -4,6 +4,10 @@
var/randomise_selection = 0 //if it lets the usr choose the teleport loc or picks it from the list
var/invocation_area = 1 //if the invocation appends the selected area
var/sound1 = "sound/weapons/ZapBang.ogg"
var/sound2 = "sound/weapons/ZapBang.ogg"
/obj/effect/proc_holder/spell/targeted/area_teleport/perform(list/targets, recharge = 1)
var/thearea = before_cast(targets)
if(!thearea || !cast_check(1))
@@ -32,7 +36,8 @@
return thearea
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
for(var/mob/living/target in targets)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
@@ -64,7 +69,8 @@
break
if(!success)
target.loc = pick(L)
target.forceMove(pick(L))
playsound(get_turf(user), sound2, 50,1)
return
+5 -2
View File
@@ -13,9 +13,11 @@
var/list/newVars = list() //vars of the summoned objects will be replaced with those where they meet
//should have format of list("emagged" = 1,"name" = "Wizard's Justicebot"), for example
var/delay = 1//Go Go Gadget Inheritance
var/cast_sound = 'sound/items/welder.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets)
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), cast_sound, 50,1)
for(var/turf/T in targets)
if(T.density && !summon_ignore_density)
targets -= T
@@ -42,6 +44,7 @@
for(var/varName in newVars)
if(varName in summoned_object.vars)
summoned_object.vars[varName] = newVars[varName]
summoned_object.admin_spawned = TRUE
if(summon_lifespan)
spawn(summon_lifespan)
+1
View File
@@ -14,6 +14,7 @@
selection_type = "range"
action_icon_state = "barn"
sound = "sound/magic/HorseHead_curse.ogg"
/obj/effect/proc_holder/spell/targeted/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
+1
View File
@@ -11,6 +11,7 @@
cooldown_min = 20 //20 deciseconds reduction per rank
action_icon_state = "knock"
sound = "sound/magic/Knock.ogg"
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets)
for(var/turf/T in targets)
+8 -2
View File
@@ -14,6 +14,7 @@
var/ready = 0
var/image/halo = null
action_icon_state = "lightning"
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
/obj/effect/proc_holder/spell/targeted/lightning/lightnian
clothes_req = 0
@@ -31,8 +32,10 @@
/obj/effect/proc_holder/spell/targeted/lightning/proc/StartChargeup(mob/user = usr)
ready = 1
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
Snd = new/sound('sound/magic/lightning_chargeup.ogg',channel = 7)
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
user.overlays.Add(halo)
playsound(get_turf(user), Snd, 50, 0)
start_time = world.time
if(do_mob(user,user,100,uninterruptible=1))
if(ready)
@@ -59,11 +62,14 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
/obj/effect/proc_holder/spell/targeted/lightning/cast(list/targets, mob/user = usr)
ready = 0
var/mob/living/carbon/target = targets[1]
Snd=sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
playsound(get_turf(user),Snd,50,0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
if(get_dist(user,target)>range)
to_chat(user, "<span class='notice'>They are too far away!</span>")
Reset(user)
return
playsound(get_turf(user), 'sound/magic/lightningbolt.ogg', 50, 1)
user.Beam(target,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
var/energy = min(world.time - start_time,100)
@@ -75,10 +81,10 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
var/mob/living/carbon/current = target
if(bounces < 1)
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
playsound(get_turf(current), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
else
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
playsound(get_turf(current), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
var/list/possible_targets = new
for(var/mob/living/M in view_or_range(range,target,"view"))
if(user == M || target == M && los_check(current,M)) // || origin == M ? Not sure double shockings is good or not
+2 -1
View File
@@ -10,7 +10,8 @@
charge_max = 300
clothes_req = 0
range = 0
cast_sound = null
action_icon_state = "mime"
action_background_icon_state = "bg_mime"
+2
View File
@@ -102,8 +102,10 @@
if(butterfingers)
item_to_retrive.loc = user.loc
item_to_retrive.loc.visible_message("<span class='caution'>The [item_to_retrive.name] suddenly appears!</span>")
playsound(get_turf(user),"sound/magic/SummonItems_generic.ogg",50,1)
else
item_to_retrive.loc.visible_message("<span class='caution'>The [item_to_retrive.name] suddenly appears in [user]'s hand!</span>")
playsound(get_turf(user),"sound/magic/SummonItems_generic.ogg",50,1)
if(message)
to_chat(user, message)
+7 -2
View File
@@ -7,8 +7,12 @@
var/include_space = 0 //whether it includes space tiles in possible teleport locations
var/include_dense = 0 //whether it includes dense tiles in possible teleport locations
var/sound1 = "sound/weapons/ZapBang.ogg"
var/sound2 = "sound/weapons/ZapBang.ogg"
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets)
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
for(var/mob/living/target in targets)
var/list/turfs = new/list()
for(var/turf/T in range(target,outer_tele_radius))
@@ -31,4 +35,5 @@
if(!picked || !isturf(picked))
return
target.loc = picked
target.forceMove(picked)
playsound(get_turf(user), sound2, 50,1)
+43 -1
View File
@@ -25,9 +25,12 @@
proj_trail_icon_state = "magicmd"
action_icon_state = "magicm"
sound = "sound/magic/MAGIC_MISSILE.ogg"
/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile
amt_weakened = 3
sound = "sound/magic/MM_Hit.ogg"
/obj/effect/proc_holder/spell/noclothes
name = "No Clothes"
@@ -52,6 +55,7 @@
cooldown_min = 300 //25 deciseconds reduction per rank
action_icon_state = "mutate"
sound = "sound/magic/Mutate.ogg"
/obj/effect/proc_holder/spell/targeted/genetic/mutate/cast(list/targets)
for(var/mob/living/target in targets)
@@ -93,6 +97,8 @@
emp_heavy = 6
emp_light = 10
sound = "sound/magic/Disable_Tech.ogg"
/obj/effect/proc_holder/spell/targeted/turf_teleport/blink
name = "Blink"
@@ -117,6 +123,9 @@
centcom_cancast = 0 //prevent people from getting to centcom
action_icon_state = "blink"
sound1 = "sound/magic/blink.ogg"
sound2 = "sound/magic/blink.ogg"
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
name = "Teleport"
@@ -135,6 +144,9 @@
smoke_amt = 5
action_icon_state = "spell_teleport"
sound1="sound/magic/Teleport_diss.ogg"
sound2="sound/magic/Teleport_app.ogg"
/obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall
name = "Forcewall"
@@ -152,6 +164,7 @@
summon_lifespan = 300
action_icon_state = "shield"
cast_sound = "sound/magic/ForceWall.ogg"
/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop
name = "Stop Time"
@@ -180,7 +193,8 @@
summon_type = list(/mob/living/simple_animal/hostile/carp)
cast_sound = "sound/magic/Summon_Karp.ogg"
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
name = "Artificer"
desc = "This spell conjures a construct which may be controlled by Shades"
@@ -195,6 +209,7 @@
summon_type = list(/obj/structure/constructshell)
action_icon_state = "artificer"
cast_sound = "sound/magic/SummonItems_generic.ogg"
/obj/effect/proc_holder/spell/aoe_turf/conjure/creature
name = "Summon Creature Swarm"
@@ -209,6 +224,7 @@
range = 3
summon_type = list(/mob/living/simple_animal/hostile/creature)
cast_sound = "sound/magic/SummonItems_generic.ogg"
/obj/effect/proc_holder/spell/targeted/trigger/blind
name = "Blind"
@@ -229,10 +245,12 @@
/obj/effect/proc_holder/spell/targeted/inflict_handler/blind
amt_eye_blind = 10
amt_eye_blurry = 20
sound="sound/magic/Blind.ogg"
/obj/effect/proc_holder/spell/targeted/genetic/blind
disabilities = BLIND
duration = 300
sound="sound/magic/Blind.ogg"
/obj/effect/proc_holder/spell/dumbfire/fireball
name = "Fireball"
@@ -254,6 +272,7 @@
proj_step_delay = 1
action_icon_state = "fireball"
sound = "sound/magic/Fireball.ogg"
/obj/effect/proc_holder/spell/turf/fireball/cast(var/turf/T)
explosion(T, -1, 0, 2, 3, 0, flame_range = 2)
@@ -282,12 +301,14 @@
var/maxthrow = 5
action_icon_state = "repulse"
sound = 'sound/magic/Repulse.ogg'
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets)
var/mob/user = usr
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
playMagSound()
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)
thrownatoms += AM
@@ -314,3 +335,24 @@
M.Weaken(2)
to_chat(M, "<span class='userdanger'>You're thrown back by a mystical force!</span>")
spawn(0) AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
/obj/effect/proc_holder/spell/targeted/sacred_flame
name = "Sacred Flame"
desc = "Makes everyone around you more flammable, and lights yourself on fire."
charge_max = 60
clothes_req = 0
invocation = "FI'RAN DADISKO"
invocation_type = "shout"
max_targets = 0
range = 6
include_user = 1
selection_type = "view"
action_icon_state = "sacredflame"
sound = "sound/magic/Fireball.ogg"
/obj/effect/proc_holder/spell/targeted/sacred_flame/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
L.adjust_fire_stacks(20)
if(isliving(user))
var/mob/living/U = user
U.IgniteMob()