mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
Little fixes
This commit is contained in:
parent
11f5ae5b59
commit
c02069114d
2 changed files with 31 additions and 31 deletions
|
@ -480,19 +480,32 @@ public class AddLandDialog extends MageDialog {
|
||||||
white += m.getWhite();
|
white += m.getWhite();
|
||||||
}
|
}
|
||||||
int total = red + green + black + blue + white;
|
int total = red + green + black + blue + white;
|
||||||
int redcards = Math.round(land_number * ((float) red / (float) total));
|
|
||||||
total -= red;
|
int redcards = 0;
|
||||||
land_number -= redcards;
|
int greencards = 0;
|
||||||
int greencards = Math.round(land_number * ((float) green / (float) total));
|
int blackcards = 0;
|
||||||
total -= green;
|
int bluecards = 0;
|
||||||
land_number -= greencards;
|
int whitecards = 0;
|
||||||
int blackcards = Math.round(land_number * ((float) black / (float) total));
|
if (total > 0) {
|
||||||
total -= black;
|
redcards = Math.round(land_number * ((float) red / (float) total));
|
||||||
land_number -= blackcards;
|
total -= red;
|
||||||
int bluecards = Math.round(land_number * ((float) blue / (float) total));
|
land_number -= redcards;
|
||||||
total -= blue;
|
|
||||||
land_number -= bluecards;
|
greencards = Math.round(land_number * ((float) green / (float) total));
|
||||||
int whitecards = land_number;
|
total -= green;
|
||||||
|
land_number -= greencards;
|
||||||
|
|
||||||
|
blackcards = Math.round(land_number * ((float) black / (float) total));
|
||||||
|
total -= black;
|
||||||
|
land_number -= blackcards;
|
||||||
|
|
||||||
|
bluecards = Math.round(land_number * ((float) blue / (float) total));
|
||||||
|
total -= blue;
|
||||||
|
land_number -= bluecards;
|
||||||
|
|
||||||
|
whitecards = land_number;
|
||||||
|
}
|
||||||
|
|
||||||
spnMountain.setValue(redcards);
|
spnMountain.setValue(redcards);
|
||||||
spnForest.setValue(greencards);
|
spnForest.setValue(greencards);
|
||||||
spnSwamp.setValue(blackcards);
|
spnSwamp.setValue(blackcards);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package mage.cards.t;
|
package mage.cards.t;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.LoyaltyAbility;
|
import mage.abilities.LoyaltyAbility;
|
||||||
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
|
||||||
|
@ -9,20 +8,8 @@ import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
|
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||||
import mage.cards.Card;
|
import mage.cards.*;
|
||||||
import mage.constants.SubType;
|
import mage.constants.*;
|
||||||
import mage.constants.SuperType;
|
|
||||||
import mage.cards.CardImpl;
|
|
||||||
import mage.cards.CardSetInfo;
|
|
||||||
import mage.cards.Cards;
|
|
||||||
import mage.cards.CardsImpl;
|
|
||||||
import mage.constants.CardType;
|
|
||||||
import mage.constants.Duration;
|
|
||||||
import mage.constants.Layer;
|
|
||||||
import static mage.constants.Layer.TypeChangingEffects_4;
|
|
||||||
import mage.constants.Outcome;
|
|
||||||
import mage.constants.SubLayer;
|
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -32,8 +19,9 @@ import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetCardInHand;
|
import mage.target.common.TargetCardInHand;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public final class TezzeretCruelMachinist extends CardImpl {
|
public final class TezzeretCruelMachinist extends CardImpl {
|
||||||
|
@ -188,9 +176,8 @@ class TezzeretCruelMachinistPowerToughnessEffect extends SetPowerToughnessTarget
|
||||||
&& target.isFaceDown(game)) {
|
&& target.isFaceDown(game)) {
|
||||||
target.getPower().setValue(5);
|
target.getPower().setValue(5);
|
||||||
target.getToughness().setValue(5);
|
target.getToughness().setValue(5);
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue