RuneHive-Game
Loading...
Searching...
No Matches
CombatType.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat;
2
3import com.runehive.game.world.entity.combat.formula.MagicFormula;
4import com.runehive.game.world.entity.combat.formula.MeleeFormula;
5import com.runehive.game.world.entity.combat.formula.RangedFormula;
6import com.runehive.game.world.entity.mob.Mob;
7
8public enum CombatType {
9 MELEE(new MeleeFormula(), 0),
12
13 private final int hitsplatDelay;
14
16
18 this.formula = formula;
19 this.hitsplatDelay = hitsplatDelay;
20 }
21
23 return formula;
24 }
25
26 public int getHitsplatDelay() {
27 return hitsplatDelay;
28 }
29
30 public boolean match(final CombatType type) {
31 return equals(type);
32 }
33
34 public boolean match(final CombatType... types) {
35 for (final CombatType type : types) {
36 if (match(type)) {
37 return true;
38 }
39 }
40 return false;
41 }
42
43}
CombatType(FormulaModifier< Mob > formula, int hitsplatDelay)
boolean match(final CombatType... types)