diff --git a/src/engine/powers/poweractions/TransferStatOTPowerAction.java b/src/engine/powers/poweractions/TransferStatOTPowerAction.java index a88a7237..bd1b4c2e 100644 --- a/src/engine/powers/poweractions/TransferStatOTPowerAction.java +++ b/src/engine/powers/poweractions/TransferStatOTPowerAction.java @@ -17,9 +17,8 @@ import engine.objects.AbstractWorldObject; import engine.powers.ActionsBase; import engine.powers.EffectsBase; import engine.powers.PowersBase; +import engine.wpak.data.PowerAction; -import java.sql.ResultSet; -import java.sql.SQLException; import java.util.HashMap; @@ -27,10 +26,10 @@ public class TransferStatOTPowerAction extends TransferStatPowerAction { private int numIterations; - public TransferStatOTPowerAction(ResultSet rs, HashMap effects) throws SQLException { - super(rs, effects); + public TransferStatOTPowerAction(PowerAction powerAction, HashMap effects) { + super(powerAction, effects); - this.numIterations = rs.getInt("numIterations"); + this.numIterations = powerAction.statTransfer.transfer_ticks; } public int getNumIterations() { diff --git a/src/engine/powers/poweractions/TransferStatPowerAction.java b/src/engine/powers/poweractions/TransferStatPowerAction.java index 71115b4c..6d83ed0d 100644 --- a/src/engine/powers/poweractions/TransferStatPowerAction.java +++ b/src/engine/powers/poweractions/TransferStatPowerAction.java @@ -32,11 +32,7 @@ public class TransferStatPowerAction extends AbstractPowerAction { protected String effectID; public PowerAction powerAction; - protected float transferAmount; - protected float transferRamp; protected boolean transferRampAdd; - protected float transferEfficiency; - protected float transferEfficiencyRamp; protected boolean transferEfficiencyRampAdd; protected boolean targetToCaster; protected mbEnums.DamageType damageType; @@ -48,10 +44,6 @@ public class TransferStatPowerAction extends AbstractPowerAction { this.powerAction = powerAction; this.effectID = powerAction.effects.get(0).effect_id; - this.transferAmount = powerAction.getFloat("transferAmount"); - this.transferRamp = powerAction.getFloat("transferRamp"); - this.transferEfficiency = powerAction.getFloat("transferEfficiency"); - this.transferEfficiencyRamp = powerAction.getFloat("transferEfficiencyRamp"); int flags = powerAction.getInt("flags"); this.transferRampAdd = ((flags & 4096) != 0) ? true : false; this.transferEfficiencyRampAdd = ((flags & 8192) != 0) ? true : false; @@ -79,7 +71,7 @@ public class TransferStatPowerAction extends AbstractPowerAction { public float getTransferAmount(float trains) { // if (this.transferRampAdd) - return this.transferAmount + (this.transferRamp * trains); + return this.powerAction.statTransfer.fromStatValue + (this.transferRamp * trains); // else // return this.transferAmount * (1 + (this.transferRamp * trains)); }