mirror of
https://github.com/correl/mage.git
synced 2025-03-16 09:16:26 -09:00
Changed integer amount declaration
This commit is contained in:
parent
bf6939f45b
commit
2420073895
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ class PersonalIncarnationLoseHalfLifeEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(game.getOwnerId(source.getSourceId()));
|
Player player = game.getPlayer(game.getOwnerId(source.getSourceId()));
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
int amount = (player.getLife() + 1) / 2;
|
Integer amount = (int) Math.ceil(player.getLife() / 2f);
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
player.loseLife(amount, game, false);
|
player.loseLife(amount, game, false);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue