mirror of
https://github.com/correl/mage.git
synced 2025-04-02 03:18:09 -09:00
Fixed a bug in LockedInCondition that caused bugs in cards that used it (e.g. Goblin Bushwhacker).
This commit is contained in:
parent
1b8077841e
commit
c9d18f0410
4 changed files with 6 additions and 3 deletions
Mage.Sets/src/mage/sets/zendikar
Mage.Tests/src/test/java/org/mage/test/cards/continuous
Mage/src/mage/abilities
|
@ -32,6 +32,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.LockedInCondition;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
|
@ -73,7 +74,7 @@ public class MoldShambler extends CardImpl<MoldShambler> {
|
|||
Target target = new TargetPermanent(filter);
|
||||
target.setRequired(true);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.getInstance(), "When {this} enters the battlefield, if it was kicked, destroy target noncreature permanent."));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new LockedInCondition(KickedCondition.getInstance()), "When {this} enters the battlefield, if it was kicked, destroy target noncreature permanent."));
|
||||
}
|
||||
|
||||
public MoldShambler(final MoldShambler card) {
|
||||
|
|
|
@ -16,6 +16,8 @@ public class GoblinBushwhackerTest extends CardTestPlayerBase {
|
|||
// Goblin Bushwhacker - Creature — Goblin Warrior 1/1, R - Kicker {R} (You may pay an additional {R} as you cast this spell.)
|
||||
// When Goblin Bushwhacker enters the battlefield, if it was kicked, creatures you control get +1/+0 and gain haste until end of turn.
|
||||
addCard(Zone.HAND, playerA, "Goblin Bushwhacker");
|
||||
|
||||
// Creature — Human Soldier 2/1
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Elite Vanguard");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Goblin Bushwhacker");
|
||||
|
|
|
@ -52,7 +52,7 @@ public class LockedInCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if(!conditionChecked) {
|
||||
result = !condition.apply(game, source);
|
||||
result = condition.apply(game, source);
|
||||
conditionChecked = true;
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -115,7 +115,7 @@ public class KickerAbility extends StaticAbility<KickerAbility> implements Optio
|
|||
|
||||
public KickerAbility(final KickerAbility ability) {
|
||||
super(ability);
|
||||
this.kickerCosts = ability.kickerCosts;
|
||||
this.kickerCosts.addAll(ability.kickerCosts);
|
||||
this.keywordText = ability.keywordText;
|
||||
this.reminderText = ability.reminderText;
|
||||
this.xManaValue = ability.xManaValue;
|
||||
|
|
Loading…
Add table
Reference in a new issue