More cleanup in statTransferAction

This commit is contained in:
2024-09-13 12:20:33 -04:00
parent f0875a6093
commit 92db9e1086
2 changed files with 5 additions and 14 deletions
@@ -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));
}