Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make arachnida cloak double size like pnp
  • Loading branch information
burner1024 committed Feb 8, 2023
1 parent 406ccfc commit 8f2cf06
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
36 changes: 35 additions & 1 deletion 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%~
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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~
Expand Down
10 changes: 7 additions & 3 deletions 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.~

0 comments on commit 8f2cf06

Please sign in to comment.