//TESH.scrollpos=132
//TESH.alwaysfold=0
//////////////////////////////////////////////////////////////////////////////////////////////////
// Lobsters Multiboard weapon system\\
// Description: creates a multiboard for a player that describes a units attack, armor, stats,
// attack speed, and evasion, along with allowing you to increase these stats using
// Cohadars bonus system(modified)
//
// Intended Use: This system is intended for rpgs' and other maps that focus on one hero per player
// It is made to replace items as a weapon slot
//
// Requires: vjass
// Importing: Copy the code out of the custom script section,and place
// it in YOUR maps custom script box. Next copy the Bonus, and Bonus Plugins into your map.
// Enable the plugins, and save, close the map, open the map, and disable the plugins.
//
// Demo instructions: Press Esc to create the multiboard. Then type "increase#" where #
// is a number between 1 and 8. You will see your stats in both the hero, and the multiboard
// go up.
//
// Using the system: Using the system is easy. To register a multiboard for a player use the
// function:
//
// function MultiboardCreate takes player p, string wt, string title returns nothing.
//
// player p is the player for whom the mkultiboard will appear
// string wt is the weapon type(or anything else you want to put in the first row)
// string title is the multiboards title.
//
// Use the following functions to increase a heros stats
//
// function updateattack takes unit u, integer i returns nothing
// function updatestrength takes unit u, integer i returns nothing
// function updateagility takes unit u, integer i returns nothing
// function updateintelligence takes unit u, integer i returns nothing
// function updatearmor takes unit u, integer i returns nothing
// function updatespeed takes unit u, integer i returns nothing
// function updatecritical takes unit u, integer i returns nothing
// function updateevasion takes unit u, integer i returns nothing
//
// where unit u is the unit, and integer i is the amount for the respective
// stat.
//
// Special Thanks to: Cohadar for Bonus.
function MultiboardCreate takes player p, string wt, string title returns nothing
globals
//configurables
string attributedamage = "Sharpness"
string attributestrength = "Strength"
string attributeagility = "Agility"
string attributeintelligence= "intelligence"
string attributearmor = "Defense"
string attributespeed = "Speed"
string attributecritical = "Critical"
string attributeevasion = "Evasion"
// end configurables
multiboard array multi
string multititle
integer array damage
integer array strength
integer array agility
integer array intelligence
integer array defense
integer array aspeed
integer array critical
integer array evasion
endglobals
local multiboard m
local integer pli
call BJDebugMsg("test1")
set multi[GetPlayerId(p)] = CreateMultiboard()
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
call MultiboardDisplay(multi[GetPlayerId(p)],false)
call MultiboardSetItemsStyle(m,true, false)
//Now to setup the multiboard
call MultiboardSetColumnCount(m, 1)
call MultiboardSetRowCount(m, 9)
call MultiboardSetItemsWidth(m, .1)
call MultiboardSetTitleText(m, title)
call MultiboardSetItemsStyle(m,true, false)
call MultiboardSetItemValue(MultiboardGetItem(m, 0,0), wt)
call MultiboardSetItemValue(MultiboardGetItem(m, 1,0), attributedamage + ": " +I2S(damage[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 2,0), attributestrength + ": " +I2S(strength[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 3,0), attributeagility + ": " +I2S(agility[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 4,0), attributeintelligence + ": " +I2S(intelligence[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 5,0), attributearmor + ": " +I2S(defense[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 6,0), attributespeed + ": " +I2S(aspeed[pli]))
call MultiboardSetItemValue(MultiboardGetItem(m, 7,0), attributecritical + ": " +I2S(critical[pli])+"%")
call MultiboardSetItemValue(MultiboardGetItem(m, 8,0), attributeevasion + ": " +I2S(evasion[pli])+"%")
if GetLocalPlayer() == p then
call MultiboardDisplay(m,true)
endif
endfunction
function updateattack takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
call BJDebugMsg("lol1")
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Damage[u] = Bonus_Damage[u] + i
set damage[pli] = damage[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,1,0), attributedamage + ": " +I2S(damage[pli]))
endfunction
function updatestrength takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Str[u] = Bonus_Str[u] + i
set strength[pli] = strength[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,2,0), attributestrength + ": " +I2S(strength[pli]))
endfunction
function updateagility takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Agi[u] = Bonus_Agi[u] + i
set agility[pli] = agility[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,3,0), attributeagility + ": " +I2S(agility[pli]))
endfunction
function updateintelligence takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Int[u] = Bonus_Int[u] + i
set intelligence[pli] = intelligence[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,4,0), attributeintelligence + ": " +I2S(intelligence[pli]))
endfunction
function updatearmor takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Armor[u] = Bonus_Armor[u] + i
set defense[pli] = defense[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,5,0), attributearmor + ": " +I2S(defense[pli]))
endfunction
function updatespeed takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_AttackSpeed[u] = Bonus_AttackSpeed[u] + i
set aspeed[pli] = aspeed[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,6,0), attributespeed + ": " +I2S(aspeed[pli]))
endfunction
function updatecritical takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Critical[u] = Bonus_Critical[u] + i
set critical[pli] = critical[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,7,0), attributecritical + ": " +I2S(critical[pli]))
endfunction
function updateevasion takes unit u, integer i returns nothing
local multiboard m
local player p
local integer pli
set p = GetOwningPlayer(u)
set m = multi[GetPlayerId(p)]
set pli = GetPlayerId(p)
set Bonus_Evasion[u] = Bonus_Evasion[u] + i
set evasion[pli] = evasion[pli] + i
call MultiboardSetItemValue(MultiboardGetItem(m,8,0), attributeevasion + ": " +I2S(evasion[pli]))
endfunction
Name | Type | is_array | initial_value |
U | unit | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
//==============================================================================
// Bonus -- State modification system -- v1.3
//==============================================================================
//
// AUTHOR:
// * Cohadar
//
// PURPOUSE:
// * Easy changing of units' max life, max mana, armor, damage, str, agi, int,
// move speed, attack speed, evasion, critical...
// (or anything else you put in)
//
// EXAMPLES:
// * set Bonus_Life[whichUnit] = 4 // will add 400 life (DELTA = 100)
// * set Bonus_Armor[whichUnit] = 10 // will add 10 armor (DELTA = 1)
// * set Bonus_Damage[whichUnit] = 5 // will add 25 damage (DELTA = 5)
// * set Bonus_Evasion[whichUnit] = 4 // will add 20% evasion (DELTA = 5%)
//
// PLUGINS:
// * Abilities needed by Bonus system are created with plugins
// If you do not need some bonus type simply do not use that type plugin
//
// PROS:
// * It removes the need for using abilties with 100 levels
// (significantly reduces map loading time)
// * It can be easily extended for other bonus types
//
// CONS:
// * You have to be smart enough to calculate wanted modification from DELTA
// * System does not support negative values
//
// DETAILS:
// * DELTA is the smallest value of modification (bonus resolution)
// DELTA is the bonus value in first bonus ability
// * COUNT is the number of custom abilities used per bonus
// Valid bonus ranges for binary bonuses are 0..(2^COUNT)-1
// Valid bonus ranges for linear bonuses are 0..COUNT
// Bonus is multiplied by DELTA to get the resulting modification
// For example bonus 7 will change units' life by 700
// because life delta is set to 100
//
// HOW TO IMPORT:
// * Just create a trigger named Bonus
// convert it to text and replace the whole trigger text with this one
// * Create needed abilities with Bonus Plugins
//
//==============================================================================
library Bonus initializer Init
//===========================================================================
globals
private constant integer MAX_CODES = 20 // max number of abilities per bonus
endglobals
//===========================================================================
interface IBonus
method operator DELTA takes nothing returns integer
method operator MAXBONUS takes nothing returns integer
method operator[] takes unit whichUnit returns integer
method operator[]= takes unit whichUnit, integer bonus returns nothing
endinterface
//===========================================================================
// This one is for stackable item abilities (life, mana, armor, str...)
//===========================================================================
private struct BinaryBonus extends IBonus
private integer firstCode
private integer count
private integer delta
private integer maxbonus
private static integer array POWZ // powers of 2 for binary algorithm
//-----------------------------------------------------------------------
static method create takes integer firstCode, integer count, integer delta returns BinaryBonus
local BinaryBonus bb = BinaryBonus.allocate()
set bb.firstCode = firstCode
set bb.count = count
set bb.delta = delta
set bb.maxbonus = .POWZ[count]-1
return bb
endmethod
//-----------------------------------------------------------------------
method operator DELTA takes nothing returns integer
return .delta
endmethod
//-----------------------------------------------------------------------
method operator MAXBONUS takes nothing returns integer
return .maxbonus
endmethod
//-----------------------------------------------------------------------
method operator[] takes unit whichUnit returns integer
local integer bonus = 0
local integer i = .count-1
loop
exitwhen i<0
if GetUnitAbilityLevel(whichUnit, .firstCode+i)>0 then
set bonus = bonus + .POWZ[i]
endif
set i = i - 1
endloop
return bonus
endmethod
//-----------------------------------------------------------------------
method operator[]= takes unit whichUnit, integer bonus returns nothing
local integer i = .count-1
if bonus < 0 then
call BJDebugMsg("|c00ff0000"+SCOPE_PREFIX+"$NAME$["+GetUnitName(whichUnit)+"] = "+I2S(bonus)+" // bonus underflow")
endif
if bonus > .POWZ[.count]-1 then
call BJDebugMsg("|c00ff0000"+SCOPE_PREFIX+"$NAME$["+GetUnitName(whichUnit)+"] = "+I2S(bonus)+" // bonus overflow")
endif
loop
exitwhen i<0
if bonus >= .POWZ[i] then
set bonus = bonus - .POWZ[i]
if GetUnitAbilityLevel(whichUnit, .firstCode+i)==0 then
call UnitAddAbility(whichUnit, .firstCode+i)
call UnitMakeAbilityPermanent(whichUnit, true, .firstCode+i)
endif
else
if GetUnitAbilityLevel(whichUnit, .firstCode+i)>0 then
call UnitMakeAbilityPermanent(whichUnit, false, .firstCode+i)
call UnitRemoveAbility(whichUnit, .firstCode+i)
endif
endif
set i = i - 1
endloop
endmethod
//-----------------------------------------------------------------------
private static method onInit takes nothing returns nothing
local integer i = 0
local integer pow = 1
loop
exitwhen i > MAX_CODES
set .POWZ[i] = pow
set i = i + 1
set pow = pow * 2
endloop
endmethod
endstruct
//===========================================================================
// This one is for non-stackable abilities (move speed, evasion, critical, ...)
//===========================================================================
private struct LinearBonus extends IBonus
private integer firstCode
private integer count
private integer delta
private integer maxbonus
//-----------------------------------------------------------------------
private static method hideSpellBook takes integer abilId returns nothing
local integer p = 0
loop
call SetPlayerAbilityAvailable(Player(p), abilId, false)
set p = p + 1
exitwhen p == bj_MAX_PLAYER_SLOTS
endloop
endmethod
//-----------------------------------------------------------------------
static method create takes integer firstCode, integer count, integer delta, boolean spellBook returns LinearBonus
local LinearBonus lb = LinearBonus.allocate()
local integer i
set lb.firstCode = firstCode
set lb.count = count
set lb.delta = delta
set lb.maxbonus = count
if spellBook then
set i = 0
loop
exitwhen i>=count
call .hideSpellBook(firstCode+i)
set i = i + 1
endloop
endif
return lb
endmethod
//-----------------------------------------------------------------------
method operator DELTA takes nothing returns integer
return .delta
endmethod
//-----------------------------------------------------------------------
method operator MAXBONUS takes nothing returns integer
return .maxbonus
endmethod
//-----------------------------------------------------------------------
method operator[] takes unit whichUnit returns integer
local integer bonus = 0
local integer i = .count-1
loop
exitwhen i<0
if GetUnitAbilityLevel(whichUnit, .firstCode+i)>0 then
return i+1
endif
set i = i - 1
endloop
return 0
endmethod
//-----------------------------------------------------------------------
method operator[]= takes unit whichUnit, integer bonus returns nothing
local integer i = .count-1
if bonus < 0 then
call BJDebugMsg("|c00ff0000"+SCOPE_PREFIX+"$NAME$["+GetUnitName(whichUnit)+"] = "+I2S(bonus)+" // bonus underflow")
set bonus = 0
endif
if bonus > .count then
call BJDebugMsg("|c00ff0000"+SCOPE_PREFIX+"$NAME$["+GetUnitName(whichUnit)+"] = "+I2S(bonus)+" // bonus overflow")
set bonus = .count
endif
loop
exitwhen i<0
if GetUnitAbilityLevel(whichUnit, .firstCode+i)>0 then
call UnitMakeAbilityPermanent(whichUnit, false, .firstCode+i)
call UnitRemoveAbility(whichUnit, .firstCode+i)
exitwhen true
endif
set i = i - 1
endloop
if bonus > 0 then
call UnitAddAbility(whichUnit, .firstCode+bonus-1)
call UnitMakeAbilityPermanent(whichUnit, true, .firstCode+bonus-1)
endif
endmethod
endstruct
//===========================================================================
// Bonus struct global variables
//===========================================================================
globals
public IBonus Life
public IBonus Mana
public IBonus Armor
public IBonus Damage
public IBonus Str
public IBonus Agi
public IBonus Int
public IBonus AttackSpeed
public IBonus MoveSpeed
public IBonus Evasion
public IBonus Critical
endglobals
//===========================================================================
// Init bonus structs
//===========================================================================
private function Init takes nothing returns nothing
set Life = BinaryBonus.create('A8L0', 8, 1)
set Mana = BinaryBonus.create('A8M0', 8, 1)
set Armor = BinaryBonus.create('A8D0', 8, 1)
set Damage = BinaryBonus.create('A8T0', 8, 1)
set Str = BinaryBonus.create('A8S0', 8, 1)
set Agi = BinaryBonus.create('A8A0', 8, 1)
set Int = BinaryBonus.create('A8I0', 8, 1)
set AttackSpeed = BinaryBonus.create('A8H0', 7, 1)
set MoveSpeed = LinearBonus.create('A8P1', 10, 1, false)
set Evasion = LinearBonus.create('A8E1', 8, 1, true)
set Critical = LinearBonus.create('A8C1', 8, 1, true)
endfunction
endlibrary
//TESH.scrollpos=2
//TESH.alwaysfold=0
//==============================================================================
// BONUS Plugin: Life and Mana
//==============================================================================
// This trigger should be disabled by default
//==============================================================================
// To generate bonus abilities:
// Enable this trigger, save the map, close the map, open the map, disable this trigger
//==============================================================================
//---------------------------------< LIFE >-----------------------------------//
//! external ObjectMerger w3a AIl2 A8L0 anam "Bonus Life" Ilif 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AIl2 A8L1 anam "Bonus Life" Ilif 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AIl2 A8L2 anam "Bonus Life" Ilif 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AIl2 A8L3 anam "Bonus Life" Ilif 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AIl2 A8L4 anam "Bonus Life" Ilif 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AIl2 A8L5 anam "Bonus Life" Ilif 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AIl2 A8L6 anam "Bonus Life" Ilif 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AIl2 A8L7 anam "Bonus Life" Ilif 1 128 ansf "(binary 7)"
//---------------------------------< MANA >-----------------------------------//
//! external ObjectMerger w3a AImz A8M0 anam "Bonus Mana" Iman 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AImz A8M1 anam "Bonus Mana" Iman 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AImz A8M2 anam "Bonus Mana" Iman 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AImz A8M3 anam "Bonus Mana" Iman 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AImz A8M4 anam "Bonus Mana" Iman 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AImz A8M5 anam "Bonus Mana" Iman 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AImz A8M6 anam "Bonus Mana" Iman 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AImz A8M7 anam "Bonus Mana" Iman 1 128 ansf "(binary 7)"
//TESH.scrollpos=5
//TESH.alwaysfold=0
//==============================================================================
// BONUS Plugin: Armor and Damage
//==============================================================================
// This trigger should be disabled by default
//==============================================================================
// To generate bonus abilities:
// Enable this trigger, save the map, close the map, open the map, disable this trigger
//==============================================================================
//---------------------------------< ARMOR >----------------------------------//
//! external ObjectMerger w3a AId2 A8D0 anam "Bonus Armor" Idef 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AId2 A8D1 anam "Bonus Armor" Idef 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AId2 A8D2 anam "Bonus Armor" Idef 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AId2 A8D3 anam "Bonus Armor" Idef 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AId2 A8D4 anam "Bonus Armor" Idef 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AId2 A8D5 anam "Bonus Armor" Idef 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AId2 A8D6 anam "Bonus Armor" Idef 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AId2 A8D7 anam "Bonus Armor" Idef 1 128 ansf "(binary 7)"
//---------------------------------< DAMAGE >---------------------------------//
//! external ObjectMerger w3a AItg A8T0 anam "Bonus Damage" Iatt 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AItg A8T1 anam "Bonus Damage" Iatt 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AItg A8T2 anam "Bonus Damage" Iatt 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AItg A8T3 anam "Bonus Damage" Iatt 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AItg A8T4 anam "Bonus Damage" Iatt 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AItg A8T5 anam "Bonus Damage" Iatt 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AItg A8T6 anam "Bonus Damage" Iatt 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AItg A8T7 anam "Bonus Damage" Iatt 1 128 ansf "(binary 7)"
//==============================================================================
//TESH.scrollpos=7
//TESH.alwaysfold=0
//==============================================================================
// BONUS Plugin: Strength, Agility and Intelligence
//==============================================================================
// This trigger should be disabled by default
//==============================================================================
// To generate bonus abilities:
// Enable this trigger, save the map, close the map, open the map, disable this trigger
//==============================================================================
//---------------------------------< STR >-----------------------------------//
//! external ObjectMerger w3a AIs1 A8S0 anam "Bonus Strength" Istr 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AIs1 A8S1 anam "Bonus Strength" Istr 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AIs1 A8S2 anam "Bonus Strength" Istr 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AIs1 A8S3 anam "Bonus Strength" Istr 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AIs1 A8S4 anam "Bonus Strength" Istr 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AIs1 A8S5 anam "Bonus Strength" Istr 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AIs1 A8S6 anam "Bonus Strength" Istr 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AIs1 A8S7 anam "Bonus Strength" Istr 1 128 ansf "(binary 7)"
//---------------------------------< AGI >-----------------------------------//
//! external ObjectMerger w3a AIa1 A8A0 anam "Bonus Agility" Iagi 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AIa1 A8A1 anam "Bonus Agility" Iagi 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AIa1 A8A2 anam "Bonus Agility" Iagi 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AIa1 A8A3 anam "Bonus Agility" Iagi 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AIa1 A8A4 anam "Bonus Agility" Iagi 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AIa1 A8A5 anam "Bonus Agility" Iagi 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AIa1 A8A6 anam "Bonus Agility" Iagi 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AIa1 A8A7 anam "Bonus Agility" Iagi 1 128 ansf "(binary 7)"
//---------------------------------< INT >-----------------------------------//
//! external ObjectMerger w3a AIi1 A8I0 anam "Bonus Intelligence" Iint 1 1 ansf "(binary 0)"
//! external ObjectMerger w3a AIi1 A8I1 anam "Bonus Intelligence" Iint 1 2 ansf "(binary 1)"
//! external ObjectMerger w3a AIi1 A8I2 anam "Bonus Intelligence" Iint 1 4 ansf "(binary 2)"
//! external ObjectMerger w3a AIi1 A8I3 anam "Bonus Intelligence" Iint 1 8 ansf "(binary 3)"
//! external ObjectMerger w3a AIi1 A8I4 anam "Bonus Intelligence" Iint 1 16 ansf "(binary 4)"
//! external ObjectMerger w3a AIi1 A8I5 anam "Bonus Intelligence" Iint 1 32 ansf "(binary 5)"
//! external ObjectMerger w3a AIi1 A8I6 anam "Bonus Intelligence" Iint 1 64 ansf "(binary 6)"
//! external ObjectMerger w3a AIi1 A8I7 anam "Bonus Intelligence" Iint 1 128 ansf "(binary 7)"
//==============================================================================
//TESH.scrollpos=6
//TESH.alwaysfold=0
//==============================================================================
// BONUS Plugin: Attack and Move Speed
//==============================================================================
// This trigger should be disabled by default
//==============================================================================
// To generate bonus abilities:
// Enable this trigger, save the map, close the map, open the map, disable this trigger
//==============================================================================
//---------------------------------< ATTS >----------------------------------//
//! external ObjectMerger w3a AIsx A8H0 anam "Bonus Attack Speed" Isx1 1 0.01 ansf "(binary 0)"
//! external ObjectMerger w3a AIsx A8H1 anam "Bonus Attack Speed" Isx1 1 0.02 ansf "(binary 1)"
//! external ObjectMerger w3a AIsx A8H2 anam "Bonus Attack Speed" Isx1 1 0.04 ansf "(binary 2)"
//! external ObjectMerger w3a AIsx A8H3 anam "Bonus Attack Speed" Isx1 1 0.08 ansf "(binary 3)"
//! external ObjectMerger w3a AIsx A8H4 anam "Bonus Attack Speed" Isx1 1 0.16 ansf "(binary 4)"
//! external ObjectMerger w3a AIsx A8H5 anam "Bonus Attack Speed" Isx1 1 1.32 ansf "(binary 5)"
//! external ObjectMerger w3a AIsx A8H6 anam "Bonus Attack Speed" Isx1 1 3.64 ansf "(binary 6)"
//---------------------------------< MOVE >----------------------------------//
//! external ObjectMerger w3a AIms A8P1 anam "Bonus Move Speed" Imvb 1 1 ansf "(linear 1)"
//! external ObjectMerger w3a AIms A8P2 anam "Bonus Move Speed" Imvb 1 2 ansf "(linear 2)"
//! external ObjectMerger w3a AIms A8P3 anam "Bonus Move Speed" Imvb 1 3 ansf "(linear 3)"
//! external ObjectMerger w3a AIms A8P4 anam "Bonus Move Speed" Imvb 1 4 ansf "(linear 4)"
//! external ObjectMerger w3a AIms A8P5 anam "Bonus Move Speed" Imvb 1 5 ansf "(linear 5)"
//! external ObjectMerger w3a AIms A8P6 anam "Bonus Move Speed" Imvb 1 6 ansf "(linear 6)"
//! external ObjectMerger w3a AIms A8P7 anam "Bonus Move Speed" Imvb 1 7 ansf "(linear 7)"
//! external ObjectMerger w3a AIms A8P8 anam "Bonus Move Speed" Imvb 1 8 ansf "(linear 8)"
//! external ObjectMerger w3a AIms A8P9 anam "Bonus Move Speed" Imvb 1 9 ansf "(linear 9)"
//! external ObjectMerger w3a AIms A8P: anam "Bonus Move Speed" Imvb 1 10 ansf "(linear :)"
//==============================================================================
//TESH.scrollpos=0
//TESH.alwaysfold=0
//==============================================================================
// BONUS Plugin: Evasion and Critical
//==============================================================================
// This trigger should be disabled by default
//==============================================================================
// To generate bonus abilities:
// Enable this trigger, save the map, close the map, open the map, disable this trigger
//==============================================================================
//---------------------------------< EVASION >-------------------------------//
//! external ObjectMerger w3a AIev A8e1 anam "Bonus Evasion" Eev1 1 0.01 ansf "(linear 1)"
//! external ObjectMerger w3a AIev A8e2 anam "Bonus Evasion" Eev1 1 0.02 ansf "(linear 2)"
//! external ObjectMerger w3a AIev A8e3 anam "Bonus Evasion" Eev1 1 0.03 ansf "(linear 3)"
//! external ObjectMerger w3a AIev A8e4 anam "Bonus Evasion" Eev1 1 0.04 ansf "(linear 4)"
//! external ObjectMerger w3a AIev A8e5 anam "Bonus Evasion" Eev1 1 0.05 ansf "(linear 5)"
//! external ObjectMerger w3a AIev A8e6 anam "Bonus Evasion" Eev1 1 0.06 ansf "(linear 6)"
//! external ObjectMerger w3a AIev A8e7 anam "Bonus Evasion" Eev1 1 0.07 ansf "(linear 7)"
//! external ObjectMerger w3a AIev A8e8 anam "Bonus Evasion" Eev1 1 0.08 ansf "(linear 8)"
//-- spellbook
//! external ObjectMerger w3a Aspb A8E1 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e1 ansf "(spellbook 1)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E2 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e2 ansf "(spellbook 2)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E3 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e3 ansf "(spellbook 3)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E4 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e4 ansf "(spellbook 4)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E5 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e5 ansf "(spellbook 5)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E6 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e6 ansf "(spellbook 6)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E7 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e7 ansf "(spellbook 7)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//! external ObjectMerger w3a Aspb A8E8 anam "Bonus Evasion" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8e8 ansf "(spellbook 8)" aart "ReplaceableTextures\CommandButtons\BTNEvasion.blp"
//---------------------------------< CRITICAL >-------------------------------//
//! external ObjectMerger w3a AIcs A8c1 anam "Bonus Critical" Ocr1 1 1 ansf "(linear 1)"
//! external ObjectMerger w3a AIcs A8c2 anam "Bonus Critical" Ocr1 1 2 ansf "(linear 2)"
//! external ObjectMerger w3a AIcs A8c3 anam "Bonus Critical" Ocr1 1 3 ansf "(linear 3)"
//! external ObjectMerger w3a AIcs A8c4 anam "Bonus Critical" Ocr1 1 4 ansf "(linear 4)"
//! external ObjectMerger w3a AIcs A8c5 anam "Bonus Critical" Ocr1 1 5 ansf "(linear 5)"
//! external ObjectMerger w3a AIcs A8c6 anam "Bonus Critical" Ocr1 1 6 ansf "(linear 6)"
//! external ObjectMerger w3a AIcs A8c7 anam "Bonus Critical" Ocr1 1 7 ansf "(linear 7)"
//! external ObjectMerger w3a AIcs A8c8 anam "Bonus Critical" Ocr1 1 8 ansf "(linear 8)"
//-- spellbook
//! external ObjectMerger w3a Aspb A8C1 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c1 ansf "(spellbook 1)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C2 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c2 ansf "(spellbook 2)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C3 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c3 ansf "(spellbook 3)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C4 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c4 ansf "(spellbook 4)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C5 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c5 ansf "(spellbook 5)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C6 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c6 ansf "(spellbook 6)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C7 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c7 ansf "(spellbook 7)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//! external ObjectMerger w3a Aspb A8C8 anam "Bonus Critical" spb5 1 "attributemodskill" spb4 1 1 spb3 1 1 spb2 1 True spb1 1 A8c8 ansf "(spellbook 8)" aart "ReplaceableTextures\CommandButtons\BTNCriticalStrike.blp"
//==============================================================================
//TESH.scrollpos=15
//TESH.alwaysfold=0
//==============================================================================
// BONUS PLUGINS -- v1.3
//==============================================================================
//
// AUTHOR:
// * Cohadar
//
// PURPOSE:
// * Bonus plugins are used for creating abilities needed by Bonus system
// * Bonus plugins should be disabled by default
//
// HOW TO USE PLUGINS:
// * Enable plugin trigger, save the map, close the map, open the map, disable plugin trigger
// * You must do this for every plugin trigger
//
// WARNING:
// * Plugin triggers create lots abilities that start with 'A8'
// Check your map to make sure rawcodes don't collide with something you already have
// or your existing abilities may get overwritten.
// * Some linear abilities use skillbook with Base Order ID: attributemodskill
// Make sure you do not use this order ID for your custom skillbooks
// * Ability generation can take a very long time (up to 10 min), be patient.
// I also noticed it sometimes bugs if you alt-tab during generation.
//
// CONVENTIONS:
// * All rawcodes start with 'A8'
// * Binary bonus rawcodes start from zero // 'A8L0', 'A8L1', 'A8L2', ...
// Linear bonus rawcodes start from one // 'A8e1', 'A8e2', 'A8e3', ...
// * Binary bonuses use uppercase letter on 3-rd digit
// Linear bonuses use lowercase letter on 3-rd digit
// Spellbooks use uppercase letter on 3-rd digit (same as their linear bonus ability) 'A8e1' -> 'A8E1'
//
// THANKS TO:
// * PitzerMike - for making grimex
//
// NOTE:
// * You should probably preload bonus abilities to prevent first cast lag
//
//==============================================================================
//TESH.scrollpos=3
//TESH.alwaysfold=0
//==============================================================================
// Q: I don't like the DELTA you used for life, can I change life by 50 instead of 100?
//==============================================================================
// A: Of course you can, first change the create method
set Life = BinaryBonus.create('A8L0', 8, 50) // was 100
// Than you will have to change ability values in Life Mana Plugin
// Instead of: 100, 200, 400, 800...
// You would go: 50, 100, 200, 400
// After that you need to recreate those abilities
//==============================================================================
//==============================================================================
// Q: What is maximum COUNT? Can I have like 16 abilities bonus?
//==============================================================================
// A: If you are making binary ability:
// Generally if you need more than 8 abilities your DELTA is too small
// With COUNT 8 you have 255 different binary modification levels
// and that is more than enough for any map
//
// A: If you are making linear ability:
// Linear abilities usually are in percents, so if you set delta to 5%
// you need 20 abilities to cover 0%..100% range.
// But in reality you can always use less than that
// For example real maps avoid evasion over 40%
// and if you set DELTA to 10% you can get away with only 4 abilities
// The general idea is to customize bonuses to your map needs
//
// If you plan on making linear ability with more than 9 levels
// Remember that ability codes use ascii numbers
// 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C ...
//==============================================================================
//TESH.scrollpos=0
//TESH.alwaysfold=0
//===========================================================================
// v1.3
// * Removed textmacros, using struct interfaces now
//
// v1.2
// * Made it more modular, you can now write plugins for Bonus sys
//
// v1.1
// * Added support for linear mods (evasion)
// * BonusTesting CHATCOMMAND macro is now simpler
// * Changed editor suffixes
// * Changed Damage DELTA to 5 (was 10)
//===========================================================================