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);
}
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;
}
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;
}
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;
}
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;
}
Aggregations