• 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

Weapon Damage Die

spannclann

Well-known member
@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.
 
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?
 
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
 
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!
 
Back
Top