* Laboratory Maniac - Fixed that it makes you also win now (if you draw from empty library) if you don't lose the game for having 0 or less life and have 0 or less life.

This commit is contained in:
LevelX2 2014-04-26 18:39:23 +02:00
parent d7a8bd64e2
commit 85572a2372
2 changed files with 12 additions and 4 deletions

View file

@ -27,7 +27,7 @@
*/
package mage.sets.avacynrestored;
import mage.constants.*;
import java.util.UUID;
import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.Ability;
@ -36,14 +36,19 @@ import mage.abilities.effects.ContinuousEffectImpl;
import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Layer;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author noxx
*/

View file

@ -109,7 +109,10 @@ class LaboratoryManiacEffect extends ReplacementEffectImpl<LaboratoryManiacEffec
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getType() == EventType.LOSES && event.getPlayerId().equals(source.getControllerId())) {
Player player = game.getPlayer(event.getPlayerId());
if (!player.hasLost() && (player.getLife() > 0 && player.isEmptyDraw() && player.getCounters().getCount(CounterType.POISON) < 10)) {
if (!player.hasLost() && (
(player.getLife() > 0 || !player.canLoseByZeroOrLessLife())
&& player.isEmptyDraw()
&& player.getCounters().getCount(CounterType.POISON) < 10)) {
return true;
}
}