Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[tool] IWD-style Spell Evasion

2»

Comments

  • Luke93Luke93 Member, Mobile Tester Posts: 1,312
    edited March 2019
    kjeron wrote: »
    I'm dense about this kind of stuff... what is the consequence of this?
    It just means that second EFF was necessary to avoid the unwanted feedback.

    Oh! Got it. So hopefully all is well.

    Yeah, sorry, two .EFFs are indeed needed (my previous solution doesn't work if the targeted Thief is HELPLESS......)

    To sum up: according to the standard check order, my issue was caused by the absence of two extra #318s protecting against the two .EFFs when the targeted CRE doesn't have EVASION (op318 - 252 !SPLSTATE EFFA/B)

    This is because the tool bundled with Scales_of_Balance is not the most recent one, so you may wanna check it out......

  • subtledoctorsubtledoctor Member Posts: 11,467
    edited March 2019
    Okay, I've updated the Evasion function to version 3.2. This makes two changes:

    - First, it adds the Confused state to the list of conditions that will prevent you from evading spells.

    - Second, it adds an %evasion_chance% variable, which can be used in addition to, or instead of, a saving throw. Now anyone can really use this to create 'selective magic resistance.'

    Scales of Balance has also been updated to use this new version.

  • Luke93Luke93 Member, Mobile Tester Posts: 1,312
    EDIT - oh I see, you mean spellstates 26 and 28. Yeah, that's a good idea.

    To tell the truth, there's no need to use them.... Entangle overlay (op#154) and Grease overlay (op#158) set STAT #62 and STAT #66 to 1 => you could simply add 'STAT GREASE/ENTANGLE > 0' to SPLPROT.2da and use these two new entries as param#2 of opcode #318 (without adding SPLSTATEs 26/28 to every SPL/ITM that makes use of op#154/158....)

    Raduziel
  • subtledoctorsubtledoctor Member Posts: 11,467
  • subtledoctorsubtledoctor Member Posts: 11,467
    edited October 2019
    This has been updated to version 3.3 I mean, version 3.4, which fixes a relatively serious bug that messed up compatibility with item revisions.

    Note, as of v3.3 you must handle spells and items separately. (There were some issues witht he possibility of the same filename being found with both the .spl and .itm extension.) To do this, there is a new string variable: %evade_ext% should be set to ~spl~ or ~itm~ as appropriate.

    Post edited by subtledoctor on
  • Luke93Luke93 Member, Mobile Tester Posts: 1,312
    edited October 2019
    This has been updated to version 3.3 I mean, version 3.4, which fixes a relatively serious bug that messed up compatibility with item revisions.

    Remember that ADD_ITEM_EFFECT defaults to type = 3 (Header type: Magical) => As a result, you might want to add
    type = 99
    
    in order to make sure to catch everything (e.g., Arrow of Detonation, whose header is of type 2 – Ranged)

  • subtledoctorsubtledoctor Member Posts: 11,467
    Luke93 wrote: »
    This has been updated to version 3.3 I mean, version 3.4, which fixes a relatively serious bug that messed up compatibility with item revisions.

    Remember that ADD_ITEM_EFFECT defaults to type = 3 (Header type: Magical) => As a result, you might want to add
    type = 99
    
    in order to make sure to catch everything (e.g., Arrow of Detonation, whose header is of type 2 – Ranged)

    Hmm... that was intentional, I wanted it to be restricted to spell effects "cast" by items; we don't want to to affect, say, the poison effects on poisonous arrows or the fire damage from those Sun bullets. Arrows of detonation are exceptions to the rule. God, why can nothing be easy?

    I'll think about it. Honestly, it might be worth doing a manual patch to arrows of detonation and leaving the function itself restricted to header type 3...

Sign In or Register to comment.