* KithkinGreatheart - Fixed that the second ability (first strike) was not conditional.

This commit is contained in:
LevelX2 2013-06-30 22:16:31 +02:00
parent 4e3e418524
commit 0acce10d9d

View file

@ -36,6 +36,7 @@ import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.continious.BoostSourceEffect; import mage.abilities.effects.common.continious.BoostSourceEffect;
import mage.abilities.effects.common.continious.GainAbilitySourceEffect; import mage.abilities.effects.common.continious.GainAbilitySourceEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
@ -57,6 +58,7 @@ public class KithkinGreatheart extends CardImpl<KithkinGreatheart> {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filter.add(new SubtypePredicate("Giant")); filter.add(new SubtypePredicate("Giant"));
} }
private static final String rule2 = "As long as you control a Giant, {this} has first strike.";
public KithkinGreatheart(UUID ownerId) { public KithkinGreatheart(UUID ownerId) {
super(ownerId, 21, "Kithkin Greatheart", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); super(ownerId, 21, "Kithkin Greatheart", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}");
@ -72,9 +74,12 @@ public class KithkinGreatheart extends CardImpl<KithkinGreatheart> {
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect( Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
new BoostSourceEffect(1,1, Duration.WhileOnBattlefield), new BoostSourceEffect(1,1, Duration.WhileOnBattlefield),
new ControlsPermanentCondition(filter), new ControlsPermanentCondition(filter),
"As long as you control a Giant, Kithkin Greatheart gets +1/+1 and has first strike")); "As long as you control a Giant, Kithkin Greatheart gets +1/+1"));
ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()));
this.addAbility(ability); this.addAbility(ability);
ConditionalContinousEffect effect2 = new ConditionalContinousEffect(
new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), new ControlsPermanentCondition(filter), rule2);
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect2));
} }
public KithkinGreatheart(final KithkinGreatheart card) { public KithkinGreatheart(final KithkinGreatheart card) {