Search in sources :

Example 96 with PARAMETER

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

the class HC_Tree method getGroupBackgroundPath.

private String getGroupBackgroundPath() {
    String imageName;
    if (arg instanceof CLASS_GROUP) {
        CLASS_GROUP group = (CLASS_GROUP) arg;
        // morph based on highest class?
        imageName = getBgImageForClass(group);
    } else {
        imageName = ContentManager.getMasteryGroup((PARAMETER) arg);
        switch(imageName) {
            case "Heavy":
                imageName = "war";
                break;
            case "Combat":
                imageName = "combat";
                break;
            case "Weapons":
                imageName = "weapons";
                break;
            case "Misc":
                imageName = "misc";
                break;
            case "Stealth":
                imageName = "stealth";
                break;
        }
        if (imageName.isEmpty()) {
            switch((PARAMS) arg) {
                case ARMORER_MASTERY:
                    imageName = "war";
                    break;
                case BLADE_MASTERY:
                case POLEARM_MASTERY:
                case BLUNT_MASTERY:
                case AXE_MASTERY:
                    imageName = "weapons";
                    break;
            }
        }
    }
    return "big\\trees\\" + imageName + ".jpg";
}
Also used : CLASS_GROUP(main.content.enums.entity.HeroEnums.CLASS_GROUP) PARAMS(eidolons.content.PARAMS) PARAMETER(main.content.values.parameters.PARAMETER)

Example 97 with PARAMETER

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

the class HT_View method added.

protected void added(ObjType type) {
    PARAMETER mastery = ContentManager.getPARAM(type.getProperty(G_PROPS.MASTERY));
    String aspect = type.getProperty(G_PROPS.SKILL_GROUP);
    String rank = "";
    // type.getIntParam(params.circle)>4
    DC_SoundMaster.playSkillAddSound(type, mastery, aspect, rank);
    tree.refresh();
    tree.getPanel().repaint();
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Example 98 with PARAMETER

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

the class HC_PagedListPanel method paint.

@Override
public void paint(Graphics g) {
    super.paint(g);
    g.setFont(getFont());
    g.setColor(ColorManager.GOLDEN_WHITE);
    if (TYPE != null) {
        if (list_type == HC_LISTS.VENDOR) {
            if (img == null) {
                PARAMETER mastery = ContentManager.getPARAM(listName);
                if (mastery == null) {
                    mastery = ContentManager.getMastery(listName);
                }
                if (TYPE instanceof C_OBJ_TYPE) {
                } else {
                    switch((DC_TYPE) TYPE) {
                        case SPELLS:
                        case SKILLS:
                            img = ImageManager.getValueIcon(mastery);
                            break;
                        case CLASSES:
                    }
                }
                int y = getTextY() - 5;
                if (img != null) {
                    g.drawImage(img, 12, y, 28, 28, null);
                    g.drawImage(img, getWidth() - img.getWidth(null) - 12, y, 28, 28, null);
                    g.drawImage(img, (getWidth() - img.getWidth(null)) / 2, y, null);
                }
            }
        }
    }
    if (getTextY() >= 0) {
        g.drawString(listName, getTextX(), getTextY());
    } else {
        setToolTipText(listName);
    }
}
Also used : C_OBJ_TYPE(main.content.C_OBJ_TYPE) DC_TYPE(main.content.DC_TYPE) PARAMETER(main.content.values.parameters.PARAMETER)

Example 99 with PARAMETER

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

the class SkillTabNew method initComps.

protected void initComps() {
    listPages = new ArrayList<>();
    for (SKILL_DISPLAY_GROUPS group : SKILL_DISPLAY_GROUPS.values()) {
        ArrayList<PARAMETER> list = new ArrayList<>(Arrays.asList(group.getMasteries()));
        ArrayList<ObjType> data = new ArrayList<>();
        for (ObjType type : this.data) {
            PARAMETER mastery = ContentManager.getPARAM(type.getProperty(G_PROPS.MASTERY));
            if (list.contains(mastery)) {
                data.add(type);
            }
        }
        HC_SkillPagedListPanel pagedListPanel = new HC_SkillPagedListPanel(getTemplate(), hero, getItemManager(), data, group.getName());
        listPages.add(pagedListPanel);
    }
}
Also used : ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList) PARAMETER(main.content.values.parameters.PARAMETER)

Example 100 with PARAMETER

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

the class PointView method stateChanged.

@Override
public void stateChanged(ChangeEvent e) {
    // subtract points from attr/mast? only down to X!
    int newValue = (int) ((PointComp) e.getSource()).getValue();
    PARAMETER param = ((PointComp) e.getSource()).getParam();
    int oldValue = getBufferType().getIntParam(param);
    int mod = newValue - oldValue;
    int cost = PointMaster.getPointCost(Math.max(newValue, oldValue), hero, param);
    if (mod < 0 || !checkCost(cost * mod)) {
        ((PointComp) e.getSource()).removeChangeListener(this);
        ((PointComp) e.getSource()).setValue(oldValue);
        ((PointComp) e.getSource()).addChangeListener(this);
        return;
    }
    // CharacterCreator.getHeroManager().modifyHeroParam(hero, param, mod);
    getBufferType().modifyParameter(param, mod);
    modifyPool(-mod, cost);
}
Also used : PointComp(main.swing.generic.misc.PointComp) 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