Search in sources :

Example 56 with Ref

use of main.entity.Ref in project Eidolons by IDemiurge.

the class DefaultActionHandler method doDebugStuff.

private static boolean doDebugStuff(Unit source, BattleFieldObject target) {
    target.getGame().getVisionMaster().getVisionController().log(source, target);
    target.getGame().getVisionMaster().getVisionController().logFor(target);
    OUTLINE_TYPE outlineType = source.getGame().getVisionMaster().getOutlineMaster().getOutlineType(target, source);
    VISIBILITY_LEVEL vl = source.getGame().getVisionMaster().getVisibilityLevel(source, target);
    target.getPlayerVisionStatus(true);
    target.getGamma();
    source.getGame().getVisionMaster().getIlluminationMaster().getIllumination(target);
    target.getGame().getVisionMaster().getGammaMaster().clearCache();
    target.getGame().getVisionMaster().getIlluminationMaster().clearCache();
    int g = target.getGame().getVisionMaster().getGammaMaster().getGamma(source, target);
    outlineType = source.getGame().getVisionMaster().getOutlineMaster().getOutlineType(target, source);
    vl = source.getGame().getVisionMaster().getVisibilityLevel(source, target);
    ClearShotCondition.clearCache();
    Ref ref = new Ref(source);
    ref.setMatch(target.getId());
    source.getGame().getVisionMaster().getSightMaster().getClearShotCondition().preCheck(ref);
    return false;
}
Also used : OUTLINE_TYPE(main.content.enums.rules.VisionEnums.OUTLINE_TYPE) VISIBILITY_LEVEL(main.content.enums.rules.VisionEnums.VISIBILITY_LEVEL) Ref(main.entity.Ref)

Example 57 with Ref

use of main.entity.Ref in project Eidolons by IDemiurge.

the class DefaultActionHandler method doDebugStuffCell.

private static boolean doDebugStuffCell(Unit source, Coordinates c) {
    Ref ref = new Ref(source);
    ref.setMatch(source.getGame().getCellByCoordinate(c).getId());
    ClearShotCondition.clearCache();
    source.getGame().getVisionMaster().getSightMaster().getClearShotCondition().preCheck(ref);
    DC_Obj target = source.getGame().getCellByCoordinate(c);
    target.getGame().getVisionMaster().getGammaMaster().clearCache();
    target.getGame().getVisionMaster().getIlluminationMaster().clearCache();
    int g = target.getGame().getVisionMaster().getGammaMaster().getGamma(source, target);
    return false;
}
Also used : DC_Obj(eidolons.entity.obj.DC_Obj) Ref(main.entity.Ref)

Example 58 with Ref

use of main.entity.Ref in project Eidolons by IDemiurge.

the class ActiveAnimator method animate.

public void animate(Obj target) {
    Ref REF = getRef().getCopy();
    REF.setTarget(target.getId());
    animate(REF);
}
Also used : Ref(main.entity.Ref)

Example 59 with Ref

use of main.entity.Ref in project Eidolons by IDemiurge.

the class DC_ActionManager method activateAction.

public boolean activateAction(Obj target, Obj source, Active action) {
    Ref ref = source.getRef().getCopy();
    ref.setTarget(target.getId());
    ref.setTriggered(true);
    return action.activatedOn(ref);
}
Also used : Ref(main.entity.Ref)

Example 60 with Ref

use of main.entity.Ref in project Eidolons by IDemiurge.

the class HeroCreator method createHeroObj.

public static Unit createHeroObj(ObjType type) {
    Unit hero = new Unit(type, 0, 0, getDefaultPlayer(), Eidolons.getGame(), new Ref(Eidolons.getGame()));
    newId(type);
    Eidolons.getGame().getState().addObject(hero);
    // hero.afterEffects();
    return hero;
}
Also used : Ref(main.entity.Ref) Unit(eidolons.entity.obj.unit.Unit)

Aggregations

Ref (main.entity.Ref)155 Unit (eidolons.entity.obj.unit.Unit)28 ObjType (main.entity.type.ObjType)23 Event (main.game.logic.event.Event)16 ArrayList (java.util.ArrayList)15 Obj (main.entity.obj.Obj)15 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)13 Coordinates (main.game.bf.Coordinates)13 Conditions (main.elements.conditions.Conditions)12 Formula (main.system.math.Formula)11 BattleFieldObject (eidolons.entity.obj.BattleFieldObject)10 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)9 PARAMETER (main.content.values.parameters.PARAMETER)9 DC_SpellObj (eidolons.entity.active.DC_SpellObj)8 Effects (main.ability.effects.Effects)8 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)7 Wave (eidolons.game.battlecraft.logic.battle.arena.Wave)7 Effect (main.ability.effects.Effect)7 DC_HeroItemObj (eidolons.entity.item.DC_HeroItemObj)5 DC_QuickItemObj (eidolons.entity.item.DC_QuickItemObj)5