From 8f2cf066f777a13ad606fc04676e05ac4aa40c78 Mon Sep 17 00:00:00 2001 From: Magus Date: Thu, 9 Feb 2023 02:09:36 +0700 Subject: [PATCH] make arachnida cloak double size like pnp --- tnt/components/shandalars_cloak/main.tpa | 36 +++++++++++++++++++++++- tnt/tra/english/shandalars_cloak.tra | 10 +++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/tnt/components/shandalars_cloak/main.tpa b/tnt/components/shandalars_cloak/main.tpa index 4951d848..abd8eea9 100644 --- a/tnt/components/shandalars_cloak/main.tpa +++ b/tnt/components/shandalars_cloak/main.tpa @@ -1,10 +1,33 @@ +// separate immunity for individual spells +// because many spell erroneously use paralyse opcode in addition to web LAF LIST_WEB_SPELLS RET_ARRAY web_spells = spells END +// icon for item ability COPY_EXISTING ~%WIZARD_WEB%.spl~ override READ_LONG SPL_extended_headers_offset eh_off READ_ASCII (eh_off + SPL_HEAD_memorised_icon) web_icon BUT_ONLY +OUTER_SPRINT custom_web ~g_web2x~ +COPY_EXISTING ~web.pro~ ~override/%custom_web%.pro~ +// not using var because of how ADD_PROJECTILE works, but this must be the same as spell name +ADD_PROJECTILE ~override/g_web2x.pro~ +OUTER_SET pro_id = "%g_web2x%" + +COPY_EXISTING ~%WIZARD_WEB%.spl~ ~override/%custom_web%.spl~ + READ_LONG SPL_extended_headers_offset eh_off + WRITE_SHORT (eh_off + SPL_HEAD_projectile) ~%pro_id%~ +BUT_ONLY + +// double size +OUTER_SET PRO_trigger_radius_offset = 0x204 +OUTER_SET PRO_aoe_size_offset = 0x206 +COPY_EXISTING ~%custom_web%.pro~ ~override~ + WRITE_SHORT PRO_trigger_radius_offset 362 // 256 * sqrt(2) + WRITE_SHORT PRO_aoe_size_offset 362 // 256 * sqrt(2) +BUT_ONLY + +// actual cloak COPY_EXISTING ~clck22.itm~ ~override~ READ_STRREF NAME2 name_shandalars_cloak SAY NAME1 ~%name_shandalars_cloak%~ @@ -46,6 +69,16 @@ COPY_EXISTING ~clck22.itm~ ~override~ END END END + // and from self + LPF ADD_ITEM_EQEFFECT + INT_VAR + opcode = OPCODE_protection_from_spell + target = TARGET_FX_self + timing = TIMING_while_equipped + resist_dispel = NONMAGICAL + STR_VAR + resource = ~%custom_web%~ + END // save vs poison bonus LPF ADD_ITEM_EQEFFECT @@ -81,11 +114,12 @@ COPY_EXISTING ~clck22.itm~ ~override~ timing = TIMING_permanent target = TARGET_FX_self // doesn't work without it for some reason STR_VAR - resource = ~%WIZARD_WEB%~ + resource = ~%custom_web%~ END BUT_ONLY + // set unidentified, 1 charge COPY_EXISTING ~dezkie.cre~ ~override~ REMOVE_CRE_ITEM ~clck22~ diff --git a/tnt/tra/english/shandalars_cloak.tra b/tnt/tra/english/shandalars_cloak.tra index af62aa09..5c46d4cb 100644 --- a/tnt/tra/english/shandalars_cloak.tra +++ b/tnt/tra/english/shandalars_cloak.tra @@ -1,11 +1,15 @@ +// https://baldursgate.fandom.com/wiki/Shandalar%27s_Cloak +// https://www.purpleworm.org/rules/DMG/DD00915.htm @1 = ~Cloak of Arachnida~ @2 = ~This cloak was originally stolen from Shandalar by the powerful mage Semia, presumably for the powerful magics woven into the fabric. How it has come to be in your possession and the fate of Semia are complete mysteries, and ones not likely to be solved. -The cloak is woven from spider silk and imbued with powerful magic. It protects the wearer from entrapment in web and any web-like spells. However, it doesn't offer any protection against other movement impairing effects. +The cloak is woven from spider silk and radiates a strong aura of alteration magic. It grants the wearer immunity to entrapment by webs of any sort. -In addition, the cloak allows to cast Web once per day, and provides extra protection from poison. +Once per day the wearer of this cloak can cast a double-sized web. This operates like the 2nd-level wizard spell. + +Also, the wearer is less subject to poison. STATISTICS: Saving Throws: +2 bonus vs Poison. -Special: The wearer is immune to webs, and can cast Web once per day.~ +Special: The wearer is immune to webs, and can cast a double-sized Web once per day.~