Olympiad game addDamage when not invulnerable.
This commit is contained in:
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -684,21 +684,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -918,15 +918,22 @@ class OlympiadGame
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == _playerOne)
|
if (player == _playerOne)
|
||||||
|
{
|
||||||
|
if (!_playerTwo.isInvul())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (player == _playerTwo)
|
else if (player == _playerTwo)
|
||||||
|
{
|
||||||
|
if (!_playerOne.isInvul())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected String getTitle()
|
protected String getTitle()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -918,15 +918,22 @@ class OlympiadGame
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == _playerOne)
|
if (player == _playerOne)
|
||||||
|
{
|
||||||
|
if (!_playerTwo.isInvul())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (player == _playerTwo)
|
else if (player == _playerTwo)
|
||||||
|
{
|
||||||
|
if (!_playerOne.isInvul())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected String getTitle()
|
protected String getTitle()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1010,15 +1010,22 @@ class OlympiadGame
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player == _playerOne)
|
if (player == _playerOne)
|
||||||
|
{
|
||||||
|
if (!_playerTwo.isInvul())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (player == _playerTwo)
|
else if (player == _playerTwo)
|
||||||
|
{
|
||||||
|
if (!_playerOne.isInvul())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected String getTitle()
|
protected String getTitle()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -648,21 +648,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
@@ -678,21 +678,30 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected final void addDamage(PlayerInstance player, int damage)
|
protected void addDamage(PlayerInstance player, int damage)
|
||||||
{
|
{
|
||||||
if ((_playerOne.getPlayer() == null) || (_playerTwo.getPlayer() == null))
|
final PlayerInstance player1 = _playerOne.getPlayer();
|
||||||
|
final PlayerInstance player2 = _playerOne.getPlayer();
|
||||||
|
if ((player1 == null) || (player2 == null))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (player == _playerOne.getPlayer())
|
|
||||||
|
if (player == player1)
|
||||||
|
{
|
||||||
|
if (!player2.isInvul() && !player2.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP1 += damage;
|
_damageP1 += damage;
|
||||||
}
|
}
|
||||||
else if (player == _playerTwo.getPlayer())
|
}
|
||||||
|
else if (player == player2)
|
||||||
|
{
|
||||||
|
if (!player1.isInvul() && !player1.isHpBlocked())
|
||||||
{
|
{
|
||||||
_damageP2 += damage;
|
_damageP2 += damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getPlayerNames()
|
public String[] getPlayerNames()
|
||||||
|
|||||||
Reference in New Issue
Block a user