use of main.content.enums.GenericEnums.DAMAGE_CASE in project Eidolons by IDemiurge.
the class DamageCalculator method getBonusDamageList.
public static List<Damage> getBonusDamageList(Ref ref, DAMAGE_CASE CASE) {
List<Damage> list = new ArrayList<>();
// TODO make BonusDamage all add to source?
DC_Obj obj = (DC_Obj) ref.getSourceObj();
for (DAMAGE_CASE e : obj.getBonusDamage().keySet()) {
if (e == CASE) {
list.addAll(obj.getBonusDamage().get(e));
}
}
obj = (DC_Obj) ref.getObj(KEYS.ACTIVE);
for (DAMAGE_CASE e : obj.getBonusDamage().keySet()) {
if (e == CASE) {
list.addAll(obj.getBonusDamage().get(e));
}
}
if (obj instanceof DC_ActiveObj) {
obj = ((DC_ActiveObj) obj).getActiveWeapon();
if (obj != null) {
for (DAMAGE_CASE e : obj.getBonusDamage().keySet()) {
if (e == CASE) {
list.addAll(obj.getBonusDamage().get(e));
}
}
}
}
return list;
}
Aggregations