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

Old April 23rd, 2021, 01:29 PM
I forgot to mention that I had a second Eval script that is as follows:



~ 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 = "IsWeapon.wUnarmed"

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.aDEX]
perform eachpick.assign[DamageOpt.aDEX]

~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
spannclann is offline   #5 Reply With Quote