Thread: Zen Archery
View Single Post
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old March 23rd, 2024, 10:13 AM
I found a fix.

I used the eval script from the monks when they can use either their STR or DEX modifier when unarmed. I changed two things:
1. changed the modifier comparison to WIS
2. the unarmed to Range Projectiles

Changing the modifier comparison to WIS and unarmed to range projectiles
makes the eval script compare Dex mod (typical of range projectiles) to WIS. If WIS is higher, the WIS mod is applied instead.

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ If we're disabled, do nothing
doneif (tagis[Helper.Disable] <> 0)

~ Now foreach through and carry out calculations to replace the wMain tag if the average
~ damage of our current tag is higher than the current one.
var curdicenum as number
var curdicesiz as number
var curwepavg as number
var dotpos as number
var tagstring as string

var searchexpr as string
searchexpr = "wCategory.RangeProj"

foreach pick in hero from BaseWep where searchexpr

~We have the option of using Dex instead of Str for attack and damage
perform eachpick.assign[MelAttOpt.aWIS]
perform eachpick.assign[DamageOpt.aWIS]

~See if our replacement damage would offer a better average damage than what the weapon can currently deal

~debug "We're active. This is " & eachpick.idstring

curdicenum = eachpick.field[wDieCount].value
curdicesiz = eachpick.field[wDieSize].value

~debug "curdicenum is " & curdicenum
~debug "curdicesiz is " & curdicesiz

curwepavg = (curdicesiz + 1)/2
curwepavg *= curdicenum

~debug "After calculations, curwepavg is " & curwepavg & " and our threshold is " & field[abValue].value

if (field[abValue].value > curwepavg) then
~debug "Ability is pushing the higher tag."
eachpick.field[wDieCount].value = field[wDieCount].value
eachpick.field[wDieSize].value = field[wDieSize].value
endif
nexteach

Last edited by spannclann; March 23rd, 2024 at 10:14 AM. Reason: added script
spannclann is offline   #2 Reply With Quote