Search in sources :

Example 1 with RULE_SCOPE

use of eidolons.game.battlecraft.rules.RuleMaster.RULE_SCOPE in project Eidolons by IDemiurge.

the class AutoTestRunner method run.

public void run() {
    Unit unit = master.getSource();
    RuleMaster.setScope(RULE_SCOPE.TEST);
    if (test.getArg(TEST_ARGS.RULE_SCOPE) != null) {
        RuleMaster.setScope(new EnumMaster<RULE_SCOPE>().retrieveEnumConst(RULE_SCOPE.class, test.getArg(TEST_ARGS.RULE_SCOPE)));
    }
    switch(test.getType()) {
        case ACTION_SKILL:
            runActionSkillTest();
            break;
        default:
            addTestTypes(unit);
            break;
    }
    runTestFunctions();
// switch (test.getAssertions()) {
// }
}
Also used : EnumMaster(main.system.auxiliary.EnumMaster) RULE_SCOPE(eidolons.game.battlecraft.rules.RuleMaster.RULE_SCOPE) Unit(eidolons.entity.obj.unit.Unit)

Example 2 with RULE_SCOPE

use of eidolons.game.battlecraft.rules.RuleMaster.RULE_SCOPE in project Eidolons by IDemiurge.

the class OptionsMaster method applyGameplayOptions.

private static void applyGameplayOptions(GameplayOptions gameplayOptions) {
    for (Object sub : gameplayOptions.getValues().keySet()) {
        new EnumMaster<GAMEPLAY_OPTION>().retrieveEnumConst(GAMEPLAY_OPTION.class, gameplayOptions.getValues().get(sub).toString());
        GAMEPLAY_OPTION key = gameplayOptions.getKey((sub.toString()));
        String value = gameplayOptions.getValue(key);
        if (!StringMaster.isInteger(value)) {
            switch(key) {
                case RULES_SCOPE:
                    RuleMaster.setScope(new EnumMaster<RULE_SCOPE>().retrieveEnumConst(RULE_SCOPE.class, gameplayOptions.getValues().get(sub).toString()));
                    break;
                case GAME_DIFFICULTY:
                    if (Eidolons.game != null)
                        if (Eidolons.game.getBattleMaster() != null)
                            Eidolons.game.getBattleMaster().getOptionManager().difficultySet(value);
                    break;
            }
        }
    }
}
Also used : EnumMaster(main.system.auxiliary.EnumMaster) RULE_SCOPE(eidolons.game.battlecraft.rules.RuleMaster.RULE_SCOPE) GAMEPLAY_OPTION(eidolons.system.options.GameplayOptions.GAMEPLAY_OPTION)

Aggregations

RULE_SCOPE (eidolons.game.battlecraft.rules.RuleMaster.RULE_SCOPE)2 EnumMaster (main.system.auxiliary.EnumMaster)2 Unit (eidolons.entity.obj.unit.Unit)1 GAMEPLAY_OPTION (eidolons.system.options.GameplayOptions.GAMEPLAY_OPTION)1