mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Little fixes
This commit is contained in:
parent
ca521751cd
commit
fb4065ba66
7 changed files with 14 additions and 16 deletions
|
@ -1252,7 +1252,7 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
private void cbExpansionSetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbExpansionSetActionPerformed
|
||||
// one item selected by user
|
||||
|
||||
// ignore combobox modifing
|
||||
// ignore combobox modifying
|
||||
if (isSetsFilterLoading) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public final class CountryUtil {
|
|||
|
||||
public static String getCountryName(String countryCode) {
|
||||
if (COUNTRY_MAP.isEmpty()) {
|
||||
for (int i = 0; i <= CountryComboBox.countryList.length - 1; i++) {
|
||||
for (int i = 0; i < CountryComboBox.countryList.length; i++) {
|
||||
COUNTRY_MAP.put(CountryComboBox.countryList[i][1], CountryComboBox.countryList[i][0]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ public class LoadTest {
|
|||
}
|
||||
|
||||
LoadTestGameResultsList gameResults = new LoadTestGameResultsList();
|
||||
for (int i = 0; i <= seedsList.size() - 1; i++) {
|
||||
for (int i = 0; i < seedsList.size(); i++) {
|
||||
long randomSeed = seedsList.get(i);
|
||||
logger.info("Game " + (i + 1) + " of " + seedsList.size() + ", RANDOM seed: " + randomSeed);
|
||||
RandomUtil.setSeed(randomSeed);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.serverside.tournament;
|
||||
|
||||
|
||||
import mage.game.tournament.Round;
|
||||
import mage.game.tournament.TournamentPairing;
|
||||
import mage.game.tournament.TournamentPlayer;
|
||||
|
@ -17,7 +16,6 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* @author Quercitron
|
||||
*/
|
||||
|
@ -258,7 +256,7 @@ public class SwissPairingMinimalWeightMatchingTest {
|
|||
@Test
|
||||
public void SimulateDifferentTournaments() {
|
||||
int playersCount = 12;
|
||||
for (int i = 0; i <= playersCount; i++) {
|
||||
for (int i = 0; i < playersCount; i++) {
|
||||
int roundsCount = ((i + 1) / 2) * 2 - 1;
|
||||
for (int j = 1; j <= roundsCount; j++) {
|
||||
SimulateTournament(i, j);
|
||||
|
|
|
@ -1591,9 +1591,9 @@ public class VerifyCardDataTest {
|
|||
}
|
||||
|
||||
boolean isFine = true;
|
||||
for (int i = 0; i <= cardRules.length - 1; i++) {
|
||||
for (int i = 0; i < cardRules.length; i++) {
|
||||
boolean isAbilityFounded = false;
|
||||
for (int j = 0; j <= refRules.length - 1; j++) {
|
||||
for (int j = 0; j < refRules.length; j++) {
|
||||
String refRule = refRules[j];
|
||||
if (compareText(cardRules[i], refRule, card.getName())) {
|
||||
cardRules[i] = "+ " + cardRules[i];
|
||||
|
|
|
@ -21,10 +21,10 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class SpellsCostReductionAllEffect extends CostModificationEffectImpl {
|
||||
|
||||
private FilterCard filter;
|
||||
private int amount;
|
||||
private final FilterCard filter;
|
||||
private final int amount;
|
||||
private final boolean upTo;
|
||||
private boolean onlyControlled;
|
||||
private final boolean onlyControlled;
|
||||
private UUID controllerId;
|
||||
|
||||
public SpellsCostReductionAllEffect(int amount) {
|
||||
|
@ -72,8 +72,8 @@ public class SpellsCostReductionAllEffect extends CostModificationEffectImpl {
|
|||
}
|
||||
Mana mana = abilityToModify.getManaCostsToPay().getMana();
|
||||
int reduceMax = mana.getGeneric();
|
||||
if (reduceMax > 2) {
|
||||
reduceMax = 2;
|
||||
if (reduceMax > this.amount) {
|
||||
reduceMax = this.amount;
|
||||
}
|
||||
if (reduceMax > 0) {
|
||||
Player controller = game.getPlayer(abilityToModify.getControllerId());
|
||||
|
|
|
@ -71,8 +71,8 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI
|
|||
if (upTo) {
|
||||
Mana mana = abilityToModify.getManaCostsToPay().getMana();
|
||||
int reduceMax = mana.getGeneric();
|
||||
if (reduceMax > amount) {
|
||||
reduceMax = amount;
|
||||
if (reduceMax > this.amount) {
|
||||
reduceMax = this.amount;
|
||||
}
|
||||
if (reduceMax > 0) {
|
||||
Player controller = game.getPlayer(abilityToModify.getControllerId());
|
||||
|
@ -83,7 +83,7 @@ public class SpellsCostReductionControllerEffect extends CostModificationEffectI
|
|||
if (!game.inCheckPlayableState()) {
|
||||
ChoiceImpl choice = new ChoiceImpl(false);
|
||||
Set<String> set = new LinkedHashSet<>();
|
||||
for (int i = 0; i <= amount; i++) {
|
||||
for (int i = 0; i <= reduceMax; i++) {
|
||||
set.add(String.valueOf(i));
|
||||
}
|
||||
choice.setChoices(set);
|
||||
|
|
Loading…
Reference in a new issue