mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
[NEO] fixed bugs with Kotose, the Silent Spider and March of Reckless Joy (fixes #8737, fixes #8736)
This commit is contained in:
parent
93cc71f40c
commit
32bf246e77
3 changed files with 12 additions and 13 deletions
|
@ -122,6 +122,7 @@ class KotoseTheSilentSpiderEffect extends OneShotEffect {
|
|||
Set<Card> cardSet = cards.getCards(game);
|
||||
controller.moveCardsToExile(cardSet, source, game, true, exileId, exileName);
|
||||
opponent.shuffleLibrary(source, game);
|
||||
cardSet.add(card);
|
||||
if (cardSet.isEmpty() || source.getSourcePermanentIfItStillExists(game) == null) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -88,28 +88,22 @@ class MarchOfRecklessJoyEffect extends OneShotEffect {
|
|||
CardUtil.getExileZoneId(game, source),
|
||||
CardUtil.getSourceName(game, source)
|
||||
);
|
||||
Condition condition = new MarchOfRecklessJoyCondition(source);
|
||||
for (Card card : cards) {
|
||||
CardUtil.makeCardPlayable(
|
||||
game, source, card, Duration.UntilEndOfYourNextTurn,
|
||||
false, null, condition
|
||||
false, null, MarchOfRecklessJoyCondition.instance
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class MarchOfRecklessJoyCondition implements Condition {
|
||||
|
||||
private final MageObjectReference mor;
|
||||
|
||||
MarchOfRecklessJoyCondition(Ability source) {
|
||||
this.mor = new MageObjectReference(source);
|
||||
}
|
||||
enum MarchOfRecklessJoyCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return MarchOfRecklessJoyWatcher.check(mor, game);
|
||||
return MarchOfRecklessJoyWatcher.check(source, game);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +127,11 @@ class MarchOfRecklessJoyWatcher extends Watcher {
|
|||
);
|
||||
}
|
||||
|
||||
static boolean check(MageObjectReference mor, Game game) {
|
||||
return game.getState().getWatcher(MarchOfRecklessJoyWatcher.class).morMap.getOrDefault(mor, 0) < 2;
|
||||
static boolean check(Ability source, Game game) {
|
||||
return game
|
||||
.getState()
|
||||
.getWatcher(MarchOfRecklessJoyWatcher.class)
|
||||
.morMap
|
||||
.getOrDefault(new MageObjectReference(source, 1), 0) < 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ExileCardsFromHandAdjuster implements CostAdjuster {
|
|||
Zone.ALL,
|
||||
new InfoEffect("as an additional cost to cast this spell, you may exile any number of "
|
||||
+ filter.getMessage() + ". This spell costs {2} less to cast for each card exiled this way")
|
||||
));
|
||||
).setRuleAtTheTop(true));
|
||||
card.getSpellAbility().setCostAdjuster(new ExileCardsFromHandAdjuster(filter));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue