Files
BattleBane/src/engine/powers/effectmodifiers/HealthFullEffectModifier.java
T
MagicBotandClaude Opus 5.5 e2ec8eb8a6 Build effect modifiers from Effects.cfg
Each EffectsBase builds its modifiers from its EffectTemplate MODS
lines, with ramps from the CompoundCurve helper. The Value mods now
fill Item.enchantValues, replacing LOAD_ENCHANT_VALUES. The ItemName
skip list of DB row IDs is gone; it only hid Centurion's and
Imperturbable from ./makeitem.

Value changes (cfg wins): weapon power X effects lose the DB-only OCV
mod; PRE-210A..237A resists and SUF-153A..171A resists (doubled);
Speed on SPRINT, SNT-010A, BHN-001A, HNT/RNG-037A, BRD-016A, PRS-031A,
and RNG-049A loses Speed; ARM-058A Necromancy +1; TMP-040A, WLR-018A;
PARRY/CRU-032A gain their Parry line. RESTORE's damage type is NONE
(cfg typo, as the client reads it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 04:40:43 -04:00

62 lines
2.3 KiB
Java

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.powers.effectmodifiers;
import engine.jobs.AbstractEffectJob;
import engine.objects.*;
import engine.parsers.objects.wpak.EffectTemplate;
import java.sql.ResultSet;
import java.sql.SQLException;
public class HealthFullEffectModifier extends AbstractEffectModifier {
public HealthFullEffectModifier(ResultSet rs) throws SQLException {
super(rs);
}
public HealthFullEffectModifier(String IDString, EffectTemplate.ModEntry modEntry) {
super(IDString, modEntry);
}
@Override
protected void _applyEffectModifier(AbstractCharacter source, AbstractWorldObject awo, int trains, AbstractEffectJob effect) {
}
@Override
public void applyBonus(AbstractCharacter ac, int trains) {
Float amount = 0f;
PlayerBonuses bonus = ac.getBonuses();
if (this.percentMod != 0f) { //Stat Percent Modifiers
if (this.useRampAdd)
amount = this.percentMod + (this.ramp * trains);
else
amount = this.percentMod * (1 + (this.ramp * trains));
amount = amount / 100;
bonus.addFloat(this, amount);
} else { //Stat Modifiers
if (this.useRampAdd)
amount = this.minMod + (this.ramp * trains);
else
amount = this.minMod * (1 + (this.ramp * trains));
bonus.addFloat(this, amount);
}
}
@Override
public void applyBonus(Item item, int trains) {
}
@Override
public void applyBonus(Building building, int trains) {
}
}