use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class ForceRule method getForceEffects.
private static Effect getForceEffects(DC_ActiveObj action) {
String force = String.valueOf(getForce(action));
KnockdownEffect e = new KnockdownEffect(force);
// PushEffect e1 = new PushEffect(force);
// InterruptionEffect e2 = new InterruptionEffect(force);
Effects effects = new Effects();
// if ()
// effects.add(e);
effects.add(new ForceEffect(force, action.isAttackAny()));
return effects;
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class InjuryRule method applyOldWounds.
public static void applyOldWounds(Unit hero) {
Effects effects = new Effects();
for (String substring : StringMaster.open(hero.getProperty(PROPS.INJURIES))) {
INJURY template = new EnumMaster<INJURY>().retrieveEnumConst(INJURY.class, substring);
effects.add(new InjuryEffect(template, true));
}
effects.apply(Ref.getSelfTargetingRefCopy(hero));
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class DC_CounterRule method getWrappedEffects.
private Effect getWrappedEffects(Unit unit) {
if (getEffect() == null)
return new Effects();
if (getBuffName() != null) {
return getBuffEffect();
}
Effects effect = effectsCache.get(unit);
if (effect == null) {
effect = new Effects(ContinuousEffect.transformEffectToContinuous(getEffect()));
effectsCache.put(unit, effect);
}
return effect;
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class DivinationMaster method applyKnownSpellDivinationEffect.
private static void applyKnownSpellDivinationEffect(DC_SpellObj spell) {
if (hero.checkPassive(UnitEnums.STANDARD_PASSIVES.DRUIDIC_VISIONS)) {
Ref ref = Ref.getSelfTargetingRefCopy(hero);
ref.setID(KEYS.SPELL, spell.getId());
new ModifyValueEffect(PARAMS.C_ESSENCE, MOD.MODIFY_BY_CONST, DC_Formulas.DRUIDIC_VISIONS_ESSENCE).apply(ref);
return;
}
if (hero.checkPassive(UnitEnums.STANDARD_PASSIVES.HOLY_PRAYER)) {
Ref ref = Ref.getSelfTargetingRefCopy(hero);
ref.setID(KEYS.SPELL, spell.getId());
new ModifyValueEffect(PARAMS.C_MORALE, MOD.MODIFY_BY_CONST, DC_Formulas.HOLY_PRAYER_MORALE).apply(ref);
// ++ REMOVE COOLDOWN FROM SPELL?
}
Ref ref = Ref.getSelfTargetingRefCopy(spell);
AddBuffEffect buffEffect = new AddBuffEffect(BUFF_FAVORED, new Effects(new ModifyValueEffect(PARAMS.ESS_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.FOC_REQ, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.FOC_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.STA_COST, MOD.MODIFY_BY_PERCENT, "-25"), new ModifyValueEffect(PARAMS.SPELLPOWER_MOD, MOD.MODIFY_BY_PERCENT, "25")));
buffEffect.apply(ref);
buffEffect.getBuff().setDuration((// TODO
hero.getIntParam(PARAMS.CHARISMA) + // GRACE!
hero.getIntParam(PARAMS.DIVINATION_MASTERY)) / 5);
buffEffect.getBuff().setProperty(G_PROPS.STD_BOOLS, "" + GenericEnums.STD_BOOLS.STACKING, true);
}
use of main.ability.effects.Effects in project Eidolons by IDemiurge.
the class PriorityManagerImpl method getSelfSpellPriority.
@Override
public int getSelfSpellPriority(Action action) {
Effects effects = null;
if (action instanceof AiQuickItemAction)
effects = EffectFinder.getEffectsFromSpell(((DC_QuickItemAction) action.getActive()).getItem().getActives().get(0));
else
effects = EffectFinder.getEffectsFromSpell(action.getActive());
if (effects.getEffects().isEmpty())
return 0;
setBasePriority(getUnitPriority(getUnit(), false));
for (Effect e : effects) {
addEffectPriority(action, e);
}
return priority;
}
Aggregations