Search in sources :

Example 6 with COUNTER

use of main.content.enums.entity.UnitEnums.COUNTER in project Eidolons by IDemiurge.

the class CounterMasterAdvanced method transform.

public static void transform(COUNTER counter, Boolean upOrDownTransform, Integer max, Unit target) {
    COUNTER to = upOrDownTransform ? counter.getUp() : counter.getDown();
    convertCounters(counter, to, max, target);
}
Also used : COUNTER(main.content.enums.entity.UnitEnums.COUNTER)

Example 7 with COUNTER

use of main.content.enums.entity.UnitEnums.COUNTER in project Eidolons by IDemiurge.

the class CounterMasterAdvanced method createCounterMap.

private static Map<COUNTER, Integer> createCounterMap(Unit unit) {
    Map<COUNTER, Integer> map = new XLinkedMap<>();
    for (DC_CounterRule rule : unit.getGame().getRules().getCounterRules()) {
        COUNTER c = getCounter(rule.getCounterName());
        Integer n = rule.getNumberOfCounters(unit);
        if (n > 0)
            map.put(c, n);
    }
    return map;
}
Also used : XLinkedMap(main.data.XLinkedMap) COUNTER(main.content.enums.entity.UnitEnums.COUNTER)

Example 8 with COUNTER

use of main.content.enums.entity.UnitEnums.COUNTER in project Eidolons by IDemiurge.

the class CounterMaster method findCounter.

public static String findCounter(String valueName, boolean strict) {
    COUNTER c = getCounter(valueName, strict);
    if (c != null)
        return c.getName();
    valueName = StringMaster.getWellFormattedString(valueName);
    if (!valueName.contains(StringMaster.COUNTER)) {
        valueName = StringMaster.getWellFormattedString(valueName.trim()) + StringMaster.COUNTER;
    }
    return valueName;
}
Also used : COUNTER(main.content.enums.entity.UnitEnums.COUNTER)

Example 9 with COUNTER

use of main.content.enums.entity.UnitEnums.COUNTER in project Eidolons by IDemiurge.

the class EffectAnimation method drawCounterMod.

private boolean drawCounterMod(AnimPhase phase) {
    String counterName = (String) phase.getArgs()[0];
    COUNTER counter = CounterMaster.findCounterConst(counterName);
    MOD modtype = (MOD) phase.getArgs()[1];
    Integer modValue = (Integer) phase.getArgs()[2];
    Boolean negative = false;
    if (counter != null) // counter.isNegative(); // img
    {
        drawTextOnTarget(StringMaster.getBonusString(modValue), font, CENTERED_X, CENTERED_Y, ColorManager.getStandardColor(negative));
    }
    StringMaster.getBonusString(modValue);
    return true;
}
Also used : MOD(main.ability.effects.Effect.MOD) COUNTER(main.content.enums.entity.UnitEnums.COUNTER)

Example 10 with COUNTER

use of main.content.enums.entity.UnitEnums.COUNTER in project Eidolons by IDemiurge.

the class DC_ContentManager method generateDerivedParams.

private static Collection<PARAMETER> generateDerivedParams() {
    Collection<PARAMETER> list = new ArrayList<>();
    for (PARAMS p : PARAMS.values()) {
        if (p.isMastery()) {
            Param scoreParam = new Param(p);
            scoreParam.setName(p.getName() + StringMaster.SCORE);
            list.add(scoreParam);
        }
    }
    for (COUNTER c : CoatingRule.COATING_COUNTERS) {
        list.add(generateCoatingParam(c, PARAMS.COATING_COUNTERS_APPLIED_PER_HIT_MOD));
        list.add(generateCoatingParam(c, PARAMS.COATING_COUNTERS_APPLIED_TO_ITEM_MOD));
        list.add(generateCoatingParam(c, PARAMS.COATING_COUNTERS_SPENT_MOD));
    }
    return list;
}
Also used : COUNTER(main.content.enums.entity.UnitEnums.COUNTER)

Aggregations

COUNTER (main.content.enums.entity.UnitEnums.COUNTER)10 Unit (eidolons.entity.obj.unit.Unit)2 XLinkedMap (main.data.XLinkedMap)2 DC_QuickItemAction (eidolons.entity.active.DC_QuickItemAction)1 DC_Obj (eidolons.entity.obj.DC_Obj)1 BufferedImage (java.awt.image.BufferedImage)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 MOD (main.ability.effects.Effect.MOD)1 COUNTER_INTERACTION (main.content.enums.entity.UnitEnums.COUNTER_INTERACTION)1 COUNTER_OPERATION (main.content.enums.entity.UnitEnums.COUNTER_OPERATION)1 CounterMaster (main.system.entity.CounterMaster)1