Array
(
[scriptVersion] => 8
[oeValues] => Array
(
[Ubertip] => "blank slate"
[Art] => ReplaceableTextures\CommandButtons\BTNCOP.blp
[abilList] => Array
(
)
[Name] => Tabula Rasa
)
[settings] => Array
(
[balanceTip] => Array
(
)
[goldcost] => 1500
[author] => Ashbringer
[authorDisplay] => |cffff6600Ashbringer|r
[version] => 1.0
[rarity] => unique
)
[dmgTable] => Array
(
)
[triggers] => Array
(
[0] => Array
(
[name] => On Item Drop
[code] => call tabula_cleanup(itm)
[values] => Array
(
[explain] =>
[visible] => false
[goldcost] => 0
[name] =>
)
)
[1] => Array
(
[name] => On Item Creation
[code] => local Tabula tabula = Tabula.create()
local integer count = 0
loop
exitwhen count>3
set tabula.mods[count] = 13
set tabula.values[count] = 0
set count = count + 1
endloop
set itm.userInt = tabula
[values] => Array
(
[explain] =>
[visible] => false
[goldcost] => 0
[name] =>
)
)
[2] => Array
(
[name] => Header
[code] => globals
MultiboardValues tabula_info
endglobals
struct Tabula
integer array mods[4]
integer array values[4]
string array names[4]
endstruct
function tabula_apply takes Item itm returns nothing
local Tabula tabula = itm.userInt
local Tower tower = itm.getCarrier()
local integer count = 0
loop
exitwhen count>3
if tabula.mods[count] != 0 and tabula.values[count] > 0.0 then
call tower.modifyProperty(tabula.mods[count], I2R(tabula.values[count])/25.0*0.01)
endif
set count = count + 1
endloop
endfunction
function tabula_cleanup takes Item itm returns nothing
local Tabula tabula = itm.userInt
local Tower tower = itm.getCarrier()
local integer count = 0
loop
exitwhen count>3
if tabula.mods[count] != 0 and tabula.values[count] > 0.0 then
call tower.modifyProperty(tabula.mods[count], -I2R(tabula.values[count])/25.0*0.01)
endif
set count = count + 1
endloop
endfunction
//Do not remove or rename this function!
//Put your initialization tasks here, this function will be called on map init
private function init takes nothing returns nothing
set tabula_info = MultiboardValues.create(4)
call tabula_info.setKey(0, "Stat 1")
call tabula_info.setKey(1, "Stat 2")
call tabula_info.setKey(2, "Stat 3")
call tabula_info.setKey(3, "Stat 4")
endfunction
[values] => Array
(
[explain] =>
[visible] => false
[goldcost] => 0
[name] =>
)
)
[3] => Array
(
[name] => On Tower Details
[code] => local Tabula tabula = itm.userInt
local integer count = 0
loop
exitwhen count>3
call tabula_info.setKey(count, tabula.names[count])
if tabula.mods[count]==MOD_ATK_CRIT_DAMAGE or tabula.mods[count]==MOD_SPELL_CRIT_DAMAGE then
call tabula_info.setValue(count, "x" + formatFloat(I2R(tabula.values[count])/50.0*0.01, 2))
else
call tabula_info.setValue(count, formatPercentAddColor(I2R(tabula.values[count])/50.0*0.01, 0))
endif
set count = count + 1
endloop
return tabula_info
[values] => Array
(
[0] => Array
(
[_value] => 0
[typ] => string
)
)
)
[4] => Array
(
[name] => On Item Pickup
[code] => call tabula_apply(itm)
[values] => Array
(
[explain] =>
[visible] => false
[goldcost] => 0
[name] =>
)
)
[5] => Array
(
[name] => Autocast
[code] => local Tabula tabula = Tabula.create()
local Tower tower = itm.getCarrier()
local Playor p = tower.getOwner()
local integer gold = R2I(GetPlayerState(p.getThePlayer(), PLAYER_STATE_RESOURCE_GOLD))
local integer array mods
local integer temp
local integer swap
local integer count = 0
if gold>=2500 then
set gold = 2500
call p.giveGold(-gold, tower.getUnit(), false, true)
call tabula_cleanup(itm)
set mods[0] = MOD_ATTACKSPEED
set mods[1] = MOD_DAMAGE_ADD_PERC
set mods[2] = MOD_ATK_CRIT_CHANCE
set mods[3] = MOD_ATK_CRIT_DAMAGE
set mods[4] = MOD_SPELL_DAMAGE_DEALT
set mods[5] = MOD_SPELL_CRIT_CHANCE
set mods[6] = MOD_SPELL_CRIT_DAMAGE
set mods[7] = MOD_TRIGGER_CHANCES
set mods[8] = MOD_EXP_RECEIVED
set mods[9] = MOD_BOUNTY_RECEIVED
set mods[10] = MOD_ITEM_CHANCE_ON_KILL
set mods[11] = MOD_ITEM_QUALITY_ON_KILL
set mods[12] = MOD_BUFF_DURATION
set mods[13] = MOD_MANA_PERC
set mods[14] = MOD_MANA_REGEN_PERC
set mods[15] = 0
//randomize
loop
exitwhen count>14
set swap = GetRandomInt(0, 14)
set temp = mods[swap]
set mods[swap] = mods[count]
set mods[count] = temp
set count = count + 1
endloop
set count = 3
set temp = GetRandomInt(0, 11)
loop
exitwhen count<0
if count>0 then
set swap = GetRandomInt(50, R2I((gold*2)/(count+1)))
set swap = swap - ModuloInteger(swap, 50)
set gold = gold - swap
else
set swap = gold
endif
set tabula.mods[count] = mods[count+temp]
set tabula.values[count] = swap
if mods[count+temp]==MOD_ATTACKSPEED then
set tabula.names[count] = "Attack Speed"
elseif mods[count+temp]==MOD_DAMAGE_ADD_PERC then
set tabula.names[count] = "Attack Damage"
elseif mods[count+temp]==MOD_ATK_CRIT_CHANCE then
set tabula.names[count] = "Crit Chance"
elseif mods[count+temp]==MOD_ATK_CRIT_DAMAGE then
set tabula.names[count] = "Crit Damage"
elseif mods[count+temp]==MOD_SPELL_DAMAGE_DEALT then
set tabula.names[count] = "Spell Damage"
elseif mods[count+temp]==MOD_SPELL_CRIT_CHANCE then
set tabula.names[count] = "Spell Crit Chance"
elseif mods[count+temp]==MOD_SPELL_CRIT_DAMAGE then
set tabula.names[count] = "Spell Crit Damage"
elseif mods[count+temp]==MOD_TRIGGER_CHANCES then
set tabula.names[count] = "Trigger Chances"
elseif mods[count+temp]==MOD_EXP_RECEIVED then
set tabula.names[count] = "Experience Gained"
elseif mods[count+temp]==MOD_BOUNTY_RECEIVED then
set tabula.names[count] = "Bounty Collected"
elseif mods[count+temp]==MOD_ITEM_CHANCE_ON_KILL then
set tabula.names[count] = "Item Quantity"
elseif mods[count+temp]==MOD_ITEM_QUALITY_ON_KILL then
set tabula.names[count] = "Item Quality"
elseif mods[count+temp]==MOD_BUFF_DURATION then
set tabula.names[count] = "Buff Duration"
elseif mods[count+temp]==MOD_MANA_PERC then
set tabula.names[count] = "Maximum Mana"
elseif mods[count+temp]==MOD_MANA_REGEN_PERC then
set tabula.names[count] = "Mana Regeneration"
else
set tabula.names[count] = "ERROR"
endif
set count = count - 1
endloop
set itm.userInt = tabula
call tabula_apply(itm)
else
call p.displayFloatingText("Insufficient gold!", tower, 255, 0, 0)
endif
set count = 0
call p.clearScreen()
call p.displayTimedText("|cffFF00BFTabula Rasa:|r", 6.0)
loop
exitwhen count>3
if tabula.mods[count]==MOD_ATK_CRIT_DAMAGE or tabula.mods[count]==MOD_SPELL_CRIT_DAMAGE then
call p.displayTimedText(tabula.names[count] + ": x" + formatFloat(I2R(tabula.values[count])/25.0*0.01, 2), 6.0)
else
call p.displayTimedText(tabula.names[count] + ": " + formatPercentAddColor(I2R(tabula.values[count])/25.0*0.01, 0), 6.0)
endif
set count = count + 1
endloop
[values] => Array
(
[explain] => Consume |cffffff802500|r gold to generate |cffffff804|r random stats with random values totalling |cffffff80100%|r, replacing any existing bonuses on this item. Bonuses are bound to the item.
[AUTOCAST_cooldown] => 120
[AUTOCAST_autoRange] => 0
[AUTOCAST_manacost] => 0
[goldcost] => 1500
[AUTOCAST_range] => 0
[AUTOCAST_targetType] => 0
[AUTOCAST_numBuffsBeforeIdle] => 0
[caster_art] =>
[target_art] =>
[AUTOCAST_autocastType] => AC_TYPE_NOAC_IMMEDIATE
[AUTOCAST_buffType] => 0
[AUTOCAST_isExtended] => false
[name] => Journey
[AUTOCAST_targetSelf] => true
)
)
)
[abilities] => Array
(
)
[buffs] => Array
(
)
[units] => Array
(
)
[references] => Array
(
)
)