View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 16th, 2020, 09:47 AM
I'm not sure how you're wanting to see the conditional work, generally speaking, trying to check alignments of other "entities" in the portfolio is complex. I've not seen any code examples aside from stuff that affects minions.

You can give the player the option to turn the AC bonus on/off manually on the in-play tab by using the abilActive field. To make an item use this field you need to make sure the checkmark next to Show in Activated Abilities List? is checked.

Here's a script example of how you might do this (generally running post-attributes 10000 timing but you may need to play with timing):

Code:
~ leave script if not equipped
doneif (field[gIsEquip].value = 0)
~ leave script if not attuned
doneif (field[gIsAttuned].value = 0)
~ leave script of not activated
doneif (field[abilActive].value = 0) 
~ otherwise add 1 to the AC bonuses
hero.childfound[ArmorClass].field[Bonus].value += 1
If you're looking to add the situational text and an asterisk by armor class, you can try something like

Code:
#situational[hero.childfound[ArmorClass],"Bonus to AC vs good creatures",field[thingname].text]
but I don't think the Armor Class field supports that consistently or at all.
dungeonguru is offline   #2 Reply With Quote