1package com.runehive.game.world.entity.combat.attack.listener;
3import com.runehive.game.world.entity.combat.CombatType;
4import com.runehive.game.world.entity.combat.FormulaModifier;
5import com.runehive.game.world.entity.combat.hit.Hit;
6import com.runehive.game.world.entity.mob.Mob;
40 default void init(T attacker,
Mob defender) {}
A Hit object holds the damage amount and hitsplat data.
A combat attack is used to describe what the attacking and defending mobs should do in each stage of ...
boolean canAttack(T attacker, Mob defender)
Checks if the attacker can attack the defender.
void block(Mob attacker, T defender, Hit hit, CombatType combatType)
Called when the defending mob blocks a hit from the attacker.
void onDamage(T defender, Hit hit)
boolean withinDistance(T attacker, Mob defender)
void hit(T attacker, Mob defender, Hit hit)
Called when the attacking mob performs an attack on the defender.
boolean canOtherAttack(Mob attacker, T defender)
Checks if the attacker can attack the defender.
void preDeath(Mob attacker, T defender, Hit hit)
Called right before the defending mob dies.
void start(T attacker, Mob defender, Hit[] hits)
Called when the strategy starts.
default void performChecks(T attacker, Mob defender)
void preKill(Mob attacker, Mob defender, Hit hit)
Called before attacker killed defender.
void onKill(T attacker, Mob defender, Hit hit)
Called when attacker killed defender.
void finishIncoming(Mob attacker, T defender)
Called when the attacking mob finishes their strategy's attack.
void finishOutgoing(T attacker, Mob defender)
Called when the defending mob finishes their strategy's attack.
default void init(T attacker, Mob defender)
Called when the strategy initializes.
void onDeath(Mob attacker, T defender, Hit hit)
Called when the defending mob dies.
void attack(T attacker, Mob defender, Hit hit)
Called when the attacking hit executes on the defender.
void hitsplat(T attacker, Mob defender, Hit hit)
Called when attacker does the hitsplat.