mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
Prevent backgrounds from being used as commanders no matter what (#10007)
This commit is contained in:
parent
f66644994f
commit
32002101ad
2 changed files with 25 additions and 1 deletions
|
@ -83,7 +83,7 @@ public abstract class AbstractCommander extends Constructed {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (commander1.getAbilities().containsClass(ChooseABackgroundAbility.class) == commander2.hasSubTypeForDeckbuilding(SubType.BACKGROUND)
|
if (commander1.getAbilities().containsClass(ChooseABackgroundAbility.class) == commander2.hasSubTypeForDeckbuilding(SubType.BACKGROUND)
|
||||||
|| commander2.getAbilities().containsClass(ChooseABackgroundAbility.class) == commander1.hasSubTypeForDeckbuilding(SubType.BACKGROUND)) {
|
&& commander2.getAbilities().containsClass(ChooseABackgroundAbility.class) == commander1.hasSubTypeForDeckbuilding(SubType.BACKGROUND)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (commander1.hasSubTypeForDeckbuilding(SubType.BACKGROUND)) {
|
if (commander1.hasSubTypeForDeckbuilding(SubType.BACKGROUND)) {
|
||||||
|
|
|
@ -71,4 +71,28 @@ public class CommanderDeckValidationTest extends MageTestBase {
|
||||||
|
|
||||||
deckTester.validate();
|
deckTester.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = AssertionError.class)
|
||||||
|
public void testBackgrounds() {
|
||||||
|
DeckTester deckTester = new DeckTester(new Commander());
|
||||||
|
deckTester.addMaindeck("Forest", 98);
|
||||||
|
|
||||||
|
deckTester.addSideboard("Thrasios, Triton Hero", 1);
|
||||||
|
deckTester.addSideboard("Haunted One", 1);
|
||||||
|
|
||||||
|
deckTester.validate(
|
||||||
|
"Commanders without the 'Choose a Background' ability should not be able to have a background as an additional commander");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test()
|
||||||
|
public void testBackgrounds2() {
|
||||||
|
DeckTester deckTester = new DeckTester(new Commander());
|
||||||
|
deckTester.addMaindeck("Plains", 98);
|
||||||
|
|
||||||
|
deckTester.addSideboard("Abdel Adrian, Gorion's Ward", 1);
|
||||||
|
deckTester.addSideboard("Haunted One", 1);
|
||||||
|
|
||||||
|
deckTester.validate(
|
||||||
|
"Commanders with the 'Choose a Background' ability should be able to have a background as an additional commander");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue