attackself(damage:Int, ?element: String):Void
Attacks the fighter who called this function for the specified amount of damage. If an element is specified, does elemental damage; otherwise, uses the neutral (sword) damage type.
This damage is blocked by Shields, and if the effects of Curse? trigger, the attack will target the opposing fighter instead.
If damage
is negative, the user is healed instead of damaged. This healing does not affect shields.
damage
: Int
The damage done to the fighter that called attackself
. If negative, the user is healed. Because of this, this function is used by equipment like Healing Crystal to heal fighters.
element
: String (Optional)
The element of the damage. If the user is weak to that element, they will take 2*damage
instead. If the user is strong against that element, they will take (damage+1)/2
instead, which is half the damage but rounded up.
Void
This function does not return a value.