Files
Server/src/engine/powers/effectmodifiers/MinDamageEffectModifier.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

69 lines
2.4 KiB
Java

// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
// Magicbane Emulator Project © 2013 - 2026
// https://www.magicbane.com
package engine.powers.effectmodifiers;
import engine.jobs.AbstractEffectJob;
import engine.objects.AbstractCharacter;
import engine.objects.AbstractWorldObject;
import engine.objects.Building;
import engine.objects.Item;
import engine.parsers.objects.wpak.EffectTemplate;
import java.sql.ResultSet;
import java.sql.SQLException;
public class MinDamageEffectModifier extends AbstractEffectModifier {
public MinDamageEffectModifier(ResultSet rs) throws SQLException {
super(rs);
}
public MinDamageEffectModifier(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) {
}
@Override
public void applyBonus(Item item, int trains) {
if (item == null)
return;
String key;
float amount = 0f;
if (this.percentMod != 0f) {
if (this.useRampAdd)
amount = (this.percentMod + (this.ramp * trains)) / 100f;
else
amount = (this.percentMod * (1 + (this.ramp * trains))) / 100f;
amount = amount / 100;
key = "min.percent";
} else {
if (this.useRampAdd)
amount = this.minMod + (this.ramp * trains);
else
amount = this.minMod * (1 + (this.ramp * trains));
key = "min";
}
item.addBonus(this, amount);
}
@Override
public void applyBonus(Building building, int trains) {
}
}