Search in sources :

Example 46 with PROPERTY

use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.

the class PartyHelper method prepareType.

private static void prepareType(ObjType type) {
    for (PROPERTY prop : InventoryTransactionManager.INV_PROPS) {
        String propValue = type.getProperty(prop);
        List<String> items = StringMaster.openContainer(propValue);
        for (String item : items) {
            if (StringMaster.isInteger(item)) {
                try {
                    propValue = StringMaster.replaceFirst(propValue, item, type.getGame().getObjectById(StringMaster.getInteger(item)).getType().getName());
                } catch (Exception e) {
                    main.system.ExceptionMaster.printStackTrace(e);
                }
            }
        }
        type.setProperty(prop, propValue);
    }
}
Also used : PROPERTY(main.content.values.properties.PROPERTY)

Example 47 with PROPERTY

use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.

the class DC_RequirementsManager method getBaseTypeRequirement.

private Requirement getBaseTypeRequirement(Entity type, OBJ_TYPE TYPE) {
    PROPERTY prop = TYPE.getUpgradeRequirementProp();
    if (prop == null) {
        return null;
    }
    Condition condition = ConditionMaster.getPropConditionSourceMatch(prop.toString(), G_PROPS.BASE_TYPE.toString());
    String altBases = type.getProperty(PROPS.ALT_BASE_TYPES);
    if (!altBases.isEmpty()) {
        OrConditions orCondition = new OrConditions(condition);
        for (String s : StringMaster.open(altBases)) {
            orCondition.add(new PropCondition(PROPS.ALT_BASE_TYPES, s, false));
        }
        condition = orCondition;
    }
    return new Requirement(condition, InfoMaster.BASE + InfoMaster.getPropReasonString(type.getProperty(G_PROPS.BASE_TYPE), prop));
}
Also used : ClassTreeCondition(eidolons.ability.conditions.req.ClassTreeCondition) SkillPointCondition(eidolons.ability.conditions.req.SkillPointCondition) ValueGroupCondition(eidolons.ability.conditions.req.ValueGroupCondition) MultiClassCondition(eidolons.ability.conditions.req.MultiClassCondition) PROPERTY(main.content.values.properties.PROPERTY)

Example 48 with PROPERTY

use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.

the class DC_SoundMaster method preconstructSpell.

private static void preconstructSpell(DC_SpellObj spell, ANIM_PART part) {
    String file = AnimationConstructor.findResourceForSpell(spell, part.toString(), "", propsExact, getSpellSoundPath(), false);
    if (file == null) {
        file = AnimationConstructor.findResourceForSpell(spell, part.toString(), "", props, getSpellSoundPath(), true);
    }
    if (file == null) {
        file = getActionEffectSoundPath(spell, part);
    }
    if (file == null) {
        return;
    }
    file = file.replace(PathFinder.getSoundPath().toLowerCase(), "");
    PROPERTY prop = getProp(part);
    if (prop == null)
        return;
    spell.getType().setProperty(prop, file);
}
Also used : PROPERTY(main.content.values.properties.PROPERTY)

Example 49 with PROPERTY

use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.

the class ContentGenerator method generateArmorPerDamageType.

public static void generateArmorPerDamageType(ObjType t, MATERIAL material) {
    Integer armor = t.getIntParam(PARAMS.ARMOR);
    for (DAMAGE_TYPE dmg_type : GenericEnums.DAMAGE_TYPE.values()) {
        RESIST_GRADE grade = (material == null) ? getGradeForUnitType(t, dmg_type) : material.getResistGrade(dmg_type);
        PROPERTY prop = DC_ContentManager.getResistGradeForDmgType(dmg_type);
        if (prop == null) {
            continue;
        }
        t.setProperty(prop, grade.toString());
        t.setParam(DC_ContentManager.getArmorParamForDmgType(dmg_type), Math.round(armor * grade.getPercent() / 100));
        if (material == null) {
            grade = new EnumMaster<RESIST_GRADE>().retrieveEnumConst(RESIST_GRADE.class, t.getProperty(DC_ContentManager.getResistGradeForDmgType(dmg_type)));
        } else {
            grade = material.getSelfDamageGrade(dmg_type);
        }
        t.setProperty(DC_ContentManager.getSelfDamageGradeForDmgType(dmg_type), grade.toString());
        prop = DC_ContentManager.getSelfDamageGradeForDmgType(dmg_type);
        if (prop == null) {
            continue;
        }
        grade = new EnumMaster<RESIST_GRADE>().retrieveEnumConst(RESIST_GRADE.class, t.getProperty(prop));
        t.setParam(DC_ContentManager.getArmorSelfDamageParamForDmgType(dmg_type), Math.round(grade.getPercent()));
    }
}
Also used : RESIST_GRADE(main.content.enums.GenericEnums.RESIST_GRADE) EnumMaster(main.system.auxiliary.EnumMaster) PROPERTY(main.content.values.properties.PROPERTY) DAMAGE_TYPE(main.content.enums.GenericEnums.DAMAGE_TYPE)

Example 50 with PROPERTY

use of main.content.values.properties.PROPERTY in project Eidolons by IDemiurge.

the class DC_InfoPanelRenderer method getTableCellRendererComponent.

@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    if (!obj.isDirty()) {
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    if (column == 0) {
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    // lbl = new JLabel(icon);
    if (StringMaster.isEmpty(value.toString())) {
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    String VALUE = table.getValueAt(row, 0).toString();
    if (VALUE == null) {
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    if (StringMaster.isEmpty(VALUE.toString())) {
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    PARAMETER p = ContentManager.getPARAM(VALUE.toString());
    if (p == null) {
        PROPERTY prop = ContentManager.getPROP(VALUE.toString());
        if (prop != null) {
            return getPropertyValueComp(prop, value.toString(), VALUE);
        }
        return getDefaultComp(table, value, isSelected, hasFocus, row, column);
    }
    return getParamValueComp(value.toString(), VALUE, p);
}
Also used : PROPERTY(main.content.values.properties.PROPERTY) PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

PROPERTY (main.content.values.properties.PROPERTY)57 PARAMETER (main.content.values.parameters.PARAMETER)23 ObjType (main.entity.type.ObjType)17 OBJ_TYPE (main.content.OBJ_TYPE)6 ArrayList (java.util.ArrayList)5 VALUE (main.content.VALUE)5 Ref (main.entity.Ref)5 DC_TYPE (main.content.DC_TYPE)4 Node (org.w3c.dom.Node)4 DC_SpellObj (eidolons.entity.active.DC_SpellObj)3 Unit (eidolons.entity.obj.unit.Unit)3 XLinkedMap (main.data.XLinkedMap)3 Obj (main.entity.obj.Obj)3 EnumMaster (main.system.auxiliary.EnumMaster)3 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)2 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)2 File (java.io.File)2 List (java.util.List)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 MOD_PROP_TYPE (main.ability.effects.Effect.MOD_PROP_TYPE)2