mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
* Some minor code and text clean up.
This commit is contained in:
parent
bc2d5caa42
commit
f480d0bebb
4 changed files with 13 additions and 12 deletions
|
@ -25,8 +25,8 @@ import java.util.*;
|
|||
public class OathbreakerFreeForAll extends GameCommanderImpl {
|
||||
|
||||
private int numPlayers;
|
||||
private Map<UUID, Set<UUID>> playerSignatureSpells = new HashMap<>();
|
||||
private Map<UUID, Set<UUID>> playerOathbreakers = new HashMap<>();
|
||||
private final Map<UUID, Set<UUID>> playerSignatureSpells = new HashMap<>();
|
||||
private final Map<UUID, Set<UUID>> playerOathbreakers = new HashMap<>();
|
||||
|
||||
private static final String COMMANDER_NAME_OATHBREAKER = "Oathbreaker";
|
||||
private static final String COMMANDER_NAME_SIGNATURE_SPELL = "Signature Spell";
|
||||
|
@ -122,19 +122,19 @@ public class OathbreakerFreeForAll extends GameCommanderImpl {
|
|||
if (player != null) {
|
||||
Set<UUID> commanders = this.playerOathbreakers.getOrDefault(player.getId(), new HashSet<>());
|
||||
Set<UUID> spells = this.playerSignatureSpells.getOrDefault(player.getId(), new HashSet<>());
|
||||
for (UUID id : player.getCommandersIds()) {
|
||||
for (UUID commanderId : getCommandersIds(player, commanderCardType)) {
|
||||
switch (commanderCardType) {
|
||||
case ANY:
|
||||
res.add(id);
|
||||
res.add(commanderId);
|
||||
break;
|
||||
case COMMANDER_OR_OATHBREAKER:
|
||||
if (commanders.contains(id)) {
|
||||
res.add(id);
|
||||
if (commanders.contains(commanderId)) {
|
||||
res.add(commanderId);
|
||||
}
|
||||
break;
|
||||
case SIGNATURE_SPELL:
|
||||
if (spells.contains(id)) {
|
||||
res.add(id);
|
||||
if (spells.contains(commanderId)) {
|
||||
res.add(commanderId);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -54,7 +54,7 @@ class TreeOfPerditionEffect extends OneShotEffect {
|
|||
|
||||
public TreeOfPerditionEffect() {
|
||||
super(Outcome.Neutral);
|
||||
staticText = "Exchange target opponent's life total with Tree of Perdition's toughness";
|
||||
staticText = "Exchange target opponent's life total with {this}'s toughness";
|
||||
}
|
||||
|
||||
public TreeOfPerditionEffect(final TreeOfPerditionEffect effect) {
|
||||
|
|
|
@ -55,8 +55,8 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
Player player = getPlayer(playerId);
|
||||
if (player != null) {
|
||||
// add new commanders
|
||||
for (UUID id : player.getSideboard()) {
|
||||
Card card = this.getCard(id);
|
||||
for (UUID cardId : player.getSideboard()) {
|
||||
Card card = this.getCard(cardId);
|
||||
if (card != null) {
|
||||
// Check for companions. If it is the only card in the sideboard, it is the commander, not a companion.
|
||||
if (player.getSideboard().size() > 1 && card.getAbilities(this).stream().anyMatch(ability -> ability instanceof CompanionAbility)) {
|
||||
|
|
|
@ -4272,7 +4272,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
cards.addAll(getLibrary().getTopCards(game, value));
|
||||
if (!cards.isEmpty()) {
|
||||
TargetCard target = new TargetCard(0, cards.size(), Zone.LIBRARY,
|
||||
new FilterCard("cards to PUT on the BOTTOM of your library (Scry)"));
|
||||
new FilterCard("card" + (cards.size() == 1 ? "":"s")
|
||||
+ " to PUT on the BOTTOM of your library (Scry)"));
|
||||
chooseTarget(Outcome.Benefit, cards, target, source, game);
|
||||
putCardsOnBottomOfLibrary(new CardsImpl(target.getTargets()), game, source, true);
|
||||
cards.removeAll(target.getTargets());
|
||||
|
|
Loading…
Reference in a new issue