Merge branch 'BrawlFormat' into 'master'

Brawl format

See merge request core-developers/forge!324
This commit is contained in:
Michael Kamensky
2018-03-30 06:35:07 +00:00
31 changed files with 458 additions and 81 deletions

View File

@@ -78,7 +78,8 @@ public class GameRules {
}
public boolean hasCommander() {
return appliedVariants.contains(GameType.Commander) || appliedVariants.contains(GameType.TinyLeaders);
return appliedVariants.contains(GameType.Commander) || appliedVariants.contains(GameType.TinyLeaders)
|| appliedVariants.contains(GameType.Brawl);
}
public boolean canCloneUseTargetsImage() {

View File

@@ -23,6 +23,7 @@ public enum GameType {
Vanguard (DeckFormat.Vanguard, true, true, true, "Vanguard", "Each player has a special \"Avatar\" card that affects the game."),
Commander (DeckFormat.Commander, false, false, false, "Commander", "Each player has a legendary \"General\" card which can be cast at any time and determines deck colors."),
TinyLeaders (DeckFormat.TinyLeaders, false, false, false, "Tiny Leaders", "Each player has a legendary \"General\" card which can be cast at any time and determines deck colors. Each card must have CMC less than 4."),
Brawl (DeckFormat.Brawl, false, false, false, "Brawl", "Each player has a legendary \"General\" card which can be cast at any time and determines deck colors. Only cards legal in Standard may be used."),
Planeswalker (DeckFormat.PlanarConquest, false, false, true, "Planeswalker", "Each player has a Planeswalker card which can be cast at any time."),
Planechase (DeckFormat.Planechase, false, false, true, "Planechase", "Plane cards apply global effects. The Plane card changes when a player rolls \"Planeswalk\" on the planar die."),
Archenemy (DeckFormat.Archenemy, false, false, true, "Archenemy", "One player is the Archenemy and fights the other players by playing Scheme cards."),

View File

@@ -2078,7 +2078,7 @@ public class CardFactoryUtil {
" | ValidBlocker$ Creature | Secondary$ True " +
" | TriggerDescription$ Afflict " + n + " (" + inst.getReminderText() + ")";
final String abStringAfflict = "DB$ Loselife | Defined$ TriggeredDefendingPlayer" +
final String abStringAfflict = "DB$ LoseLife | Defined$ TriggeredDefendingPlayer" +
" | LifeAmount$ " + n;
final Trigger afflictTrigger = TriggerHandler.parseTrigger(trigStr.toString(), card, intrinsic);

View File

@@ -550,8 +550,9 @@ public class Player extends GameEntity implements Comparable<Player> {
}
}
//Tiny Leaders ignore commander damage rule.
if (source.isCommander() && isCombat && this.getGame().getRules().getGameType() != GameType.TinyLeaders) {
//Tiny Leaders and Brawl ignore commander damage rule.
if (source.isCommander() && isCombat && this.getGame().getRules().getGameType() != GameType.TinyLeaders
&& this.getGame().getRules().getGameType() != GameType.Brawl) {
commanderDamage.put(source, getCommanderDamage(source) + amount);
view.updateCommanderDamage(this);
}

View File

@@ -124,6 +124,10 @@ public class RegisteredPlayer {
start.commanders = deck.getCommanders();
start.setStartingLife(start.getStartingLife() + 5);
}
if (appliedVariants.contains(GameType.Brawl)) {
start.commanders = deck.getCommanders();
start.setStartingLife(start.getStartingLife() + 10);
}
if (appliedVariants.contains(GameType.Planechase)) {
start.planes = planes;
}