mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Refactor: Add proper support for modifying and querying base P/T (#9409)
This commit is contained in:
parent
d83eb41073
commit
07a142c9e8
415 changed files with 1844 additions and 2095 deletions
|
|
@ -882,7 +882,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
// this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1));
|
||||
// this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers());
|
||||
// if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()){
|
||||
// this.spnNumPlayers.setValue(oldValue);
|
||||
// this.spnNumPlayers.setBoostedValue(oldValue);
|
||||
// }
|
||||
// this.cbAttackOption.setEnabled(gameType.isUseAttackOption());
|
||||
// this.cbRange.setEnabled(gameType.isUseRange());
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class TestCardRenderDialog extends MageDialog {
|
|||
this.removeDialog();
|
||||
}
|
||||
|
||||
private PermanentView createPermanentCard(Game game, UUID controllerId, String code, String cardNumber, int power, int toughness, int damage, boolean tapped, boolean transform, List<Ability> extraAbilities) {
|
||||
private PermanentView createPermanentCard(Game game, UUID controllerId, String code, String cardNumber, int powerBoosted, int toughnessBoosted, int damage, boolean tapped, boolean transform, List<Ability> extraAbilities) {
|
||||
CardInfo cardInfo = CardRepository.instance.findCard(code, cardNumber);
|
||||
ExpansionInfo setInfo = ExpansionRepository.instance.getSetByCode(code);
|
||||
CardSetInfo testSet = new CardSetInfo(cardInfo.getName(), setInfo.getCode(), cardNumber, cardInfo.getRarity(),
|
||||
|
|
@ -133,8 +133,8 @@ public class TestCardRenderDialog extends MageDialog {
|
|||
}
|
||||
|
||||
if (damage > 0) perm.damage(damage, controllerId, null, game);
|
||||
if (power > 0) perm.getPower().setValue(power);
|
||||
if (toughness > 0) perm.getToughness().setValue(toughness);
|
||||
if (powerBoosted > 0) perm.getPower().setBoostedValue(powerBoosted);
|
||||
if (toughnessBoosted > 0) perm.getToughness().setBoostedValue(toughnessBoosted);
|
||||
perm.removeSummoningSickness();
|
||||
perm.setTapped(tapped);
|
||||
PermanentView cardView = new PermanentView(perm, permCard, controllerId, game);
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ public final class CardRendererUtils {
|
|||
// boost colorizing
|
||||
if (value != null) {
|
||||
int current = value.getValue();
|
||||
int origin = value.getBaseValueModified();
|
||||
int origin = value.getModifiedBaseValue();
|
||||
if (origin != 0) {
|
||||
if (current < origin) {
|
||||
return textLight ? CARD_TEXT_COLOR_BAD_LIGHT : CARD_TEXT_COLOR_BAD_DARK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue