Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymorph Overhaul #10

Merged
merged 5 commits into from
May 5, 2022
Merged

Polymorph Overhaul #10

merged 5 commits into from
May 5, 2022

Conversation

4Luke4
Copy link
Contributor

@4Luke4 4Luke4 commented May 5, 2022

The entire Polymorph mechanics has been recoded from scratch.

It now works as follows:
SPINHUM.SPL => universal "Shapeshift: Natural Form" ability (for voluntary forms)

  • Usable at will (op172, op171 as casting feature effects)
  • op326, resource="SPINHUME"
  • op326, resource="SPINHUMR"

SPINHUME.SPL (for use with "Fire / Earth Elemental Transformation" only)

  • op177, resource="SPINHUME"
  • op17, dicenumber=3, dicesize=10 (+3d10 HP)

SPINHUME.EFF (for use with "Fire / Earth Elemental Transformation" only)

  • op318, resource="SPINHUME", parent_resource="*PINHUME"

SPINHUMR.SPL (actual Natural Form ability)

  • op177, resource="SPINHUMW"
  • op177, resource="SPINHUMS"
  • visual / cosmetic effects

SPINHUMW.EFF

  • op135, resource="", parent_resource="*PINHUMW"
    • Clear Magical Weapon Slot / Terminate existing Polymorph

SPINHUMS.EFF

  • op321, resource="SPIN823", parent_resource="*PINHUMS"
    • Clear "Slayer Change" Delayed Damage and Save/Rest block

SPWI489.SPL => "Shapeshift: Natural Form" (forced by "Polymorph Self")

  • visual / audio feedback
  • op177, resource="SPWI489R"
  • op146, parameter2=1, resource="SPINHUMR"

SPWI489R.EFF

  • op318, resource="SPWI489", parent_resource="SPWI416R"
    • Blocks "SPINHUMR.SPL" if the caster is not in one of the forms granted by "Polymorph Self"

SPIN150.SPL => "Shapeshift: Natural Form" (forced by "Shapechange")

  • visual / audio feedback
  • op177, resource="SPIN150R"
  • op146, parameter2=1, resource="SPINHUMR"

SPIN150R.EFF

  • op318, resource="SPIN150", parent_resource="SPWI916R"
    • Blocks "SPINHUMR.SPL" if the caster is not in one of the forms granted by "Shapechange"

Self Polymorphs (with an overall duration)

  • Examples: Shapeshift: Ogre, Shapechange: Fire Elemental, etc...
  • Usable at will: (op172, op171 as casting feature effects)
  • op146, parameter2=1, timing=1, resource="SPINHUMR"
  • op111, timing=4, duration=0 resource="<poly_weapon>"
    • That 0 seconds delay is meant to prevent equipped effect loss (see the IESDP for further details)

Self Polymorphs (without an overall duration)

  • Examples: Druid polymorphs (i.e., Shapeshift: Water Elemental, Shapeshift: Greater Werewolf, ...)
  • op146, parameter2=1, timing=1, resource="SPINHUMR"
  • op111, timing=4, duration=0, resource="<poly_weapon>"
    • That 0 seconds delay is meant to prevent equipped effect loss (see the IESDP for further details)
  • op146, parameter2=1, timing=1, resource=SPINHUMR

Hostile / Limited Polymorphs

  • Examples: Fire Elemental Transformation, Polymorph Other, Cloak of the Sewers, etc...
  • op146, parameter2=1, timing=1, resource="SPINHUMR"
    • op111, timing=4, duration=0, resource="<poly_weapon>" – if permanent duration (such as Bolt of Polymorphing)
      • That 0 seconds delay is meant to prevent equipped effect loss (see the IESDP for further details)
    • op146, parameter2=1, timing=4, duration=0, resource="<subspell>" – if limited duration (such as Sphere of Chaos)
      • That 0 seconds delay is meant to prevent equipped effect loss (see the IESDP for further details)
      • subspell
        • op111, timing=0, duration=<intended_duration>, resource="<poly_weapon>"

Slayer Change

  • Relevant SPL files: SPIN717, SPIN783, SPIN823, SPIN852
  • op146, parameter2=1, timing=1, resource="SPINHUMR" (all but the voluntary one, i.e.: SPIN823)
  • op146, parameter2=1, timing=1, resource="SPINHUMS" (only the voluntary one, i.e.: SPIN823)
    • "Slayer Change" (SPIN823) casts SPINHUMS, which casts SPINHUMR while blocking its second EFF (op321), as it would remove all the effects of SPIN823 that are about to be applied.
    • SPIN823 has its own leading op321 to prevent stacking itself.
  • op146, parameter2=1, timing=4, duration=0, resource="<subspell>"
    • That 0 seconds delay is meant to prevent equipped effect loss (see the IESDP for further details)
    • subspell
      • op111, timing=0, duration=<intended_duration>, resource="<slayer_weapon>" (all)
      • op206, timing=0, duration=180, resource="SPIN822" (only the voluntary one)
        • In the unmodded game, SPIN823 normally gives SPIN822 back after a 180 seconds delay. This way instead SPIN822 is blocked for 180 seconds rather than removed and given back later, as it seems like that process got interrupted on occasion (people complaining about permanently losing the ability).
      • op247 (Attack nearest creature – only the hostile one)
  • The "Slayer Change" 'recoil' damage now scales as follows: 1, 2, 4, 8, ... , up to 32768 (since at least in principle your character can have 32767 HP)
    • NB.: The unknown damage type is to avoid screwing around with the player's damage resistance, using something they cannot prevent.

<poly_weapon>

  • op335, resource="SPINHUM" (only voluntary forms)
  • op335, resource="SPIN160" ("Shapeshift: Fire Salamander" only)
  • op335, resource="SPIN974" ("Shapechange: Mind Flayer" only)
  • op318, resource="SPWI416R" (only forms granted by "Polymorph Self")
  • op318, resource="SPWI916R" (only forms granted by "Shapechange")
  • op318, resource="*PINHUME" ("Fire / Earth Elemental Transformation" only)

Non-polymorph spells/items

  • Examples: "Flame Blade", "MMM", "Shillelagh", etc...
  • op326, parameter2=(STAT POLYMORPHED = 1), resource="SPINHUMW" (right before op111)
  • Only relevant for Contingency, Sequencer, Item activation (f.i. casting from scrolls), since op135,p2=0 automatically disables arcane / divine spellcasting).
  • Non-polymorph Weapon-Creation spells cast SPINHUMW, which casts SPINHUMR while blocking its first EFF (op135), but not the rest.
    • It has to block the op135 EFF, because otherwise op135 would remove the Magical Weapon that is being created by the spell.
      • The new magical weapon will terminate the polymorph on its own, as it replaces the polymorph weapon.

@CamDawg CamDawg merged commit 22f42c8 into Gibberlings3:master May 5, 2022
@4Luke4 4Luke4 changed the title Polymorph overhaul Polymorph Overhaul May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants