mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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();
|
||||
}
|
||||
int total = red + green + black + blue + white;
|
||||
int redcards = Math.round(land_number * ((float) red / (float) total));
|
||||
total -= red;
|
||||
land_number -= redcards;
|
||||
int greencards = Math.round(land_number * ((float) green / (float) total));
|
||||
total -= green;
|
||||
land_number -= greencards;
|
||||
int blackcards = Math.round(land_number * ((float) black / (float) total));
|
||||
total -= black;
|
||||
land_number -= blackcards;
|
||||
int bluecards = Math.round(land_number * ((float) blue / (float) total));
|
||||
total -= blue;
|
||||
land_number -= bluecards;
|
||||
int whitecards = land_number;
|
||||
|
||||
int redcards = 0;
|
||||
int greencards = 0;
|
||||
int blackcards = 0;
|
||||
int bluecards = 0;
|
||||
int whitecards = 0;
|
||||
if (total > 0) {
|
||||
redcards = Math.round(land_number * ((float) red / (float) total));
|
||||
total -= red;
|
||||
land_number -= redcards;
|
||||
|
||||
greencards = Math.round(land_number * ((float) green / (float) total));
|
||||
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);
|
||||
spnForest.setValue(greencards);
|
||||
spnSwamp.setValue(blackcards);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
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.continuous.AddCardTypeTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
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.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -32,8 +19,9 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TezzeretCruelMachinist extends CardImpl {
|
||||
|
@ -188,9 +176,8 @@ class TezzeretCruelMachinistPowerToughnessEffect extends SetPowerToughnessTarget
|
|||
&& target.isFaceDown(game)) {
|
||||
target.getPower().setValue(5);
|
||||
target.getToughness().setValue(5);
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue