mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Maintainers Have No Sense of Right or Wrong (#12381)
This commit is contained in:
committed by
variableundefined
parent
a185a1e537
commit
3eb4ad0ed5
@@ -1,170 +1,169 @@
|
||||
//In this file: Summon Magic/Summon Guns/Summon Events
|
||||
|
||||
// 1 in 50 chance of getting something really special.
|
||||
#define SPECIALIST_MAGIC_PROB 2
|
||||
|
||||
/mob/proc/rightandwrong(summon_type, revolver_fight = FALSE, fake_revolver_fight = FALSE) //0 = Summon Guns, 1 = Summon Magic
|
||||
var/list/gunslist = list("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","arg","uzi","turret","pulsecarbine","decloner","mindflayer","kinetic","advplasmacutter","wormhole","wt550","grenadelauncher","medibeam", "fakerevolver")
|
||||
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffhealing", "armor", "scrying", "staffdoor", "special","voodoo","special")
|
||||
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos","necromantic")
|
||||
GLOBAL_LIST_INIT(summoned_guns, list(
|
||||
/obj/item/gun/energy/disabler,
|
||||
/obj/item/gun/energy/gun,
|
||||
/obj/item/gun/energy/gun/advtaser,
|
||||
/obj/item/gun/energy/laser,
|
||||
/obj/item/gun/projectile/revolver,
|
||||
/obj/item/gun/projectile/revolver/detective,
|
||||
/obj/item/gun/projectile/automatic/pistol/deagle/camo,
|
||||
/obj/item/gun/projectile/automatic/gyropistol,
|
||||
/obj/item/gun/energy/pulse,
|
||||
/obj/item/gun/projectile/automatic/pistol,
|
||||
/obj/item/gun/projectile/revolver/doublebarrel,
|
||||
/obj/item/gun/projectile/shotgun,
|
||||
/obj/item/gun/projectile/shotgun/automatic/combat,
|
||||
/obj/item/gun/projectile/automatic/ar,
|
||||
/obj/item/gun/projectile/revolver/mateba,
|
||||
/obj/item/gun/projectile/shotgun/boltaction,
|
||||
/obj/item/gun/projectile/automatic/mini_uzi,
|
||||
/obj/item/gun/energy/lasercannon,
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large,
|
||||
/obj/item/gun/energy/gun/nuclear,
|
||||
/obj/item/gun/projectile/automatic/proto,
|
||||
/obj/item/gun/projectile/automatic/c20r,
|
||||
/obj/item/gun/projectile/automatic/l6_saw,
|
||||
/obj/item/gun/projectile/automatic/m90,
|
||||
/obj/item/gun/energy/alien,
|
||||
/obj/item/gun/energy/gun/turret,
|
||||
/obj/item/gun/energy/pulse/carbine,
|
||||
/obj/item/gun/energy/decloner,
|
||||
/obj/item/gun/energy/mindflayer,
|
||||
/obj/item/gun/energy/kinetic_accelerator,
|
||||
/obj/item/gun/energy/plasmacutter/adv,
|
||||
/obj/item/gun/energy/wormhole_projector,
|
||||
/obj/item/gun/projectile/automatic/wt550,
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog,
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher,
|
||||
/obj/item/gun/projectile/revolver/golden,
|
||||
/obj/item/gun/projectile/automatic/sniper_rifle,
|
||||
/obj/item/gun/medbeam,
|
||||
/obj/item/gun/energy/laser/scatter))
|
||||
|
||||
to_chat(usr, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
|
||||
message_admins("[key_name_admin(usr)] summoned [summon_type ? "magic" : "guns"]! ([revolver_fight ? "Revolver duel!" : ""] [fake_revolver_fight ? "Suicidal revolver duel!" : ""])")
|
||||
//if you add anything that isn't covered by the typepaths below, add it to summon_magic_objective_types
|
||||
GLOBAL_LIST_INIT(summoned_magic, list(
|
||||
/obj/item/spellbook/oneuse/fireball,
|
||||
/obj/item/spellbook/oneuse/smoke,
|
||||
/obj/item/spellbook/oneuse/blind,
|
||||
/obj/item/spellbook/oneuse/mindswap,
|
||||
/obj/item/spellbook/oneuse/forcewall,
|
||||
/obj/item/spellbook/oneuse/knock,
|
||||
/obj/item/spellbook/oneuse/horsemask,
|
||||
/obj/item/spellbook/oneuse/charge,
|
||||
/obj/item/spellbook/oneuse/summonitem,
|
||||
/obj/item/gun/magic/wand,
|
||||
/obj/item/gun/magic/wand/death,
|
||||
/obj/item/gun/magic/wand/resurrection,
|
||||
/obj/item/gun/magic/wand/polymorph,
|
||||
/obj/item/gun/magic/wand/teleport,
|
||||
/obj/item/gun/magic/wand/door,
|
||||
/obj/item/gun/magic/wand/fireball,
|
||||
/obj/item/gun/magic/staff/healing,
|
||||
/obj/item/gun/magic/staff/door,
|
||||
/obj/item/scrying,
|
||||
/obj/item/voodoo,
|
||||
/obj/item/clothing/suit/space/hardsuit/wizard,
|
||||
/obj/item/immortality_talisman,
|
||||
/obj/item/melee/ghost_sword))
|
||||
|
||||
GLOBAL_LIST_INIT(summoned_special_magic, list(
|
||||
/obj/item/gun/magic/staff/change,
|
||||
/obj/item/gun/magic/staff/animate,
|
||||
/obj/item/storage/belt/wands/full,
|
||||
/obj/item/contract,
|
||||
/obj/item/gun/magic/staff/chaos,
|
||||
/obj/item/necromantic_stone,
|
||||
/obj/item/blood_contract))
|
||||
|
||||
//everything above except for single use spellbooks, because they are counted separately (and are for basic bitches anyways)
|
||||
GLOBAL_LIST_INIT(summoned_magic_objectives, list(
|
||||
/obj/item/contract,
|
||||
/obj/item/blood_contract,
|
||||
/obj/item/clothing/suit/space/hardsuit/wizard,
|
||||
/obj/item/gun/magic,
|
||||
/obj/item/immortality_talisman,
|
||||
/obj/item/melee/ghost_sword,
|
||||
/obj/item/necromantic_stone,
|
||||
/obj/item/scrying,
|
||||
/obj/item/spellbook,
|
||||
/obj/item/storage/belt/wands/full,
|
||||
/obj/item/voodoo))
|
||||
|
||||
// If true, it's the probability of triggering "survivor" antag.
|
||||
GLOBAL_VAR_INIT(summon_guns_triggered, FALSE)
|
||||
GLOBAL_VAR_INIT(summon_magic_triggered, FALSE)
|
||||
|
||||
/proc/give_guns(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
return
|
||||
if(H.mind)
|
||||
if(iswizard(H))
|
||||
return
|
||||
|
||||
if(prob(GLOB.summon_guns_triggered) && !(H.mind in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += H.mind
|
||||
|
||||
H.mind.add_antag_datum(/datum/antagonist/survivalist/guns)
|
||||
H.create_attack_log("<font color='red'>was made into a survivalist, and trusts no one!</font>")
|
||||
|
||||
var/gun_type = pick(GLOB.summoned_guns)
|
||||
var/obj/item/gun/G = new gun_type(get_turf(H))
|
||||
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, TRUE)
|
||||
|
||||
var/in_hand = H.put_in_hands(G) // not always successful
|
||||
|
||||
to_chat(H, "<span class='warning'>\A [G] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
|
||||
|
||||
/proc/give_magic(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
return
|
||||
if(H.mind)
|
||||
if(iswizard(H))
|
||||
return
|
||||
|
||||
if(prob(GLOB.summon_magic_triggered) && !(H.mind in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += H.mind
|
||||
|
||||
H.mind.add_antag_datum(/datum/antagonist/survivalist/magic)
|
||||
H.create_attack_log("<font color='red'>was made into a survivalist, and trusts no one!</font>")
|
||||
|
||||
var/magic_type = pick(GLOB.summoned_magic)
|
||||
var/lucky = FALSE
|
||||
if(prob(SPECIALIST_MAGIC_PROB))
|
||||
magic_type = pick(GLOB.summoned_special_magic)
|
||||
lucky = TRUE
|
||||
|
||||
var/obj/item/M = new magic_type(get_turf(H))
|
||||
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, TRUE)
|
||||
|
||||
var/in_hand = H.put_in_hands(M)
|
||||
|
||||
to_chat(H, "<span class='warning'>\A [M] appears [in_hand ? "in your hand" : "at your feet"]!</span>")
|
||||
if(lucky)
|
||||
to_chat(H, "<span class='notice'>You feel incredibly lucky.</span>")
|
||||
|
||||
/proc/rightandwrong(summon_type, mob/user, survivor_probability)
|
||||
if(user) //in this case either someone holding a spellbook or a badmin
|
||||
to_chat(user, "<span class='warning'>You summoned [summon_type]!</span>")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] summoned [summon_type]!")
|
||||
log_game("[key_name(user)] summoned [summon_type]!")
|
||||
|
||||
if(summon_type == SUMMON_MAGIC)
|
||||
GLOB.summon_magic_triggered = survivor_probability
|
||||
else if(summon_type == SUMMON_GUNS)
|
||||
GLOB.summon_guns_triggered = survivor_probability
|
||||
else
|
||||
CRASH("Bad summon_type given: [summon_type]")
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !(H.client))
|
||||
var/turf/T = get_turf(H)
|
||||
if(T && is_away_level(T.z))
|
||||
continue
|
||||
if(H.mind)
|
||||
if(H.mind.special_role == SPECIAL_ROLE_WIZARD || H.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)
|
||||
continue
|
||||
var/randomizeguns = pick(gunslist)
|
||||
var/randomizemagic = pick(magiclist)
|
||||
var/randomizemagicspecial = pick(magicspeciallist)
|
||||
if(revolver_fight)
|
||||
randomizeguns = "revolver"
|
||||
if(fake_revolver_fight)
|
||||
if(prob(50))
|
||||
randomizeguns = "revolver"
|
||||
else
|
||||
randomizeguns = "fakerevolver"
|
||||
if(!summon_type)
|
||||
switch(randomizeguns)
|
||||
if("taser")
|
||||
new /obj/item/gun/energy/gun/advtaser(get_turf(H))
|
||||
if("egun")
|
||||
new /obj/item/gun/energy/gun(get_turf(H))
|
||||
if("laser")
|
||||
new /obj/item/gun/energy/laser(get_turf(H))
|
||||
if("revolver")
|
||||
new /obj/item/gun/projectile/revolver(get_turf(H))
|
||||
if("detective")
|
||||
new /obj/item/gun/projectile/revolver/detective(get_turf(H))
|
||||
if("deagle")
|
||||
new /obj/item/gun/projectile/automatic/pistol/deagle/camo(get_turf(H))
|
||||
if("gyrojet")
|
||||
new /obj/item/gun/projectile/automatic/gyropistol(get_turf(H))
|
||||
if("pulse")
|
||||
new /obj/item/gun/energy/pulse(get_turf(H))
|
||||
if("suppressed")
|
||||
new /obj/item/gun/projectile/automatic/pistol(get_turf(H))
|
||||
new /obj/item/suppressor(get_turf(H))
|
||||
if("doublebarrel")
|
||||
new /obj/item/gun/projectile/revolver/doublebarrel(get_turf(H))
|
||||
if("shotgun")
|
||||
new /obj/item/gun/projectile/shotgun(get_turf(H))
|
||||
if("combatshotgun")
|
||||
new /obj/item/gun/projectile/shotgun/automatic/combat(get_turf(H))
|
||||
if("arg")
|
||||
new /obj/item/gun/projectile/automatic/ar(get_turf(H))
|
||||
if("mateba")
|
||||
new /obj/item/gun/projectile/revolver/mateba(get_turf(H))
|
||||
if("boltaction")
|
||||
new /obj/item/gun/projectile/shotgun/boltaction(get_turf(H))
|
||||
if("uzi")
|
||||
new /obj/item/gun/projectile/automatic/mini_uzi(get_turf(H))
|
||||
if("cannon")
|
||||
new /obj/item/gun/energy/lasercannon(get_turf(H))
|
||||
if("crossbow")
|
||||
new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
|
||||
if("nuclear")
|
||||
new /obj/item/gun/energy/gun/nuclear(get_turf(H))
|
||||
if("sabr")
|
||||
new /obj/item/gun/projectile/automatic/proto(get_turf(H))
|
||||
if("bulldog")
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(get_turf(H))
|
||||
if("c20r")
|
||||
new /obj/item/gun/projectile/automatic/c20r(get_turf(H))
|
||||
if("saw")
|
||||
new /obj/item/gun/projectile/automatic/l6_saw(get_turf(H))
|
||||
if("car")
|
||||
new /obj/item/gun/projectile/automatic/m90(get_turf(H))
|
||||
if("turret")
|
||||
new /obj/item/gun/energy/gun/turret(get_turf(H))
|
||||
if("pulsecarbine")
|
||||
new /obj/item/gun/energy/pulse/carbine(get_turf(H))
|
||||
if("decloner")
|
||||
new /obj/item/gun/energy/decloner(get_turf(H))
|
||||
if("mindflayer")
|
||||
new /obj/item/gun/energy/mindflayer(get_turf(H))
|
||||
if("kinetic")
|
||||
new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
|
||||
if("advplasmacutter")
|
||||
new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
|
||||
if("wormhole")
|
||||
new /obj/item/gun/energy/wormhole_projector(get_turf(H))
|
||||
if("wt550")
|
||||
new /obj/item/gun/projectile/automatic/wt550(get_turf(H))
|
||||
if("grenadelauncher")
|
||||
new /obj/item/gun/projectile/revolver/grenadelauncher(get_turf(H))
|
||||
if("medibeam")
|
||||
new /obj/item/gun/medbeam(get_turf(H))
|
||||
if("fakerevolver")
|
||||
new /obj/item/toy/russian_revolver/trick_revolver(get_turf(H)) //lol
|
||||
|
||||
playsound(get_turf(H), 'sound/magic/summon_guns.ogg', 50, 1)
|
||||
if(summon_type == SUMMON_MAGIC)
|
||||
give_magic(H)
|
||||
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/horsemask(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(!(XRAY in H.mutations))
|
||||
H.mutations.Add(XRAY)
|
||||
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
H.see_in_dark = 8
|
||||
H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
H.update_sight()
|
||||
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
if("voodoo")
|
||||
new /obj/item/voodoo(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/contract(get_turf(H))
|
||||
if("staffchaos")
|
||||
new /obj/item/gun/magic/staff/chaos(get_turf(H))
|
||||
if("necromantic")
|
||||
new /obj/item/necromantic_stone(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)
|
||||
give_guns(H)
|
||||
@@ -295,11 +295,11 @@
|
||||
/datum/spellbook_entry/summon
|
||||
name = "Summon Stuff"
|
||||
category = "Rituals"
|
||||
refundable = 0
|
||||
refundable = FALSE
|
||||
buy_word = "Cast"
|
||||
var/active = 0
|
||||
var/active = FALSE
|
||||
|
||||
/datum/spellbook_entry/summon/CanBuy(var/mob/living/carbon/human/user,var/obj/item/spellbook/book)
|
||||
/datum/spellbook_entry/summon/CanBuy(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
return ..() && !active
|
||||
|
||||
/datum/spellbook_entry/summon/GetInfo()
|
||||
@@ -337,8 +337,7 @@
|
||||
|
||||
/datum/spellbook_entry/summon/guns
|
||||
name = "Summon Guns"
|
||||
desc = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill you. Just be careful not to stand still too long! You will also receive 1 extra point to use in your spellbook."
|
||||
cost = 0
|
||||
desc = "Nothing could possibly go wrong with arming a crew of lunatics just itching for an excuse to kill you. There is a good chance that they will shoot each other first."
|
||||
log_name = "SG"
|
||||
|
||||
/datum/spellbook_entry/summon/guns/IsSpellAvailable()
|
||||
@@ -349,18 +348,17 @@
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/datum/spellbook_entry/summon/guns/Buy(var/mob/living/carbon/human/user,var/obj/item/spellbook/book)
|
||||
/datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
feedback_add_details("wizard_spell_learned", log_name)
|
||||
user.rightandwrong(0)
|
||||
book.uses += 1
|
||||
active = 1
|
||||
to_chat(user, "<span class='notice'>You have cast summon guns and gained an extra charge for your spellbook.</span>")
|
||||
return 1
|
||||
rightandwrong(SUMMON_GUNS, user, 10)
|
||||
active = TRUE
|
||||
playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You have cast summon guns!</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/spellbook_entry/summon/magic
|
||||
name = "Summon Magic"
|
||||
desc = "Share the wonders of magic with the crew and show them why they aren't to be trusted with it at the same time. You will also receive 1 extra point to use in your spellbook."
|
||||
cost = 0
|
||||
desc = "Share the wonders of magic with the crew and show them why they aren't to be trusted with it at the same time."
|
||||
log_name = "SU"
|
||||
|
||||
/datum/spellbook_entry/summon/magic/IsSpellAvailable()
|
||||
@@ -371,13 +369,13 @@
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/datum/spellbook_entry/summon/magic/Buy(var/mob/living/carbon/human/user,var/obj/item/spellbook/book)
|
||||
/datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user, obj/item/spellbook/book)
|
||||
feedback_add_details("wizard_spell_learned", log_name)
|
||||
user.rightandwrong(1)
|
||||
book.uses += 1
|
||||
active = 1
|
||||
to_chat(user, "<span class='notice'>You have cast summon magic and gained an extra charge for your spellbook.</span>")
|
||||
return 1
|
||||
rightandwrong(SUMMON_MAGIC, user, 10)
|
||||
active = TRUE
|
||||
playsound(get_turf(user), 'sound/magic/castsummon.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You have cast summon magic!</span>")
|
||||
return TRUE
|
||||
|
||||
//Main category - Magical Items
|
||||
/datum/spellbook_entry/item
|
||||
|
||||
Reference in New Issue
Block a user