From ff53bdd87ff6500f06e0997ba3f4a16151e08778 Mon Sep 17 00:00:00 2001 From: datlo Date: Thu, 14 Dec 2023 21:35:21 +0100 Subject: [PATCH] Buff wizard apprentice, limits to one per wizard (The Sequel) (#23258) * Buff wizard apprentice, limits to one per wizard * Update restoration apprentice * fix name of staff of healing * rebuild tgui * Apply suggestions from code review Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * Apply snake case * Update tgui.bundle.js * Update code/game/gamemodes/wizard/artefact.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * remove forcewall from stealth * tgui update and useless comment removal * Update code/datums/spells/wizard_spells.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * update tgui --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/datums/spells/banana_touch.dm | 11 +++ code/datums/spells/wizard_spells.dm | 26 +++++ code/game/gamemodes/wizard/artefact.dm | 95 +++++++++++++------ code/game/gamemodes/wizard/spellbook.dm | 2 + code/modules/clothing/shoes/misc_shoes.dm | 4 + .../interfaces/WizardApprenticeContract.js | 56 +++++++---- tgui/packages/tgui/public/tgui.bundle.js | 6 +- 7 files changed, 149 insertions(+), 51 deletions(-) diff --git a/code/datums/spells/banana_touch.dm b/code/datums/spells/banana_touch.dm index fc4f0dd3f68..ed44996ce45 100644 --- a/code/datums/spells/banana_touch.dm +++ b/code/datums/spells/banana_touch.dm @@ -19,6 +19,17 @@ icon_state = "banana_touch" item_state = "banana_touch" +/obj/effect/proc_holder/spell/touch/banana/apprentice + hand_path = /obj/item/melee/touch_attack/banana/apprentice + +/obj/item/melee/touch_attack/banana/apprentice + +/obj/item/melee/touch_attack/banana/apprentice/afterattack(atom/target, mob/living/carbon/user, proximity) + if(iswizard(target) && target != user) + to_chat(user, "Seriously?! Honk THEM, not me!") + return + ..() + /obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) return diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm index cee4dbb0728..8951fb00ffc 100644 --- a/code/datums/spells/wizard_spells.dm +++ b/code/datums/spells/wizard_spells.dm @@ -190,6 +190,29 @@ /obj/effect/proc_holder/spell/area_teleport/teleport/create_new_targeting() return new /datum/spell_targeting/self +/obj/effect/proc_holder/spell/return_to_teacher + name = "Return to Teacher" + desc = "This spell teleports you back to your teacher." + + school = "abjuration" + base_cooldown = 30 SECONDS + clothes_req = TRUE + invocation = "SCYAR TESO" + invocation_type = "shout" + cooldown_min = 10 SECONDS + + action_icon_state = "spell_teleport" + var/datum/mind/teacher + +/obj/effect/proc_holder/spell/return_to_teacher/create_new_targeting() + return new /datum/spell_targeting/self + +/obj/effect/proc_holder/spell/return_to_teacher/cast(list/targets, mob/living/user = usr) + if(!(teacher && teacher.current)) + to_chat(user, "The link to your teacher is broken!") + return + do_teleport(user, teacher.current, 1, sound_in = 'sound/magic/blink.ogg', sound_out = 'sound/magic/blink.ogg', safe_turf_pick = TRUE) + /obj/effect/proc_holder/spell/forcewall name = "Force Wall" desc = "This spell creates a 3 tile wide unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds." @@ -332,6 +355,9 @@ active = FALSE +/obj/effect/proc_holder/spell/fireball/apprentice + centcom_cancast = FALSE + /obj/effect/proc_holder/spell/fireball/create_new_targeting() var/datum/spell_targeting/clicked_atom/C = new() C.range = 20 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 8fdbbd949fe..f62205c0cf5 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -40,34 +40,8 @@ new /obj/effect/particle_effect/smoke(H.loc) var/mob/living/carbon/human/M = new/mob/living/carbon/human(H.loc) M.key = C.key - to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow [H.p_their()] orders and help [H.p_them()] in accomplishing their goals.") - switch(action) - if("destruction") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/projectile/magic_missile(null)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/fireball(null)) - to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned powerful, destructive spells. You are able to cast magic missile and fireball.") - if("bluespace") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/area_teleport/teleport(null)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/ethereal_jaunt(null)) - to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned reality bending mobility spells. You are able to cast teleport and ethereal jaunt.") - if("healing") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/charge(null)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/forcewall(null)) - M.equip_to_slot_or_del(new /obj/item/gun/magic/staff/healing(M), SLOT_HUD_RIGHT_HAND) - to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.") - if("robeless") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe/knock(null)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/mind_transfer(null)) - to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.") - - M.equip_to_slot_or_del(new /obj/item/radio/headset(M), SLOT_HUD_LEFT_EAR) - M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), SLOT_HUD_JUMPSUIT) - M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), SLOT_HUD_SHOES) - M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), SLOT_HUD_OUTER_SUIT) - M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), SLOT_HUD_HEAD) - M.equip_to_slot_or_del(new /obj/item/storage/backpack(M), SLOT_HUD_BACK) - M.equip_to_slot_or_del(new /obj/item/storage/box(M), SLOT_HUD_IN_BACKPACK) - M.equip_to_slot_or_del(new /obj/item/teleportation_scroll/apprentice(M), SLOT_HUD_RIGHT_STORE) + to_chat(M, "You are [H.real_name]'s apprentice! You are bound by magic contract to follow [H.p_their()] orders and help [H.p_them()] in accomplishing [H.p_their()] goals.") + equip_apprentice(action, M, H) var/wizard_name_first = pick(GLOB.wizard_first) var/wizard_name_second = pick(GLOB.wizard_second) var/randomname = "[wizard_name_first] [wizard_name_second]" @@ -80,9 +54,8 @@ M.name = newname var/datum/objective/protect/new_objective = new /datum/objective/protect - new_objective.owner = M.mind new_objective.target = H.mind - new_objective.explanation_text = "Protect [H.real_name], the wizard." + new_objective.explanation_text = "Protect and obey [H.real_name], your teacher." M.mind.add_mind_objective(new_objective) SSticker.mode.apprentices += M.mind @@ -105,6 +78,68 @@ ui_interact(user) +/obj/item/contract/proc/equip_apprentice(action, mob/living/carbon/human/M, mob/living/carbon/human/H) + M.equip_to_slot_or_del(new /obj/item/radio/headset(M), SLOT_HUD_LEFT_EAR) + if(action == "stealth") + M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), SLOT_HUD_JUMPSUIT) + else + M.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(M), SLOT_HUD_JUMPSUIT) + M.equip_to_slot_or_del(new /obj/item/storage/backpack(M), SLOT_HUD_BACK) + M.equip_to_slot_or_del(new /obj/item/storage/box(M), SLOT_HUD_IN_BACKPACK) + M.equip_to_slot_or_del(new /obj/item/teleportation_scroll/apprentice(M), SLOT_HUD_RIGHT_STORE) + switch(action) + if("fire") + M.mind.AddSpell(new /obj/effect/proc_holder/spell/fireball/apprentice(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/sacred_flame(null)) + ADD_TRAIT(M, TRAIT_RESISTHEAT, MAGIC_TRAIT) + ADD_TRAIT(M, TRAIT_RESISTHIGHPRESSURE, MAGIC_TRAIT) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/ethereal_jaunt(null)) + M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), SLOT_HUD_SHOES) + M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/red(M), SLOT_HUD_OUTER_SUIT) + M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), SLOT_HUD_HEAD) + to_chat(M, "Your service has not gone unrewarded. Under the tutelage of [H.real_name], you've acquired proficiency in the fundamentals of Firebending, enabling you to cast spells like Fireball, Sacred Flame, and Ethereal Jaunt.") + to_chat(M, "You are immune to fire, but you are NOT immune to the explosions caused by your fireballs. Neither is your teacher, for that matter. Be careful!") + if("translocation") + M.mind.AddSpell(new /obj/effect/proc_holder/spell/area_teleport/teleport(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/turf_teleport/blink(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/ethereal_jaunt(null)) + M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(M), SLOT_HUD_SHOES) + M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(M), SLOT_HUD_OUTER_SUIT) + M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), SLOT_HUD_HEAD) + to_chat(M, "Your service has not gone unrewarded. While studying under [H.real_name], you mastered reality-bending mobility spells, allowing you to cast Teleport, Blink, and Ethereal Jaunt.") + if("restoration") + M.mind.AddSpell(new /obj/effect/proc_holder/spell/charge(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe/knock(null)) + var/obj/effect/proc_holder/spell/return_to_teacher/S = new /obj/effect/proc_holder/spell/return_to_teacher(null) + S.teacher = H.mind + M.mind.AddSpell(S) + M.equip_to_slot_or_del(new /obj/item/gun/magic/staff/healing(M), SLOT_HUD_RIGHT_HAND) + M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/marisa(M), SLOT_HUD_SHOES) + M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/marisa(M), SLOT_HUD_OUTER_SUIT) + M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), SLOT_HUD_HEAD) + to_chat(M, "Your service has not gone unrewarded. Under the guidance of [H.real_name], you've acquired life-saving survival spells. You can now cast Charge and Knock, and possess the ability to teleport back to your mentor.") + to_chat(M, "Your Charge spell can be used to recharge your Staff of Healing or reduce the cooldowns of your teacher, if you are grabbing them with empty hands.") + if("stealth") + M.mind.AddSpell(new /obj/effect/proc_holder/spell/mind_transfer(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe/knock(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/fireball/toolbox(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/summonitem(null)) + M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), SLOT_HUD_SHOES) + M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), SLOT_HUD_WEAR_MASK) + M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), SLOT_HUD_GLOVES) + M.equip_to_slot_or_del(new /obj/item/storage/belt/utility/full(M), SLOT_HUD_BELT) + to_chat(M, "Your service has not gone unrewarded. Under the mentorship of [H.real_name], you've mastered stealthy, robeless spells. You can now cast Mindswap, Knock, Homing Toolbox, Forcewall, and Instant Summons without the need for wizard robes.") + if("honk") + M.mind.AddSpell(new /obj/effect/proc_holder/spell/touch/banana/apprentice(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/ethereal_jaunt(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/summonitem(null)) + M.equip_to_slot_or_del(new /obj/item/gun/magic/staff/slipping(M), SLOT_HUD_RIGHT_HAND) + M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes/magical/nodrop(M), SLOT_HUD_SHOES) + M.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/clown(M), SLOT_HUD_OUTER_SUIT) + M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/clown(M), SLOT_HUD_HEAD) + M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clownwiz(M), SLOT_HUD_WEAR_MASK) + to_chat(M, "Your dedication pays off! Under [H.real_name]'s guidance, you've mastered magical honkings, seamlessly casting spells like Banana Touch, Ethereal Jaunt, and Instant Summons, while skillfully wielding a Staff of Slipping. Honk!") + ///////////////////////////Veil Render////////////////////// /obj/item/veilrender diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index c63ce948f07..a0849e4c800 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -615,6 +615,8 @@ desc = "A magical contract binding an apprentice wizard to your service, using it will summon them to your side." item_path = /obj/item/contract category = "Summons" + limit = 1 + is_ragin_restricted = TRUE //We have enough wizards already! Sheesh! /datum/spellbook_entry/item/tarotdeck name = "Guardian Deck" diff --git a/code/modules/clothing/shoes/misc_shoes.dm b/code/modules/clothing/shoes/misc_shoes.dm index c53a3982043..a6925603b28 100644 --- a/code/modules/clothing/shoes/misc_shoes.dm +++ b/code/modules/clothing/shoes/misc_shoes.dm @@ -119,6 +119,10 @@ desc = "Standard-issue shoes of the wizarding class clown. Damn they're huge! And powerful! Somehow." magical = TRUE +/obj/item/clothing/shoes/clown_shoes/magical/nodrop + desc = "Standard-issue shoes of the wizarding class clown. Damn they're huge! And stuck to your feet!" + flags = NODROP + /obj/item/clothing/shoes/clown_shoes/slippers actions_types = list(/datum/action/item_action/slipping) enabled_waddle = FALSE diff --git a/tgui/packages/tgui/interfaces/WizardApprenticeContract.js b/tgui/packages/tgui/interfaces/WizardApprenticeContract.js index 631b725f54b..6228eded3f8 100644 --- a/tgui/packages/tgui/interfaces/WizardApprenticeContract.js +++ b/tgui/packages/tgui/interfaces/WizardApprenticeContract.js @@ -26,49 +26,69 @@ export const WizardApprenticeContract = (props, context) => {
- - Your apprentice is skilled in offensive magic. They know Magic - Missile and Fireball. + + Your apprentice is skilled in bending fire.
+ They know Fireball, Sacred Flame, and Ethereal Jaunt.