Page 1 of 1

rpdat Modifier Question

Posted: Tue May 03, 2011 12:52 am
by dunstvangeet
Looking at finishing out the PHB2 dataset (YAY ME!). Just have a little question.

The Avenger class gets a +3 AC Bonus if they are wearing no armor, or have cloth armor. I also need to check for a shield (they can't use a shield). I'm having trouble constructing the boolean to add to the APPLIES tag, and could use some help.

What properties am I looking for?

Re: rpdat Modifier Question

Posted: Tue May 03, 2011 5:24 am
by Jagged
What happens if they have a shield?

If its simply that they don't get the bonus for the shield then you shouldn't have to do anything.

If it effects the +3 AC bonus then that's more complicated.

Re: rpdat Modifier Question

Posted: Tue May 03, 2011 11:01 am
by dunstvangeet
Here's the official text...

"The favor of your deity wards you from harm. While you are wearing cloth armor or no armor and aren’t using a shield, you gain a +3 bonus to AC."

So, it's while there is no shield, and either cloth armor, or no armor.

Re: rpdat Modifier Question

Posted: Tue May 03, 2011 12:15 pm
by dunstvangeet
So, the boolean logic would be...

AND(shield == none, OR(armorType == cloth, armorType == none))

I'm just not sure which parentheses I can use to get to it. That's all that I need to know.

Re: rpdat Modifier Question

Posted: Tue May 03, 2011 1:33 pm
by Jagged
I am not sure how you check for no armour but for the rest I am guessing something like:

Code: Select all


and( not(exists("root.equipped.shield.armorBonus")) ,
  or(getIfExists("armorItem.armorType", "Cloth") , getIfExists("armorItem.armorType", "") ) )


Re: rpdat Modifier Question

Posted: Wed May 04, 2011 3:45 am
by dunstvangeet
Okay, I got the asking for Cloth Armor part. I'm still not sure how to ask if they're not equipped with any armor, nor where they're equipped with a shield.

Re: rpdat Modifier Question

Posted: Wed May 04, 2011 4:30 am
by Jagged
I "think" getIfExists("armorItem.armorType", "") should check if they have no armour.

And not(exists("root.equipped.shield.armorBonus")) should check they aren't getting a shield bonus.

I think :) None of that is tested.

Re: rpdat Modifier Question

Posted: Wed May 04, 2011 11:15 am
by dunstvangeet
Tried the armor one. Keep on getting NullPointerExceptions. Jay, if you're around, I'd like your opinion...

Re: rpdat Modifier Question

Posted: Wed May 04, 2011 11:21 am
by jay
This will return true if the player has no armor equipped or just Cloth armor.

Code: Select all

eq(getIfExists("root.equipped.armor.armorType", "Cloth"), "Cloth")
This will return true if the player doesn't have a shield equipped.

Code: Select all

not(exists("root.equipped.shield.name"))

Re: rpdat Modifier Question

Posted: Wed May 04, 2011 12:20 pm
by dunstvangeet
Thank you. Finally works the way I want it to.