mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- Legend rule for Brothers Yamazaki
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user