Search in sources :

Example 11 with RatingCurve

use of delta.games.lotro.character.stats.ratings.RatingCurve in project lotro-companion by dmorcellet.

the class StatCurveChartPanelController method updateStatSeries.

private void updateStatSeries(XYSeries statSeries, SingleStatCurveConfiguration curveConfiguration) {
    int count = statSeries.getItemCount();
    if (count > 0) {
        statSeries.remove(0);
    }
    if (_statValue != null) {
        RatingCurve curve = curveConfiguration.getCurve();
        double rating = _statValue.doubleValue();
        int level = _config.getLevel();
        Double percentage = curve.getPercentage(rating, level);
        if (percentage != null) {
            statSeries.add(rating, percentage.doubleValue());
        }
    }
}
Also used : RatingCurve(delta.games.lotro.character.stats.ratings.RatingCurve) Paint(java.awt.Paint)

Example 12 with RatingCurve

use of delta.games.lotro.character.stats.ratings.RatingCurve in project lotro-companion by dmorcellet.

the class StatCurvesConfigurationFactory method buildParryChart.

/**
 * Build configuration for the 'parry' chart.
 * @return A chart configuration.
 */
public StatCurvesChartConfiguration buildParryChart() {
    StatCurvesChartConfiguration parryChart = new StatCurvesChartConfiguration("Parry", STAT.PARRY);
    RatingCurve avoidance = _ratingsMgr.getAvoidance();
    SingleStatCurveConfiguration fullParryCfg = new SingleStatCurveConfiguration("Full Parry", avoidance);
    fullParryCfg.addStat(STAT.PARRY_PERCENTAGE);
    parryChart.addCurve(fullParryCfg);
    RatingCurve partialAvoidance = _ratingsMgr.getPartialAvoidance();
    SingleStatCurveConfiguration partialParryCfg = new SingleStatCurveConfiguration("Partial Parry", partialAvoidance);
    partialParryCfg.addStat(STAT.PARTIAL_PARRY_PERCENTAGE);
    parryChart.addCurve(partialParryCfg);
    RatingCurve partialMitigation = _ratingsMgr.getPartialMitigation();
    SingleStatCurveConfiguration partialMitParryCfg = new SingleStatCurveConfiguration("Partial Parry Mitigation", partialMitigation);
    partialMitParryCfg.addStat(STAT.PARTIAL_PARRY_MITIGATION_PERCENTAGE);
    parryChart.addCurve(partialMitParryCfg);
    return parryChart;
}
Also used : RatingCurve(delta.games.lotro.character.stats.ratings.RatingCurve)

Example 13 with RatingCurve

use of delta.games.lotro.character.stats.ratings.RatingCurve in project lotro-companion by dmorcellet.

the class StatCurvesConfigurationFactory method buildTacticalDamageChart.

/**
 * Build configuration for the 'tactical damage' chart.
 * @return A chart configuration.
 */
public StatCurvesChartConfiguration buildTacticalDamageChart() {
    RatingCurve damage = _ratingsMgr.getDamage();
    StatCurvesChartConfiguration tacticalDamageCfg = new StatCurvesChartConfiguration("Tactical damage", STAT.TACTICAL_MASTERY);
    SingleStatCurveConfiguration tacticalDamageCurveCfg = new SingleStatCurveConfiguration("Tactical damage", damage);
    tacticalDamageCurveCfg.addStat(STAT.TACTICAL_DAMAGE_PERCENTAGE);
    tacticalDamageCfg.addCurve(tacticalDamageCurveCfg);
    return tacticalDamageCfg;
}
Also used : RatingCurve(delta.games.lotro.character.stats.ratings.RatingCurve)

Example 14 with RatingCurve

use of delta.games.lotro.character.stats.ratings.RatingCurve in project lotro-companion by dmorcellet.

the class StatCurvesConfigurationFactory method buildEvadeChart.

/**
 * Build configuration for the 'evade' chart.
 * @return A chart configuration.
 */
public StatCurvesChartConfiguration buildEvadeChart() {
    StatCurvesChartConfiguration evadeChart = new StatCurvesChartConfiguration("Evade", STAT.EVADE);
    RatingCurve avoidance = _ratingsMgr.getAvoidance();
    SingleStatCurveConfiguration fullEvadeCfg = new SingleStatCurveConfiguration("Full Evade", avoidance);
    fullEvadeCfg.addStat(STAT.EVADE_PERCENTAGE);
    evadeChart.addCurve(fullEvadeCfg);
    RatingCurve partialAvoidance = _ratingsMgr.getPartialAvoidance();
    SingleStatCurveConfiguration partialEvadeCfg = new SingleStatCurveConfiguration("Partial Evade", partialAvoidance);
    partialEvadeCfg.addStat(STAT.PARTIAL_EVADE_PERCENTAGE);
    evadeChart.addCurve(partialEvadeCfg);
    RatingCurve partialMitigation = _ratingsMgr.getPartialMitigation();
    SingleStatCurveConfiguration partialMitEvadeCfg = new SingleStatCurveConfiguration("Partial Evade Mitigation", partialMitigation);
    partialMitEvadeCfg.addStat(STAT.PARTIAL_EVADE_MITIGATION_PERCENTAGE);
    evadeChart.addCurve(partialMitEvadeCfg);
    return evadeChart;
}
Also used : RatingCurve(delta.games.lotro.character.stats.ratings.RatingCurve)

Example 15 with RatingCurve

use of delta.games.lotro.character.stats.ratings.RatingCurve in project lotro-companion by dmorcellet.

the class StatCurvesConfigurationFactory method buildResistanceChart.

/**
 * Build configuration for the 'resistance' chart.
 * @return A chart configuration.
 */
public StatCurvesChartConfiguration buildResistanceChart() {
    RatingCurve resistance = _ratingsMgr.getResistance();
    StatCurvesChartConfiguration resistanceCfg = new StatCurvesChartConfiguration("Resistance", STAT.RESISTANCE);
    SingleStatCurveConfiguration resistanceCurveCfg = new SingleStatCurveConfiguration("Resistance", resistance);
    resistanceCurveCfg.addStat(STAT.RESISTANCE_PERCENTAGE);
    resistanceCfg.addCurve(resistanceCurveCfg);
    return resistanceCfg;
}
Also used : RatingCurve(delta.games.lotro.character.stats.ratings.RatingCurve)

Aggregations

RatingCurve (delta.games.lotro.character.stats.ratings.RatingCurve)18 Paint (java.awt.Paint)2 FixedDecimalsInteger (delta.games.lotro.utils.FixedDecimalsInteger)1