From 0964f65c33a75cb5a43bc92caaaa4e3d8f083dbe Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 5 Mar 2013 15:05:54 +0100 Subject: [PATCH] Fixed bug of Alms Beast. The gain Lifelink ability is now a static ability instead of a triggered ability. --- .../src/mage/sets/gatecrash/AlmsBeast.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/gatecrash/AlmsBeast.java b/Mage.Sets/src/mage/sets/gatecrash/AlmsBeast.java index 5d114a3c2a..44049f5c3e 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/AlmsBeast.java +++ b/Mage.Sets/src/mage/sets/gatecrash/AlmsBeast.java @@ -31,11 +31,16 @@ import java.util.UUID; import mage.Constants.CardType; import mage.Constants.Duration; import mage.Constants.Rarity; +import mage.Constants.Zone; import mage.MageInt; -import mage.abilities.common.BlocksOrBecomesBlockedByCreatureTriggeredAbility; -import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityAllEffect; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.BlockedByIdPredicate; +import mage.filter.predicate.permanent.BlockingAttackerIdPredicate; /** * @@ -54,9 +59,11 @@ public class AlmsBeast extends CardImpl { this.toughness = new MageInt(6); // Creatures blocking or blocked by Alms Beast have lifelink. - this.addAbility(new BlocksOrBecomesBlockedByCreatureTriggeredAbility( - new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfCombat), - false, "Creatures blocking or blocked by {this} have lifelink.")); + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(Predicates.or(new BlockedByIdPredicate(this.getId()), + new BlockingAttackerIdPredicate(this.getId()))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(LifelinkAbility.getInstance(), Duration.EndOfCombat, filter, + "Creatures blocking or blocked by {this} have lifelink"))); } public AlmsBeast(final AlmsBeast card) {