Senior Member
Join Date: Aug 2018
Location: Texas
Posts: 109
|
@Fenris447
I am needing an eval script that checks for the hero's level. If the appropriate level is met then shortbow and damage die are increased to the next highest die. (i.e. Shortbow to 1d8 and Longbow to 1d10) I found this level check: ~ Check whether you have at least 18 levels of the Fighter class @valid = 0 if (#levelcount[Fighter] >= 18) then @valid = 1 endif and I know to do this for damage die: hero.childfound[wShortbow].field[wDieCount].value = 1 hero.childfound[wShortbow].field[wDieSize].value = 8 I assume I need a check to see if the hero has the weapon in question before it applies the larger damage die. |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 602
|
So it's gonna get kinda complicated if you want it to work for any weapon, any damage die. Because you could add 2 to the wDieSize, but if they're already at a d12 then you'd be bumping it up to the non-standard d14.
Second thing is, are you looking at specific weapons, a pool of specific weapons, or any weapon of the player's choice? That'll determine exactly how we approach this. And is it a feature for a specific class/subclass, or is this like a feat where the class doesn't matter? Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#2 |
Senior Member
Join Date: Aug 2018
Location: Texas
Posts: 109
|
It is a custom fighter subclass ability. I got it to work using this, but I am not sure if there is a better way.
if (field[xAllLev].value >= 18) then foreach pick in hero from BaseWep where "IsWeapon.wShortbow" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wShortbow" eachpick.field[wDieSize].value = 8 nexteach foreach pick in hero from BaseWep where "IsWeapon.wLongbow" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wLongbow" eachpick.field[wDieSize].value = 10 nexteach foreach pick in hero from BaseWep where "IsWeapon.wRIPHankyu" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wRIPHankyu" eachpick.field[wDieSize].value = 8 nexteach foreach pick in hero from BaseWep where "IsWeapon.wRIPGreatbow" eachpick.field[wDieCount].value = 2 nexteach foreach pick in hero from BaseWep where "IsWeapon.wRIPGreatbow" eachpick.field[wDieSize].value = 6 nexteach foreach pick in hero from BaseWep where "IsWeapon.w5COvrLngbw" eachpick.field[wDieCount].value = 2 nexteach foreach pick in hero from BaseWep where "IsWeapon.w5COvrLngbw" eachpick.field[wDieSize].value = 8 nexteach foreach pick in hero from BaseWep where "IsWeapon.w5CLiReCro" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.w5CLiReCro" eachpick.field[wDieSize].value = 10 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrssbwHan" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrssbwHan" eachpick.field[wDieSize].value = 8 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrssbwHvy" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrssbwHvy" eachpick.field[wDieSize].value = 12 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrossbowL" eachpick.field[wDieCount].value = 1 nexteach foreach pick in hero from BaseWep where "IsWeapon.wCrossbowL" eachpick.field[wDieSize].value = 10 nexteach endif |
#3 |
Senior Member
Join Date: Sep 2017
Posts: 602
|
If it's working the way you want it, then great!
My only note is that typically, 5e subclasses base everything on your class level. That [xAllLev] is basing it on your total level, regardless of multiple classes. But if that's okay with you, then no worries! Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#4 |
Senior Member
Join Date: Aug 2018
Location: Texas
Posts: 109
|
I did mean to change it to check for the Fighter level.
|
#5 |
|
|