- Legend rule for Brothers Yamazaki

This commit is contained in:
swordshine
2013-07-12 09:49:13 +00:00
parent a849c03651
commit c74a577030

View File

@@ -905,9 +905,9 @@ public class GameAction {
// Place triggers on stack // Place triggers on stack
game.getStack().chooseOrderOfSimultaneousStackEntryAll(); game.getStack().chooseOrderOfSimultaneousStackEntryAll();
} }
boolean yamazaki = CardLists.filter(game.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Brothers Yamazaki")).size() == 2;
for(Player p : game.getPlayers() ) { for(Player p : game.getPlayers() ) {
if (this.handleLegendRule(p)) { if (this.handleLegendRule(p, yamazaki)) {
checkAgain = true; checkAgain = true;
} }
@@ -1190,14 +1190,14 @@ public class GameAction {
* destroyLegendaryCreatures. * destroyLegendaryCreatures.
* </p> * </p>
*/ */
private boolean handleLegendRule(Player p) { private boolean handleLegendRule(Player p, boolean yama) {
final List<Card> a = CardLists.getType(p.getCardsIn(ZoneType.Battlefield), "Legendary"); final List<Card> a = CardLists.getType(p.getCardsIn(ZoneType.Battlefield), "Legendary");
if (a.isEmpty() || game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noLegendRule)) { if (a.isEmpty() || game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noLegendRule)) {
return false; return false;
} }
boolean recheck = false; boolean recheck = false;
final List<Card> yamazaki = CardLists.filter(a, CardPredicates.nameEquals("Brothers Yamazaki")); if (yama) {
if (yamazaki.size() == 2) { List<Card> yamazaki = CardLists.filter(a, CardPredicates.nameEquals("Brothers Yamazaki"));
a.removeAll(yamazaki); a.removeAll(yamazaki);
} }