[MIRROR] Shooting specific wizard staffs as a non-wizard or non-magician now backfires in different ways. [MDB IGNORE] (#9089)

* Shooting specific wizard staffs as a non-wizard or non-magician now backfires in different ways. (#62257)

About The Pull Request

If you try using the staff of change, the staff of chaos, the spellblade or the staff of healing as a crewmember, then it'll backfire.
People who can use the staff normally: Apprentices, Wizards, Amateur Magician (from Summon Magic event)

Backfiring is different depending on the staff, each effect is listed below and happens when you try firing the staff.
Staff of change - Wabbajacks the imposter, although they can't become a xeno or a borg.
Staff of chaos - 5% chance to fire the staff at the imposter using it.
Staff of healing - Acts as a medibeam gun to the imposter.
Why It's Good For The Game

Crew getting access to the Staff of Change tends to end in a lot of people becoming xenomorphs or syndicate borgs. It forces the round into a turn for the worse for all antags as xenomorphs have hardstuns, syndicate borgs have emag, greatly improved healing chemicals and powerful weaponary.
Crew getting access to the Staff of Healing results in death being irrelevant. Killing people is no longer a viable tactic as an antagonist because anyone killed, no matter how damaged their body is, can be instantly healed with this staff.
Crew getting access to the Staff of Chaos is like crew getting access to the staff of change and the staff of healing at the same time, only more unpredictable. It's better if they can't reliably use it to get the spells they want as chaos is implied in the name, it becomes russian roulette trying to get the correct bolt as you can also get shot by a bolt of death, instantly killing you.

This is a better alternative to outright removing the staffs or making them usable only by wizards as it gives a quirky use to trying to use them as a crewmember. Maybe not the staff of healing, but fuck the staff of healing.
Changelog

cl
balance: If you try using the staff of change, the staff of chaos or the staff of healing as a crewmember, then it'll backfire. The Staff of change wabbajacks the user, like the pool of change; this means you can't become a xenomorph or a syndicate borg. The Staff of chaos has a 5% chance of firing the bolt directly at the user using it. The Staff of healing now behaves like a medibeam gun to non-wizards trying to use it.
/cl

* Shooting specific wizard staffs as a non-wizard or non-magician now backfires in different ways.

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-10-28 01:09:22 +01:00
committed by GitHub
parent 10bd31e9ec
commit b88b41ceb7
5 changed files with 146 additions and 4 deletions

View File

@@ -254,6 +254,11 @@
spooky_scaries |= M spooky_scaries |= M
to_chat(M, "[span_userdanger("You have been revived by ")]<B>[user.real_name]!</B>") to_chat(M, "[span_userdanger("You have been revived by ")]<B>[user.real_name]!</B>")
to_chat(M, span_userdanger("[user.p_theyre(TRUE)] your master now, assist [user.p_them()] even if it costs you your new life!")) to_chat(M, span_userdanger("[user.p_theyre(TRUE)] your master now, assist [user.p_them()] even if it costs you your new life!"))
var/datum/antagonist/wizard/antag_datum = user.mind.has_antag_datum(/datum/antagonist/wizard)
if(antag_datum)
if(!antag_datum.wiz_team)
antag_datum.create_wiz_team()
M.mind.add_antag_datum(/datum/antagonist/wizard_minion, antag_datum.wiz_team)
equip_roman_skeleton(M) equip_roman_skeleton(M)

View File

@@ -19,6 +19,49 @@
var/wiz_age = WIZARD_AGE_MIN /* Wizards by nature cannot be too young. */ var/wiz_age = WIZARD_AGE_MIN /* Wizards by nature cannot be too young. */
show_to_ghosts = TRUE show_to_ghosts = TRUE
/datum/antagonist/wizard_minion
name = "Wizard Minion"
antagpanel_category = "Wizard"
antag_hud_type = ANTAG_HUD_WIZ
antag_hud_name = "apprentice"
show_in_roundend = FALSE
show_name_in_check_antagonists = TRUE
/// The wizard team this wizard minion is part of.
var/datum/team/wizard/wiz_team
/datum/antagonist/wizard_minion/create_team(datum/team/wizard/new_team)
if(!new_team)
return
if(!istype(new_team))
stack_trace("Wrong team type passed to [type] initialization.")
wiz_team = new_team
/datum/antagonist/wizard_minion/apply_innate_effects(mob/living/mob_override)
var/mob/living/current_mob = mob_override || owner.current
add_antag_hud(antag_hud_type, antag_hud_name, current_mob)
current_mob.faction |= ROLE_WIZARD
/datum/antagonist/wizard_minion/remove_innate_effects(mob/living/mob_override)
var/mob/living/last_mob = mob_override || owner.current
remove_antag_hud(antag_hud_type, last_mob)
last_mob.faction -= ROLE_WIZARD
/datum/antagonist/wizard_minion/on_gain()
create_objectives()
return ..()
/datum/antagonist/wizard_minion/proc/create_objectives()
if(!wiz_team)
return
var/datum/objective/custom/custom_objective = new()
custom_objective.owner = owner
custom_objective.name = "Serve [wiz_team.master_wizard?.owner]"
custom_objective.explanation_text = "Serve [wiz_team.master_wizard?.owner]"
objectives += custom_objective
/datum/antagonist/wizard_minion/get_team()
return wiz_team
/datum/antagonist/wizard/on_gain() /datum/antagonist/wizard/on_gain()
//SKYRAT EDIT REMOVAL BEGIN - WIZARD CHANGES //SKYRAT EDIT REMOVAL BEGIN - WIZARD CHANGES
/* /*
@@ -324,7 +367,7 @@
parts += "<span class='header'>Wizards/witches of [master_wizard.owner.name] team were:</span>" parts += "<span class='header'>Wizards/witches of [master_wizard.owner.name] team were:</span>"
parts += master_wizard.roundend_report() parts += master_wizard.roundend_report()
parts += " " parts += " "
parts += "<span class='header'>[master_wizard.owner.name] apprentices were:</span>" parts += "<span class='header'>[master_wizard.owner.name] apprentices and minions were:</span>"
parts += printplayerlist(members - master_wizard.owner) parts += printplayerlist(members - master_wizard.owner)
return "<div class='panel redborder'>[parts.Join("<br>")]</div>" return "<div class='panel redborder'>[parts.Join("<br>")]</div>"

View File

@@ -519,6 +519,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
var/allowmultiple = FALSE var/allowmultiple = FALSE
var/allowling = TRUE var/allowling = TRUE
var/allowguardian = FALSE var/allowguardian = FALSE
var/datum/antagonist/antag_datum_to_give
/obj/item/guardiancreator/attack_self(mob/living/user) /obj/item/guardiancreator/attack_self(mob/living/user)
if(isguardian(user) && !allowguardian) if(isguardian(user) && !allowguardian)
@@ -620,6 +621,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
/mob/living/proc/guardian_recall, \ /mob/living/proc/guardian_recall, \
/mob/living/proc/guardian_reset)) /mob/living/proc/guardian_reset))
G?.client.init_verbs() G?.client.init_verbs()
return G
/obj/item/guardiancreator/choose /obj/item/guardiancreator/choose
random = FALSE random = FALSE
@@ -631,6 +633,18 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Gravitokinetic") possible_guardians = list("Assassin", "Chaos", "Charger", "Dextrous", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Gravitokinetic")
allowmultiple = TRUE allowmultiple = TRUE
/obj/item/guardiancreator/choose/wizard/spawn_guardian(mob/living/user, mob/dead/candidate)
. = ..()
var/mob/guardian = .
if(!guardian)
return
var/datum/antagonist/wizard/antag_datum = user.mind.has_antag_datum(/datum/antagonist/wizard)
if(antag_datum)
if(!antag_datum.wiz_team)
antag_datum.create_wiz_team()
guardian.mind.add_antag_datum(/datum/antagonist/wizard_minion, antag_datum.wiz_team)
/obj/item/guardiancreator/tech /obj/item/guardiancreator/tech
name = "holoparasite injector" name = "holoparasite injector"
desc = "It contains an alien nanoswarm of unknown origin. Though capable of near sorcerous feats via use of hardlight holograms and nanomachines, it requires an organic host as a home base and source of fuel." desc = "It contains an alien nanoswarm of unknown origin. Though capable of near sorcerous feats via use of hardlight holograms and nanomachines, it requires an organic host as a home base and source of fuel."

View File

@@ -246,7 +246,7 @@
shoot_with_empty_chamber(user) shoot_with_empty_chamber(user)
return return
if(check_botched(user)) if(check_botched(user, target))
return return
var/obj/item/bodypart/other_hand = user.has_hand_for_held_index(user.get_inactive_hand_index()) //returns non-disabled inactive hands var/obj/item/bodypart/other_hand = user.has_hand_for_held_index(user.get_inactive_hand_index()) //returns non-disabled inactive hands
@@ -268,13 +268,13 @@
return process_fire(target, user, TRUE, params, null, bonus_spread) return process_fire(target, user, TRUE, params, null, bonus_spread)
/obj/item/gun/proc/check_botched(mob/living/user, params) /obj/item/gun/proc/check_botched(mob/living/user, atom/target)
if(clumsy_check) if(clumsy_check)
if(istype(user)) if(istype(user))
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40)) if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
to_chat(user, span_userdanger("You shoot yourself in the foot with [src]!")) to_chat(user, span_userdanger("You shoot yourself in the foot with [src]!"))
var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
process_fire(user, user, FALSE, params, shot_leg) process_fire(user, user, FALSE, null, shot_leg)
SEND_SIGNAL(user, COMSIG_MOB_CLUMSY_SHOOT_FOOT) SEND_SIGNAL(user, COMSIG_MOB_CLUMSY_SHOOT_FOOT)
user.dropItemToGround(src, TRUE) user.dropItemToGround(src, TRUE)
return TRUE return TRUE

View File

@@ -6,6 +6,27 @@
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi' lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi' righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
item_flags = NEEDS_PERMIT | NO_MAT_REDEMPTION item_flags = NEEDS_PERMIT | NO_MAT_REDEMPTION
var/allow_intruder_use = FALSE
/obj/item/gun/magic/staff/proc/is_wizard_or_friend(mob/user)
if(!user?.mind?.has_antag_datum(/datum/antagonist/wizard) \
&& !user.mind.has_antag_datum(/datum/antagonist/survivalist/magic) \
&& !user.mind.has_antag_datum(/datum/antagonist/wizard_minion))
return FALSE
return TRUE
/obj/item/gun/magic/staff/check_botched(mob/living/user, atom/target)
if(allow_intruder_use)
return ..()
if(!is_wizard_or_friend(user))
return !on_intruder_use(user, target)
return ..()
/// Called when someone who isn't a wizard or magician uses this staff.
/// Return TRUE to allow usage.
/obj/item/gun/magic/staff/proc/on_intruder_use(mob/living/user, atom/target)
return TRUE
/obj/item/gun/magic/staff/change /obj/item/gun/magic/staff/change
name = "staff of change" name = "staff of change"
@@ -16,6 +37,21 @@
inhand_icon_state = "staffofchange" inhand_icon_state = "staffofchange"
school = SCHOOL_TRANSMUTATION school = SCHOOL_TRANSMUTATION
/obj/item/gun/magic/staff/change/unrestricted
allow_intruder_use = TRUE
/obj/item/gun/magic/staff/change/pickup(mob/user)
. = ..()
if(!is_wizard_or_friend(user))
to_chat(user, span_hypnophrase("<span style='font-size: 24px'>You don't feel strong enough to properly wield this staff!</span>"))
balloon_alert(user, "you feel weak holding this staff")
/obj/item/gun/magic/staff/change/on_intruder_use(mob/living/user, atom/target)
user.dropItemToGround(src, TRUE)
var/randomize = pick("monkey","humanoid","animal")
var/mob/new_body = user.wabbajack(randomize)
balloon_alert(new_body, "wabbajack, wabbajack!")
/obj/item/gun/magic/staff/animate /obj/item/gun/magic/staff/animate
name = "staff of animation" name = "staff of animation"
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines." desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
@@ -33,6 +69,35 @@
icon_state = "staffofhealing" icon_state = "staffofhealing"
inhand_icon_state = "staffofhealing" inhand_icon_state = "staffofhealing"
school = SCHOOL_RESTORATION school = SCHOOL_RESTORATION
var/obj/item/gun/medbeam/healing_beam
/obj/item/gun/magic/staff/healing/pickup(mob/user)
. = ..()
if(!is_wizard_or_friend(user))
to_chat(user, span_hypnophrase("<span style='font-size: 24px'>The staff feels weaker as you touch it</span>"))
balloon_alert(user, "the staff feels weaker as you touch it")
/obj/item/gun/magic/staff/healing/Initialize(mapload)
. = ..()
healing_beam = new(src)
healing_beam.mounted = TRUE
/obj/item/gun/magic/staff/healing/Destroy()
qdel(healing_beam)
return ..()
/obj/item/gun/magic/staff/healing/unrestricted
allow_intruder_use = TRUE
/obj/item/gun/magic/staff/healing/on_intruder_use(mob/living/user, atom/target)
if(target == user)
return FALSE
healing_beam.process_fire(target, user)
return FALSE
/obj/item/gun/magic/staff/healing/dropped(mob/user)
healing_beam.LoseTarget()
return ..()
/obj/item/gun/magic/staff/healing/handle_suicide() //Stops people trying to commit suicide to heal themselves /obj/item/gun/magic/staff/healing/handle_suicide() //Stops people trying to commit suicide to heal themselves
return return
@@ -54,10 +119,25 @@
/obj/projectile/magic/bounty, /obj/projectile/magic/antimagic, /obj/projectile/magic/fetch, /obj/projectile/magic/sapping, /obj/projectile/magic/bounty, /obj/projectile/magic/antimagic, /obj/projectile/magic/fetch, /obj/projectile/magic/sapping,
/obj/projectile/magic/necropotence, /obj/projectile/magic, /obj/projectile/temp/chill, /obj/projectile/magic/wipe) //SKYRAT EDIT - Removes /obj/projectile/magic/change /obj/projectile/magic/necropotence, /obj/projectile/magic, /obj/projectile/temp/chill, /obj/projectile/magic/wipe) //SKYRAT EDIT - Removes /obj/projectile/magic/change
/obj/item/gun/magic/staff/chaos/unrestricted
allow_intruder_use = TRUE
/obj/item/gun/magic/staff/chaos/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) /obj/item/gun/magic/staff/chaos/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
chambered.projectile_type = pick(allowed_projectile_types) chambered.projectile_type = pick(allowed_projectile_types)
. = ..() . = ..()
/obj/item/gun/magic/staff/chaos/on_intruder_use(mob/living/user)
if(user.anti_magic_check(TRUE, FALSE, FALSE)) // Don't let people with antimagic use the staff of chaos.
balloon_alert(user, "the staff refuses to fire!")
return FALSE
if(prob(95)) // You have a 5% chance of hitting yourself when using the staff of chaos.
return TRUE
balloon_alert(user, "chaos!")
user.dropItemToGround(src, TRUE)
process_fire(user, user, FALSE)
return FALSE
/obj/item/gun/magic/staff/door /obj/item/gun/magic/staff/door
name = "staff of door creation" name = "staff of door creation"
desc = "An artefact that spits bolts of transformative magic that can create doors in walls." desc = "An artefact that spits bolts of transformative magic that can create doors in walls."