use of eidolons.ability.effects.oneshot.mechanic.ModeEffect in project Eidolons by IDemiurge.
the class RestEffect method applyThis.
@Override
public boolean applyThis() {
// whole party!
/*
add regen and wait()
interrupt?
remove buff?
or rely on reset() ?
block actions
add shader
*/
List<Unit> allies = getGame().getMetaMaster().getPartyManager().getParty().getMembers();
for (Unit sub : allies) {
Ref REF = sub.getRef().getTargetingRef(sub);
new ModeEffect(STD_MODES.SLEEPING).apply(REF);
}
float time = 120;
// (Boolean) WaitMaster.waitForInput(WAIT_OPERATIONS.WAIT_COMPLETE);
Boolean result = getGame().getDungeonMaster().getExplorationMaster().getTimeMaster().playerRests(time);
if (result) {
// applyRested();
for (Unit sub : allies) {
sub.removeBuff("Sleeping");
Ref REF = sub.getRef().getTargetingRef(sub);
getRestedBuffEffect().apply(REF);
new ModifyValueEffect(PARAMS.C_MORALE, MOD.MODIFY_BY_PERCENT, "15").apply(REF);
}
}
return true;
}
use of eidolons.ability.effects.oneshot.mechanic.ModeEffect in project Eidolons by IDemiurge.
the class ChannelingRule method activateChanneing.
public static boolean activateChanneing(DC_SpellObj spell) {
// ActiveAbility spell_ability = ActivesConstructor
// .mergeActiveList(spell, TARGETING_MODE.SINGLE);
spell.getOwnerObj().getHandler().initChannelingSpellData(spell);
boolean result = true;
ModeEffect modeEffect = new ModeEffect(STD_MODES.CHANNELING);
// String string = STD_MODES.CHANNELING.toString();
// if (spell instanceof DC_UnitAction) {
// if (spell.checkProperty(G_PROPS.CUSTOM_PROPS)) {
// modeEffect.getModPropEffect().setValue(
// spell.getProperty(G_PROPS.CUSTOM_PROPS));
// }
// }
Ref REF = spell.getRef().getCopy();
REF.setTarget(spell.getOwnerObj().getId());
// modeEffect.getAddBuffEffect().setEffect(effect)
// Condition conditions = new Conditions(new RefCondition(
// KEYS.EVENT_SOURCE, KEYS.SOURCE), new StringComparison(
// "{SOURCE_MODE}", string, true));
// CastSpellEffect castEffect = new CastSpellEffect(spell);
// castEffect.setForceTargeting(true);
// AddTriggerEffect triggerEffect = new AddTriggerEffect(
// STANDARD_EVENT_TYPE.UNIT_TURN_STARTED, conditions,
// new ActiveAbility(null, new Effects(
// new RemoveBuffEffect(string), castEffect)));
modeEffect.setReinit(false);
// modeEffect.getAddBuffEffect().addEffect(triggerEffect);
modeEffect.getAddBuffEffect().setDuration(2);
result &= modeEffect.apply(REF);
return result;
}
Aggregations