Remove the DB power action loader

Power actions come from PowerActions.cfg (3fc5e725, tested). Deletes
AbstractPowerAction.getAllPowerActions and the ResultSet constructor on
every power action class. static_power_poweraction is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MagicBotandClaude Opus 5.5 committed 2026-10-26 09:41:17 -04:00
1 parent 29e1e51b04
commit 025a451770
33 files changed
-466

No files matched your search

@@ -25,8 +25,6 @@ import engine.powers.EffectsBase;
import engine.powers.PowersBase;
import engine.powers.effectmodifiers.HealthEffectModifier;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.concurrent.ThreadLocalRandom;
@@ -49,43 +47,6 @@ public class TransferStatPowerAction extends AbstractPowerAction {
protected mbEnums.DamageType damageType;
protected EffectsBase effect;
public TransferStatPowerAction(ResultSet rs, HashMap<String, EffectsBase> effects) throws SQLException {
super(rs);
this.effectID = rs.getString("effectID");
String st = rs.getString("transferFromType");
if (st.equals("HEALTH"))
this.transferFromHealth = true;
else if (st.equals("MANA"))
this.transferFromMana = true;
else
this.transferFromStamina = true;
st = rs.getString("transferToType");
if (st.equals("HEALTH"))
this.transferToHealth = true;
else if (st.equals("MANA"))
this.transferToMana = true;
else
this.transferToStamina = true;
this.transferAmount = rs.getFloat("transferAmount");
this.transferRamp = rs.getFloat("transferRamp");
this.transferEfficiency = rs.getFloat("transferEfficiency");
this.transferEfficiencyRamp = rs.getFloat("transferEfficiencyRamp");
int flags = rs.getInt("flags");
this.transferRampAdd = ((flags & 4096) != 0) ? true : false;
this.transferEfficiencyRampAdd = ((flags & 8192) != 0) ? true : false;
this.targetToCaster = ((flags & 16384) != 0) ? true : false;
this.effect = effects.get(this.effectID);
try {
String damageString = rs.getString("damageType");
// Damage type can sometimes be null in the DB.
if (damageString.isEmpty() == false)
this.damageType = mbEnums.DamageType.getDamageType(damageString);
} catch (Exception e) {
this.damageType = null;
}
}
public TransferStatPowerAction(PowerActionTemplate powerActionTemplate, int id, HashMap<String, EffectsBase> effects) {
super(powerActionTemplate, id);
CurveRamp amountRamp = CurveRamp.fromCurve(powerActionTemplate.transfer_amount_curve);