Search in sources :

Example 1 with EffectAnimation

use of eidolons.system.graphics.EffectAnimation in project Eidolons by IDemiurge.

the class DC_BuffRule method playAnimation.

protected void playAnimation(Ref ref) {
    DC_ActiveObj action = (DC_ActiveObj) ref.getObj(KEYS.ACTIVE);
    if (action == null) {
        action = target.getDummyAction();
    }
    EffectAnimation anim = new EffectAnimation(action);
    anim.addPhase(new AnimPhase(PHASE_TYPE.BUFF, ref.getObj(KEYS.BUFF)));
    getGame().getAnimationManager().newAnimation(anim);
    animationQueued = false;
}
Also used : EffectAnimation(eidolons.system.graphics.EffectAnimation) AnimPhase(main.system.graphics.AnimPhase) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj)

Example 2 with EffectAnimation

use of eidolons.system.graphics.EffectAnimation in project Eidolons by IDemiurge.

the class RollMaster method rollLogged.

/**
 * @param logString  to be appended to the logged string; for success by default,
 *                   for failure if contains @
 * @param rollSource special descriptor for logging, e.g. if rolling vs Ensnare
 * @returns false if target has resisted ('wins roll')
 */
public static boolean rollLogged(ROLL_TYPES roll_type, String success, String fail, Ref ref, String logString, String rollSource) {
    boolean result = roll(roll_type, success, fail, ref, logString, rollSource, false);
    if (!checkRollLogged(roll_type, result)) {
        return result;
    }
    Object[] args = { roll_type.getName(), ref.getSourceObj().getName(), ref.getTargetObj().getName() };
    if (roll_type.isLogToTop()) {
        args = new Object[] { main.system.text.LogManager.WRITE_TO_TOP, roll_type.getName(), ref.getSourceObj().getName(), ref.getTargetObj().getName() };
    }
    LogEntryNode entry = ref.getGame().getLogManager().newLogEntryNode(result ? ENTRY_TYPE.ROLL_LOST : ENTRY_TYPE.ROLL_WON, args);
    ref.getGame().getLogManager().log(RollMaster.logString);
    ref.getGame().getLogManager().doneLogEntryNode();
    if (CoreEngine.isPhaseAnimsOn())
        if (ref.getActive() != null) {
            ANIM anim = new EffectAnimation((DC_ActiveObj) ref.getActive());
            anim.addPhase(new AnimPhase(PHASE_TYPE.ROLL, roll));
            entry.setLinkedAnimation(anim);
        }
    // PHASE_TYPE.ROLL));
    if (ref.getGame().isDummyMode()) {
        return true;
    }
    return result;
}
Also used : EffectAnimation(eidolons.system.graphics.EffectAnimation) AnimPhase(main.system.graphics.AnimPhase) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) LogEntryNode(main.system.text.LogEntryNode) ANIM(main.system.graphics.ANIM)

Aggregations

DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)2 EffectAnimation (eidolons.system.graphics.EffectAnimation)2 AnimPhase (main.system.graphics.AnimPhase)2 ANIM (main.system.graphics.ANIM)1 LogEntryNode (main.system.text.LogEntryNode)1