Search in sources :

Example 16 with DAMAGE_TYPE

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;
}
Also used : DAMAGE_TYPE(main.content.enums.GenericEnums.DAMAGE_TYPE) MultiValueContainer(eidolons.libgdx.gui.panels.dc.unitinfo.MultiValueContainer) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer)

Example 17 with DAMAGE_TYPE

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() + "%");
        }
    });
}
Also used : ValueTooltip(eidolons.libgdx.gui.tooltips.ValueTooltip) DAMAGE_TYPE(main.content.enums.GenericEnums.DAMAGE_TYPE) PARAMS(eidolons.content.PARAMS) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Pair(org.apache.commons.lang3.tuple.Pair) PARAMETER(main.content.values.parameters.PARAMETER)

Example 18 with DAMAGE_TYPE

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;
}
Also used : DAMAGE_TYPE(main.content.enums.GenericEnums.DAMAGE_TYPE)

Aggregations

DAMAGE_TYPE (main.content.enums.GenericEnums.DAMAGE_TYPE)18 RESIST_GRADE (main.content.enums.GenericEnums.RESIST_GRADE)4 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)3 Unit (eidolons.entity.obj.unit.Unit)3 PARAMETER (main.content.values.parameters.PARAMETER)3 BattleFieldObject (eidolons.entity.obj.BattleFieldObject)2 Damage (eidolons.game.battlecraft.rules.combat.damage.Damage)2 ValueContainer (eidolons.libgdx.gui.generic.ValueContainer)2 HashMap (java.util.HashMap)2 Ref (main.entity.Ref)2 PARAMS (eidolons.content.PARAMS)1 DC_HeroSlotItem (eidolons.entity.item.DC_HeroSlotItem)1 AttackCalculator (eidolons.game.battlecraft.rules.combat.attack.AttackCalculator)1 MultiValueContainer (eidolons.libgdx.gui.panels.dc.unitinfo.MultiValueContainer)1 ValueTooltip (eidolons.libgdx.gui.tooltips.ValueTooltip)1 PROPERTY (main.content.values.properties.PROPERTY)1 Obj (main.entity.obj.Obj)1 Event (main.game.logic.event.Event)1 EnumMaster (main.system.auxiliary.EnumMaster)1 AnimPhase (main.system.graphics.AnimPhase)1