From e277337c98b86a29a6ee0777529cdc446258fbd8 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Jul 2016 10:54:17 +0200 Subject: [PATCH 1/2] Xmage 1.4.13v3 --- Mage.Common/src/mage/utils/MageVersion.java | 2 +- Mage/src/main/java/mage/cards/repository/CardRepository.java | 2 +- Utils/release/getting_implemented_cards.txt | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Mage.Common/src/mage/utils/MageVersion.java b/Mage.Common/src/mage/utils/MageVersion.java index 83b565f3c6..9c6758207b 100644 --- a/Mage.Common/src/mage/utils/MageVersion.java +++ b/Mage.Common/src/mage/utils/MageVersion.java @@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 13; - public final static String MAGE_VERSION_MINOR_PATCH = "v2"; + public final static String MAGE_VERSION_MINOR_PATCH = "v3"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java index 18ce6b8d0e..fe9f3f061d 100644 --- a/Mage/src/main/java/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -63,7 +63,7 @@ public enum CardRepository { // raise this if db structure was changed private static final long CARD_DB_VERSION = 43; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 53; + private static final long CARD_CONTENT_VERSION = 54; private final Random random = new Random(); private Dao cardDao; diff --git a/Utils/release/getting_implemented_cards.txt b/Utils/release/getting_implemented_cards.txt index 77fc812716..5475713d00 100644 --- a/Utils/release/getting_implemented_cards.txt +++ b/Utils/release/getting_implemented_cards.txt @@ -90,6 +90,9 @@ git log d0ecb473da0833be5fe52f5ac72a125cc091f7fe..head --diff-filter=A --name-st since 1.4.13v1 git log 80f4ab770b78b7a7211490ff961ee90998bdc01c..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt +since 1.4.13v3 +git log 7c2eaf9510b1b49fecc28f5c8e68d5377c7a7e3e..head --diff-filter=A --name-status | sed -ne "s/^A[^u]Mage.Sets\/src\/mage\/sets\///p" | sort > added_cards.txt + 3. Copy added_cards.txt to trunk\Utils folder 4. Run script: > perl extract_in_wiki_format.perl From 171a8b336d436f75a4d7733fc4ca804fa1e2f2b1 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 24 Jul 2016 14:18:45 +0200 Subject: [PATCH 2/2] * Urza's Incubator - Fixed the not working cost reduction. --- .../cost/SpellsCostReductionAllEffect.java | 15 ++-- ...CostReductionAllOfChosenSubtypeEffect.java | 89 +++++++++---------- 2 files changed, 46 insertions(+), 58 deletions(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java index 2a5bffac42..50b4e1506a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllEffect.java @@ -77,6 +77,11 @@ public class SpellsCostReductionAllEffect extends CostModificationEffectImpl { this.upTo = effect.upTo; } + @Override + public void init(Ability source, Game game) { + super.init(source, game); + } + @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { if (upTo) { @@ -109,16 +114,6 @@ public class SpellsCostReductionAllEffect extends CostModificationEffectImpl { return true; } - /** - * Overwrite this in effect that inherits from this - * - * @param source - * @param game - */ - protected void setRuntimeData(Ability source, Game game) { - - } - /** * Overwrite this in effect that inherits from this * diff --git a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllOfChosenSubtypeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllOfChosenSubtypeEffect.java index 18fe9c1028..7799747779 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllOfChosenSubtypeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/cost/SpellsCostReductionAllOfChosenSubtypeEffect.java @@ -1,48 +1,41 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package mage.abilities.effects.common.cost; - -import mage.abilities.Ability; -import mage.cards.Card; -import mage.filter.FilterCard; -import mage.game.Game; - -/** - * - * @author LevelX2 - */ -public class SpellsCostReductionAllOfChosenSubtypeEffect extends SpellsCostReductionAllEffect { - - String subtype = null; - - public SpellsCostReductionAllOfChosenSubtypeEffect(FilterCard filter, int amount) { - super(filter, amount); - } - - public SpellsCostReductionAllOfChosenSubtypeEffect(final SpellsCostReductionAllOfChosenSubtypeEffect effect) { - super(effect); - this.subtype = effect.subtype; - } - - @Override - public SpellsCostReductionAllOfChosenSubtypeEffect copy() { - return new SpellsCostReductionAllOfChosenSubtypeEffect(this); - } - - @Override - protected boolean selectedByRuntimeData(Card card, Ability source, Game game) { - if (subtype != null) { - return card.hasSubtype(subtype); - } - return false; - } - - @Override - protected void setRuntimeData(Ability source, Game game) { - subtype = (String) game.getState().getValue(source.getSourceId() + "_type"); - } - -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package mage.abilities.effects.common.cost; + +import mage.abilities.Ability; +import mage.cards.Card; +import mage.filter.FilterCard; +import mage.game.Game; + +/** + * + * @author LevelX2 + */ +public class SpellsCostReductionAllOfChosenSubtypeEffect extends SpellsCostReductionAllEffect { + + public SpellsCostReductionAllOfChosenSubtypeEffect(FilterCard filter, int amount) { + super(filter, amount); + } + + public SpellsCostReductionAllOfChosenSubtypeEffect(final SpellsCostReductionAllOfChosenSubtypeEffect effect) { + super(effect); + } + + @Override + public SpellsCostReductionAllOfChosenSubtypeEffect copy() { + return new SpellsCostReductionAllOfChosenSubtypeEffect(this); + } + + @Override + protected boolean selectedByRuntimeData(Card card, Ability source, Game game) { + String subtype = (String) game.getState().getValue(source.getSourceId() + "_type"); + if (subtype != null) { + return card.hasSubtype(subtype); + } + return false; + } + +}