Merge pull request #7190 from MusaBrt/master

Fixing some dirty codes
This commit is contained in:
Oleg Agafonov 2020-11-18 07:28:25 +01:00 committed by GitHub
commit 0fade0ed8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 15 deletions

View file

@ -149,15 +149,13 @@ public enum CopyPasteImageSource implements CardImageSource {
viewMissingCards = false;
String displayMissingCardsStr = "Up to the first 20 cards are:\n";
String missingCardsStr = "";
if (this.missingCards != null) {
for (String card : this.missingCards) {
if (count < 20) {
displayMissingCardsStr = displayMissingCardsStr + card + "\n";
}
missingCardsStr = missingCardsStr + card + "\n";
count++;
for (String card : this.missingCards) {
if (count < 20) {
displayMissingCardsStr = displayMissingCardsStr + card + "\n";
}
missingCardsStr = missingCardsStr + card + "\n";
count++;
}
StringSelection stringSelection = new StringSelection(missingCardsStr);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();

View file

@ -102,7 +102,7 @@ class ArchonOfValorsReachReplacementEffect extends ContinuousRuleModifyingEffect
if (savedType instanceof String && card != null) {
CardType cardType = CardType.fromString((String) savedType);
if (cardType != null && card != null && card.getCardType().contains(cardType)) {
if (cardType != null && card.getCardType().contains(cardType)) {
return true;
}
}

View file

@ -79,9 +79,7 @@ class CadaverousBloomManaEffect extends BasicManaEffect {
getManaTemplate().getColorless() * count
);
if (count > 0) {
netMana.add(mana);
}
netMana.add(mana);
}
}
return netMana;

View file

@ -104,7 +104,7 @@ class GnostroVoiceOfTheCragsEffect extends OneShotEffect {
if (player == null) {
return false;
}
return player != null && player.scry(
return player.scry (
GnostroVoiceOfTheCragsValue.instance.calculate(game, source, this), source, game
);
}

View file

@ -105,7 +105,7 @@ class OathOfLimDulEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Boolean sacrificeDone = false;
boolean sacrificeDone = false;
int numberSacrificed = 0;
int numberToDiscard = 0;
int numberOfControlledPermanents = 0;

View file

@ -40,7 +40,7 @@ public abstract class PlainTextDeckImporter extends DeckImporter {
sbMessage.setLength(0);
try {
try (Scanner scanner = new Scanner(f)) {
Boolean canFix = true;
boolean canFix = true;
while (scanner.hasNextLine()) {
String line = scanner.nextLine().trim();
FixedInfo fixedInfo = new FixedInfo(line);