View Single Post
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old January 31st, 2017, 11:03 AM
since I still have a bit of time left to play during lunch, I decided to try the code... and as expected there were errors. However, nothing major, so here is a better version to play with.

PostLevelUser/10000
Code:
var atku as number
var fortu as number
var refu as number
var willu as number

foreach pick in hero where "component.BaseClHelp"
  if (eachpick.tagcount[cAttack.Good] <> 0)then
    atku += 1 * eachpick.field[cTotalLev].value
    elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
      atku += 3/4 * eachpick.field[cTotalLev].value
    elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
      atku += 1/2 * eachpick.field[cTotalLev].value
    endif
  if (eachpick.tagcount[cFort.Good] <> 0) then
    fortu += 1/2 * eachpick.field[cTotalLev].value +2
    elseif (eachpick.tagcount[cFort.Poor] <> 0) then
      fortu += 1/3 * eachpick.field[cTotalLev].value
    endif
  if (eachpick.tagcount[cRef.Good] <> 0) then
    refu += 1/2 * eachpick.field[cTotalLev].value +2
    elseif (eachpick.tagcount[cRef.Poor] <> 0) then
      refu += 1/3 * eachpick.field[cTotalLev].value
    endif
  if (eachpick.tagcount[cWill.Good] <> 0) then
    willu += 1/2 * eachpick.field[cTotalLev].value +2
    elseif (eachpick.tagcount[cWill.Poor] <> 0) then
      willu += 1/3 * eachpick.field[cTotalLev].value
    endif
  nexteach

var babtotal as number
babtotal = round(atku,0,-1)

var forttotal as number
forttotal = round(fortu,0,-1)

var reftotal as number
reftotal = round(refu,0,-1)

var willtotal as number
willtotal = round(willu,0,-1)

hero.child[Attack].field[tAtkBase].value = babtotal
hero.child[vFort].field[vBase].value = forttotal
hero.child[vRef].field[vBase].value = reftotal
hero.child[vWill].field[vBase].value = willtotal
it seems to be working, but you will probably be able to see what it is missing better then I will. If it passes your tests, the easiest way to implement would be a condition with a source that has to be turned on.

The best way would be to set up a radial button on the configure hero screen between normal progression and fractional progression however, I am unsure on how to do that (or if it is even possible from the user side).
Nightfox is offline   #9 Reply With Quote