mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Sonar's fixes
This commit is contained in:
parent
f572ace420
commit
bce01ce053
6 changed files with 703 additions and 714 deletions
|
@ -848,7 +848,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements
|
|||
}
|
||||
|
||||
// can save result
|
||||
if (isDownloadOK & httpConn != null) {
|
||||
if (isDownloadOK && httpConn != null) {
|
||||
// save data to temp
|
||||
try (InputStream in = new BufferedInputStream(httpConn.getInputStream());
|
||||
OutputStream tfileout = new TFileOutputStream(fileTempImage);
|
||||
|
|
|
@ -135,6 +135,7 @@ public class TableView implements Serializable {
|
|||
switch (table.getState()) {
|
||||
case WAITING:
|
||||
stateText.append(" (").append(table.getTournament().getPlayers().size()).append('/').append(table.getNumberOfSeats()).append(')');
|
||||
break;
|
||||
case READY_TO_START:
|
||||
case STARTING:
|
||||
infoText.append(" Time: ").append(table.getTournament().getOptions().getMatchOptions().getMatchTimeLimit().toString());
|
||||
|
@ -153,6 +154,7 @@ public class TableView implements Serializable {
|
|||
if (draft != null) {
|
||||
stateText.append(' ').append(draft.getBoosterNum()).append('/').append(draft.getCardNum() - 1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
this.additionalInfo = infoText.toString();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1999,8 +1999,10 @@ public class HumanPlayer extends PlayerImpl {
|
|||
tResponse.setString("resolveStack");
|
||||
actionQueueSaved.add(tResponse);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
super.sendPlayerAction(playerAction, game, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,12 +97,13 @@ class BondOfPassionEffect extends OneShotEffect {
|
|||
Permanent permanent2 = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (permanent2 != null) {
|
||||
permanent2.damage(2, source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
Player player = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(2, source.getSourceId(), game);
|
||||
} else {
|
||||
Player player = game.getPlayer(source.getTargets().get(1).getFirstTarget());
|
||||
if (player != null) {
|
||||
player.damage(2, source.getSourceId(), game);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
|
||||
package mage;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.Cost;
|
||||
|
@ -14,6 +9,11 @@ import mage.filter.Filter;
|
|||
import mage.filter.FilterMana;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
*/
|
||||
|
@ -192,6 +192,7 @@ public class ConditionalMana extends Mana implements Serializable {
|
|||
break;
|
||||
case COLORLESS:
|
||||
colorless += amount;
|
||||
break;
|
||||
case GENERIC:
|
||||
generic += amount;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue