use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.
the class PanicRule method initEffects.
@Override
public void initEffects() {
ImmobilizeEffect effect = new ImmobilizeEffect();
effects = new AddBuffEffect(retain_conditions, buffTypeName, effect);
}
use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.
the class TreasonRule method initEffects.
@Override
public void initEffects() {
OwnershipChangeEffect effect = new OwnershipChangeEffect(true);
effects = new AddBuffEffect(retain_conditions, buffTypeName, effect);
}
use of eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.
the class DC_CounterRule method applyEffects.
protected void applyEffects(Unit unit) {
Effect effects = getWrappedEffects(unit);
effects.apply(Ref.getSelfTargetingRefCopy(unit));
if (effects instanceof AddBuffEffect) {
((AddBuffEffect) effects).getBuff().setCounterRef(getCounterName());
}
// TODO animation?
// startContinuousAnimation();
// playAddAnimation();
// playIntensifyAnimation();
// playTickAnimation();
}
use of eidolons.ability.effects.attachment.AddBuffEffect 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 eidolons.ability.effects.attachment.AddBuffEffect in project Eidolons by IDemiurge.
the class AuraEffect method applyThis.
/*
*
* so what really happens?
*
* maybe it's OK if it's not Spirit?
*
* There aren't really non-ValueMod effect variants, are there?
* "Damage Aura"? Property Aura, e.g. demonic! :)
*/
public boolean applyThis() {
if (!on) {
return true;
}
if (game.isSimulation()) {
return false;
}
if (continuous) {
AutoTargeting targeting = new AutoTargeting(new DistanceCondition(radius.toString()));
targeting.getConditions().add(ConditionMaster.getAliveCondition(KEYS.MATCH));
if (onlyEnemiesOrAllies != null) {
if (onlyEnemiesOrAllies) {
targeting.getConditions().add(ConditionMaster.getEnemyCondition());
} else {
targeting.getConditions().add(ConditionMaster.getAllyCondition());
}
}
// remove aura-bearer from targets list
targeting.getConditions().add(new NotCondition(new RefCondition(KEYS.MATCH, KEYS.SOURCE)));
AddBuffEffect buffEffect = new AddBuffEffect(getBuffType(), effect, true);
Effects auraEffects = new Effects(new ConditionalEffect(ConditionMaster.getAliveCondition(KEYS.SOURCE), new CustomTargetEffect(targeting, buffEffect)));
auraEffect = new AddBuffEffect(auraEffects);
// auraEffect.setTransient(false);
boolean results = auraEffect.apply(ref);
if (results) {
if (!notSelf) {
Effect copy = effect.getCopy();
copy.apply(Ref.getSelfTargetingRefCopy(ref.getSourceObj()));
}
}
return results;
}
// preCheck?
if (!initialized) {
init();
}
return trigger.apply(ref);
}
Aggregations