RuneHive-Game
Loading...
Searching...
No Matches
CombatImpact.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat;
2
3import com.runehive.game.world.entity.combat.hit.Hit;
4import com.runehive.game.world.entity.mob.Mob;
5
6import java.util.List;
7
8/**
9 * Represents a combat impact hit effect.
10 * @author Artem Batutin
11 */
12public interface CombatImpact {
13
14 /**
15 * Condition if the impact is affecting.
16 */
17 default boolean canAffect(Mob attacker, Mob defender, Hit hit) {
18 return true;
19 }
20
21 /**
22 * The impact execution.
23 */
24 void impact(Mob attacker, Mob defender, Hit hit, List<Hit> hits);
25}
A Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
Handles the mob class.
Definition Mob.java:66
Represents a combat impact hit effect.
default boolean canAffect(Mob attacker, Mob defender, Hit hit)
Condition if the impact is affecting.
void impact(Mob attacker, Mob defender, Hit hit, List< Hit > hits)
The impact execution.