Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

DummyDamage

Source

class DummyDamage

Source

DummyDamage is used when you want to inflict damage from a certain player, without having access to a unit by that player, that the damage should originate from, e.g. an effect missile, that does damage on impact, but doesn't know the caster unit. A DummyDamage is constructed analogous to a DummyCaster using the builder pattern. > new DummyDamage() > ..attacker(attackingPlayer) > ..target(targetWidget) > ..amount(50) > ..attackType(ATTACK_TYPE_NORMAL) > ..apply(true) The object is only destroyed if you pass true to the #apply function, and can therefore be reused to apply the same type of damage to multiple targets.

function amount(real amount)

Source

function apply()

Source

function apply(boolean terminate)

Source

function attackType(attacktype attackType)

Source

function attacker(player attacker)

Source

function damageType(damagetype damageType)

Source

function isAttack(boolean isAttack)

Source

function isRanged(boolean isRanged)

Source

function origin(vec2 origin)

Source

function target(widget target)

Source

function weaponType(weapontype weaponType)

Source