forked from MagicBane/Server
More cleanup in statTransferAction
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user