use of main.content.enums.GenericEnums.DAMAGE_TYPE in project Eidolons by IDemiurge.
the class AttackTooltipFactory method createPrecalcRow.
private static ValueContainer createPrecalcRow(boolean precalc, DC_UnitAction el, DC_Obj target) {
if (!precalc) {
return null;
}
int min_damage = FutureBuilder.precalculateDamage(el, target, true, true);
int max_damage = FutureBuilder.precalculateDamage(el, target, true, false);
DAMAGE_TYPE dmgType = el.getDamageType();
// TODO display all bonus damage!
// Attack attack = EffectFinder.getAttackFromAction(el);
// DamageFactory.getDamageFromAttack();
String info = min_damage + "-" + max_damage + dmgType.getName() + " damage";
String tooltip = "";
// if ()
// DamageCalculator.isUnconscious()
// "(will drop)";
// tooltip +=" (shield!)";
ValueContainer container = new ValueContainer(info, tooltip);
return container;
}
use of main.content.enums.GenericEnums.DAMAGE_TYPE in project Eidolons by IDemiurge.
the class ResistPanel method updateAct.
@Override
public void updateAct(float delta) {
List<Pair<PARAMETER, String>> source = (List<Pair<PARAMETER, String>>) getUserObject();
source.forEach(pair -> {
PARAMS param = (PARAMS) pair.getLeft();
DAMAGE_TYPE damageType = getFromParams(param);
if (map.containsKey(damageType)) {
final ValueContainer container = map.get(damageType);
ValueTooltip valueTooltip = new ValueTooltip();
valueTooltip.setUserObject((Supplier) () -> Arrays.asList(new ValueContainer(param.getName(), "")));
container.addListener(valueTooltip.getController());
container.updateValue(pair.getRight() + "%");
}
});
}
use of main.content.enums.GenericEnums.DAMAGE_TYPE in project Eidolons by IDemiurge.
the class DC_ContentManager method getArmorGradeMultiParams.
public static List<VALUE> getArmorGradeMultiParams() {
List<VALUE> list = new ArrayList<>();
list.add(PARAMS.ARMOR);
for (DAMAGE_TYPE dmg_type : GenericEnums.DAMAGE_TYPE.values()) {
if (dmg_type != GenericEnums.DAMAGE_TYPE.POISON && dmg_type != GenericEnums.DAMAGE_TYPE.PHYSICAL) {
if (dmg_type.isNatural() || !dmg_type.isMagical()) {
list.add(new MultiParameter(" / ", getArmorParamForDmgType(dmg_type), getArmorSelfDamageParamForDmgType(dmg_type)));
}
}
}
return list;
}
Aggregations