mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Gamemode refactor, lots of code shuffles, PR will have details.
This commit is contained in:
@@ -508,17 +508,6 @@ client
|
||||
src.give_disease2(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
|
||||
@@ -111,252 +111,56 @@ datum/mind
|
||||
var/out = "<B>[name]</B>[(current&&(current.real_name!=name))?" (as [current.real_name])":""]<br>"
|
||||
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
|
||||
out += "Assigned role: [assigned_role]. <a href='?src=\ref[src];role_edit=1'>Edit</a><br>"
|
||||
out += "Factions and special roles:<br>"
|
||||
out += "<hr>"
|
||||
out += "Factions and special roles:<br><table>"
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
out += "[antag.get_panel_entry(src)]"
|
||||
out += "</table><hr>"
|
||||
out += "<b>Objectives</b></br>"
|
||||
|
||||
var/list/sections = list(
|
||||
"implant",
|
||||
"revolution",
|
||||
"cult",
|
||||
"wizard",
|
||||
"changeling",
|
||||
"mercenary",
|
||||
"traitor", // "traitorchan",
|
||||
"monkey",
|
||||
"malfunction",
|
||||
)
|
||||
var/text = ""
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(current, /mob/living/carbon/human) || istype(current, /mob/living/carbon/monkey))
|
||||
/** Impanted**/
|
||||
if(istype(current, /mob/living/carbon/human))
|
||||
if(H.is_loyalty_implanted(H))
|
||||
text = "Loyalty Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
|
||||
if(objectives && objectives.len)
|
||||
var/num = 1
|
||||
for(var/datum/objective/O in objectives)
|
||||
out += "<b>Objective #[num]:</b> [O.explanation_text] "
|
||||
if(O.completed)
|
||||
out += "(<font color='green'>complete</font>)"
|
||||
else
|
||||
text = "Loyalty Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
|
||||
else
|
||||
text = "Loyalty Implant: Don't implant that monkey!</br>"
|
||||
sections["implant"] = text
|
||||
/** REVOLUTION ***/
|
||||
text = "revolution"
|
||||
if (ticker.mode.config_tag=="revolution")
|
||||
text += uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (istype(current, /mob/living/carbon/monkey) || H.is_loyalty_implanted(H))
|
||||
text += "<b>LOYAL EMPLOYEE</b>|headrev|rev"
|
||||
else if (src in ticker.mode.head_revolutionaries)
|
||||
text = "<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
text += "<br>Flash: <a href='?src=\ref[src];revolution=flash'>give</a>"
|
||||
out += "(<font color='red'>incomplete</font>)"
|
||||
out += " <a href='?src=\ref[src];obj_completed=\ref[O]'>\[toggle\]</a>"
|
||||
out += " <a href='?src=\ref[src];obj_delete=\ref[O]'>\[remove\]</a><br>"
|
||||
num++
|
||||
out += "<br><a href='?src=\ref[src];obj_announce=1'>\[announce objectives\]</a>"
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (flash)
|
||||
if(!flash.broken)
|
||||
text += "|<a href='?src=\ref[src];revolution=takeflash'>take</a>."
|
||||
else
|
||||
text += "|<a href='?src=\ref[src];revolution=takeflash'>take</a>|<a href='?src=\ref[src];revolution=repairflash'>repair</a>."
|
||||
else
|
||||
text += "."
|
||||
|
||||
text += " <a href='?src=\ref[src];revolution=reequip'>Reequip</a> (gives traitor uplink)."
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];revolution=autoobjectives'>Set to kill all heads</a>."
|
||||
else if (src in ticker.mode.revolutionaries)
|
||||
text += "<a href='?src=\ref[src];revolution=clear'>employee</a>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<b>REV</b>"
|
||||
else
|
||||
text += "<b>EMPLOYEE</b>|<a href='?src=\ref[src];revolution=headrev'>headrev</a>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
|
||||
sections["revolution"] = text
|
||||
|
||||
/** CULT ***/
|
||||
text = "cult"
|
||||
if (ticker.mode.config_tag=="cult")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (istype(current, /mob/living/carbon/monkey) || H.is_loyalty_implanted(H))
|
||||
text += "<B>LOYAL EMPLOYEE</B>|cultist"
|
||||
else if (src in ticker.mode.cult)
|
||||
text += "<a href='?src=\ref[src];cult=clear'>employee</a>|<b>CULTIST</b>"
|
||||
text += "<br>Give <a href='?src=\ref[src];cult=tome'>tome</a>|<a href='?src=\ref[src];cult=amulet'>amulet</a>."
|
||||
/*
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! Set to sacrifice and <a href='?src=\ref[src];cult=escape'>escape</a> or <a href='?src=\ref[src];cult=summon'>summon</a>."
|
||||
*/
|
||||
else
|
||||
text += "<b>EMPLOYEE</b>|<a href='?src=\ref[src];cult=cultist'>cultist</a>"
|
||||
sections["cult"] = text
|
||||
|
||||
/** WIZARD ***/
|
||||
text = "wizard"
|
||||
if (ticker.mode.config_tag=="wizard")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.wizards)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];wizard=clear'>no</a>"
|
||||
text += "<br><a href='?src=\ref[src];wizard=lair'>To lair</a>, <a href='?src=\ref[src];common=undress'>undress</a>, <a href='?src=\ref[src];wizard=dressup'>dress up</a>, <a href='?src=\ref[src];wizard=name'>let choose name</a>."
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];wizard=autoobjectives'>Randomize!</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];wizard=wizard'>yes</a>|<b>NO</b>"
|
||||
sections["wizard"] = text
|
||||
|
||||
/** CHANGELING ***/
|
||||
text = "changeling"
|
||||
if (ticker.mode.config_tag=="changeling" || ticker.mode.config_tag=="traitorchan")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.changelings)
|
||||
text += "<b>YES</b>|<a href='?src=\ref[src];changeling=clear'>no</a>"
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];changeling=autoobjectives'>Randomize!</a>"
|
||||
if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) )
|
||||
text += "<br><a href='?src=\ref[src];changeling=initialdna'>Transform to initial appearance.</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];changeling=changeling'>yes</a>|<b>NO</b>"
|
||||
// var/datum/game_mode/changeling/changeling = ticker.mode
|
||||
// if (istype(changeling) && changeling.changelingdeath)
|
||||
// text += "<br>All the changelings are dead! Restart in [round((changeling.TIME_TO_GET_REVIVED-(world.time-changeling.changelingdeathtime))/10)] seconds."
|
||||
sections["changeling"] = text
|
||||
|
||||
/** NUCLEAR ***/
|
||||
text = "mercenary"
|
||||
if (ticker.mode.config_tag=="mercenary")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (src in ticker.mode.syndicates)
|
||||
text += "<b>OPERATIVE</b>|<a href='?src=\ref[src];mercenary=clear'>nanotrasen</a>"
|
||||
text += "<br><a href='?src=\ref[src];mercenary=lair'>To shuttle</a>, <a href='?src=\ref[src];common=undress'>undress</a>, <a href='?src=\ref[src];mercenary=dressup'>dress up</a>."
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
code = bombue.r_code
|
||||
break
|
||||
if (code)
|
||||
text += " Code is [code]. <a href='?src=\ref[src];mercenary=tellcode'>tell the code.</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];mercenary=mercenary'>operative</a>|<b>NANOTRASEN</b>"
|
||||
sections["mercenary"] = text
|
||||
|
||||
/** TRAITOR ***/
|
||||
text = "traitor"
|
||||
if (ticker.mode.config_tag=="traitor" || ticker.mode.config_tag=="traitorchan")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if(istype(current, /mob/living/carbon/human))
|
||||
if (H.is_loyalty_implanted(H))
|
||||
text +="traitor|<b>LOYAL EMPLOYEE</b>"
|
||||
else
|
||||
if (src in ticker.mode.traitors)
|
||||
text += "<b>TRAITOR</b>|<a href='?src=\ref[src];traitor=clear'>Employee</a>"
|
||||
if (objectives.len==0)
|
||||
text += "<br>Objectives are empty! <a href='?src=\ref[src];traitor=autoobjectives'>Randomize</a>!"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];traitor=traitor'>traitor</a>|<b>Employee</b>"
|
||||
sections["traitor"] = text
|
||||
|
||||
/** MONKEY ***/
|
||||
if (istype(current, /mob/living/carbon))
|
||||
text = "monkey"
|
||||
if (ticker.mode.config_tag=="monkey")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (istype(current, /mob/living/carbon/human))
|
||||
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<b>HUMAN</b>|other"
|
||||
else if (istype(current, /mob/living/carbon/monkey))
|
||||
var/found = 0
|
||||
for(var/datum/disease/D in current.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever)) found = 1
|
||||
|
||||
if(found)
|
||||
text += "<a href='?src=\ref[src];monkey=healthy'>healthy</a>|<b>INFECTED</b>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
|
||||
else
|
||||
text += "<b>HEALTHY</b>|<a href='?src=\ref[src];monkey=infected'>infected</a>|<a href='?src=\ref[src];monkey=human'>human</a>|other"
|
||||
|
||||
else
|
||||
text += "healthy|infected|human|<b>OTHER</b>"
|
||||
sections["monkey"] = text
|
||||
|
||||
|
||||
/** SILICON ***/
|
||||
|
||||
if (istype(current, /mob/living/silicon))
|
||||
text = "silicon"
|
||||
if (ticker.mode.config_tag=="malfunction")
|
||||
text = uppertext(text)
|
||||
text = "<i><b>[text]</b></i>: "
|
||||
if (istype(current, /mob/living/silicon/ai))
|
||||
if (src in ticker.mode.malf_ai)
|
||||
text += "<b>MALF</b>|<a href='?src=\ref[src];silicon=unmalf'>not malf</a>"
|
||||
else
|
||||
text += "<a href='?src=\ref[src];silicon=malf'>malf</a>|<b>NOT MALF</b>"
|
||||
var/mob/living/silicon/robot/robot = current
|
||||
if (istype(robot) && robot.emagged)
|
||||
text += "<br>Cyborg: Is emagged! <a href='?src=\ref[src];silicon=unemag'>Unemag!</a><br>0th law: [robot.laws.zeroth_law]"
|
||||
var/mob/living/silicon/ai/ai = current
|
||||
if (istype(ai) && ai.connected_robots.len)
|
||||
var/n_e_robots = 0
|
||||
for (var/mob/living/silicon/robot/R in ai.connected_robots)
|
||||
if (R.emagged)
|
||||
n_e_robots++
|
||||
text += "<br>[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. <a href='?src=\ref[src];silicon=unemagcyborgs'>Unemag</a>"
|
||||
sections["malfunction"] = text
|
||||
|
||||
if (ticker.mode.config_tag == "traitorchan")
|
||||
if (sections["traitor"])
|
||||
out += sections["traitor"]+"<br>"
|
||||
if (sections["changeling"])
|
||||
out += sections["changeling"]+"<br>"
|
||||
sections -= "traitor"
|
||||
sections -= "changeling"
|
||||
else
|
||||
if (sections[ticker.mode.config_tag])
|
||||
out += sections[ticker.mode.config_tag]+"<br>"
|
||||
sections -= ticker.mode.config_tag
|
||||
for (var/i in sections)
|
||||
if (sections[i])
|
||||
out += sections[i]+"<br>"
|
||||
|
||||
|
||||
if (((src in ticker.mode.head_revolutionaries) || \
|
||||
(src in ticker.mode.traitors) || \
|
||||
(src in ticker.mode.syndicates)) && \
|
||||
istype(current,/mob/living/carbon/human) )
|
||||
|
||||
text = "Uplink: <a href='?src=\ref[src];common=uplink'>give</a>"
|
||||
var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink()
|
||||
var/crystals
|
||||
if (suplink)
|
||||
crystals = suplink.uses
|
||||
if (suplink)
|
||||
text += "|<a href='?src=\ref[src];common=takeuplink'>take</a>"
|
||||
if (usr.client.holder.rights & R_FUN)
|
||||
text += ", <a href='?src=\ref[src];common=crystals'>[crystals]</a> crystals"
|
||||
else
|
||||
text += ", [crystals] crystals"
|
||||
text += "." //hiel grammar
|
||||
out += text
|
||||
|
||||
out += "<br>"
|
||||
|
||||
out += "<b>Memory:</b><br>"
|
||||
out += memory
|
||||
out += "<br><a href='?src=\ref[src];memory_edit=1'>Edit memory</a><br>"
|
||||
out += "Objectives:<br>"
|
||||
if (objectives.len == 0)
|
||||
out += "EMPTY<br>"
|
||||
else
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=\ref[src];obj_edit=\ref[objective]'>Edit</a> <a href='?src=\ref[src];obj_delete=\ref[objective]'>Delete</a> <a href='?src=\ref[src];obj_completed=\ref[objective]'><font color=[objective.completed ? "green" : "red"]>Toggle Completion</font></a><br>"
|
||||
obj_count++
|
||||
out += "<a href='?src=\ref[src];obj_add=1'>Add objective</a><br><br>"
|
||||
|
||||
out += "<a href='?src=\ref[src];obj_announce=1'>Announce objectives</a><br><br>"
|
||||
|
||||
out += "None."
|
||||
out += "<br><a href='?src=\ref[src];obj_add=1'>\[add\]</a>"
|
||||
usr << browse(out, "window=edit_memory[src]")
|
||||
|
||||
Topic(href, href_list)
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if (href_list["role_edit"])
|
||||
if(href_list["add_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
|
||||
if(antag) antag.add_antagonist(src)
|
||||
|
||||
else if(href_list["remove_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["remove_antagonist"]]
|
||||
if(antag) antag.remove_antagonist(src)
|
||||
|
||||
else if(href_list["equip_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["equip_antagonist"]]
|
||||
if(antag) antag.equip(src.current)
|
||||
|
||||
else if(href_list["unequip_antagonist"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["unequip_antagonist"]]
|
||||
if(antag) antag.unequip(src.current)
|
||||
|
||||
else if(href_list["move_antag_to_spawn"])
|
||||
var/datum/antagonist/antag = all_antag_types[href_list["move_antag_to_spawn"]]
|
||||
if(antag) antag.place_mob(src.current)
|
||||
|
||||
else if (href_list["role_edit"])
|
||||
var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist
|
||||
if (!new_role) return
|
||||
assigned_role = new_role
|
||||
@@ -509,334 +313,13 @@ datum/mind
|
||||
if(I in organs.implants)
|
||||
I.Del()
|
||||
break
|
||||
H << "\blue <Font size =3><B>Your loyalty implant has been deactivated.</B></FONT>"
|
||||
|
||||
H << "<span class='notice'><font size =3><B>Your loyalty implant has been deactivated.</font></span>"
|
||||
log_admin("[key_name_admin(usr)] has de-loyalty implanted [current].")
|
||||
if("add")
|
||||
H << "<span class='danger'><font size =3>You somehow have become the recepient of a loyalty transplant, and it just activated!</font>"
|
||||
H.implant_loyalty(H, override = TRUE)
|
||||
H << "\red <Font size =3><B>You somehow have become the recepient of a loyalty transplant, and it just activated!</B></FONT>"
|
||||
if(src in ticker.mode.revolutionaries)
|
||||
special_role = null
|
||||
ticker.mode.revolutionaries -= src
|
||||
src << "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>"
|
||||
if(src in ticker.mode.head_revolutionaries)
|
||||
special_role = null
|
||||
ticker.mode.head_revolutionaries -=src
|
||||
src << "\red <Font size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!</B></Font>"
|
||||
if(src in ticker.mode.cult)
|
||||
ticker.mode.cult -= src
|
||||
ticker.mode.update_cult_icons_removed(src)
|
||||
special_role = null
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
cult.memorize_cult_objectives(src)
|
||||
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!</B></FONT>"
|
||||
memory = ""
|
||||
if(src in ticker.mode.traitors)
|
||||
ticker.mode.traitors -= src
|
||||
special_role = null
|
||||
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
|
||||
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
|
||||
else
|
||||
|
||||
|
||||
else if (href_list["revolution"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
|
||||
switch(href_list["revolution"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.revolutionaries)
|
||||
ticker.mode.revolutionaries -= src
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a revolutionary!</B></FONT>"
|
||||
ticker.mode.update_rev_icons_removed(src)
|
||||
special_role = null
|
||||
if(src in ticker.mode.head_revolutionaries)
|
||||
ticker.mode.head_revolutionaries -= src
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a head revolutionary!</B></FONT>"
|
||||
ticker.mode.update_rev_icons_removed(src)
|
||||
special_role = null
|
||||
current.verbs -= /mob/living/carbon/human/proc/RevConvert
|
||||
log_admin("[key_name_admin(usr)] has de-rev'ed [current].")
|
||||
|
||||
if("rev")
|
||||
if(src in ticker.mode.head_revolutionaries)
|
||||
ticker.mode.head_revolutionaries -= src
|
||||
ticker.mode.update_rev_icons_removed(src)
|
||||
current << "\red <FONT size = 3><B>Revolution has been disappointed of your leader traits! You are a regular revolutionary now!</B></FONT>"
|
||||
else if(!(src in ticker.mode.revolutionaries))
|
||||
current << "\red <FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!</FONT>"
|
||||
show_objectives(src)
|
||||
else
|
||||
return
|
||||
ticker.mode.revolutionaries += src
|
||||
ticker.mode.update_rev_icons_added(src)
|
||||
special_role = "Revolutionary"
|
||||
log_admin("[key_name(usr)] has rev'ed [current].")
|
||||
|
||||
if("headrev")
|
||||
if(src in ticker.mode.revolutionaries)
|
||||
ticker.mode.revolutionaries -= src
|
||||
ticker.mode.update_rev_icons_removed(src)
|
||||
current << "\red <FONT size = 3><B>You have proved your devotion to revoltion! You are a head revolutionary now!</B></FONT>"
|
||||
show_objectives(src)
|
||||
else if(!(src in ticker.mode.head_revolutionaries))
|
||||
current << "\blue You are a member of the revolutionaries' leadership now!"
|
||||
else
|
||||
return
|
||||
if (ticker.mode.head_revolutionaries.len>0)
|
||||
// copy targets
|
||||
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
|
||||
if (valid_head)
|
||||
for (var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = src
|
||||
rev_obj.target = O.target
|
||||
rev_obj.explanation_text = "Assassinate [O.target.name], the [O.target.assigned_role]."
|
||||
objectives += rev_obj
|
||||
ticker.mode.greet_revolutionary(src,0)
|
||||
current.verbs += /mob/living/carbon/human/proc/RevConvert
|
||||
ticker.mode.head_revolutionaries += src
|
||||
ticker.mode.update_rev_icons_added(src)
|
||||
special_role = "Head Revolutionary"
|
||||
log_admin("[key_name_admin(usr)] has head-rev'ed [current].")
|
||||
|
||||
if("autoobjectives")
|
||||
ticker.mode.forge_revolutionary_objectives(src)
|
||||
ticker.mode.greet_revolutionary(src,0)
|
||||
usr << "\blue The objectives for revolution have been generated and shown to [key]"
|
||||
|
||||
if("flash")
|
||||
if (!ticker.mode.equip_revolutionary(current))
|
||||
usr << "\red Spawning flash failed!"
|
||||
|
||||
if("takeflash")
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (!flash)
|
||||
usr << "\red Deleting flash failed!"
|
||||
del(flash)
|
||||
|
||||
if("repairflash")
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
if (!flash)
|
||||
usr << "\red Repairing flash failed!"
|
||||
else
|
||||
flash.broken = 0
|
||||
|
||||
if("reequip")
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
del(flash)
|
||||
take_uplink()
|
||||
var/fail = 0
|
||||
fail |= !ticker.mode.equip_traitor(current, 1)
|
||||
fail |= !ticker.mode.equip_revolutionary(current)
|
||||
if (fail)
|
||||
usr << "\red Reequipping revolutionary goes wrong!"
|
||||
|
||||
else if (href_list["cult"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
switch(href_list["cult"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.cult)
|
||||
ticker.mode.cult -= src
|
||||
ticker.mode.update_cult_icons_removed(src)
|
||||
special_role = null
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
if(!config.objectives_disabled)
|
||||
cult.memorize_cult_objectives(src)
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a cultist!</B></FONT>"
|
||||
memory = ""
|
||||
log_admin("[key_name_admin(usr)] has de-cult'ed [current].")
|
||||
if("cultist")
|
||||
if(!(src in ticker.mode.cult))
|
||||
ticker.mode.cult += src
|
||||
ticker.mode.update_cult_icons_added(src)
|
||||
special_role = "Cultist"
|
||||
current << "<font color=\"purple\"><b><i>You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.</b></i></font>"
|
||||
current << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
if(!config.objectives_disabled)
|
||||
cult.memorize_cult_objectives(src)
|
||||
show_objectives(src)
|
||||
log_admin("[key_name_admin(usr)] has cult'ed [current].")
|
||||
if("tome")
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(H))
|
||||
var/obj/item/weapon/book/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
"backpack" = slot_in_backpack,
|
||||
"left pocket" = slot_l_store,
|
||||
"right pocket" = slot_r_store,
|
||||
"left hand" = slot_l_hand,
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
usr << "\red Spawning tome failed!"
|
||||
else
|
||||
H << "A tome, a message from your new master, appears in your [where]."
|
||||
|
||||
if("amulet")
|
||||
if (!ticker.mode.equip_cultist(current))
|
||||
usr << "\red Spawning amulet failed!"
|
||||
|
||||
else if (href_list["wizard"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
|
||||
switch(href_list["wizard"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.wizards)
|
||||
ticker.mode.wizards -= src
|
||||
special_role = null
|
||||
current.spellremove(current, config.feature_object_spell_system? "object":"verb")
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a wizard!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-wizard'ed [current].")
|
||||
if("wizard")
|
||||
if(!(src in ticker.mode.wizards))
|
||||
ticker.mode.wizards += src
|
||||
special_role = "Wizard"
|
||||
//ticker.mode.learn_basic_spells(current)
|
||||
current << "<B>\red You are the Space Wizard!</B>"
|
||||
show_objectives(src)
|
||||
log_admin("[key_name_admin(usr)] has wizard'ed [current].")
|
||||
if("lair")
|
||||
current.loc = pick(wizardstart)
|
||||
if("dressup")
|
||||
ticker.mode.equip_wizard(current)
|
||||
if("name")
|
||||
ticker.mode.name_wizard(current)
|
||||
if("autoobjectives")
|
||||
if(!config.objectives_disabled)
|
||||
ticker.mode.forge_wizard_objectives(src)
|
||||
usr << "\blue The objectives for wizard [key] have been generated. You can edit them and anounce manually."
|
||||
|
||||
else if (href_list["changeling"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
switch(href_list["changeling"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.changelings)
|
||||
ticker.mode.changelings -= src
|
||||
special_role = null
|
||||
current.remove_changeling_powers()
|
||||
current.verbs -= /datum/changeling/proc/EvolutionMenu
|
||||
if(changeling) del(changeling)
|
||||
current << "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-changeling'ed [current].")
|
||||
if("changeling")
|
||||
if(!(src in ticker.mode.changelings))
|
||||
ticker.mode.changelings += src
|
||||
ticker.mode.grant_changeling_powers(current)
|
||||
special_role = "Changeling"
|
||||
current << "<B><font color='red'>Your powers are awoken. A flash of memory returns to us...we are a changeling!</font></B>"
|
||||
show_objectives(src)
|
||||
log_admin("[key_name_admin(usr)] has changeling'ed [current].")
|
||||
if("autoobjectives")
|
||||
if(!config.objectives_disabled)
|
||||
ticker.mode.forge_changeling_objectives(src)
|
||||
usr << "\blue The objectives for changeling [key] have been generated. You can edit them and anounce manually."
|
||||
|
||||
if("initialdna")
|
||||
if( !changeling || !changeling.absorbed_dna.len )
|
||||
usr << "\red Resetting DNA failed!"
|
||||
else
|
||||
current.dna = changeling.absorbed_dna[1]
|
||||
current.real_name = current.dna.real_name
|
||||
current.UpdateAppearance()
|
||||
domutcheck(current, null)
|
||||
|
||||
else if (href_list["mercenary"])
|
||||
var/mob/living/carbon/human/H = current
|
||||
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
|
||||
switch(href_list["mercenary"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.syndicates)
|
||||
ticker.mode.syndicates -= src
|
||||
ticker.mode.update_synd_icons_removed(src)
|
||||
special_role = null
|
||||
for (var/datum/objective/nuclear/O in objectives)
|
||||
objectives-=O
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer an operative!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-merc'd [current].")
|
||||
if("mercenary")
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
ticker.mode.update_synd_icons_added(src)
|
||||
if (ticker.mode.syndicates.len==1)
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
special_role = "Mercenary"
|
||||
current << "\blue You are a [syndicate_name()] agent!"
|
||||
ticker.mode.forge_syndicate_objectives(src)
|
||||
ticker.mode.greet_syndicate(src)
|
||||
log_admin("[key_name_admin(usr)] has merc'd [current].")
|
||||
if("lair")
|
||||
current.loc = pick(synd_spawn)
|
||||
if("dressup")
|
||||
del(H.belt)
|
||||
del(H.back)
|
||||
del(H.l_ear)
|
||||
del(H.r_ear)
|
||||
del(H.gloves)
|
||||
del(H.head)
|
||||
del(H.shoes)
|
||||
del(H.wear_id)
|
||||
del(H.wear_suit)
|
||||
del(H.w_uniform)
|
||||
|
||||
if (!ticker.mode.equip_syndicate(current))
|
||||
usr << "\red Equipping an operative failed!"
|
||||
if("tellcode")
|
||||
var/code
|
||||
for (var/obj/machinery/nuclearbomb/bombue in machines)
|
||||
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
|
||||
code = bombue.r_code
|
||||
break
|
||||
if (code)
|
||||
store_memory("<B>Nuclear Bomb Code</B>: [code]", 0, 0)
|
||||
current << "The nuclear authorization code is: <B>[code]</B>"
|
||||
else
|
||||
usr << "\red No valid nuke found!"
|
||||
|
||||
else if (href_list["traitor"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
switch(href_list["traitor"])
|
||||
if("clear")
|
||||
if(src in ticker.mode.traitors)
|
||||
ticker.mode.traitors -= src
|
||||
special_role = null
|
||||
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a traitor!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
|
||||
if(isAI(current))
|
||||
var/mob/living/silicon/ai/A = current
|
||||
A.set_zeroth_law("")
|
||||
A.show_laws()
|
||||
|
||||
|
||||
if("traitor")
|
||||
if(!(src in ticker.mode.traitors))
|
||||
ticker.mode.traitors += src
|
||||
special_role = "traitor"
|
||||
current << "<B>\red You are a traitor!</B>"
|
||||
log_admin("[key_name_admin(usr)] has traitor'ed [current].")
|
||||
show_objectives()
|
||||
|
||||
if(istype(current, /mob/living/silicon))
|
||||
var/mob/living/silicon/A = current
|
||||
call(/datum/game_mode/proc/add_law_zero)(A)
|
||||
A.show_laws()
|
||||
|
||||
if("autoobjectives")
|
||||
if (!config.objectives_disabled)
|
||||
ticker.mode.forge_traitor_objectives(src)
|
||||
usr << "\blue The objectives for traitor [key] have been generated. You can edit them and anounce manually."
|
||||
|
||||
else if (href_list["monkey"])
|
||||
var/mob/living/L = current
|
||||
if (L.monkeyizing)
|
||||
@@ -890,33 +373,6 @@ datum/mind
|
||||
else if (href_list["silicon"])
|
||||
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
|
||||
switch(href_list["silicon"])
|
||||
if("unmalf")
|
||||
if(src in ticker.mode.malf_ai)
|
||||
ticker.mode.malf_ai -= src
|
||||
special_role = null
|
||||
|
||||
current.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
|
||||
/datum/game_mode/malfunction/proc/takeover,
|
||||
/datum/game_mode/malfunction/proc/ai_win,
|
||||
/client/proc/fireproof_core,
|
||||
/client/proc/upgrade_turrets,
|
||||
/client/proc/disable_rcd,
|
||||
/client/proc/overload_machine,
|
||||
/client/proc/blackout,
|
||||
/client/proc/interhack,
|
||||
/client/proc/reactivate_camera)
|
||||
|
||||
current:laws = new /datum/ai_laws/nanotrasen
|
||||
del(current:malf_picker)
|
||||
current:show_laws()
|
||||
current.icon_state = "ai"
|
||||
|
||||
current << "\red <FONT size = 3><B>You have been patched! You are no longer malfunctioning!</B></FONT>"
|
||||
log_admin("[key_name_admin(usr)] has de-malf'ed [current].")
|
||||
|
||||
if("malf")
|
||||
make_AI_Malf()
|
||||
log_admin("[key_name_admin(usr)] has malf'ed [current].")
|
||||
|
||||
if("unemag")
|
||||
var/mob/living/silicon/robot/R = current
|
||||
@@ -972,9 +428,6 @@ datum/mind
|
||||
if (!isnull(crystals))
|
||||
if (suplink)
|
||||
suplink.uses = crystals
|
||||
if("uplink")
|
||||
if (!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
|
||||
usr << "\red Equipping an operative failed!"
|
||||
|
||||
else if (href_list["obj_announce"])
|
||||
var/obj_count = 1
|
||||
@@ -982,7 +435,6 @@ datum/mind
|
||||
for(var/datum/objective/objective in objectives)
|
||||
current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
edit_memory()
|
||||
/*
|
||||
proc/clear_memory(var/silent = 1)
|
||||
@@ -1029,151 +481,6 @@ datum/mind
|
||||
del(H)
|
||||
|
||||
|
||||
proc/make_AI_Malf()
|
||||
if(!(src in ticker.mode.malf_ai))
|
||||
ticker.mode.malf_ai += src
|
||||
|
||||
current.verbs += /mob/living/silicon/ai/proc/choose_modules
|
||||
current.verbs += /datum/game_mode/malfunction/proc/takeover
|
||||
current:malf_picker = new /datum/AI_Module/module_picker
|
||||
current:laws = new /datum/ai_laws/nanotrasen/malfunction
|
||||
current:show_laws()
|
||||
current << "<b>System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first...</b>"
|
||||
special_role = "malfunction"
|
||||
current.icon_state = "ai-malf"
|
||||
|
||||
proc/make_Traitor()
|
||||
if(!(src in ticker.mode.traitors))
|
||||
ticker.mode.traitors += src
|
||||
special_role = "traitor"
|
||||
if (!config.objectives_disabled)
|
||||
ticker.mode.forge_traitor_objectives(src)
|
||||
ticker.mode.finalize_traitor(src)
|
||||
ticker.mode.greet_traitor(src)
|
||||
|
||||
proc/make_Nuke()
|
||||
if(!(src in ticker.mode.syndicates))
|
||||
ticker.mode.syndicates += src
|
||||
ticker.mode.update_synd_icons_added(src)
|
||||
if (ticker.mode.syndicates.len==1)
|
||||
ticker.mode.prepare_syndicate_leader(src)
|
||||
else
|
||||
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
|
||||
special_role = "Mercenary"
|
||||
assigned_role = "MODE"
|
||||
current << "\blue You are a [syndicate_name()] mercenary!"
|
||||
ticker.mode.forge_syndicate_objectives(src)
|
||||
ticker.mode.greet_syndicate(src)
|
||||
|
||||
current.loc = pick(synd_spawn)
|
||||
|
||||
var/mob/living/carbon/human/H = current
|
||||
del(H.belt)
|
||||
del(H.back)
|
||||
del(H.l_ear)
|
||||
del(H.r_ear)
|
||||
del(H.gloves)
|
||||
del(H.head)
|
||||
del(H.shoes)
|
||||
del(H.wear_id)
|
||||
del(H.wear_suit)
|
||||
del(H.w_uniform)
|
||||
|
||||
ticker.mode.equip_syndicate(current)
|
||||
|
||||
proc/make_Changling()
|
||||
if(!(src in ticker.mode.changelings))
|
||||
ticker.mode.changelings += src
|
||||
ticker.mode.grant_changeling_powers(current)
|
||||
special_role = "Changeling"
|
||||
if(!config.objectives_disabled)
|
||||
ticker.mode.forge_changeling_objectives(src)
|
||||
ticker.mode.greet_changeling(src)
|
||||
|
||||
proc/make_Wizard()
|
||||
if(!(src in ticker.mode.wizards))
|
||||
ticker.mode.wizards += src
|
||||
special_role = "Wizard"
|
||||
assigned_role = "MODE"
|
||||
//ticker.mode.learn_basic_spells(current)
|
||||
if(!wizardstart.len)
|
||||
current.loc = pick(latejoin)
|
||||
current << "HOT INSERTION, GO GO GO"
|
||||
else
|
||||
current.loc = pick(wizardstart)
|
||||
|
||||
ticker.mode.equip_wizard(current)
|
||||
for(var/obj/item/weapon/spellbook/S in current.contents)
|
||||
S.op = 0
|
||||
ticker.mode.name_wizard(current)
|
||||
ticker.mode.forge_wizard_objectives(src)
|
||||
ticker.mode.greet_wizard(src)
|
||||
|
||||
|
||||
proc/make_Cultist()
|
||||
if(!(src in ticker.mode.cult))
|
||||
ticker.mode.cult += src
|
||||
ticker.mode.update_cult_icons_added(src)
|
||||
special_role = "Cultist"
|
||||
current << "<font color=\"purple\"><b><i>You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.</b></i></font>"
|
||||
current << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
|
||||
var/datum/game_mode/cult/cult = ticker.mode
|
||||
if (istype(cult))
|
||||
cult.memorize_cult_objectives(src)
|
||||
else
|
||||
var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it."
|
||||
current << "<B>Objective #1</B>: [explanation]"
|
||||
current.memory += "<B>Objective #1</B>: [explanation]<BR>"
|
||||
current << "The convert rune is join blood self"
|
||||
current.memory += "The convert rune is join blood self<BR>"
|
||||
|
||||
var/mob/living/carbon/human/H = current
|
||||
if (istype(H))
|
||||
var/obj/item/weapon/book/tome/T = new(H)
|
||||
|
||||
var/list/slots = list (
|
||||
"backpack" = slot_in_backpack,
|
||||
"left pocket" = slot_l_store,
|
||||
"right pocket" = slot_r_store,
|
||||
"left hand" = slot_l_hand,
|
||||
"right hand" = slot_r_hand,
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(T, slots)
|
||||
if (!where)
|
||||
else
|
||||
H << "A tome, a message from your new master, appears in your [where]."
|
||||
|
||||
if (!ticker.mode.equip_cultist(current))
|
||||
H << "Spawning an amulet from your Master failed."
|
||||
|
||||
proc/make_Rev()
|
||||
if (ticker.mode.head_revolutionaries.len>0)
|
||||
// copy targets
|
||||
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
|
||||
if (valid_head)
|
||||
for (var/datum/objective/mutiny/O in valid_head.objectives)
|
||||
var/datum/objective/mutiny/rev_obj = new
|
||||
rev_obj.owner = src
|
||||
rev_obj.target = O.target
|
||||
rev_obj.explanation_text = "Assassinate [O.target.current.real_name], the [O.target.assigned_role]."
|
||||
objectives += rev_obj
|
||||
ticker.mode.greet_revolutionary(src,0)
|
||||
ticker.mode.head_revolutionaries += src
|
||||
ticker.mode.update_rev_icons_added(src)
|
||||
special_role = "Head Revolutionary"
|
||||
|
||||
ticker.mode.forge_revolutionary_objectives(src)
|
||||
ticker.mode.greet_revolutionary(src,0)
|
||||
|
||||
var/list/L = current.get_contents()
|
||||
var/obj/item/device/flash/flash = locate() in L
|
||||
del(flash)
|
||||
take_uplink()
|
||||
var/fail = 0
|
||||
// fail |= !ticker.mode.equip_traitor(current, 1)
|
||||
fail |= !ticker.mode.equip_revolutionary(current)
|
||||
|
||||
|
||||
// check whether this mind's mob has been brigged for the given duration
|
||||
// have to call this periodically for the duration to work properly
|
||||
proc/is_brigged(duration)
|
||||
|
||||
@@ -1,286 +0,0 @@
|
||||
/obj/effect/proc_holder
|
||||
var/panel = "Debug"//What panel the proc holder needs to go on.
|
||||
|
||||
var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now
|
||||
|
||||
/obj/effect/proc_holder/spell
|
||||
name = "Spell"
|
||||
desc = "A wizard spell"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
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/charge_type = "recharge" //can be recharge or charges, see charge_max and charge_counter descriptions; can also be based on the holder's vars now, use "holder_var" for that
|
||||
|
||||
var/charge_max = 100 //recharge time in deciseconds if charge_type = "recharge" or starting charges if charge_type = "charges"
|
||||
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each decisecond if charge_type = "recharge" or -- each cast if charge_type = "charges"
|
||||
|
||||
var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
|
||||
var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
|
||||
|
||||
var/clothes_req = 1 //see if it requires clothes
|
||||
var/stat_allowed = 0 //see if it requires being conscious/alive, need to set to 1 for ghostpells
|
||||
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; outer radius for aoe spells
|
||||
var/message = "" //whatever it says to the guy affected by it
|
||||
var/selection_type = "view" //can be "range" or "view"
|
||||
|
||||
var/overlay = 0
|
||||
var/overlay_icon = 'icons/obj/wizard.dmi'
|
||||
var/overlay_icon_state = "spell"
|
||||
var/overlay_lifespan = 0
|
||||
|
||||
var/sparks_spread = 0
|
||||
var/sparks_amt = 0 //cropped at 10
|
||||
var/smoke_spread = 0 //1 - harmless, 2 - harmful
|
||||
var/smoke_amt = 0 //cropped at 10
|
||||
|
||||
var/critfailchance = 0
|
||||
var/centcomm_cancast = 1 //Whether or not the spell should be allowed on z2
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0,mob/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
|
||||
|
||||
if(!(src in usr.spell_list))
|
||||
usr << "\red You shouldn't have this spell! Something's wrong."
|
||||
return 0
|
||||
|
||||
if(usr.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
|
||||
return 0
|
||||
|
||||
if(!skipcharge)
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
if(charge_counter < charge_max)
|
||||
usr << "[name] is still recharging."
|
||||
return 0
|
||||
if("charges")
|
||||
if(!charge_counter)
|
||||
usr << "[name] has no charges left."
|
||||
return 0
|
||||
|
||||
if(usr.stat && !stat_allowed)
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
|
||||
if(ishuman(usr) || ismonkey(usr))
|
||||
if(istype(usr.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
usr << "Mmmf mrrfff!"
|
||||
return 0
|
||||
|
||||
if(clothes_req) //clothes check
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
return 0
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/void/wizard))
|
||||
usr << "I don't feel strong enough without my robe."
|
||||
return 0
|
||||
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
|
||||
usr << "I don't feel strong enough without my sandals."
|
||||
return 0
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/void/wizard))
|
||||
usr << "I don't feel strong enough without my hat."
|
||||
return 0
|
||||
|
||||
if(!skipcharge)
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
charge_counter = 0 //doesn't start recharging until the targets selecting ends
|
||||
if("charges")
|
||||
charge_counter-- //returns the charge if the targets selecting fails
|
||||
if("holdervar")
|
||||
adjust_var(user, holder_var_type, holder_var_amount)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/invocation(mob/user = usr) //spelling the spell out and setting it on recharge/reducing charges amount
|
||||
|
||||
switch(invocation_type)
|
||||
if("shout")
|
||||
if(prob(50))//Auto-mute? Fuck that noise
|
||||
usr.say(invocation)
|
||||
else
|
||||
usr.say(replacetext(invocation," ","`"))
|
||||
if(usr.gender==MALE)
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
else
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
if("whisper")
|
||||
if(prob(50))
|
||||
usr.whisper(invocation)
|
||||
else
|
||||
usr.whisper(replacetext(invocation," ","`"))
|
||||
|
||||
/obj/effect/proc_holder/spell/New()
|
||||
..()
|
||||
|
||||
charge_counter = charge_max
|
||||
|
||||
/obj/effect/proc_holder/spell/Click()
|
||||
if(cast_check())
|
||||
choose_targets()
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/choose_targets(mob/user = usr) //depends on subtype - /targeted or /aoe_turf
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/start_recharge()
|
||||
while(charge_counter < charge_max)
|
||||
sleep(1)
|
||||
charge_counter++
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1) //if recharge is started is important for the trigger spells
|
||||
before_cast(targets)
|
||||
invocation()
|
||||
spawn(0)
|
||||
if(charge_type == "recharge" && recharge)
|
||||
start_recharge()
|
||||
if(prob(critfailchance))
|
||||
critfail(targets)
|
||||
else
|
||||
cast(targets)
|
||||
after_cast(targets)
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/before_cast(list/targets)
|
||||
if(overlay)
|
||||
for(var/atom/target in targets)
|
||||
var/location
|
||||
if(istype(target,/mob/living))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
location = target
|
||||
var/obj/effect/overlay/spell = new /obj/effect/overlay(location)
|
||||
spell.icon = overlay_icon
|
||||
spell.icon_state = overlay_icon_state
|
||||
spell.anchored = 1
|
||||
spell.density = 0
|
||||
spawn(overlay_lifespan)
|
||||
del(spell)
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/after_cast(list/targets)
|
||||
for(var/atom/target in targets)
|
||||
var/location
|
||||
if(istype(target,/mob/living))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
location = target
|
||||
if(istype(target,/mob/living) && message)
|
||||
target << text("[message]")
|
||||
if(sparks_spread)
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
|
||||
sparks.start()
|
||||
if(smoke_spread)
|
||||
if(smoke_spread == 1)
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
|
||||
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
|
||||
smoke.start()
|
||||
else if(smoke_spread == 2)
|
||||
var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad()
|
||||
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
|
||||
smoke.start()
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/cast(list/targets)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/critfail(list/targets)
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/revert_cast(mob/user = usr) //resets recharge or readds a charge
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
charge_counter = charge_max
|
||||
if("charges")
|
||||
charge_counter++
|
||||
if("holdervar")
|
||||
adjust_var(user, holder_var_type, -holder_var_amount)
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
|
||||
switch(type)
|
||||
if("bruteloss")
|
||||
target.adjustBruteLoss(amount)
|
||||
if("fireloss")
|
||||
target.adjustFireLoss(amount)
|
||||
if("toxloss")
|
||||
target.adjustToxLoss(amount)
|
||||
if("oxyloss")
|
||||
target.adjustOxyLoss(amount)
|
||||
if("stunned")
|
||||
target.AdjustStunned(amount)
|
||||
if("weakened")
|
||||
target.AdjustWeakened(amount)
|
||||
if("paralysis")
|
||||
target.AdjustParalysis(amount)
|
||||
else
|
||||
target.vars[type] += amount //I bear no responsibility for the runtimes that'll happen if you try to adjust non-numeric or even non-existant vars
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted //can mean aoe for mobs (limited/unlimited number) or one target mob
|
||||
var/max_targets = 1 //leave 0 for unlimited targets in range, 1 for one selectable target in range, more for limited number of casts (can all target one guy, depends on target_ignore_prev) in range
|
||||
var/target_ignore_prev = 1 //only important if max_targets > 1, affects if the spell can be cast multiple times at one person from one cast
|
||||
var/include_user = 0 //if it includes usr in the target list
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf //affects all turfs in view or range (depends)
|
||||
var/inner_radius = -1 //for all your ring spell needs
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/choose_targets(mob/user = usr)
|
||||
var/list/targets = list()
|
||||
|
||||
switch(max_targets)
|
||||
if(0) //unlimited
|
||||
for(var/mob/living/target in view_or_range(range, user, selection_type))
|
||||
targets += target
|
||||
if(1) //single target can be picked
|
||||
if(range < 0)
|
||||
targets += user
|
||||
else
|
||||
var/possible_targets = list()
|
||||
|
||||
for(var/mob/living/M in view_or_range(range, user, selection_type))
|
||||
if(!include_user && user == M)
|
||||
continue
|
||||
possible_targets += M
|
||||
|
||||
targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
|
||||
else
|
||||
var/list/possible_targets = list()
|
||||
for(var/mob/living/target in view_or_range(range, user, selection_type))
|
||||
possible_targets += target
|
||||
for(var/i=1,i<=max_targets,i++)
|
||||
if(!possible_targets.len)
|
||||
break
|
||||
if(target_ignore_prev)
|
||||
var/target = pick(possible_targets)
|
||||
possible_targets -= target
|
||||
targets += target
|
||||
else
|
||||
targets += pick(possible_targets)
|
||||
|
||||
if(!include_user && (user in targets))
|
||||
targets -= user
|
||||
|
||||
if(!targets.len) //doesn't waste the spell
|
||||
revert_cast(user)
|
||||
return
|
||||
|
||||
perform(targets)
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/choose_targets(mob/user = usr)
|
||||
var/list/targets = list()
|
||||
|
||||
for(var/turf/target in view_or_range(range,user,selection_type))
|
||||
if(!(target in view_or_range(inner_radius,user,selection_type)))
|
||||
targets += target
|
||||
|
||||
if(!targets.len) //doesn't waste the spell
|
||||
revert_cast()
|
||||
return
|
||||
|
||||
perform(targets)
|
||||
|
||||
return
|
||||
@@ -1,82 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport
|
||||
name = "Area teleport"
|
||||
desc = "This spell teleports you to a type of area of your selection."
|
||||
|
||||
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
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/perform(list/targets, recharge = 1)
|
||||
var/thearea = before_cast(targets)
|
||||
if(!thearea || !cast_check(1))
|
||||
revert_cast()
|
||||
return
|
||||
invocation(thearea)
|
||||
spawn(0)
|
||||
if(charge_type == "recharge" && recharge)
|
||||
start_recharge()
|
||||
cast(targets,thearea)
|
||||
after_cast(targets)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/before_cast(list/targets)
|
||||
var/A = null
|
||||
|
||||
if(!randomise_selection)
|
||||
A = input("Area to teleport to", "Teleport", A) in teleportlocs
|
||||
else
|
||||
A = pick(teleportlocs)
|
||||
|
||||
var/area/thearea = teleportlocs[A]
|
||||
|
||||
return thearea
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
|
||||
for(var/mob/living/target in targets)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density)
|
||||
var/clear = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = 0
|
||||
break
|
||||
if(clear)
|
||||
L+=T
|
||||
|
||||
if(!L.len)
|
||||
usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
|
||||
return
|
||||
|
||||
if(target && target.buckled)
|
||||
target.buckled.unbuckle_mob()
|
||||
|
||||
var/list/tempL = L
|
||||
var/attempt = null
|
||||
var/success = 0
|
||||
while(tempL.len)
|
||||
attempt = pick(tempL)
|
||||
success = target.Move(attempt)
|
||||
if(!success)
|
||||
tempL.Remove(attempt)
|
||||
else
|
||||
break
|
||||
|
||||
if(!success)
|
||||
target.loc = pick(L)
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/invocation(area/chosenarea = null)
|
||||
if(!invocation_area || !chosenarea)
|
||||
..()
|
||||
else
|
||||
switch(invocation_type)
|
||||
if("shout")
|
||||
usr.say("[invocation] [uppertext(chosenarea.name)]")
|
||||
if(usr.gender==MALE)
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
else
|
||||
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
|
||||
if("whisper")
|
||||
usr.whisper("[invocation] [uppertext(chosenarea.name)]")
|
||||
|
||||
return
|
||||
@@ -1,87 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure
|
||||
name = "Conjure"
|
||||
desc = "This spell conjures objs of the specified types in range."
|
||||
|
||||
var/list/summon_type = list() //determines what exactly will be summoned
|
||||
//should be text, like list("/obj/machinery/bot/ed209")
|
||||
|
||||
var/summon_lifespan = 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
|
||||
|
||||
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
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets)
|
||||
|
||||
for(var/turf/T in targets)
|
||||
if(T.density && !summon_ignore_density)
|
||||
targets -= T
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 50, 1)
|
||||
|
||||
if(do_after(usr,delay))
|
||||
for(var/i=0,i<summon_amt,i++)
|
||||
if(!targets.len)
|
||||
break
|
||||
var/summoned_object_type = pick(summon_type)
|
||||
var/spawn_place = pick(targets)
|
||||
if(summon_ignore_prev_spawn_points)
|
||||
targets -= spawn_place
|
||||
if(ispath(summoned_object_type,/turf))
|
||||
var/turf/O = spawn_place
|
||||
var/turf/N = summoned_object_type
|
||||
O.ChangeTurf(N)
|
||||
else
|
||||
var/atom/summoned_object = new summoned_object_type(spawn_place)
|
||||
|
||||
for(var/varName in newVars)
|
||||
if(varName in summoned_object.vars)
|
||||
summoned_object.vars[varName] = newVars[varName]
|
||||
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
del(summoned_object)
|
||||
else
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
charge_counter = charge_max - 5//So you don't lose charge for a failed spell(Also prevents most over-fill)
|
||||
if("charges")
|
||||
charge_counter++//Ditto, just for different spell types
|
||||
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/summonEdSwarm //test purposes
|
||||
name = "Dispense Wizard Justice"
|
||||
desc = "This spell dispenses wizard justice."
|
||||
|
||||
summon_type = list(/obj/item/weapon/secbot_assembly/ed209_assembly)
|
||||
summon_amt = 10
|
||||
range = 3
|
||||
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
|
||||
|
||||
|
||||
//This was previously left in the old wizard code, not being included.
|
||||
//Wasn't sure if I should transfer it here, or to code/datums/spells.dm
|
||||
//But I decided because it is a conjuration related object it would fit better here
|
||||
//Feel free to change this, I don't know.
|
||||
/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
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj, var/def_zone)
|
||||
var/turf/T = get_turf(src.loc)
|
||||
if(T)
|
||||
for(var/mob/M in T)
|
||||
Proj.on_hit(M,M.bullet_act(Proj, def_zone))
|
||||
return
|
||||
@@ -1,86 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/dumbfire
|
||||
|
||||
var/projectile_type = ""
|
||||
var/activate_on_collision = 1
|
||||
|
||||
var/proj_icon = 'icons/obj/projectiles.dmi'
|
||||
var/proj_icon_state = "spell"
|
||||
var/proj_name = "a spell projectile"
|
||||
|
||||
var/proj_trail = 0 //if it leaves a trail
|
||||
var/proj_trail_lifespan = 0 //deciseconds
|
||||
var/proj_trail_icon = 'icons/obj/wizard.dmi'
|
||||
var/proj_trail_icon_state = "trail"
|
||||
|
||||
var/proj_type = "/obj/effect/proc_holder/spell" //IMPORTANT use only subtypes of this
|
||||
|
||||
var/proj_insubstantial = 0 //if it can pass through dense objects or not
|
||||
var/proj_trigger_range = 1 //the range from target at which the projectile triggers cast(target)
|
||||
|
||||
var/proj_lifespan = 100 //in deciseconds * proj_step_delay
|
||||
var/proj_step_delay = 1 //lower = faster
|
||||
|
||||
/obj/effect/proc_holder/spell/dumbfire/choose_targets(mob/user = usr)
|
||||
|
||||
var/turf/T = get_turf(usr)
|
||||
for(var/i = 1; i < range; i++)
|
||||
var/turf/new_turf = get_step(T, usr.dir)
|
||||
if(new_turf.density)
|
||||
break
|
||||
T = new_turf
|
||||
perform(list(T))
|
||||
|
||||
/obj/effect/proc_holder/spell/dumbfire/cast(list/targets, mob/user = usr)
|
||||
|
||||
for(var/turf/target in targets)
|
||||
spawn(0)
|
||||
var/obj/effect/proc_holder/spell/targeted/projectile
|
||||
if(istext(proj_type))
|
||||
var/projectile_type = text2path(proj_type)
|
||||
projectile = new projectile_type(user)
|
||||
if(istype(proj_type,/obj/effect/proc_holder/spell))
|
||||
projectile = new /obj/effect/proc_holder/spell/targeted/trigger(user)
|
||||
projectile:linked_spells += proj_type
|
||||
projectile.icon = proj_icon
|
||||
projectile.icon_state = proj_icon_state
|
||||
projectile.set_dir(get_dir(projectile, target))
|
||||
projectile.name = proj_name
|
||||
|
||||
var/current_loc = usr.loc
|
||||
|
||||
projectile.loc = current_loc
|
||||
|
||||
for(var/i = 0,i < proj_lifespan,i++)
|
||||
if(!projectile)
|
||||
break
|
||||
|
||||
if(proj_insubstantial)
|
||||
projectile.loc = get_step(projectile, projectile.dir)
|
||||
else
|
||||
step(projectile, projectile.dir)
|
||||
|
||||
if(projectile.loc == current_loc || i == proj_lifespan)
|
||||
projectile.cast(current_loc)
|
||||
break
|
||||
|
||||
var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - usr
|
||||
if(L)
|
||||
projectile.cast(L.loc)
|
||||
break
|
||||
|
||||
if(proj_trail && projectile)
|
||||
spawn(0)
|
||||
if(projectile)
|
||||
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
|
||||
trail.icon = proj_trail_icon
|
||||
trail.icon_state = proj_trail_icon_state
|
||||
trail.density = 0
|
||||
spawn(proj_trail_lifespan)
|
||||
del(trail)
|
||||
|
||||
current_loc = projectile.loc
|
||||
|
||||
sleep(proj_step_delay)
|
||||
|
||||
if(projectile)
|
||||
del(projectile)
|
||||
@@ -1,13 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/emplosion
|
||||
name = "Emplosion"
|
||||
desc = "This spell emplodes an area."
|
||||
|
||||
var/emp_heavy = 2
|
||||
var/emp_light = 3
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
empulse(target.loc, emp_heavy, emp_light)
|
||||
|
||||
return
|
||||
@@ -1,106 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt
|
||||
name = "Ethereal Jaunt"
|
||||
desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 1
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
centcomm_cancast = 0 //Prevent people from getting to centcomm
|
||||
|
||||
var phaseshift = 0
|
||||
var/jaunt_duration = 50 //in deciseconds
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
|
||||
for(var/mob/living/target in targets)
|
||||
spawn(0)
|
||||
|
||||
if(target.buckled)
|
||||
var/obj/structure/bed/buckled_to = target.buckled.
|
||||
buckled_to.unbuckle_mob()
|
||||
|
||||
var/mobloc = get_turf(target.loc)
|
||||
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )
|
||||
animation.name = "water"
|
||||
animation.density = 0
|
||||
animation.anchored = 1
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.icon_state = "liquify"
|
||||
animation.layer = 5
|
||||
animation.master = holder
|
||||
if(phaseshift == 1)
|
||||
animation.dir = target.dir
|
||||
flick("phase_shift",animation)
|
||||
target.loc = holder
|
||||
target.client.eye = holder
|
||||
sleep(jaunt_duration)
|
||||
mobloc = get_turf(target.loc)
|
||||
animation.loc = mobloc
|
||||
target.canmove = 0
|
||||
sleep(20)
|
||||
animation.dir = target.dir
|
||||
flick("phase_shift2",animation)
|
||||
sleep(5)
|
||||
if(!target.Move(mobloc))
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
var/turf/T = get_step(mobloc, direction)
|
||||
if(T)
|
||||
if(target.Move(T))
|
||||
break
|
||||
target.canmove = 1
|
||||
target.client.eye = target
|
||||
del(animation)
|
||||
del(holder)
|
||||
else
|
||||
flick("liquify",animation)
|
||||
target.loc = holder
|
||||
target.client.eye = holder
|
||||
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
|
||||
steam.set_up(10, 0, mobloc)
|
||||
steam.start()
|
||||
sleep(jaunt_duration)
|
||||
mobloc = get_turf(target.loc)
|
||||
animation.loc = mobloc
|
||||
steam.location = mobloc
|
||||
steam.start()
|
||||
target.canmove = 0
|
||||
sleep(20)
|
||||
flick("reappear",animation)
|
||||
sleep(5)
|
||||
if(!target.Move(mobloc))
|
||||
for(var/direction in list(1,2,4,8,5,6,9,10))
|
||||
var/turf/T = get_step(mobloc, direction)
|
||||
if(T)
|
||||
if(target.Move(T))
|
||||
break
|
||||
target.canmove = 1
|
||||
target.client.eye = target
|
||||
del(animation)
|
||||
del(holder)
|
||||
|
||||
/obj/effect/dummy/spell_jaunt
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "nothing"
|
||||
var/canmove = 1
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
|
||||
if (!src.canmove) return
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
if(!(newLoc.flags & NOJAUNT))
|
||||
loc = newLoc
|
||||
else
|
||||
user << "<span class='warning'>Some strange aura is blocking the way!</span>"
|
||||
src.canmove = 0
|
||||
spawn(2) src.canmove = 1
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/ex_act(blah)
|
||||
return
|
||||
/obj/effect/dummy/spell_jaunt/bullet_act(blah)
|
||||
return
|
||||
@@ -1,15 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/explosion
|
||||
name = "Explosion"
|
||||
desc = "This spell explodes an area."
|
||||
|
||||
var/ex_severe = 1
|
||||
var/ex_heavy = 2
|
||||
var/ex_light = 3
|
||||
var/ex_flash = 4
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
|
||||
|
||||
return
|
||||
@@ -1,31 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/genetic
|
||||
name = "Genetic"
|
||||
desc = "This spell inflicts a set of mutations and disabilities upon the target."
|
||||
|
||||
var/disabilities = 0 //bits
|
||||
var/list/mutations = list() //mutation strings
|
||||
var/duration = 100 //deciseconds
|
||||
/*
|
||||
Disabilities
|
||||
1st bit - ?
|
||||
2nd bit - ?
|
||||
3rd bit - ?
|
||||
4th bit - ?
|
||||
5th bit - ?
|
||||
6th bit - ?
|
||||
*/
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Add(x)
|
||||
target.disabilities |= disabilities
|
||||
target.update_mutations() //update target's mutation overlays
|
||||
spawn(duration)
|
||||
for(var/x in mutations)
|
||||
target.mutations.Remove(x)
|
||||
target.disabilities &= ~disabilities
|
||||
target.update_mutations()
|
||||
|
||||
return
|
||||
@@ -1,50 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/horsemask
|
||||
name = "Curse of the Horseman"
|
||||
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
|
||||
school = "transmutation"
|
||||
charge_type = "recharge"
|
||||
charge_max = 150
|
||||
charge_counter = 0
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
selection_type = "range"
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/horsemask/cast(list/targets, mob/user = usr)
|
||||
if(!targets.len)
|
||||
user << "<span class='notice'>No target found in range.</span>"
|
||||
return
|
||||
|
||||
var/mob/living/carbon/target = targets[1]
|
||||
|
||||
if(!(target.type in compatible_mobs))
|
||||
user << "<span class='notice'>It'd be stupid to curse [target] with a horse's head!</span>"
|
||||
return
|
||||
|
||||
if(!(target in oview(range)))//If they are not in overview after selection.
|
||||
user << "<span class='notice'>They are too far away!</span>"
|
||||
return
|
||||
|
||||
var/obj/item/clothing/mask/horsehead/magic/magichead = new /obj/item/clothing/mask/horsehead/magic
|
||||
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
|
||||
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
|
||||
target.equip_to_slot(magichead, slot_wear_mask)
|
||||
|
||||
flick("e_flash", target.flash)
|
||||
|
||||
//item used by the horsehead spell
|
||||
/obj/item/clothing/mask/horsehead/magic
|
||||
//flags_inv = null //so you can still see their face... no. How can you recognize someone when their face is completely different?
|
||||
voicechange = 1 //NEEEEIIGHH
|
||||
|
||||
dropped(mob/user as mob)
|
||||
canremove = 1
|
||||
..()
|
||||
|
||||
equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_wear_mask)
|
||||
canremove = 0 //curses!
|
||||
..()
|
||||
@@ -1,59 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler
|
||||
name = "Inflict Handler"
|
||||
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
|
||||
|
||||
var/amt_weakened = 0
|
||||
var/amt_paralysis = 0
|
||||
var/amt_stunned = 0
|
||||
|
||||
//set to negatives for healing
|
||||
var/amt_dam_fire = 0
|
||||
var/amt_dam_brute = 0
|
||||
var/amt_dam_oxy = 0
|
||||
var/amt_dam_tox = 0
|
||||
|
||||
var/amt_eye_blind = 0
|
||||
var/amt_eye_blurry = 0
|
||||
|
||||
var/destroys = "none" //can be "none", "gib" or "disintegrate"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
switch(destroys)
|
||||
if("gib")
|
||||
target.gib()
|
||||
if("gib_brain")
|
||||
if(ishuman(target) || ismonkey(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(!C.has_brain()) // Their brain is already taken out
|
||||
var/obj/item/organ/brain/B = new(C.loc)
|
||||
B.transfer_identity(C)
|
||||
target.gib()
|
||||
if("disintegrate")
|
||||
target.dust()
|
||||
|
||||
if(!target)
|
||||
continue
|
||||
//damage
|
||||
if(amt_dam_brute > 0)
|
||||
if(amt_dam_fire >= 0)
|
||||
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
else if (amt_dam_fire < 0)
|
||||
target.take_overall_damage(amt_dam_brute,0)
|
||||
target.heal_overall_damage(0,amt_dam_fire)
|
||||
else if(amt_dam_brute < 0)
|
||||
if(amt_dam_fire > 0)
|
||||
target.take_overall_damage(0,amt_dam_fire)
|
||||
target.heal_overall_damage(amt_dam_brute,0)
|
||||
else if (amt_dam_fire <= 0)
|
||||
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
target.adjustToxLoss(amt_dam_tox)
|
||||
target.oxyloss += amt_dam_oxy
|
||||
//disabling
|
||||
target.Weaken(amt_weakened)
|
||||
target.Paralyse(amt_paralysis)
|
||||
target.Stun(amt_stunned)
|
||||
|
||||
target.eye_blind += amt_eye_blind
|
||||
target.eye_blurry += amt_eye_blurry
|
||||
@@ -1,20 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock
|
||||
name = "Knock"
|
||||
desc = "This spell opens nearby doors and does not require wizard garb."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "AULIE OXIN FIERA"
|
||||
invocation_type = "whisper"
|
||||
range = 3
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets)
|
||||
for(var/turf/T in targets)
|
||||
for(var/obj/machinery/door/door in T.contents)
|
||||
spawn(1)
|
||||
if(istype(door,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = door
|
||||
A.unlock(1) //forced because it's magic!
|
||||
door.open()
|
||||
return
|
||||
@@ -1,114 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
name = "Mind Transfer"
|
||||
desc = "This spell allows the user to switch bodies with a target."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
invocation = "GIN'YU CAPAN"
|
||||
invocation_type = "whisper"
|
||||
range = 1
|
||||
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human,/mob/living/carbon/monkey) //which types of mobs are affected by the spell. NOTE: change at your own risk
|
||||
var/base_spell_loss_chance = 20 //base probability of the wizard losing a spell in the process
|
||||
var/spell_loss_chance_modifier = 7 //amount of probability of losing a spell added per spell (mind_transfer included)
|
||||
var/spell_loss_amount = 1 //the maximum amount of spells possible to lose during a single transfer
|
||||
var/msg_wait = 500 //how long in deciseconds it waits before telling that body doesn't feel right or mind swap robbed of a spell
|
||||
var/paralysis_amount_caster = 20 //how much the caster is paralysed for after the spell
|
||||
var/paralysis_amount_victim = 20 //how much the victim is paralysed for after the spell
|
||||
|
||||
/*
|
||||
Urist: I don't feel like figuring out how you store object spells so I'm leaving this for you to do.
|
||||
Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering.
|
||||
Also, you never added distance checking after target is selected. I've went ahead and did that.
|
||||
*/
|
||||
/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets,mob/user = usr)
|
||||
if(!targets.len)
|
||||
user << "No mind found."
|
||||
return
|
||||
|
||||
if(targets.len > 1)
|
||||
user << "Too many minds! You're not a hive damnit!"//Whaa...aat?
|
||||
return
|
||||
|
||||
var/mob/living/target = targets[1]
|
||||
|
||||
if(!(target in oview(range)))//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it.
|
||||
user << "They are too far away!"
|
||||
return
|
||||
|
||||
if(!(target.type in compatible_mobs))
|
||||
user << "Their mind isn't compatible with yours."
|
||||
return
|
||||
|
||||
if(target.stat == DEAD)
|
||||
user << "You didn't study necromancy back at the Space Wizard Federation academy."
|
||||
return
|
||||
|
||||
if(!target.key || !target.mind)
|
||||
user << "They appear to be catatonic. Not even magic can affect their vacant mind."
|
||||
return
|
||||
|
||||
if(target.mind.special_role in protected_roles)
|
||||
user << "Their mind is resisting your spell."
|
||||
return
|
||||
|
||||
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
|
||||
var/mob/caster = user//The wizard/whomever doing the body transferring.
|
||||
|
||||
//SPELL LOSS BEGIN
|
||||
//NOTE: The caster must ALWAYS keep mind transfer, even when other spells are lost.
|
||||
var/obj/effect/proc_holder/spell/targeted/mind_transfer/m_transfer = locate() in user.spell_list//Find mind transfer directly.
|
||||
var/list/checked_spells = user.spell_list
|
||||
checked_spells -= m_transfer //Remove Mind Transfer from the list.
|
||||
|
||||
if(caster.spell_list.len)//If they have any spells left over after mind transfer is taken out. If they don't, we don't need this.
|
||||
for(var/i=spell_loss_amount,(i>0&&checked_spells.len),i--)//While spell loss amount is greater than zero and checked_spells has spells in it, run this proc.
|
||||
for(var/j=checked_spells.len,(j>0&&checked_spells.len),j--)//While the spell list to check is greater than zero and has spells in it, run this proc.
|
||||
if(prob(base_spell_loss_chance))
|
||||
checked_spells -= pick(checked_spells)//Pick a random spell to remove.
|
||||
spawn(msg_wait)
|
||||
victim << "The mind transfer has robbed you of a spell."
|
||||
break//Spell lost. Break loop, going back to the previous for() statement.
|
||||
else//Or keep checking, adding spell chance modifier to increase chance of losing a spell.
|
||||
base_spell_loss_chance += spell_loss_chance_modifier
|
||||
|
||||
checked_spells += m_transfer//Add back Mind Transfer.
|
||||
user.spell_list = checked_spells//Set user spell list to whatever the new list is.
|
||||
//SPELL LOSS END
|
||||
|
||||
//MIND TRANSFER BEGIN
|
||||
if(caster.mind.special_verbs.len)//If the caster had any special verbs, remove them from the mob verb list.
|
||||
for(var/V in caster.mind.special_verbs)//Since the caster is using an object spell system, this is mostly moot.
|
||||
caster.verbs -= V//But a safety nontheless.
|
||||
|
||||
if(victim.mind.special_verbs.len)//Now remove all of the victim's verbs.
|
||||
for(var/V in victim.mind.special_verbs)
|
||||
victim.verbs -= V
|
||||
|
||||
var/mob/dead/observer/ghost = victim.ghostize(0)
|
||||
ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob.
|
||||
|
||||
caster.mind.transfer_to(victim)
|
||||
victim.spell_list = caster.spell_list//Now they are inside the victim's body.
|
||||
|
||||
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
|
||||
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
|
||||
caster.verbs += V
|
||||
|
||||
ghost.mind.transfer_to(caster)
|
||||
caster.key = ghost.key //have to transfer the key since the mind was not active
|
||||
caster.spell_list = ghost.spell_list
|
||||
|
||||
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
|
||||
for(var/V in caster.mind.special_verbs)
|
||||
caster.verbs += V
|
||||
//MIND TRANSFER END
|
||||
|
||||
//Here we paralyze both mobs and knock them out for a time.
|
||||
caster.Paralyse(paralysis_amount_caster)
|
||||
victim.Paralyse(paralysis_amount_victim)
|
||||
|
||||
//After a certain amount of time the victim gets a message about being in a different body.
|
||||
spawn(msg_wait)
|
||||
caster << "\red You feel woozy and lightheaded. <b>Your body doesn't seem like your own.</b>"
|
||||
@@ -1,83 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/projectile
|
||||
name = "Projectile"
|
||||
desc = "This spell summons projectiles which try to hit the targets."
|
||||
|
||||
var/proj_icon = 'icons/obj/projectiles.dmi'
|
||||
var/proj_icon_state = "spell"
|
||||
var/proj_name = "a spell projectile"
|
||||
|
||||
var/proj_trail = 0 //if it leaves a trail
|
||||
var/proj_trail_lifespan = 0 //deciseconds
|
||||
var/proj_trail_icon = 'icons/obj/wizard.dmi'
|
||||
var/proj_trail_icon_state = "trail"
|
||||
|
||||
var/proj_type = "/obj/effect/proc_holder/spell/targeted" //IMPORTANT use only subtypes of this
|
||||
|
||||
var/proj_lingering = 0 //if it lingers or disappears upon hitting an obstacle
|
||||
var/proj_homing = 1 //if it follows the target
|
||||
var/proj_insubstantial = 0 //if it can pass through dense objects or not
|
||||
var/proj_trigger_range = 0 //the range from target at which the projectile triggers cast(target)
|
||||
|
||||
var/proj_lifespan = 15 //in deciseconds * proj_step_delay
|
||||
var/proj_step_delay = 1 //lower = faster
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/projectile/cast(list/targets, mob/user = usr)
|
||||
|
||||
for(var/mob/living/target in targets)
|
||||
spawn(0)
|
||||
var/obj/effect/proc_holder/spell/targeted/projectile
|
||||
if(istext(proj_type))
|
||||
var/projectile_type = text2path(proj_type)
|
||||
projectile = new projectile_type(user)
|
||||
if(istype(proj_type,/obj/effect/proc_holder/spell))
|
||||
projectile = new /obj/effect/proc_holder/spell/targeted/trigger(user)
|
||||
projectile:linked_spells += proj_type
|
||||
projectile.icon = proj_icon
|
||||
projectile.icon_state = proj_icon_state
|
||||
projectile.set_dir(get_dir(target,projectile))
|
||||
projectile.name = proj_name
|
||||
|
||||
var/current_loc = usr.loc
|
||||
|
||||
projectile.loc = current_loc
|
||||
|
||||
for(var/i = 0,i < proj_lifespan,i++)
|
||||
if(!projectile)
|
||||
break
|
||||
|
||||
if(proj_homing)
|
||||
if(proj_insubstantial)
|
||||
projectile.set_dir(get_dir(projectile,target))
|
||||
projectile.loc = get_step_to(projectile,target)
|
||||
else
|
||||
step_to(projectile,target)
|
||||
else
|
||||
if(proj_insubstantial)
|
||||
projectile.loc = get_step(projectile,dir)
|
||||
else
|
||||
step(projectile,dir)
|
||||
|
||||
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
|
||||
del(projectile)
|
||||
break
|
||||
|
||||
if(proj_trail && projectile)
|
||||
spawn(0)
|
||||
if(projectile)
|
||||
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
|
||||
trail.icon = proj_trail_icon
|
||||
trail.icon_state = proj_trail_icon_state
|
||||
trail.density = 0
|
||||
spawn(proj_trail_lifespan)
|
||||
del(trail)
|
||||
|
||||
if(projectile.loc in range(target.loc,proj_trigger_range))
|
||||
projectile.perform(list(target))
|
||||
break
|
||||
|
||||
current_loc = projectile.loc
|
||||
|
||||
sleep(proj_step_delay)
|
||||
|
||||
if(projectile)
|
||||
del(projectile)
|
||||
@@ -1,28 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/trigger
|
||||
name = "Trigger"
|
||||
desc = "This spell triggers another spell or a few."
|
||||
|
||||
var/list/linked_spells = list() //those are just referenced by the trigger spell and are unaffected by it directly
|
||||
var/list/starting_spells = list() //those are added on New() to contents from default spells and are deleted when the trigger spell is deleted to prevent memory leaks
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/trigger/New()
|
||||
..()
|
||||
|
||||
for(var/spell in starting_spells)
|
||||
var/spell_to_add = text2path(spell)
|
||||
new spell_to_add(src) //should result in adding to contents, needs testing
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/trigger/Del()
|
||||
for(var/spell in contents)
|
||||
del(spell)
|
||||
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets)
|
||||
for(var/mob/living/target in targets)
|
||||
for(var/obj/effect/proc_holder/spell/spell in contents)
|
||||
spell.perform(list(target),0)
|
||||
for(var/obj/effect/proc_holder/spell/spell in linked_spells)
|
||||
spell.perform(list(target),0)
|
||||
|
||||
return
|
||||
@@ -1,34 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/turf_teleport
|
||||
name = "Turf Teleport"
|
||||
desc = "This spell teleports the target to the turf in range."
|
||||
|
||||
var/inner_tele_radius = 1
|
||||
var/outer_tele_radius = 2
|
||||
|
||||
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
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets)
|
||||
for(var/mob/living/target in targets)
|
||||
var/list/turfs = new/list()
|
||||
for(var/turf/T in range(target,outer_tele_radius))
|
||||
if(T in range(target,inner_tele_radius)) continue
|
||||
if(istype(T,/turf/space) && !include_space) continue
|
||||
if(T.density && !include_dense) continue
|
||||
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
|
||||
turfs += T
|
||||
|
||||
if(!turfs.len)
|
||||
var/list/turfs_to_pick_from = list()
|
||||
for(var/turf/T in orange(target,outer_tele_radius))
|
||||
if(!(T in orange(target,inner_tele_radius)))
|
||||
turfs_to_pick_from += T
|
||||
turfs += pick(/turf in turfs_to_pick_from)
|
||||
|
||||
var/turf/picked = pick(turfs)
|
||||
|
||||
if(!picked || !isturf(picked))
|
||||
return
|
||||
|
||||
target.loc = picked
|
||||
@@ -1,327 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile
|
||||
name = "Magic Missile"
|
||||
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 150
|
||||
clothes_req = 1
|
||||
invocation = "FORTI GY AMA"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
|
||||
max_targets = 0
|
||||
|
||||
proj_icon_state = "magicm"
|
||||
proj_name = "a magic missile"
|
||||
proj_lingering = 1
|
||||
proj_type = "/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile"
|
||||
|
||||
proj_lifespan = 20
|
||||
proj_step_delay = 5
|
||||
|
||||
proj_trail = 1
|
||||
proj_trail_lifespan = 5
|
||||
proj_trail_icon_state = "magicmd"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile
|
||||
amt_weakened = 5
|
||||
amt_dam_fire = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/mutate
|
||||
name = "Mutate"
|
||||
desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 400
|
||||
clothes_req = 1
|
||||
invocation = "BIRUZ BENNAR"
|
||||
invocation_type = "shout"
|
||||
message = "\blue You feel strong! You feel a pressure building behind your eyes!"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
mutations = list(LASER, HULK)
|
||||
duration = 300
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate
|
||||
name = "Disintegrate"
|
||||
desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
invocation = "EI NATH"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
|
||||
destroys = "gib_brain"
|
||||
|
||||
sparks_spread = 1
|
||||
sparks_amt = 4
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/smoke
|
||||
name = "Smoke"
|
||||
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 120
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
smoke_spread = 2
|
||||
smoke_amt = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/emplosion/disable_tech
|
||||
name = "Disable Tech"
|
||||
desc = "This spell disables all weapons, cameras and most other technology in range."
|
||||
charge_max = 400
|
||||
clothes_req = 1
|
||||
invocation = "NEC CANTIO"
|
||||
invocation_type = "shout"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
emp_heavy = 6
|
||||
emp_light = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/turf_teleport/blink
|
||||
name = "Blink"
|
||||
desc = "This spell randomly teleports you a short distance."
|
||||
|
||||
school = "abjuration"
|
||||
charge_max = 20
|
||||
clothes_req = 1
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
smoke_spread = 1
|
||||
smoke_amt = 10
|
||||
|
||||
inner_tele_radius = 0
|
||||
outer_tele_radius = 6
|
||||
|
||||
centcomm_cancast = 0 //prevent people from getting to centcomm
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
|
||||
name = "Teleport"
|
||||
desc = "This spell teleports you to a type of area of your selection."
|
||||
|
||||
school = "abjuration"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
invocation = "SCYAR NILA"
|
||||
invocation_type = "shout"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
smoke_spread = 1
|
||||
smoke_amt = 5
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall
|
||||
name = "Forcewall"
|
||||
desc = "This spell creates an unbreakable wall that lasts for 30 seconds and does not need wizard garb."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "TARCOL MINTI ZHERI"
|
||||
invocation_type = "whisper"
|
||||
range = 0
|
||||
|
||||
summon_type = list("/obj/effect/forcefield")
|
||||
summon_lifespan = 300
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/carp
|
||||
name = "Summon Carp"
|
||||
desc = "This spell conjures a simple carp."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 1200
|
||||
clothes_req = 1
|
||||
invocation = "NOUK FHUNMM SACP RISSKA"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
|
||||
summon_type = list(/mob/living/simple_animal/hostile/carp)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
|
||||
name = "Artificer"
|
||||
desc = "This spell conjures a construct which may be controlled by Shades"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
|
||||
summon_type = list(/obj/structure/constructshell)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/creature
|
||||
name = "Summon Creature Swarm"
|
||||
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 1200
|
||||
clothes_req = 0
|
||||
invocation = "IA IA"
|
||||
invocation_type = "shout"
|
||||
summon_amt = 10
|
||||
range = 3
|
||||
|
||||
summon_type = list(/mob/living/simple_animal/hostile/creature)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/trigger/blind
|
||||
name = "Blind"
|
||||
desc = "This spell temporarily blinds a single person and does not require wizard garb."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "STI KALY"
|
||||
invocation_type = "whisper"
|
||||
message = "\blue Your eyes cry out in pain!"
|
||||
|
||||
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind")
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/blind
|
||||
amt_eye_blind = 10
|
||||
amt_eye_blurry = 20
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/blind
|
||||
disabilities = 1
|
||||
duration = 300
|
||||
|
||||
/obj/effect/proc_holder/spell/dumbfire/fireball
|
||||
name = "Fireball"
|
||||
desc = "This spell fires a fireball at a target and does not require wizard garb."
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "ONI SOMA"
|
||||
invocation_type = "shout"
|
||||
range = 20
|
||||
|
||||
proj_icon_state = "fireball"
|
||||
proj_name = "a fireball"
|
||||
proj_type = "/obj/effect/proc_holder/spell/turf/fireball"
|
||||
|
||||
proj_lifespan = 200
|
||||
proj_step_delay = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/turf/fireball/cast(var/turf/T)
|
||||
explosion(T, -1, 1, 2, 3)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/inflict_handler/fireball
|
||||
amt_dam_brute = 20
|
||||
amt_dam_fire = 25
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/explosion/fireball
|
||||
ex_severe = -1
|
||||
ex_heavy = -1
|
||||
ex_light = 2
|
||||
ex_flash = 5
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////Construct Spells/////////////////////////
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser
|
||||
charge_max = 1800
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor
|
||||
name = "Floor Construction"
|
||||
desc = "This spell constructs a cult floor"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 20
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/floor/engine/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
|
||||
name = "Leser Construction"
|
||||
desc = "This spell constructs a cult wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/wall/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
desc = "This spell constructs a reinforced metal wall"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
delay = 50
|
||||
|
||||
summon_type = list(/turf/simulated/wall/r_wall)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/soulstone
|
||||
name = "Summon Soulstone"
|
||||
desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space"
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 3000
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
|
||||
summon_type = list(/obj/item/device/soulstone)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall
|
||||
name = "Shield"
|
||||
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/obj/effect/forcefield)
|
||||
summon_lifespan = 50
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
|
||||
name = "Phase Shift"
|
||||
desc = "This spell allows you to pass through walls"
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
phaseshift = 1
|
||||
jaunt_duration = 50 //in deciseconds
|
||||
centcomm_cancast = 0 //Stop people from getting to centcomm
|
||||
Reference in New Issue
Block a user