use of eidolons.game.module.adventure.entity.MacroActionManager.MACRO_MODES in project Eidolons by IDemiurge.
the class RestMasterOld method rest.
// setFinishDate / setRestTime / defaultTime (4/8/12 hours)
// TODO endTurn => auto-rest? valid modes preCheck
public static boolean rest(MacroParty party) {
for (Unit hero : party.getMembers()) {
MACRO_MODES mode = hero.getMacroMode();
if (mode == null || !checkModeValid(party, mode)) {
DialogMaster.inform("Choose a mode on the lowermost panel!");
return false;
// mode = promptMode(hero); // or auto-set for non-leaders?
}
hero.setMacroMode(mode);
}
// each hero gain as per Mode
// non-cancelable perhaps? Or also an Order?
//
party.setStatus(MACRO_STATUS.CAMPING);
return true;
// party.setCurrentDestination(null);
// party.setCurrentRoute(null);
}
use of eidolons.game.module.adventure.entity.MacroActionManager.MACRO_MODES in project Eidolons by IDemiurge.
the class RestMasterOld method applyMacroModeContinuous.
// upon activation
public static void applyMacroModeContinuous(Unit hero) {
MACRO_MODES mode = new EnumMaster<MACRO_MODES>().retrieveEnumConst(MACRO_MODES.class, hero.getProperty(MACRO_PROPS.MACRO_MODE));
String paramString = mode.getContinuousParamString();
Map<PARAMETER, Integer> map = new RandomWizard<PARAMETER>().constructWeightMap(paramString, PARAMETER.class);
for (PARAMETER param : map.keySet()) {
hero.modifyParameter(param, map.get(param));
}
}
use of eidolons.game.module.adventure.entity.MacroActionManager.MACRO_MODES in project Eidolons by IDemiurge.
the class RestMasterOld method applyMacroMode.
public static void applyMacroMode(Unit hero) {
MACRO_MODES mode = new EnumMaster<MACRO_MODES>().retrieveEnumConst(MACRO_MODES.class, hero.getProperty(MACRO_PROPS.MACRO_MODE));
String paramString = mode.getParamString();
Map<PARAMETER, String> map = new RandomWizard<PARAMETER>().constructStringWeightMap(paramString, PARAMETER.class);
for (PARAMETER p : map.keySet()) {
Ref ref = hero.getRef().getCopy();
// TODO MAX
setModeTargets(mode, ref);
String string = formatModeFormula(map.get(p));
new ModifyValueEffect(p, MOD.MODIFY_BY_CONST, string).apply(ref);
// hero.modifyParameter(portrait, amount);
}
// applyCustomEffect
if (mode.isSpecEffect()) {
switch(mode) {
// break;
case BREW:
break;
case DIVINATION:
DivinationMaster.divine(hero, TimeMaster.hoursLeft());
break;
case RECHARGE:
break;
case REPAIR:
break;
case SCOUT:
break;
case STAND_WATCH:
break;
case TRAIN_WITH_MAGIC:
// choose mastery? minor xp bonus?
break;
case TRAIN_WITH_WEAPONS:
break;
}
}
}
Aggregations