Fixed maximum force always been +1 if use Momentum Charge.
Contributed by Sero.
This commit is contained in:
parent
ec0185256f
commit
53bb6c78bb
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
@ -51,7 +51,7 @@ public class GetMomentum extends AbstractEffect
|
|||||||
if (effected.isPlayer())
|
if (effected.isPlayer())
|
||||||
{
|
{
|
||||||
final PlayerInstance player = effected.getActingPlayer();
|
final PlayerInstance player = effected.getActingPlayer();
|
||||||
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM, 1);
|
final int maxCharge = (int) player.getStat().getValue(Stat.MAX_MOMENTUM);
|
||||||
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
final int newCharge = Math.min(player.getCharges() + 1, maxCharge);
|
||||||
|
|
||||||
player.setCharges(newCharge);
|
player.setCharges(newCharge);
|
||||||
|
Loading…
Reference in New Issue
Block a user