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)));
}
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;
}
Aggregations