Thread: Question
View Single Post
Senior Member
Join Date: May 2016
Location: Louisville, KY
Posts: 490

Old July 27th, 2018, 11:50 AM
Originally Posted by TaylorBland View Post
My Question is, how do i make it to where the Damage bonus is triggered instead of static and it requires Batteries to use? i am still working on placing those in the Editor so i don't have their code yet. But any example would be great.
Generally speaking, you would put your damage bonus in a script that looks at Activated Abilities.

If it's a static, on/off ability you'll want to check the abilActive value.

if (field[abilActive].value = 1) then
   ~ if we're active then add +2 to weapon damage bonus
   field[wDamBonus].value += 2
If you want a sliding scale, you can look at the "Defender" magic sword setup. These allow you to subtract your bonus and add to your AC, but you could simply do something like the following:

 field[wDamBonus].value += field[actUser].value
As far as enforcing ammuntion or charges, it depends on how you're tracking them. As ammunition - there's no logic that forces a bow to check to see that you have arrows in inventory. As charges, you basically have to look at adding a "tracker" to your item. Both ways have pros/cons.

DM'ing since 1984's red box. Pretending to slay dragons for a long time before.
The mirror doesn't lie.

Links for Community files:
Changelog for 5e Community Files
Open Issues for 5e Community Files

LW Products: Hero Labs Classic
Other Tools: CC3+, Inspiration Pad Pro
dungeonguru is offline   #25 Reply With Quote