Files
Server/src/engine/powers/effectmodifiers/MeleeDamageEffectModifier.java
T
MagicBotandClaude Opus 5.5 dee936d8a5 Remove the DB effect loaders
Effects, modifiers, source types, effect fail conditions and item
enchant values all come from Effects.cfg (4.6b). Removes
dbEffectsBaseHandler, dbPowerHandler, the EffectsBase and effect
modifier ResultSet constructors, EffectsBase.getFailConditions and
LOAD_ENCHANT_VALUES.

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

55 lines
2.1 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;
public class MeleeDamageEffectModifier extends AbstractEffectModifier {
public MeleeDamageEffectModifier(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) {
}
}