Junior Member
Join Date: Aug 2009
Location: Worcester MA
Posts: 18
|
I'm working to create two magic items, each based off of existing items. What I'm not sure on is the syntax I would need to use for both.
The first is easy. it's a Runestone of Protection, which gives a +1 Unnamed bonus to AC (normal, touch and flat-flooted) and to all saves. Sort of like a +1 Ring of Protection and a +1 Amulet of Natural Armor combined. What I was thinking of was this: Code:
if (field[gIsEquip].value <> 0) then hero.child[ArmorClass].field[tACArmor].value = maximum(hero.child[ArmorClass].field[tACLuck].value, 1) hero.child[vFort].field[vResist].value = maximum(hero.child[vFort].field[vResist].value, 1) hero.child[vRef].field[vResist].value = maximum(hero.child[vRef].field[vResist].value, 1) hero.child[vWill].field[vResist].value = maximum(hero.child[vWill].field[vResist].value, 1) hero.child[ArmorClass].field[tACDeflect].value = maximum(hero.child[ArmorClass].field[tACDeflect].value, 1) endif Second one is a bit tougher. It's an artifact based on the Monk's Belt, but with a few additions: 1. At 9th level, it provides Dodge as a bonus feat. If the wearer already has Dodge, then it provides an additional Dodge action versus a second opponent, with the action as an interrupt. 2. +1 to hit/damage in melee I'm sure the GM will also throw in more features as my Monk reaches higher levels. Now, the Monk's Belt already has this as the code: Code:
if (field[gIsEquip].value <> 0) then ~ ~ If we're a monk, our AC and unarmed damage abilities get ~ 5 extra levels if (hero.tagis[Classes.Monk] <> 0) then hero.child[cMnkAC].field[xExtraLev].value = hero.child[cMnkAC].field[xExtraLev].value + 5 hero.child[cMnkUnarm].field[xExtraLev].value = hero.child[cMnkUnarm].field[xExtraLev].value + 5 ~ ~ Otherwise, we get 3 upgrades to our unarmed damage, and an AC bonus ~ assigned below else var result as number result = hero.child[wUnarmed].assign[Helper.DamageUp] result = hero.child[wUnarmed].assign[Helper.DamageUp] result = hero.child[wUnarmed].assign[Helper.DamageUp] endif endif I've tried doing this before, a couple of years ago with just toying around, but never got anywhere successful. Oh, and as a bonus, he has bracers that give +1 Strength and AC, enhancement bonuses. Fun, huh? Thanks in advance for any assistance. A learning experience is one of those things that say, "You know that thing you just did? Don't do that." === Douglas Adams |
#1 |
Senior Member
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,089
|
1. Your first item is trying to grant two separate bonuses to AC (+1 luck and +1 Deflection) and there is no luck bonus to AC. If you delete that first "AC bonus" line, the item will work and grant a Deflection bonus to AC. (Which won't stack with any existing Def AC)
You might be better using the script from the Amulet of Natural Armour, so that you grant a (or increase an existing) natural armour bonus. 2. No ideas on the Dodge for your Monk's Belt upgrade at the moment, I'll think about it if I get a chance. Look at the "Amulet of Mighty Fists" to get the +1 attack/damage bonus. 3. Bracers. Look at a Belt of Ogre Strength, etc for the Strength increase. |
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
hero.child[ArmorClass].field[Bonus].value += 1 Quote:
Now, the Monk's Belt already has this as the code: Code:
perform hero.child[wUnarmed].assign[Helper.DamageUp] perform hero.child[wUnarmed].assign[Helper.DamageUp] perform hero.child[wUnarmed].assign[Helper.DamageUp] Quote:
Code:
foreach pick in hero from BaseWep where "wCategory.Melee" eachpick.field[Bonus].value += 1 nexteach Code:
Classes.Monk>=9 I'll have to look into what it would take to check to see if the character already has Dodge before adding the Dodge feat, but once we get that figured out you can then use another bootstrap to add a special that indicates the ability to take another Dodge action. |
|||
#3 |
|
|