Changed integer amount declaration

This commit is contained in:
Zzooouhh 2017-12-20 00:35:26 +01:00 committed by GitHub
parent bf6939f45b
commit 2420073895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,7 +128,7 @@ class PersonalIncarnationLoseHalfLifeEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(game.getOwnerId(source.getSourceId()));
if (player != null) {
int amount = (player.getLife() + 1) / 2;
Integer amount = (int) Math.ceil(player.getLife() / 2f);
if (amount > 0) {
player.loseLife(amount, game, false);
return true;