Merge pull request #184 from TheDZD/magic

Wizard Bugfixes and One Spell Addition
This commit is contained in:
Fox-McCloud
2015-01-17 16:43:06 -05:00
6 changed files with 90 additions and 26 deletions
+46 -1
View File
@@ -46,6 +46,7 @@
message = "\blue You feel strong! You feel a pressure building behind your eyes!"
range = -1
include_user = 1
centcom_cancast = 0
mutations = list(M_LASER, M_HULK)
duration = 300
@@ -278,4 +279,48 @@
/obj/effect/proc_holder/spell/wizard/targeted/explosion/fireball
ex_severe = -1
ex_heavy = -1
ex_light = 2
ex_light = 2
/obj/effect/proc_holder/spell/wizard/aoe_turf/repulse
name = "Repulse"
desc = "This spell throws everything around the user away."
charge_max = 400
clothes_req = 1
invocation = "GITTAH WEIGH"
invocation_type = "shout"
range = 5
cooldown_min = 150
selection_type = "view"
var/maxthrow = 5
/obj/effect/proc_holder/spell/wizard/aoe_turf/repulse/cast(list/targets)
var/mob/user = usr
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
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
for(var/atom/movable/AM in thrownatoms)
if(AM == user || AM.anchored) continue
var/obj/effect/overlay/targeteffect = new /obj/effect/overlay{icon='icons/effects/effects.dmi'; icon_state="shieldsparkles"; mouse_opacity=0; density = 0}()
AM.overlays += targeteffect
throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user)))
distfromcaster = get_dist(user, AM)
spawn(10)
AM.overlays -= targeteffect
qdel(targeteffect)
if(distfromcaster == 0)
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.Weaken(5)
M.adjustBruteLoss(5)
M << "<span class='userdanger'>You're slammed into the floor by a mystical force!</span>"
else
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.Weaken(2)
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.
+10 -3
View File
@@ -49,7 +49,7 @@
dat += "<HR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=noclothes'>Remove Clothes Requirement</A>"
dat += "<A href='byond://?src=\ref[src];spell_choice=noclothes'>Remove Clothes Requirement</A><BR>"
dat += "<b>Warning: this takes away 2 spell choices.</b><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=magicmissile'>Magic Missile</A> (15)<BR>"
@@ -67,6 +67,9 @@
dat += "<A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR>"
dat += "<I>This spell spawns a cloud of choking smoke at your location and does not require wizard garb.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=repulse'>Repulse</A> (40)<BR>"
dat += "<I>This spell throws nearby objects away from you and knocks creatures down.</I><BR>"
dat += "<A href='byond://?src=\ref[src];spell_choice=blind'>Blind</A> (30)<BR>"
dat += "<I>This spell temporarly blinds a single person and does not require wizard garb.</I><BR>"
@@ -200,7 +203,7 @@
uses--
/*
*/
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", fleshtostone = "Flesh to Stone", summonitem = "Instant Summons", summonguns = "Summon Guns", summonmagic = "Summon Magic", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", staffchaos = "Staff of Chaos", staffdoor = "Staff of Door Creation", wands = "Wand Assortment")
var/list/available_spells = list(magicmissile = "Magic Missile", fireball = "Fireball", disintegrate = "Disintegrate", disabletech = "Disable Tech", repulse = "Repulse", smoke = "Smoke", blind = "Blind", mindswap = "Mind Transfer", forcewall = "Forcewall", blink = "Blink", teleport = "Teleport", mutate = "Mutate", etherealjaunt = "Ethereal Jaunt", knock = "Knock", horseman = "Curse of the Horseman", fleshtostone = "Flesh to Stone", summonitem = "Instant Summons", summonguns = "Summon Guns", summonmagic = "Summon Magic", staffchange = "Staff of Change", soulstone = "Six Soul Stone Shards and the spell Artificer", armor = "Mastercrafted Armor Set", staffanimate = "Staff of Animation", staffchaos = "Staff of Chaos", staffdoor = "Staff of Door Creation", wands = "Wand Assortment")
var/already_knows = 0
for(var/obj/effect/proc_holder/spell/wizard/aspell in H.spell_list)
if(available_spells[href_list["spell_choice"]] == initial(aspell.name))
@@ -238,7 +241,7 @@
feedback_add_details("wizard_spell_learned","NC")
H.spell_list += new /obj/effect/proc_holder/spell/wizard/noclothes
temp = "This teaches you how to use your spells without your magical garb, truely you are the wizardest."
uses--
uses -= 2
if("magicmissile")
feedback_add_details("wizard_spell_learned","MM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/wizard/targeted/projectile/magic_missile(H)
@@ -255,6 +258,10 @@
feedback_add_details("wizard_spell_learned","DT") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/wizard/targeted/emplosion/disable_tech(H)
temp = "You have learned disable technology."
if("repulse")
feedback_add_details("wizard_spell_learned","RP") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/wizard/aoe_turf/repulse(null)
temp = "You have learned repulse."
if("smoke")
feedback_add_details("wizard_spell_learned","SM") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
H.spell_list += new /obj/effect/proc_holder/spell/wizard/targeted/smoke(H)
-22
View File
@@ -26,28 +26,6 @@
new /obj/effect/forcefield/mime(locate(usr.x,usr.y,usr.z))
return
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
name = "invisible wall"
desc = "You have a bad feeling about this."
var/timeleft = 300
var/last_process = 0
/obj/effect/forcefield/mime/New()
..()
last_process = world.time
processing_objects.Add(src)
/obj/effect/forcefield/mime/process()
timeleft -= (world.time - last_process)
if(timeleft <= 0)
processing_objects.Remove(src)
del(src)
///////////////////////////////
/client/proc/mimespeak()
set category = "Mime"
set name = "Speech"
+33
View File
@@ -0,0 +1,33 @@
/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon = 'icons/effects/effects.dmi'
icon_state = "m_shield"
anchored = 1.0
opacity = 0
density = 1
unacidable = 1
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
name = "invisible wall"
desc = "You have a bad feeling about this."
var/timeleft = 50
var/last_process = 0
/obj/effect/forcefield/mime/New()
..()
last_process = world.time
processing_objects.Add(src)
/obj/effect/forcefield/mime/process()
timeleft -= (world.time - last_process)
if(timeleft <= 0)
processing_objects.Remove(src)
qdel(src)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 260 KiB

+1
View File
@@ -557,6 +557,7 @@
#include "code\game\objects\effects\anomalies.dm"
#include "code\game\objects\effects\bump_teleporter.dm"
#include "code\game\objects\effects\effect_system.dm"
#include "code\game\objects\effects\forcefields.dm"
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\glowshroom.dm"
#include "code\game\objects\effects\landmarks.dm"