Cohadar
master of fugue
- Reaction score
- 209
The answer to both questions is yes.
Life regen is a BinaryBonus.
ManaRegen is a LinearBonus.
Life regen is a BinaryBonus.
ManaRegen is a LinearBonus.
Okay cool. More questions:
How does this help if a bonus is of the linear type? If I needed to have say 50 different levels of a linear bonus ranging from 1 to 50 wouldn't this require just as much as a single 50 level ability?
What do I use for life and mana regen? Would the life regen from a heal aura be correct, and perhaps mana regen from brilliance aura? And would either of these require spellbooks to hide?
Does this work with the latest patch?
//===========================================================================
// 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(039;A8L0039;, 8, 100)
set Mana = BinaryBonus.create(039;A8M0039;, 8, 100)
set Armor = BinaryBonus.create(039;A8D0039;, 8, 1)
set Damage = BinaryBonus.create(039;A8T0039;, 8, 5)
set Str = BinaryBonus.create(039;A8S0039;, 8, 1)
set Agi = BinaryBonus.create(039;A8A0039;, 8, 1)
set Int = BinaryBonus.create(039;A8I0039;, 8, 1)
set AttackSpeed = BinaryBonus.create(039;A8H0039;, 7, 5)
set MoveSpeed = LinearBonus.create(039;A8P1039;, 10, 5, false)
set Evasion = LinearBonus.create(039;A8E1039;, 8, 5, true)
set Critical = LinearBonus.create(039;A8C1039;, 8, 5, true)
endfunction
endlibrary
Of course, the point of bonuses being that they have nothing to do with initial values...bonus system which reads initial stats values
I don't really see why this uses the IBonus interface. I don't see people passing bonuses as parameters, which is the only purpose that seems to serve. I'm not thrilled how much this system goes through to add 1 to a unit's damage - I'd like to add a unit's mana to its damage as a bonus, but using this would mean periodically firing n complexity functions through trigger evaluates. Is this likely to be optimised further?