mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Added descriptions to wizard spells.
Beefed up Mind Transfer. Can now swap with traitors/revs/etc. Limited to humans and monkeys, and may not transfer to changelings, wizards, or cultists. Targets must still have a mind and a client for this to work (must also be alive). Mind Transfer now correctly works for mime targets or other targets with special verbs. Added a proper spell book for wizards. Changelings are now properly assigned their special role at round start. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@810 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -985,6 +985,17 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
|
||||
throw_range = 20
|
||||
m_amt = 100
|
||||
|
||||
/obj/item/weapon/spellbook
|
||||
name = "Spell Book"
|
||||
icon = 'library.dmi'
|
||||
icon_state ="book"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/uses = 4.0
|
||||
var/temp = null
|
||||
|
||||
/obj/item/weapon/staff
|
||||
name = "wizards staff"
|
||||
icon = 'wizard.dmi'
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
|
||||
grant_changeling_powers(changeling.current)
|
||||
changeling.special_role = "Changeling"
|
||||
changelings += changeling
|
||||
|
||||
//OBJECTIVES - Always absorb 5 genomes, plus random traitor objectives.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/client/proc/blind(mob/M as mob in oview())
|
||||
set category = "Spells"
|
||||
set name = "Blind"
|
||||
set desc = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
// if(!usr.casting()) return
|
||||
usr.verbs -= /client/proc/blind
|
||||
spawn(300)
|
||||
@@ -35,7 +36,7 @@
|
||||
/client/proc/magicmissile()
|
||||
set category = "Spells"
|
||||
set name = "Magic missile"
|
||||
set desc="Whom"
|
||||
set desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
|
||||
if(!usr.casting()) return
|
||||
|
||||
usr.say("FORTI GY AMA")
|
||||
@@ -80,7 +81,7 @@
|
||||
|
||||
set category = "Spells"
|
||||
set name = "Smoke"
|
||||
set desc = "Creates a cloud of smoke"
|
||||
set desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
// if(!usr.casting()) return
|
||||
usr.verbs -= /client/proc/smokecloud
|
||||
spawn(120)
|
||||
@@ -105,7 +106,7 @@
|
||||
|
||||
set category = "Spells"
|
||||
set name = "Forcewall"
|
||||
set desc = "Create a forcewall on your location."
|
||||
set desc = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
|
||||
// if(!usr.casting()) return
|
||||
|
||||
@@ -127,7 +128,7 @@
|
||||
/client/proc/fireball(mob/T as mob in oview())
|
||||
set category = "Spells"
|
||||
set name = "Fireball"
|
||||
set desc="Fireball target:"
|
||||
set desc = "This spell fires a fireball at a target and does not require wizard garb."
|
||||
// if(!usr.casting()) return
|
||||
|
||||
usr.verbs -= /client/proc/fireball
|
||||
@@ -162,6 +163,7 @@
|
||||
/client/proc/knock()
|
||||
set category = "Spells"
|
||||
set name = "Knock"
|
||||
set desc = "This spell opens nearby doors and does not require wizard garb."
|
||||
// if(!usr.casting()) return
|
||||
usr.verbs -= /client/proc/knock
|
||||
spawn(100)
|
||||
@@ -180,6 +182,7 @@
|
||||
/mob/proc/kill(mob/M as mob in oview(1))
|
||||
set category = "Spells"
|
||||
set name = "Disintegrate"
|
||||
set desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
|
||||
if(!usr.casting()) return
|
||||
usr.verbs -= /mob/proc/kill
|
||||
spawn(600)
|
||||
@@ -199,6 +202,7 @@
|
||||
/mob/proc/tech()
|
||||
set category = "Spells"
|
||||
set name = "Disable Technology"
|
||||
set desc = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if(!usr.casting()) return
|
||||
usr.verbs -= /mob/proc/tech
|
||||
spawn(400)
|
||||
@@ -388,7 +392,7 @@
|
||||
/client/proc/blink()
|
||||
set category = "Spells"
|
||||
set name = "Blink"
|
||||
set desc="Blink"
|
||||
set desc = "This spell randomly teleports you a short distance."
|
||||
if(!usr.casting()) return
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in orange(6))
|
||||
@@ -413,7 +417,7 @@
|
||||
/mob/proc/teleport()
|
||||
set category = "Spells"
|
||||
set name = "Teleport"
|
||||
set desc="Teleport"
|
||||
set desc = "This spell teleports you to a type of area of your selection."
|
||||
if(!usr.casting()) return
|
||||
var/A
|
||||
usr.verbs -= /mob/proc/teleport
|
||||
@@ -490,6 +494,7 @@
|
||||
/client/proc/jaunt()
|
||||
set category = "Spells"
|
||||
set name = "Ethereal Jaunt"
|
||||
set desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if(!usr.casting()) return
|
||||
usr.verbs -= /client/proc/jaunt
|
||||
spawn(300)
|
||||
@@ -574,6 +579,7 @@
|
||||
/client/proc/mutate()
|
||||
set category = "Spells"
|
||||
set name = "Mutate"
|
||||
set desc = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
if(!usr.casting()) return
|
||||
usr.verbs -= /client/proc/mutate
|
||||
spawn(400)
|
||||
@@ -592,15 +598,17 @@
|
||||
if (usr.mutations & 8) usr.mutations &= ~8
|
||||
return
|
||||
|
||||
//BODY SWAP
|
||||
//BODY SWAP /N
|
||||
|
||||
/mob/proc/swap(mob/M as mob in oview())
|
||||
set category = "Spells"
|
||||
set name = "Body Swap"
|
||||
set name = "Mind Transfer"
|
||||
set desc = "This spell allows the user to switch bodies with a target."
|
||||
|
||||
if(M.client && M.mind)
|
||||
if(!M.mind.special_role && (istype(M, /mob/living/carbon/human)))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(M.mind.special_role != "Wizard" || "Changeling" || "Cultist")//Wizards, changelings, and cultists are protected.
|
||||
if( (istype(M, /mob/living/carbon/human)) || (istype(M, /mob/living/carbon/monkey)) && M.stat != 2)
|
||||
var/mob/living/carbon/human/H = M //so it does not freak out when looking at the variables.
|
||||
var/mob/living/carbon/human/U = src
|
||||
|
||||
U.whisper("GIN'YU CAPAN")
|
||||
@@ -612,29 +620,34 @@
|
||||
var/mob/dead/observer/G = new /mob/dead/observer(H) //To properly transfer clients so no-one gets kicked off the game.
|
||||
|
||||
H.client.mob = G
|
||||
if(H.mind.special_verbs.len)
|
||||
for(var/V in H.mind.special_verbs)
|
||||
H.verbs -= V
|
||||
G.mind = H.mind
|
||||
|
||||
U.client.mob = H
|
||||
H.mind = U.mind
|
||||
if(H.mind.special_verbs.len)
|
||||
var/spell_loss = 1
|
||||
var/probability = 95
|
||||
var/spell_loss = 1//Can lose only one spell during transfer.
|
||||
var/probability = 95 //To determine the chance of wizard losing their spell.
|
||||
for(var/V in H.mind.special_verbs)
|
||||
if(spell_loss == 0)
|
||||
H.verbs += V
|
||||
else
|
||||
if(prob(probability))
|
||||
H.verbs += V
|
||||
probability -= 7
|
||||
probability -= 7//Chance of of keeping spells goes down each time a spell is added. Less spells means less chance of losing them.
|
||||
else
|
||||
spell_loss = 0
|
||||
H.mind.special_verbs -= V
|
||||
spawn(500)
|
||||
H << "The mind transfer has robbed you of a spell."
|
||||
|
||||
|
||||
G.client.mob = U
|
||||
U.mind = G.mind
|
||||
if(U.mind.special_verbs.len)//Basic fix to swap verbs for any mob if needed.
|
||||
for(var/V in U.mind.special_verbs)
|
||||
U.verbs += V
|
||||
|
||||
U.mind.current = U
|
||||
H.mind.current = H
|
||||
@@ -648,10 +661,13 @@
|
||||
H.verbs += /mob/proc/swap
|
||||
|
||||
del(G)
|
||||
else
|
||||
src << "Their mind is not compatible."
|
||||
return
|
||||
else
|
||||
src << "Their mind is resisting your spell."
|
||||
return
|
||||
|
||||
else
|
||||
src << "Their mind is not compatible."
|
||||
src << "They appear to be brain-dead."
|
||||
return
|
||||
@@ -165,7 +165,7 @@
|
||||
wizard_mob.equip_if_possible(new /obj/item/weapon/storage/backpack(wizard_mob), wizard_mob.slot_back)
|
||||
// wizard_mob.equip_if_possible(new /obj/item/weapon/scrying_gem(wizard_mob), wizard_mob.slot_l_store) For scrying gem.
|
||||
wizard_mob.equip_if_possible(new /obj/item/weapon/teleportation_scroll(wizard_mob), wizard_mob.slot_r_store)
|
||||
wizard_mob.equip_if_possible(new /obj/item/weapon/SWF_uplink(wizard_mob), wizard_mob.slot_l_hand)
|
||||
wizard_mob.equip_if_possible(new /obj/item/weapon/spellbook(wizard_mob), wizard_mob.slot_r_hand)
|
||||
|
||||
wizard_mob << "You will find a list of available spells in your spell book. Choose your magic arsenal carefully."
|
||||
wizard_mob << "In your pockets you will find two more important, magical artifacts. Use them as needed."
|
||||
@@ -254,17 +254,136 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
//SPELL BOOK PROCS
|
||||
|
||||
/obj/item/weapon/spellbook
|
||||
name = "Spell Book"
|
||||
icon = 'library.dmi'
|
||||
icon_state ="book"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
//WIP
|
||||
/obj/item/weapon/spellbook/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>The Book of Spells:</B><BR>"
|
||||
dat += "Spells left to memorize: [src.uses]<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Memorize which spell:</B><BR>"
|
||||
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=1'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=2'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=3'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=4'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=5'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=6'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=7'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=8'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=9'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=10'>Teleport</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=11'>Mutate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=12'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=13'>Knock</A> (10)<BR>"
|
||||
dat += "<HR>"
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/weapon/spellbook/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
usr.machine = src
|
||||
switch(href_list["spell_choice"])
|
||||
if ("1")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/magicmissile
|
||||
usr.mind.special_verbs += /client/proc/magicmissile
|
||||
src.temp = "This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage."
|
||||
if ("2")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/fireball
|
||||
usr.mind.special_verbs += /client/proc/fireball
|
||||
src.temp = "This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you."
|
||||
if ("3")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/kill
|
||||
usr.mind.special_verbs += /mob/proc/kill
|
||||
src.temp = "This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown."
|
||||
if ("4")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/tech
|
||||
usr.mind.special_verbs += /mob/proc/tech
|
||||
src.temp = "This spell disables all weapons, cameras and most other technology in range."
|
||||
if ("5")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/smokecloud
|
||||
usr.mind.special_verbs += /client/proc/smokecloud
|
||||
src.temp = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
if ("6")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blind
|
||||
usr.mind.special_verbs += /client/proc/blind
|
||||
src.temp = "This spell temporarly blinds a single person and does not require wizard garb."
|
||||
if ("7")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/swap
|
||||
src.temp = "This spell allows the user to switch bodies with a target. Careful to not lose your memory in the process."
|
||||
if ("8")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/forcewall
|
||||
usr.mind.special_verbs += /client/proc/forcewall
|
||||
src.temp = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
if ("9")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/blink
|
||||
usr.mind.special_verbs += /client/proc/blink
|
||||
src.temp = "This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience."
|
||||
if ("10")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /mob/proc/teleport
|
||||
usr.mind.special_verbs += /mob/proc/teleport
|
||||
src.temp = "This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable."
|
||||
if ("11")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/mutate
|
||||
usr.mind.special_verbs += /client/proc/mutate
|
||||
src.temp = "This spell causes you to turn into a hulk and gain telekinesis for a short while."
|
||||
if ("12")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/jaunt
|
||||
usr.mind.special_verbs += /client/proc/jaunt
|
||||
src.temp = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
if ("13")
|
||||
if (src.uses >= 1)
|
||||
src.uses -= 1
|
||||
usr.verbs += /client/proc/knock
|
||||
usr.mind.special_verbs += /client/proc/knock
|
||||
src.temp = "This spell opens nearby doors and does not require wizard garb."
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
//SWF UPLINK PROCS
|
||||
/obj/item/weapon/SWF_uplink/attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
var/dat
|
||||
@@ -285,7 +404,7 @@
|
||||
dat += "<A href='byond://?src=\ref[src];spell_emp=1'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_smoke=1'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blind=1'>Blind</A> (30)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_swap=1'>Body Swap</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_swap=1'>Mind Transfer</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_forcewall=1'>Forcewall</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_blink=1'>Blink</A> (2)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A> (60)<BR>"
|
||||
|
||||
@@ -321,6 +321,8 @@
|
||||
src.equip_if_possible(new /obj/item/clothing/belt/suspenders(src), slot_belt)
|
||||
src.verbs += /client/proc/mimespeak
|
||||
src.verbs += /client/proc/mimewall
|
||||
src.mind.special_verbs += /client/proc/mimespeak
|
||||
src.mind.special_verbs += /client/proc/mimewall
|
||||
src.miming = 1
|
||||
|
||||
if ("Station Engineer")
|
||||
|
||||
Reference in New Issue
Block a user