• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Cursed ring

Don Keebals

Member
I want to add a cursed ring to my game that looks and acts like a ring of protection, but only for worshipers of Lamashtu. All others will take a negative to AC equal to it's protection bonus. How would that be sripted?
 
Original code for a ring of protection.
Code:
      if (field[gIsEquip].value <> 0) then
        hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, 2)
        endif

Modified Code
Code:
      doneif (field[gIsEquip].value = 0)

      if (#hasdeity[deiLamashtu] <> 0) then
        hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, 2)
      else
        hero.child[ArmorClass].field[Penalty].value -= 2
        endif

No assurances on the code, it isn't tested. As always modify as needed.
 
Back
Top