Search in sources :

Example 1 with MOD_PROP_TYPE

use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.

the class EffectAnimation method drawTextColumn.

private void drawTextColumn(Map<PROPERTY, List<Object>> map, boolean onSource) {
    int y = 4;
    for (PROPERTY p : map.keySet()) {
        MOD_PROP_TYPE type = (MOD_PROP_TYPE) map.get(p).get(0);
        String prefix = (type == MOD_PROP_TYPE.ADD) ? "+" : "=";
        Boolean negative = (type == MOD_PROP_TYPE.ADD) ? false : null;
        if (type == MOD_PROP_TYPE.REMOVE) {
            prefix = "-";
            negative = true;
        }
        String string = p.getName() + prefix + StringMaster.getWellFormattedString(map.get(p).get(1).toString());
        // MigMaster.getCenteredTextPosition(string, font, w);
        int x = 5;
        y += drawTextColored(onSource, negative, string, font, x, y);
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) MOD_PROP_TYPE(main.ability.effects.Effect.MOD_PROP_TYPE)

Example 2 with MOD_PROP_TYPE

use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.

the class MC_ControlPanel method massEdit.

public static void massEdit(List<ObjType> types, VALUE prop) {
    // GenericListChooser.s
    types = ListChooser.chooseTypes_(types);
    if (types.isEmpty()) {
        return;
    }
    String value = inputMassValue(prop);
    if (StringMaster.isEmpty(value)) {
        return;
    }
    MOD_PROP_TYPE p = new EnumMaster<MOD_PROP_TYPE>().selectEnum(MOD_PROP_TYPE.class);
    // }
    for (ObjType sub : (types)) {
        sub.modifyProperty(p, (PROPERTY) prop, value);
    }
}
Also used : ObjType(main.entity.type.ObjType) MOD_PROP_TYPE(main.ability.effects.Effect.MOD_PROP_TYPE)

Example 3 with MOD_PROP_TYPE

use of main.ability.effects.Effect.MOD_PROP_TYPE in project Eidolons by IDemiurge.

the class EffectFinder method initPropModEffects.

public static void initPropModEffects(Effects modEffects, Map<PROPERTY, String> propMap, Ref ref) {
    for (PROPERTY prop : propMap.keySet()) {
        String amount = propMap.get(prop);
        MOD_PROP_TYPE code1 = MOD_PROP_TYPE.ADD;
        if (amount.contains(StringMaster.REMOVE)) {
            code1 = MOD_PROP_TYPE.REMOVE;
            amount.replace(StringMaster.REMOVE, "");
        }
        if (amount.contains(StringMaster.SET)) {
            code1 = MOD_PROP_TYPE.SET;
            amount.replace(StringMaster.SET, "");
        }
        ModifyPropertyEffect e = new ModifyPropertyEffect(prop, code1, amount);
        modEffects.add(e);
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) MOD_PROP_TYPE(main.ability.effects.Effect.MOD_PROP_TYPE) ModifyPropertyEffect(eidolons.ability.effects.common.ModifyPropertyEffect)

Aggregations

MOD_PROP_TYPE (main.ability.effects.Effect.MOD_PROP_TYPE)3 PROPERTY (main.content.values.properties.PROPERTY)2 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)1 ObjType (main.entity.type.ObjType)1