Datum antag wizard.
This commit is contained in:
committed by
CitadelStationBot
parent
6b10a53724
commit
5be4669924
@@ -382,7 +382,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
switch(new_character.mind.special_role)
|
||||
if("Wizard")
|
||||
new_character.forceMove(pick(GLOB.wizardstart))
|
||||
SSticker.mode.equip_wizard(new_character)
|
||||
var/datum/antagonist/wizard/A = new_character.mind.has_antag_datum(/datum/antagonist/wizard,TRUE)
|
||||
A.equip_wizard()
|
||||
if("Syndicate")
|
||||
new_character.forceMove(pick(GLOB.nukeop_start))
|
||||
call(/datum/game_mode/proc/equip_syndicate)(new_character)
|
||||
|
||||
@@ -108,27 +108,12 @@
|
||||
|
||||
/obj/structure/academy_wizard_spawner/proc/summon_wizard()
|
||||
var/turf/T = src.loc
|
||||
|
||||
var/mob/living/carbon/human/wizbody = new(T)
|
||||
wizbody.equipOutfit(/datum/outfit/wizard/academy)
|
||||
var/obj/item/implant/exile/Implant = new/obj/item/implant/exile(wizbody)
|
||||
Implant.implant(wizbody)
|
||||
wizbody.faction |= "wizard"
|
||||
wizbody.real_name = "Academy Teacher"
|
||||
wizbody.name = "Academy Teacher"
|
||||
|
||||
var/datum/mind/wizmind = new /datum/mind()
|
||||
wizmind.name = "Wizard Defender"
|
||||
wizbody.fully_replace_character_name("Academy Teacher")
|
||||
wizbody.mind_initialize()
|
||||
var/datum/mind/wizmind = wizbody.mind
|
||||
wizmind.special_role = "Academy Defender"
|
||||
var/datum/objective/O = new("Protect Wizard Academy from the intruders")
|
||||
wizmind.objectives += O
|
||||
wizmind.transfer_to(wizbody)
|
||||
SSticker.mode.wizards |= wizmind
|
||||
|
||||
wizmind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt)
|
||||
wizmind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile)
|
||||
wizmind.AddSpell(new /obj/effect/proc_holder/spell/aimed/fireball)
|
||||
|
||||
wizmind.add_antag_datum(/datum/antagonist/wizard/academy)
|
||||
current_wizard = wizbody
|
||||
|
||||
give_control()
|
||||
|
||||
@@ -265,6 +265,20 @@
|
||||
back = /obj/item/storage/backpack
|
||||
backpack_contents = list(/obj/item/storage/box=1)
|
||||
|
||||
/datum/outfit/wizard/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
if(visualsOnly)
|
||||
return
|
||||
|
||||
var/obj/item/spellbook/S = locate() in H.held_items
|
||||
if(S)
|
||||
S.owner = H
|
||||
|
||||
/datum/outfit/wizard/apprentice
|
||||
name = "Wizard Apprentice"
|
||||
r_hand = null
|
||||
l_hand = null
|
||||
r_pocket = /obj/item/teleportation_scroll/apprentice
|
||||
|
||||
/datum/outfit/wizard/red
|
||||
name = "Red Wizard"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
|
||||
continue //#savetheminers
|
||||
if(ruins_wizard_loadout && H.mind && ((H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices)))
|
||||
if(ruins_wizard_loadout && iswizard(H))
|
||||
continue
|
||||
if(item_set == "catgirls2015") //Wizard code means never having to say you're sorry
|
||||
H.gender = FEMALE
|
||||
|
||||
@@ -24,35 +24,18 @@
|
||||
I.name = I.dna.real_name
|
||||
I.updateappearance(mutcolor_update=1)
|
||||
I.domutcheck()
|
||||
if(W.ears)
|
||||
I.equip_to_slot_or_del(new W.ears.type, slot_ears)
|
||||
if(W.w_uniform)
|
||||
I.equip_to_slot_or_del(new W.w_uniform.type , slot_w_uniform)
|
||||
if(W.shoes)
|
||||
I.equip_to_slot_or_del(new W.shoes.type, slot_shoes)
|
||||
if(W.wear_suit)
|
||||
I.equip_to_slot_or_del(new W.wear_suit.type, slot_wear_suit)
|
||||
if(W.head)
|
||||
I.equip_to_slot_or_del(new W.head.type, slot_head)
|
||||
if(W.back)
|
||||
I.equip_to_slot_or_del(new W.back.type, slot_back)
|
||||
I.key = C.key
|
||||
|
||||
//Operation: Fuck off and scare people
|
||||
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(null))
|
||||
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(null))
|
||||
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null))
|
||||
|
||||
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
|
||||
if(!master.wiz_team)
|
||||
master.create_wiz_team()
|
||||
var/datum/antagonist/wizard/apprentice/imposter = new(I.mind)
|
||||
imposter.master = M
|
||||
imposter.wiz_team = master.wiz_team
|
||||
master.wiz_team += imposter
|
||||
I.mind.add_antag_datum(imposter)
|
||||
//Remove if possible
|
||||
SSticker.mode.apprentices += I.mind
|
||||
I.mind.special_role = "imposter"
|
||||
|
||||
var/datum/objective/protect/protect_objective = new /datum/objective/protect
|
||||
protect_objective.owner = I.mind
|
||||
protect_objective.target = W.mind
|
||||
protect_objective.explanation_text = "Protect [W.real_name], the wizard."
|
||||
I.mind.objectives += protect_objective
|
||||
SSticker.mode.update_wiz_icons_added(I.mind)
|
||||
|
||||
I.log_message("<font color='red'>Is an imposter!</font>", INDIVIDUAL_ATTACK_LOG)
|
||||
to_chat(I, "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>")
|
||||
//
|
||||
I.log_message("<font color='red'>Is an imposter!</font>", INDIVIDUAL_ATTACK_LOG) //?
|
||||
SEND_SOUND(I, sound('sound/effects/magic.ogg'))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
var/list/mobs = list()
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(H.stat || !H.mind || (H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices))
|
||||
if(H.stat || !H.mind || iswizard(H))
|
||||
continue //the wizard(s) are spared on this one
|
||||
mobs += H
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(M.mind in SSticker.mode.changelings)
|
||||
return 2
|
||||
if("wizard")
|
||||
if(M.mind in SSticker.mode.wizards)
|
||||
if(iswizard(M))
|
||||
return 2
|
||||
if("apprentice")
|
||||
if(M.mind in SSticker.mode.apprentices)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
//In this file: Summon Magic/Summon Guns/Summon Events
|
||||
|
||||
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
|
||||
@@ -217,3 +218,226 @@
|
||||
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(iswizard(H) || 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!")
|
||||
>>>>>>> e8ff73e... Datum antag wizard. (#31449)
|
||||
|
||||
Reference in New Issue
Block a user