Merge branch 'master' into upstream-merge-31176
This commit is contained in:
@@ -90,7 +90,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
/obj/effect/proc_holder/spell
|
||||
name = "Spell"
|
||||
desc = "A wizard spell"
|
||||
desc = "A wizard spell."
|
||||
panel = "Spells"
|
||||
var/sound = null //The sound the spell makes when it is cast
|
||||
anchored = TRUE // Crap like fireball projectiles are proc_holders, this is needed so fireballs don't get blown back into your face via atmos etc.
|
||||
@@ -429,7 +429,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
else
|
||||
if(los_check(user,L))
|
||||
M = L
|
||||
if(M in view_or_range(range, user, selection_type)) targets += M
|
||||
if(M in view_or_range(range, user, selection_type))
|
||||
targets += M
|
||||
|
||||
else
|
||||
var/list/possible_targets = list()
|
||||
|
||||
@@ -65,9 +65,8 @@
|
||||
/obj/effect/proc_holder/spell/aimed/proc/fire_projectile(mob/living/user, atom/target)
|
||||
current_amount--
|
||||
var/obj/item/projectile/P = new projectile_type(user.loc)
|
||||
P.current = get_turf(user)
|
||||
P.firer = user
|
||||
P.preparePixelProjectile(target, get_turf(target), user)
|
||||
P.preparePixelProjectile(target, user)
|
||||
for(var/V in projectile_var_overrides)
|
||||
if(P.vars[V])
|
||||
P.vars[V] = projectile_var_overrides[V]
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor
|
||||
name = "Summon Cult Floor"
|
||||
desc = "This spell constructs a cult floor"
|
||||
desc = "This spell constructs a cult floor."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 20
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall
|
||||
name = "Summon Cult Wall"
|
||||
desc = "This spell constructs a cult wall"
|
||||
desc = "This spell constructs a cult wall."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall/reinforced
|
||||
name = "Greater Construction"
|
||||
desc = "This spell constructs a reinforced metal wall"
|
||||
desc = "This spell constructs a reinforced metal wall."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 300
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/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"
|
||||
desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 3000
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
/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"
|
||||
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/shift
|
||||
name = "Phase Shift"
|
||||
desc = "This spell allows you to pass through walls"
|
||||
desc = "This spell allows you to pass through walls."
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 250
|
||||
|
||||
@@ -80,7 +80,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/dummy/spell_jaunt/relaymove(var/mob/user, direction)
|
||||
if ((movedelay > world.time) || reappearing || !direction) return
|
||||
if ((movedelay > world.time) || reappearing || !direction)
|
||||
return
|
||||
var/turf/newLoc = get_step(src,direction)
|
||||
setDir(direction)
|
||||
if(!(newLoc.flags_1 & NOJAUNT_1))
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
return
|
||||
var/mob/M = target
|
||||
do_sparks(4, FALSE, M.loc)
|
||||
for(var/mob/living/L in view(src, 7))
|
||||
if(L != user)
|
||||
L.flash_act(affect_silicon = FALSE)
|
||||
M.gib()
|
||||
..()
|
||||
|
||||
|
||||
@@ -1,219 +1,221 @@
|
||||
//In this file: Summon Magic/Summon Guns/Summon Events
|
||||
|
||||
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
|
||||
var/list/gunslist = list("taser","gravgun","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","speargun","arg","uzi","alienpistol","dragnet","turret","pulsecarbine","decloner","mindflayer","hyperkinetic","advplasmacutter","wormhole","wt550","bulldog","grenadelauncher","goldenrevolver","sniper","medibeam","scatterbeam")
|
||||
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying","staffdoor","voodoo", "whistle", "battlemage", "immortality", "ghostsword", "special")
|
||||
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos", "necromantic", "bloodcontract")
|
||||
|
||||
if(user) //in this case either someone holding a spellbook or a badmin
|
||||
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
|
||||
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD || !(H.client)) continue
|
||||
if(H.mind)
|
||||
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist") continue
|
||||
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += H.mind
|
||||
if(!summon_type)
|
||||
var/datum/objective/steal_five_of_type/summon_guns/guns = new
|
||||
guns.owner = H.mind
|
||||
H.mind.objectives += guns
|
||||
H.mind.special_role = "survivalist"
|
||||
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
|
||||
else
|
||||
var/datum/objective/steal_five_of_type/summon_magic/magic = new
|
||||
magic.owner = H.mind
|
||||
H.mind.objectives += magic
|
||||
H.mind.special_role = "amateur magician"
|
||||
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = H.mind
|
||||
H.mind.objectives += survive
|
||||
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
H.mind.announce_objectives()
|
||||
var/randomizeguns = pick(gunslist)
|
||||
var/randomizemagic = pick(magiclist)
|
||||
var/randomizemagicspecial = pick(magicspeciallist)
|
||||
if(!summon_type)
|
||||
var/obj/item/gun/G
|
||||
switch (randomizeguns)
|
||||
if("taser")
|
||||
G = new /obj/item/gun/energy/e_gun/advtaser(get_turf(H))
|
||||
if("egun")
|
||||
G = new /obj/item/gun/energy/e_gun(get_turf(H))
|
||||
if("laser")
|
||||
G = new /obj/item/gun/energy/laser(get_turf(H))
|
||||
if("revolver")
|
||||
G = new /obj/item/gun/ballistic/revolver(get_turf(H))
|
||||
if("detective")
|
||||
G = new /obj/item/gun/ballistic/revolver/detective(get_turf(H))
|
||||
if("deagle")
|
||||
G = new /obj/item/gun/ballistic/automatic/pistol/deagle/camo(get_turf(H))
|
||||
if("gyrojet")
|
||||
G = new /obj/item/gun/ballistic/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
G = new /obj/item/gun/energy/pulse(get_turf(H))
|
||||
if("suppressed")
|
||||
G = new /obj/item/gun/ballistic/automatic/pistol(get_turf(H))
|
||||
new /obj/item/suppressor(get_turf(H))
|
||||
if("doublebarrel")
|
||||
G = new /obj/item/gun/ballistic/revolver/doublebarrel(get_turf(H))
|
||||
if("shotgun")
|
||||
G = new /obj/item/gun/ballistic/shotgun(get_turf(H))
|
||||
if("combatshotgun")
|
||||
G = new /obj/item/gun/ballistic/shotgun/automatic/combat(get_turf(H))
|
||||
if("arg")
|
||||
G = new /obj/item/gun/ballistic/automatic/ar(get_turf(H))
|
||||
if("mateba")
|
||||
G = new /obj/item/gun/ballistic/revolver/mateba(get_turf(H))
|
||||
if("boltaction")
|
||||
G = new /obj/item/gun/ballistic/shotgun/boltaction(get_turf(H))
|
||||
if("speargun")
|
||||
G = new /obj/item/gun/ballistic/automatic/speargun(get_turf(H))
|
||||
if("uzi")
|
||||
G = new /obj/item/gun/ballistic/automatic/mini_uzi(get_turf(H))
|
||||
if("cannon")
|
||||
G = new /obj/item/gun/energy/lasercannon(get_turf(H))
|
||||
if("crossbow")
|
||||
G = new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
|
||||
if("nuclear")
|
||||
G = new /obj/item/gun/energy/e_gun/nuclear(get_turf(H))
|
||||
if("sabr")
|
||||
G = new /obj/item/gun/ballistic/automatic/proto(get_turf(H))
|
||||
if("bulldog")
|
||||
G = new /obj/item/gun/ballistic/automatic/shotgun/bulldog(get_turf(H))
|
||||
if("c20r")
|
||||
G = new /obj/item/gun/ballistic/automatic/c20r(get_turf(H))
|
||||
if("saw")
|
||||
G = new /obj/item/gun/ballistic/automatic/l6_saw(get_turf(H))
|
||||
if("car")
|
||||
G = new /obj/item/gun/ballistic/automatic/m90(get_turf(H))
|
||||
if("alienpistol")
|
||||
G = new /obj/item/gun/energy/alien(get_turf(H))
|
||||
if("dragnet")
|
||||
G = new /obj/item/gun/energy/e_gun/dragnet(get_turf(H))
|
||||
if("turret")
|
||||
G = new /obj/item/gun/energy/e_gun/turret(get_turf(H))
|
||||
if("pulsecarbine")
|
||||
G = new /obj/item/gun/energy/pulse/carbine(get_turf(H))
|
||||
if("decloner")
|
||||
G = new /obj/item/gun/energy/decloner(get_turf(H))
|
||||
if("mindflayer")
|
||||
G = new /obj/item/gun/energy/mindflayer(get_turf(H))
|
||||
if("hyperkinetic")
|
||||
G = new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
|
||||
if("advplasmacutter")
|
||||
G = new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
|
||||
if("wormhole")
|
||||
G = new /obj/item/gun/energy/wormhole_projector(get_turf(H))
|
||||
if("wt550")
|
||||
G = new /obj/item/gun/ballistic/automatic/wt550(get_turf(H))
|
||||
if("bulldog")
|
||||
G = new /obj/item/gun/ballistic/automatic/shotgun(get_turf(H))
|
||||
if("grenadelauncher")
|
||||
G = new /obj/item/gun/ballistic/revolver/grenadelauncher(get_turf(H))
|
||||
if("goldenrevolver")
|
||||
G = new /obj/item/gun/ballistic/revolver/golden(get_turf(H))
|
||||
if("sniper")
|
||||
G = new /obj/item/gun/ballistic/automatic/sniper_rifle(get_turf(H))
|
||||
if("medibeam")
|
||||
G = new /obj/item/gun/medbeam(get_turf(H))
|
||||
if("scatterbeam")
|
||||
G = new /obj/item/gun/energy/laser/scatter(get_turf(H))
|
||||
if("gravgun")
|
||||
G = new /obj/item/gun/energy/gravity_gun(get_turf(H))
|
||||
G.unlock()
|
||||
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
|
||||
|
||||
else
|
||||
switch (randomizemagic)
|
||||
if("fireball")
|
||||
new /obj/item/spellbook/oneuse/fireball(get_turf(H))
|
||||
if("smoke")
|
||||
new /obj/item/spellbook/oneuse/smoke(get_turf(H))
|
||||
if("blind")
|
||||
new /obj/item/spellbook/oneuse/blind(get_turf(H))
|
||||
if("mindswap")
|
||||
new /obj/item/spellbook/oneuse/mindswap(get_turf(H))
|
||||
if("forcewall")
|
||||
new /obj/item/spellbook/oneuse/forcewall(get_turf(H))
|
||||
if("knock")
|
||||
new /obj/item/spellbook/oneuse/knock(get_turf(H))
|
||||
if("horsemask")
|
||||
new /obj/item/spellbook/oneuse/barnyard(get_turf(H))
|
||||
if("charge")
|
||||
new /obj/item/spellbook/oneuse/charge(get_turf(H))
|
||||
if("summonitem")
|
||||
new /obj/item/spellbook/oneuse/summonitem(get_turf(H))
|
||||
if("wandnothing")
|
||||
new /obj/item/gun/magic/wand(get_turf(H))
|
||||
if("wanddeath")
|
||||
new /obj/item/gun/magic/wand/death(get_turf(H))
|
||||
if("wandresurrection")
|
||||
new /obj/item/gun/magic/wand/resurrection(get_turf(H))
|
||||
if("wandpolymorph")
|
||||
new /obj/item/gun/magic/wand/polymorph(get_turf(H))
|
||||
if("wandteleport")
|
||||
new /obj/item/gun/magic/wand/teleport(get_turf(H))
|
||||
if("wanddoor")
|
||||
new /obj/item/gun/magic/wand/door(get_turf(H))
|
||||
if("wandfireball")
|
||||
new /obj/item/gun/magic/wand/fireball(get_turf(H))
|
||||
if("staffhealing")
|
||||
new /obj/item/gun/magic/staff/healing(get_turf(H))
|
||||
if("staffdoor")
|
||||
new /obj/item/gun/magic/staff/door(get_turf(H))
|
||||
if("armor")
|
||||
new /obj/item/clothing/suit/space/hardsuit/wizard(get_turf(H))
|
||||
if("scrying")
|
||||
new /obj/item/scrying(get_turf(H))
|
||||
if (!(H.dna.check_mutation(XRAY)))
|
||||
H.dna.add_mutation(XRAY)
|
||||
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
if("voodoo")
|
||||
new /obj/item/voodoo(get_turf(H))
|
||||
if("whistle")
|
||||
new /obj/item/warpwhistle(get_turf(H))
|
||||
if("battlemage")
|
||||
new /obj/item/clothing/suit/space/hardsuit/shielded/wizard(get_turf(H))
|
||||
if("immortality")
|
||||
new /obj/item/device/immortality_talisman(get_turf(H))
|
||||
if("ghostsword")
|
||||
new /obj/item/melee/ghost_sword(get_turf(H))
|
||||
if("special")
|
||||
magiclist -= "special" //only one super OP item per summoning max
|
||||
switch (randomizemagicspecial)
|
||||
if("staffchange")
|
||||
new /obj/item/gun/magic/staff/change(get_turf(H))
|
||||
if("staffanimation")
|
||||
new /obj/item/gun/magic/staff/animate(get_turf(H))
|
||||
if("wandbelt")
|
||||
new /obj/item/storage/belt/wands/full(get_turf(H))
|
||||
if("contract")
|
||||
new /obj/item/antag_spawner/contract(get_turf(H))
|
||||
if("staffchaos")
|
||||
new /obj/item/gun/magic/staff/chaos(get_turf(H))
|
||||
if("necromantic")
|
||||
new /obj/item/device/necromantic_stone(get_turf(H))
|
||||
if("bloodcontract")
|
||||
new /obj/item/blood_contract(get_turf(H))
|
||||
to_chat(H, "<span class='notice'>You suddenly feel lucky.</span>")
|
||||
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
|
||||
|
||||
|
||||
/proc/summonevents()
|
||||
if(!SSevents.wizardmode)
|
||||
SSevents.frequency_lower = 600 //1 minute lower bound
|
||||
SSevents.frequency_upper = 3000 //5 minutes upper bound
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.reschedule()
|
||||
|
||||
else //Speed it up
|
||||
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
|
||||
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
|
||||
SSevents.frequency_upper = SSevents.frequency_lower
|
||||
|
||||
SSevents.reschedule()
|
||||
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
|
||||
log_game("Summon Events was increased!")
|
||||
//In this file: Summon Magic/Summon Guns/Summon Events
|
||||
|
||||
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
|
||||
var/list/gunslist = list("taser","gravgun","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","speargun","arg","uzi","alienpistol","dragnet","turret","pulsecarbine","decloner","mindflayer","hyperkinetic","advplasmacutter","wormhole","wt550","bulldog","grenadelauncher","goldenrevolver","sniper","medibeam","scatterbeam")
|
||||
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying","staffdoor","voodoo", "whistle", "battlemage", "immortality", "ghostsword", "special")
|
||||
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos", "necromantic", "bloodcontract")
|
||||
|
||||
if(user) //in this case either someone holding a spellbook or a badmin
|
||||
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
|
||||
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
continue
|
||||
if(H.mind)
|
||||
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist")
|
||||
continue
|
||||
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += H.mind
|
||||
if(!summon_type)
|
||||
var/datum/objective/steal_five_of_type/summon_guns/guns = new
|
||||
guns.owner = H.mind
|
||||
H.mind.objectives += guns
|
||||
H.mind.special_role = "survivalist"
|
||||
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
|
||||
else
|
||||
var/datum/objective/steal_five_of_type/summon_magic/magic = new
|
||||
magic.owner = H.mind
|
||||
H.mind.objectives += magic
|
||||
H.mind.special_role = "amateur magician"
|
||||
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
|
||||
var/datum/objective/survive/survive = new
|
||||
survive.owner = H.mind
|
||||
H.mind.objectives += survive
|
||||
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
H.mind.announce_objectives()
|
||||
var/randomizeguns = pick(gunslist)
|
||||
var/randomizemagic = pick(magiclist)
|
||||
var/randomizemagicspecial = pick(magicspeciallist)
|
||||
if(!summon_type)
|
||||
var/obj/item/gun/G
|
||||
switch (randomizeguns)
|
||||
if("taser")
|
||||
G = new /obj/item/gun/energy/e_gun/advtaser(get_turf(H))
|
||||
if("egun")
|
||||
G = new /obj/item/gun/energy/e_gun(get_turf(H))
|
||||
if("laser")
|
||||
G = new /obj/item/gun/energy/laser(get_turf(H))
|
||||
if("revolver")
|
||||
G = new /obj/item/gun/ballistic/revolver(get_turf(H))
|
||||
if("detective")
|
||||
G = new /obj/item/gun/ballistic/revolver/detective(get_turf(H))
|
||||
if("deagle")
|
||||
G = new /obj/item/gun/ballistic/automatic/pistol/deagle/camo(get_turf(H))
|
||||
if("gyrojet")
|
||||
G = new /obj/item/gun/ballistic/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
G = new /obj/item/gun/energy/pulse(get_turf(H))
|
||||
if("suppressed")
|
||||
G = new /obj/item/gun/ballistic/automatic/pistol(get_turf(H))
|
||||
new /obj/item/suppressor(get_turf(H))
|
||||
if("doublebarrel")
|
||||
G = new /obj/item/gun/ballistic/revolver/doublebarrel(get_turf(H))
|
||||
if("shotgun")
|
||||
G = new /obj/item/gun/ballistic/shotgun(get_turf(H))
|
||||
if("combatshotgun")
|
||||
G = new /obj/item/gun/ballistic/shotgun/automatic/combat(get_turf(H))
|
||||
if("arg")
|
||||
G = new /obj/item/gun/ballistic/automatic/ar(get_turf(H))
|
||||
if("mateba")
|
||||
G = new /obj/item/gun/ballistic/revolver/mateba(get_turf(H))
|
||||
if("boltaction")
|
||||
G = new /obj/item/gun/ballistic/shotgun/boltaction(get_turf(H))
|
||||
if("speargun")
|
||||
G = new /obj/item/gun/ballistic/automatic/speargun(get_turf(H))
|
||||
if("uzi")
|
||||
G = new /obj/item/gun/ballistic/automatic/mini_uzi(get_turf(H))
|
||||
if("cannon")
|
||||
G = new /obj/item/gun/energy/lasercannon(get_turf(H))
|
||||
if("crossbow")
|
||||
G = new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
|
||||
if("nuclear")
|
||||
G = new /obj/item/gun/energy/e_gun/nuclear(get_turf(H))
|
||||
if("sabr")
|
||||
G = new /obj/item/gun/ballistic/automatic/proto(get_turf(H))
|
||||
if("bulldog")
|
||||
G = new /obj/item/gun/ballistic/automatic/shotgun/bulldog(get_turf(H))
|
||||
if("c20r")
|
||||
G = new /obj/item/gun/ballistic/automatic/c20r(get_turf(H))
|
||||
if("saw")
|
||||
G = new /obj/item/gun/ballistic/automatic/l6_saw(get_turf(H))
|
||||
if("car")
|
||||
G = new /obj/item/gun/ballistic/automatic/m90(get_turf(H))
|
||||
if("alienpistol")
|
||||
G = new /obj/item/gun/energy/alien(get_turf(H))
|
||||
if("dragnet")
|
||||
G = new /obj/item/gun/energy/e_gun/dragnet(get_turf(H))
|
||||
if("turret")
|
||||
G = new /obj/item/gun/energy/e_gun/turret(get_turf(H))
|
||||
if("pulsecarbine")
|
||||
G = new /obj/item/gun/energy/pulse/carbine(get_turf(H))
|
||||
if("decloner")
|
||||
G = new /obj/item/gun/energy/decloner(get_turf(H))
|
||||
if("mindflayer")
|
||||
G = new /obj/item/gun/energy/mindflayer(get_turf(H))
|
||||
if("hyperkinetic")
|
||||
G = new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
|
||||
if("advplasmacutter")
|
||||
G = new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
|
||||
if("wormhole")
|
||||
G = new /obj/item/gun/energy/wormhole_projector(get_turf(H))
|
||||
if("wt550")
|
||||
G = new /obj/item/gun/ballistic/automatic/wt550(get_turf(H))
|
||||
if("bulldog")
|
||||
G = new /obj/item/gun/ballistic/automatic/shotgun(get_turf(H))
|
||||
if("grenadelauncher")
|
||||
G = new /obj/item/gun/ballistic/revolver/grenadelauncher(get_turf(H))
|
||||
if("goldenrevolver")
|
||||
G = new /obj/item/gun/ballistic/revolver/golden(get_turf(H))
|
||||
if("sniper")
|
||||
G = new /obj/item/gun/ballistic/automatic/sniper_rifle(get_turf(H))
|
||||
if("medibeam")
|
||||
G = new /obj/item/gun/medbeam(get_turf(H))
|
||||
if("scatterbeam")
|
||||
G = new /obj/item/gun/energy/laser/scatter(get_turf(H))
|
||||
if("gravgun")
|
||||
G = new /obj/item/gun/energy/gravity_gun(get_turf(H))
|
||||
G.unlock()
|
||||
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
|
||||
|
||||
else
|
||||
switch (randomizemagic)
|
||||
if("fireball")
|
||||
new /obj/item/spellbook/oneuse/fireball(get_turf(H))
|
||||
if("smoke")
|
||||
new /obj/item/spellbook/oneuse/smoke(get_turf(H))
|
||||
if("blind")
|
||||
new /obj/item/spellbook/oneuse/blind(get_turf(H))
|
||||
if("mindswap")
|
||||
new /obj/item/spellbook/oneuse/mindswap(get_turf(H))
|
||||
if("forcewall")
|
||||
new /obj/item/spellbook/oneuse/forcewall(get_turf(H))
|
||||
if("knock")
|
||||
new /obj/item/spellbook/oneuse/knock(get_turf(H))
|
||||
if("horsemask")
|
||||
new /obj/item/spellbook/oneuse/barnyard(get_turf(H))
|
||||
if("charge")
|
||||
new /obj/item/spellbook/oneuse/charge(get_turf(H))
|
||||
if("summonitem")
|
||||
new /obj/item/spellbook/oneuse/summonitem(get_turf(H))
|
||||
if("wandnothing")
|
||||
new /obj/item/gun/magic/wand(get_turf(H))
|
||||
if("wanddeath")
|
||||
new /obj/item/gun/magic/wand/death(get_turf(H))
|
||||
if("wandresurrection")
|
||||
new /obj/item/gun/magic/wand/resurrection(get_turf(H))
|
||||
if("wandpolymorph")
|
||||
new /obj/item/gun/magic/wand/polymorph(get_turf(H))
|
||||
if("wandteleport")
|
||||
new /obj/item/gun/magic/wand/teleport(get_turf(H))
|
||||
if("wanddoor")
|
||||
new /obj/item/gun/magic/wand/door(get_turf(H))
|
||||
if("wandfireball")
|
||||
new /obj/item/gun/magic/wand/fireball(get_turf(H))
|
||||
if("staffhealing")
|
||||
new /obj/item/gun/magic/staff/healing(get_turf(H))
|
||||
if("staffdoor")
|
||||
new /obj/item/gun/magic/staff/door(get_turf(H))
|
||||
if("armor")
|
||||
new /obj/item/clothing/suit/space/hardsuit/wizard(get_turf(H))
|
||||
if("scrying")
|
||||
new /obj/item/scrying(get_turf(H))
|
||||
if (!(H.dna.check_mutation(XRAY)))
|
||||
H.dna.add_mutation(XRAY)
|
||||
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
if("voodoo")
|
||||
new /obj/item/voodoo(get_turf(H))
|
||||
if("whistle")
|
||||
new /obj/item/warpwhistle(get_turf(H))
|
||||
if("battlemage")
|
||||
new /obj/item/clothing/suit/space/hardsuit/shielded/wizard(get_turf(H))
|
||||
if("immortality")
|
||||
new /obj/item/device/immortality_talisman(get_turf(H))
|
||||
if("ghostsword")
|
||||
new /obj/item/melee/ghost_sword(get_turf(H))
|
||||
if("special")
|
||||
magiclist -= "special" //only one super OP item per summoning max
|
||||
switch (randomizemagicspecial)
|
||||
if("staffchange")
|
||||
new /obj/item/gun/magic/staff/change(get_turf(H))
|
||||
if("staffanimation")
|
||||
new /obj/item/gun/magic/staff/animate(get_turf(H))
|
||||
if("wandbelt")
|
||||
new /obj/item/storage/belt/wands/full(get_turf(H))
|
||||
if("contract")
|
||||
new /obj/item/antag_spawner/contract(get_turf(H))
|
||||
if("staffchaos")
|
||||
new /obj/item/gun/magic/staff/chaos(get_turf(H))
|
||||
if("necromantic")
|
||||
new /obj/item/device/necromantic_stone(get_turf(H))
|
||||
if("bloodcontract")
|
||||
new /obj/item/blood_contract(get_turf(H))
|
||||
to_chat(H, "<span class='notice'>You suddenly feel lucky.</span>")
|
||||
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
|
||||
|
||||
|
||||
/proc/summonevents()
|
||||
if(!SSevents.wizardmode)
|
||||
SSevents.frequency_lower = 600 //1 minute lower bound
|
||||
SSevents.frequency_upper = 3000 //5 minutes upper bound
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.reschedule()
|
||||
|
||||
else //Speed it up
|
||||
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
|
||||
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
|
||||
SSevents.frequency_upper = SSevents.frequency_lower
|
||||
|
||||
SSevents.reschedule()
|
||||
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
|
||||
log_game("Summon Events was increased!")
|
||||
@@ -11,16 +11,23 @@
|
||||
invocation_type = "shout"
|
||||
action_icon_state = "shapeshift"
|
||||
|
||||
var/revert_on_death = TRUE
|
||||
var/die_with_shapeshifted_form = TRUE
|
||||
|
||||
var/shapeshift_type
|
||||
var/list/current_shapes = list()
|
||||
var/list/current_casters = list()
|
||||
var/list/possible_shapes = list(/mob/living/simple_animal/mouse,\
|
||||
/mob/living/simple_animal/pet/dog/corgi,\
|
||||
/mob/living/simple_animal/hostile/carp/ranged/chaos,\
|
||||
/mob/living/simple_animal/bot/ed209,\
|
||||
/mob/living/simple_animal/hostile/poison/giant_spider/hunter/viper,\
|
||||
/mob/living/simple_animal/hostile/construct/armored)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/cast(list/targets,mob/user = usr)
|
||||
if(src in user.mob_spell_list)
|
||||
user.mob_spell_list.Remove(src)
|
||||
user.mind.AddSpell(src)
|
||||
if(user.buckled)
|
||||
user.buckled.unbuckle_mob(src,force=TRUE)
|
||||
for(var/mob/living/M in targets)
|
||||
if(!shapeshift_type)
|
||||
var/list/animal_list = list()
|
||||
@@ -34,46 +41,33 @@
|
||||
if(!shapeshift_type) //If you aren't gonna decide I am!
|
||||
shapeshift_type = pick(animal_list)
|
||||
shapeshift_type = animal_list[shapeshift_type]
|
||||
if(M in current_shapes)
|
||||
|
||||
var/obj/shapeshift_holder/S = locate() in M
|
||||
if(S)
|
||||
Restore(M)
|
||||
else
|
||||
Shapeshift(M)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/proc/Shapeshift(mob/living/caster)
|
||||
for(var/mob/living/M in caster)
|
||||
if(M.status_flags & GODMODE)
|
||||
to_chat(caster, "<span class='warning'>You're already shapeshifted!</span>")
|
||||
return
|
||||
var/obj/shapeshift_holder/H = locate() in caster
|
||||
if(H)
|
||||
to_chat(caster, "<span class='warning'>You're already shapeshifted!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/shape = new shapeshift_type(caster.loc)
|
||||
caster.forceMove(shape)
|
||||
caster.status_flags |= GODMODE
|
||||
|
||||
current_shapes |= shape
|
||||
current_casters |= caster
|
||||
H = new(shape,src,caster)
|
||||
clothes_req = 0
|
||||
human_req = 0
|
||||
|
||||
caster.mind.transfer_to(shape)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/proc/Restore(mob/living/shape)
|
||||
var/mob/living/caster
|
||||
for(var/mob/living/M in shape)
|
||||
if(M in current_casters)
|
||||
caster = M
|
||||
break
|
||||
if(!caster)
|
||||
return
|
||||
caster.forceMove(shape.loc)
|
||||
caster.status_flags &= ~GODMODE
|
||||
var/obj/shapeshift_holder/H = locate() in shape
|
||||
if(!H)
|
||||
return
|
||||
H.restore()
|
||||
|
||||
clothes_req = initial(clothes_req)
|
||||
human_req = initial(human_req)
|
||||
current_casters.Remove(caster)
|
||||
current_shapes.Remove(shape)
|
||||
|
||||
shape.mind.transfer_to(caster)
|
||||
qdel(shape) //Gib it maybe ?
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/dragon
|
||||
name = "Dragon Form"
|
||||
@@ -81,6 +75,85 @@
|
||||
invocation = "RAAAAAAAAWR!"
|
||||
|
||||
shapeshift_type = /mob/living/simple_animal/hostile/megafauna/dragon/lesser
|
||||
list/current_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
|
||||
list/current_casters = list()
|
||||
list/possible_shapes = list(/mob/living/simple_animal/hostile/megafauna/dragon/lesser)
|
||||
|
||||
|
||||
/obj/shapeshift_holder
|
||||
name = "Shapeshift holder"
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
|
||||
var/mob/living/stored
|
||||
var/mob/living/shape
|
||||
var/restoring = FALSE
|
||||
var/datum/soullink/shapeshift/slink
|
||||
var/obj/effect/proc_holder/spell/targeted/shapeshift/source
|
||||
|
||||
/obj/shapeshift_holder/Initialize(mapload,obj/effect/proc_holder/spell/targeted/shapeshift/source,mob/living/caster)
|
||||
. = ..()
|
||||
src.source = source
|
||||
shape = loc
|
||||
if(!istype(shape))
|
||||
CRASH("shapeshift holder created outside mob/living")
|
||||
stored = caster
|
||||
if(stored.mind)
|
||||
stored.mind.transfer_to(shape)
|
||||
stored.forceMove(src)
|
||||
stored.notransform = TRUE
|
||||
slink = soullink(/datum/soullink/shapeshift, stored , shape)
|
||||
slink.source = src
|
||||
|
||||
/obj/shapeshift_holder/Destroy()
|
||||
if(!restoring)
|
||||
restore()
|
||||
stored = null
|
||||
shape = null
|
||||
. = ..()
|
||||
|
||||
/obj/shapeshift_holder/Moved()
|
||||
. = ..()
|
||||
if(!restoring || QDELETED(src))
|
||||
restore()
|
||||
|
||||
/obj/shapeshift_holder/handle_atom_del(atom/A)
|
||||
if(A == stored && !restoring)
|
||||
restore()
|
||||
|
||||
/obj/shapeshift_holder/Exited(atom/movable/AM)
|
||||
if(AM == stored && !restoring)
|
||||
restore()
|
||||
|
||||
/obj/shapeshift_holder/proc/casterDeath()
|
||||
//Something kills the stored caster through direct damage.
|
||||
if(source.revert_on_death)
|
||||
restore(death=TRUE)
|
||||
else
|
||||
shape.death()
|
||||
|
||||
/obj/shapeshift_holder/proc/shapeDeath()
|
||||
//Shape dies.
|
||||
if(source.die_with_shapeshifted_form)
|
||||
if(source.revert_on_death)
|
||||
restore(death=TRUE)
|
||||
else
|
||||
restore()
|
||||
|
||||
/obj/shapeshift_holder/proc/restore(death=FALSE)
|
||||
restoring = TRUE
|
||||
qdel(slink)
|
||||
stored.forceMove(get_turf(src))
|
||||
stored.notransform = FALSE
|
||||
if(shape.mind)
|
||||
shape.mind.transfer_to(stored)
|
||||
if(death)
|
||||
stored.death()
|
||||
qdel(shape)
|
||||
qdel(src)
|
||||
|
||||
/datum/soullink/shapeshift
|
||||
var/obj/shapeshift_holder/source
|
||||
|
||||
/datum/soullink/shapeshift/ownerDies(gibbed, mob/living/owner)
|
||||
if(source)
|
||||
source.casterDeath(gibbed)
|
||||
|
||||
/datum/soullink/shapeshift/sharerDies(gibbed, mob/living/sharer)
|
||||
if(source)
|
||||
source.shapeDeath(gibbed)
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
charge_counter = charge_max
|
||||
attached_hand = null
|
||||
to_chat(user, "<span class='notice'>You draw the power out of your hand.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/touch/cast(list/targets,mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(!attached_hand)
|
||||
if(!ChargeHand(C))
|
||||
return 0
|
||||
while(attached_hand) //hibernate untill the spell is actually used
|
||||
return FALSE
|
||||
while(attached_hand)
|
||||
charge_counter = 0
|
||||
stoplag(1)
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
charge_counter = charge_max
|
||||
attached_hand = null
|
||||
to_chat(user, "<span class='warning'>Your hands are full!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You channel the power of the spell to your hand.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/touch/disintegrate
|
||||
@@ -58,4 +58,4 @@
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
action_icon_state = "statue"
|
||||
sound = 'sound/magic/fleshtostone.ogg'
|
||||
sound = 'sound/magic/fleshtostone.ogg'
|
||||
|
||||
@@ -16,9 +16,12 @@
|
||||
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(isspaceturf(T) && !include_space) continue
|
||||
if(T.density && !include_dense) continue
|
||||
if(T in range(target,inner_tele_radius))
|
||||
continue
|
||||
if(isspaceturf(T) && !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)
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
|
||||
name = "Artificer"
|
||||
desc = "This spell conjures a construct which may be controlled by Shades"
|
||||
desc = "This spell conjures a construct which may be controlled by Shades."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 600
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
/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"
|
||||
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth."
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 1200
|
||||
|
||||
Reference in New Issue
Block a user