Search in sources :

Example 66 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class DebugUtilities method setGodParams.

private static void setGodParams(Entity entity) {
    int i = 0;
    for (PARAMETER p : GOD_MODE_INFINITE_PARAMETERS) {
        entity.setParam(p, GOD_MODE_INFINITE_VALS[i]);
        i++;
    }
    i = 0;
    // for (PARAMETER portrait : GOD_MODE_INFINITE_PARAMETERS) {
    // portrait = ContentManager.getCurrentParam(portrait);
    // entity.setParam(portrait, GOD_MODE_INFINITE_VALS[i]);
    // i++;
    // }
    // entity.setParam(PARAMS.C_MORALE, QUASI_INFINITE_VALUE / 10);
    entity.setParam(PARAMS.C_INITIATIVE, QUASI_INFINITE_VALUE / 100);
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Example 67 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class TextGenerator method generatePerkParamBonuses.

public static String generatePerkParamBonuses(Entity e) {
    List<List<VALUE>> pages = ValuePageManager.getValuesForHCInfoPages(e.getOBJ_TYPE_ENUM());
    String string = PREFIX;
    for (List<VALUE> list : pages) {
        boolean prop = false;
        for (VALUE v : list) {
            if (v instanceof PARAMETER) {
                if (!ContentManager.isValueForOBJ_TYPE(DC_TYPE.CHARS, v)) {
                    continue;
                }
                String amount = e.getValue(v);
                amount = TextParser.parse(amount, e.getRef());
                int n = new Formula(amount).getInt(e.getRef());
                if (n != 0) {
                    string += n + " " + v.getName() + ", ";
                }
            } else {
                prop = true;
                break;
            }
        }
        if (!prop && !list.equals(pages.get(pages.size() - 1))) {
            string += StringMaster.NEW_LINE;
        }
    }
    // StringMaster.replaceLast(" ," "and
    string.substring(0, string.length() - 2);
    return string;
}
Also used : Formula(main.system.math.Formula) List(java.util.List) VALUE(main.content.VALUE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 68 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class ContentManager method initCharParams.

private static void initCharParams() {
    charParameters = new ArrayList<>(getParamList().size());
    for (PARAMETER p : getParamList()) {
        if (p.getEntityType().equals(DC_TYPE.CHARS.getName())) {
            charParameters.add(p);
            continue;
        }
        if (Arrays.asList(p.getEntityTypes()).contains((DC_TYPE.CHARS.getName()))) {
            charParameters.add(p);
        }
    }
    filteredCharParameters = new ArrayList<>(charParameters.size());
    for (PARAMETER p : charParameters) {
        if (!p.isDynamic()) {
            if (!p.isLowPriority()) {
                filteredCharParameters.add(p);
            }
        }
    }
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Example 69 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class ContentManager method getBaseParameterFromCurrent.

public static PARAMETER getBaseParameterFromCurrent(PARAMETER param) {
    PARAMETER baseParam = new MapMaster<PARAMETER, PARAMETER>().getKeyForValue(currentCache, param);
    if (baseParam != null) {
        return baseParam;
    }
    if (!param.name().startsWith(StringMaster.CURRENT)) {
        return param;
    }
    baseParam = getPARAM(param.getFullName().replace(StringMaster.CURRENT, ""), true);
    currentCache.put(baseParam, param);
    return baseParam;
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Example 70 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class ContentManager method getParamsForType.

public static List<PARAMETER> getParamsForType(String entity, boolean dynamic) {
    List<PARAMETER> paramList = (dynamic) ? paramListsMap.get(entity) : paramListsMapAV.get(entity);
    if (paramList != null) {
        return paramList;
    }
    paramList = new ArrayList<>();
    for (PARAMETER param : params) {
        if (!dynamic) {
            if (param.isDynamic() && !param.isWriteToType()) {
                continue;
            }
        }
        if (isValueForOBJ_TYPE(entity, param)) {
            paramList.add(param);
        }
    }
    if (!dynamic) {
        paramListsMapAV.put(entity, paramList);
    } else {
        paramListsMap.put(entity, paramList);
    }
    return paramList;
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

PARAMETER (main.content.values.parameters.PARAMETER)136 PROPERTY (main.content.values.properties.PROPERTY)22 ObjType (main.entity.type.ObjType)13 ArrayList (java.util.ArrayList)12 Formula (main.system.math.Formula)12 Ref (main.entity.Ref)9 VALUE (main.content.VALUE)7 Obj (main.entity.obj.Obj)7 PARAMS (eidolons.content.PARAMS)6 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)5 Cost (main.elements.costs.Cost)5 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)4 G_Panel (main.swing.generic.components.G_Panel)4 Node (org.w3c.dom.Node)4 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)3 HashMap (java.util.HashMap)3 DAMAGE_TYPE (main.content.enums.GenericEnums.DAMAGE_TYPE)3 Costs (main.elements.costs.Costs)3 Entity (main.entity.Entity)3 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)3