Search in sources :

Example 1 with ItemCondition

use of eidolons.ability.conditions.req.ItemCondition in project Eidolons by IDemiurge.

the class DurabilityRule method getAttackItemDurabilityReductionEffects.

public static Effects getAttackItemDurabilityReductionEffects(int amount) {
    String source_ref = "{EVENT_SOURCE}";
    String target_ref = "{EVENT_TARGET}";
    return new Effects(new ConditionalEffect(new OrConditions(new ItemCondition(source_ref, ItemEnums.ITEM_SLOT.MAIN_HAND.getProp().getName()), new ItemCondition(source_ref, ItemEnums.ITEM_SLOT.OFF_HAND.getProp().getName())), new DurabilityReductionEffect(true, amount)), new ConditionalEffect(new ItemCondition(target_ref, ItemEnums.ITEM_SLOT.ARMOR.getProp().getName()), new DurabilityReductionEffect(false, amount)));
}
Also used : ConditionalEffect(main.ability.effects.container.ConditionalEffect) DurabilityReductionEffect(eidolons.ability.effects.oneshot.rule.DurabilityReductionEffect) OrConditions(main.elements.conditions.OrConditions) Effects(main.ability.effects.Effects) ItemCondition(eidolons.ability.conditions.req.ItemCondition)

Example 2 with ItemCondition

use of eidolons.ability.conditions.req.ItemCondition in project Eidolons by IDemiurge.

the class DC_ConditionMaster method getConditionFromTemplate.

@Override
public Condition getConditionFromTemplate(CONDITION_TEMPLATES template, String str1, String str2) {
    Condition result = null;
    {
        switch(template) {
            case ITEM:
                {
                    String slot = str1;
                    String prop = VariableManager.removeVarPart(str2);
                    String val = VariableManager.getVarPart(str2);
                    return new ItemCondition(KEYS.SOURCE.toString(), slot, prop, val);
                }
        }
    }
    if (result == null) {
        result = super.getConditionFromTemplate(template, str1, str2);
    }
    return result;
}
Also used : StdPassiveCondition(eidolons.ability.conditions.shortcut.StdPassiveCondition) ClassificationCondition(main.elements.conditions.standard.ClassificationCondition) MoveCondition(eidolons.ability.conditions.MoveCondition) ItemCondition(eidolons.ability.conditions.req.ItemCondition) VisibilityCondition(eidolons.ability.conditions.VisibilityCondition) FacingCondition(eidolons.ability.conditions.FacingCondition) SpaceCondition(eidolons.ability.conditions.shortcut.SpaceCondition) PositionCondition(main.elements.conditions.standard.PositionCondition) ZLevelCondition(main.elements.conditions.standard.ZLevelCondition) CellCondition(eidolons.ability.conditions.req.CellCondition) StatusCheckCondition(eidolons.ability.conditions.StatusCheckCondition) OwnershipCondition(main.elements.conditions.standard.OwnershipCondition) CostCondition(eidolons.ability.conditions.req.CostCondition) RangeCondition(eidolons.ability.conditions.shortcut.RangeCondition) ItemCondition(eidolons.ability.conditions.req.ItemCondition)

Aggregations

ItemCondition (eidolons.ability.conditions.req.ItemCondition)2 FacingCondition (eidolons.ability.conditions.FacingCondition)1 MoveCondition (eidolons.ability.conditions.MoveCondition)1 StatusCheckCondition (eidolons.ability.conditions.StatusCheckCondition)1 VisibilityCondition (eidolons.ability.conditions.VisibilityCondition)1 CellCondition (eidolons.ability.conditions.req.CellCondition)1 CostCondition (eidolons.ability.conditions.req.CostCondition)1 RangeCondition (eidolons.ability.conditions.shortcut.RangeCondition)1 SpaceCondition (eidolons.ability.conditions.shortcut.SpaceCondition)1 StdPassiveCondition (eidolons.ability.conditions.shortcut.StdPassiveCondition)1 DurabilityReductionEffect (eidolons.ability.effects.oneshot.rule.DurabilityReductionEffect)1 Effects (main.ability.effects.Effects)1 ConditionalEffect (main.ability.effects.container.ConditionalEffect)1 OrConditions (main.elements.conditions.OrConditions)1 ClassificationCondition (main.elements.conditions.standard.ClassificationCondition)1 OwnershipCondition (main.elements.conditions.standard.OwnershipCondition)1 PositionCondition (main.elements.conditions.standard.PositionCondition)1 ZLevelCondition (main.elements.conditions.standard.ZLevelCondition)1