Search in sources :

Example 6 with OUTLINE_TYPE

use of main.content.enums.rules.VisionEnums.OUTLINE_TYPE in project Eidolons by IDemiurge.

the class JUnitClearshotTest method checkObj.

protected void checkObj(DC_Obj sub, boolean hero_inside, boolean inside) {
    OUTLINE_TYPE outline = sub.getOutlineType();
    boolean blocked = hero_inside != inside;
    LogMaster.setOff(false);
    if (blocked)
        if (OUTLINE_TYPE.BLOCKED_OUTLINE != outline) {
            boolean result = game.getVisionMaster().getSightMaster().getClearShotCondition().check(getHero(), sub);
            if (!result) {
                main.system.auxiliary.log.LogMaster.log(1, "Failed ClearShotCondition:" + " " + sub + "; hero_inside= " + hero_inside + "; inside=" + inside);
                assertTrue(false);
            }
        } else if (OUTLINE_TYPE.BLOCKED_OUTLINE == outline) {
            main.system.auxiliary.log.LogMaster.log(1, "Failed BLOCKED_OUTLINE:" + " " + sub + "; hero_inside= " + hero_inside + "; inside=" + inside);
            assertTrue(false);
        }
    if (sub instanceof BattleFieldObject)
        if (!sub.isMine())
            if (sub.getVisibilityLevelForPlayer() != VISIBILITY_LEVEL.UNSEEN) {
                main.system.auxiliary.log.LogMaster.log(1, "Failed UNSEEN:" + " " + sub + "; hero_inside= " + hero_inside + "; inside=" + inside);
                assertTrue(false);
            }
}
Also used : OUTLINE_TYPE(main.content.enums.rules.VisionEnums.OUTLINE_TYPE) BattleFieldObject(eidolons.entity.obj.BattleFieldObject)

Aggregations

OUTLINE_TYPE (main.content.enums.rules.VisionEnums.OUTLINE_TYPE)6 Unit (eidolons.entity.obj.unit.Unit)4 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)1 BattleFieldObject (eidolons.entity.obj.BattleFieldObject)1 DC_Cell (eidolons.entity.obj.DC_Cell)1 BattleClickListener (eidolons.libgdx.bf.mouse.BattleClickListener)1 ResourceSourceImpl (eidolons.libgdx.gui.panels.dc.unitinfo.datasource.ResourceSourceImpl)1 LastSeenTooltipFactory (eidolons.libgdx.gui.tooltips.LastSeenTooltipFactory)1 UnitViewTooltip (eidolons.libgdx.gui.tooltips.UnitViewTooltip)1 OUTLINE_IMAGE (main.content.enums.rules.VisionEnums.OUTLINE_IMAGE)1 VISIBILITY_LEVEL (main.content.enums.rules.VisionEnums.VISIBILITY_LEVEL)1 Ref (main.entity.Ref)1