Restored Android version to 16, Removed modification to boost, fixed primitives MH1 and M20, Fixed Snow mana issue.

This commit is contained in:
valfieri
2019-09-07 22:05:01 +02:00
parent 5c67d11aa6
commit ccd17d32d0
10 changed files with 106 additions and 84 deletions

View File

@@ -182,9 +182,7 @@ public:
shared_ptr(): px(0), pn() // never throws in 1.30+ shared_ptr(): px(0), pn() // never throws in 1.30+
{ {
} }
shared_ptr(const shared_ptr&) = default;
template<class Y> template<class Y>
explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete
{ {

View File

@@ -712,10 +712,10 @@ string JGE::getFileUserFolderPath()
jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId); jstring systemPath = (jstring) env->CallStaticObjectMethod(jniClass, methodId);
// Now convert the Java String to C++ char array // Now convert the Java String to C++ char array
const char* cstr = env->GetStringUTFChars(systemPath, 0); const char* cstr = env->GetStringUTFChars(systemPath, 0);
string retVal (cstr); string retVal (cstr);
env->ReleaseStringUTFChars(systemPath, cstr); env->ReleaseStringUTFChars(systemPath, cstr);
env->DeleteLocalRef(systemPath); env->DeleteLocalRef(systemPath);
return retVal; return retVal;
} }

View File

@@ -11,4 +11,4 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-29 target=android-16

View File

@@ -1306,7 +1306,6 @@ mana={1}{G}{G}{G}
type=Legendary Planeswalker type=Legendary Planeswalker
subtype=Vivien subtype=Vivien
[/card] [/card]
[card] [card]
name=Sorin's Guide name=Sorin's Guide
auto=may moveto(myhand) target(Sorin, Vampire Lord|mylibrary) auto=may moveto(myhand) target(Sorin, Vampire Lord|mylibrary)

View File

@@ -20,6 +20,7 @@ subtype=Sliver
power=2 power=2
toughness=2 toughness=2
[/card] [/card]
[card]
name=Goblin Champion name=Goblin Champion
abilities=haste,exalted abilities=haste,exalted
text=Haste -- Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.) text=Haste -- Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)
@@ -1783,3 +1784,84 @@ mana={1}{W}
type=Enchantment type=Enchantment
subtype=Aura subtype=Aura
[/card] [/card]
[card]
name=Frostwalk Bastion
auto={T}:add{1}
auto={1}{i}:becomes(Creature Construct,2/3) ueot
text={T}: Add {1}. -- {1} {Snow}: Until end of turn, Frostwalk Bastion becomes a 2/3 Construct artifact creature. It's still a land. ( Snow can be paid with one mana from a snow permanent.) -- Whenever Frostwalk Bastion deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
type=Snow Land
[/card]
[card]
name=Echo of Eons
flashback={2}{U}
auto=ability$! moveto(mylibrary) all(*|myhand,mygraveyard) !$ controller
auto=ability$! moveto(mylibrary) all(*|myhand,mygraveyard) !$ opponent
auto=shuffle all(player)
auto=ability$! if type(*|mylibrary)~morethan~6 then may draw:7 _ if type(*|mylibrary)~morethan~5 then may draw:6 _ if type(*|mylibrary)~morethan~4 then may draw:5 _ if type(*|mylibrary)~morethan~3 then may draw:4 _ if type(*|mylibrary)~morethan~2 then may draw:3 _ if type(*|mylibrary)~morethan~1 then may draw:2 _ if type(*|mylibrary)~morethan~0 then may draw:1 !$ opponent
auto=ability$! if type(*|mylibrary)~morethan~6 then may draw:7 _ if type(*|mylibrary)~morethan~5 then may draw:6 _ if type(*|mylibrary)~morethan~4 then may draw:5 _ if type(*|mylibrary)~morethan~3 then may draw:4 _ if type(*|mylibrary)~morethan~2 then may draw:3 _ if type(*|mylibrary)~morethan~1 then may draw:2 _ if type(*|mylibrary)~morethan~0 then may draw:1 !$ controller
text=Each player shuffles their hand and graveyard into their library, then draws seven cards. -- Flashback {2}{U} (You may cast this card from your graveyard for its flashback cost. Then exile it.)
mana={4}{U}{U}
type=Sorcery
[/card]
[card]
name=Chillerpillar
auto=this(cantargetcard(*[-monstrous]) {4}{i}{i}:becomes(monstrous) forever && counter(1/1,2) && transforms((,newability[flying])) forever
text={4}{S{i}{S{i}: Monstrosity 2. (If this creature isn't monstrous, put two +1/+1 counters on it and it becomes monstrous. Snow can be paid with one mana from a snow permanent.) -- As long as Chillerpillar is monstrous, it has flying.
mana={3}{U}
type=Snow Creature
subtype=Insect
power=3
toughness=3
[/card]
[card]
name=Arcum's Astrolabe
other={i}
auto={1}{T}:Add{W}
auto={1}{T}:Add{U}
auto={1}{T}:Add{B}
auto={1}{T}:Add{R}
auto={1}{T}:Add{G}
text=(Snow can be paid with one mana from a snow permanent.) -- When Arcum's Astrolabe enters the battlefield, draw a card. -- {1}, {T}: Add one mana of any color.
mana={9999}
type=Snow Artifact
[/card]
[card]
name=Icehide Golem
other={i}
text=(Snow can be paid with one mana from a snow permanent.)
mana={9999}
type=Snow Artifact Creature
subtype=Golem
power=2
toughness=2
[/card]
[card]
name=Marit Lage's Slumber
auto=scry:1 scrycore delayed dontshow donothing scrycoreend scryend
auto=@movedTo(*[snow]|mybattlefield):scry:1 scrycore delayed dontshow donothing scrycoreend scryend
@each my upkeep restriction{type(*[snow]|myBattlefield)~morethan~9}:may sacrifice all(this) && token(Avatar,creature Avatar,20/20,black,flying,indestructible) controller
text=Whenever Marit Lage's Slumber or another snow permanent enters the battlefield under your control, scry 1. -- At the beginning of your upkeep, if you control ten or more snow permanents, sacrifice Marit Lage's Slumber. If you do, create Marit Lage, a legendary 20/20 black Avatar creature token with flying and indestructible.
mana={1}{U}
type=Legendary Snow Enchantment
[/card]
[card]
name=Frostwalla
auto={i}:2/2 ueot limit:1
text={S{i}: Frostwalla gets +2/+2 until end of turn. Activate this ability only once each turn. ( Snow can be paid with one mana from a snow permanent.)
mana={2}{G}
type=Snow Creature
subtype=Lizard
power=2
toughness=2
[/card]
[card]
name=Seasoned Pyromancer
auto=draw:2 &&2ability$! reject notatarget(<2>*|myhand) and!( if cantargetcard(*[-land]|*) then token(Elemental,creature Elemental,1/1,red) all(abilitycontroller) oneshot )! !$ targetedplayer
auto={3}{R}{R}{E(this|mygraveyard)}:token(Elemental,creature Elemental,1/1,red)*2
text=When Seasoned Pyromancer enters the battlefield, discard two cards, then draw two cards. For each nonland card discarded this way, create a 1/1 red Elemental creature token. -- {3}{R}{R}, Exile Seasoned Pyromancer from your graveyard: Create two 1/1 red Elemental creature tokens.
mana={1}{R}{R}
type=Creature
subtype=Human Shaman
power=2
toughness=2
[/card]

View File

@@ -1,12 +1,5 @@
grade=unsupported grade=unsupported
[card] [card]
name=Frostwalk Bastion
auto={T}:add{1}
text={T}: Add {1}. -- {1} {Snow}: Until end of turn, Frostwalk Bastion becomes a 2/3 Construct artifact creature. It's still a land. ( Snow can be paid with one mana from a snow permanent.) -- Whenever Frostwalk Bastion deals combat damage to a creature, tap that creature and it doesn't untap during its controller's next untap step.
type=Snow Land
[/card]
[card]
[card]
name=Force of Rage name=Force of Rage
text=If it's not your turn, you may exile a red card from your hand rather than pay this spell's mana cost. -- Create two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep. text=If it's not your turn, you may exile a red card from your hand rather than pay this spell's mana cost. -- Create two 3/1 red Elemental creature tokens with trample and haste. Sacrifice those tokens at the beginning of your next upkeep.
mana={1}{R}{R} mana={1}{R}{R}
@@ -19,12 +12,6 @@ mana={1}{U}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Echo of Eons
text=Each player shuffles their hand and graveyard into their library, then draws seven cards. -- Flashback {2}{U} (You may cast this card from your graveyard for its flashback cost. Then exile it.)
mana={4}{U}{U}
type=Sorcery
[/card]
[card]
name=Eyekite name=Eyekite
abilities=flying abilities=flying
text=Flying -- Eyekite gets +2/+0 as long as you've drawn two or more cards this turn. text=Flying -- Eyekite gets +2/+0 as long as you've drawn two or more cards this turn.
@@ -35,30 +22,6 @@ power=1
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Chillerpillar
text={4}{Snow}{Snow}: Monstrosity 2. (If this creature isn't monstrous, put two +1/+1 counters on it and it becomes monstrous. Snow can be paid with one mana from a snow permanent.) -- As long as Chillerpillar is monstrous, it has flying.
mana={3}{U}
type=Snow Creature
subtype=Insect
power=3
toughness=3
[/card]
[card]
name=Arcum's Astrolabe
text=(Snow can be paid with one mana from a snow permanent.) -- When Arcum's Astrolabe enters the battlefield, draw a card. -- {1}, {T}: Add one mana of any color.
mana={Snow}
type=Snow Artifact
[/card]
[card]
name=Icehide Golem
text=(Snow can be paid with one mana from a snow permanent.)
mana={Snow}
type=Snow Artifact Creature
subtype=Golem
power=2
toughness=2
[/card]
[card]
name=Throatseeker name=Throatseeker
text=Unblocked attacking Ninjas you control have lifelink. text=Unblocked attacking Ninjas you control have lifelink.
mana={2}{B} mana={2}{B}
@@ -112,7 +75,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Urza, Lord High Artificer name=Urza, Lord High Artificer
text=When Urza, Lord High Artificer enters the battlefield, create a 0/0 colorless Construct artifact creature token with "This creature gets +1/+1 for each artifact you control." -- Tap an untapped artifact you control: Add -- {U} -- . -- 5 : Shuffle your library, then exile the top card. Until end of turn, you may play that card without paying its mana cost. text=When Urza, Lord High Artificer enters the battlefield, create a 0/0 colorless Construct artifact creature token with "This creature gets +1/+1 for each artifact you control." -- Tap an untapped artifact you control: Add {U}. -- {5}: Shuffle your library, then exile the top card. Until end of turn, you may play that card without paying its mana cost.
mana={2}{U}{U} mana={2}{U}{U}
type=Legendary Creature type=Legendary Creature
subtype=Human Artificer subtype=Human Artificer
@@ -177,7 +140,7 @@ subtype=Wrenn
[card] [card]
name=Unsettled Mariner name=Unsettled Mariner
abilities=changeling abilities=changeling
aauto=@targeted(*|mybattlefield) from(*|opponentbattlefield,opponenthand,opponentstack,opponentgraveyard,opponentexile,opponentlibrary):transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever auto=@targeted(*|mybattlefield) from(*|opponentbattlefield,opponenthand,opponentstack,opponentgraveyard,opponentexile,opponentlibrary):transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever
text=Changeling (This card is every creature type.) -- Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {1}. text=Changeling (This card is every creature type.) -- Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, counter that spell or ability unless its controller pays {1}.
mana={W}{U} mana={W}{U}
type=Creature type=Creature
@@ -206,12 +169,6 @@ mana={2}{U}
type=Enchantment type=Enchantment
[/card] [/card]
[card] [card]
name=Marit Lage's Slumber
text=Whenever Marit Lage's Slumber or another snow permanent enters the battlefield under your control, scry 1. -- At the beginning of your upkeep, if you control ten or more snow permanents, sacrifice Marit Lage's Slumber. If you do, create Marit Lage, a legendary 20/20 black Avatar creature token with flying and indestructible.
mana={1}{U}
type=Legendary Snow Enchantment
[/card]
[card]
name=On Thin Ice name=On Thin Ice
text=Enchant snow land you control -- When On Thin Ice enters the battlefield, exile target creature an opponent controls until On Thin Ice leaves the battlefield. text=Enchant snow land you control -- When On Thin Ice enters the battlefield, exile target creature an opponent controls until On Thin Ice leaves the battlefield.
mana={W} mana={W}
@@ -241,28 +198,8 @@ mana={U}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Frostwalla
text={Snow}: Frostwalla gets +2/+2 until end of turn. Activate this ability only once each turn. ( Snow can be paid with one mana from a snow permanent.)
mana={2}{G}
type=Snow Creature
subtype=Lizard
power=2
toughness=2
[/card]
[card]
name=Tectonic Reformation name=Tectonic Reformation
text=Each land card in your hand has cycling {R}. -- Cycling {2} ({2}, Discard this card: Draw a card.) text=Each land card in your hand has cycling {R}. -- Cycling {2} ({2}, Discard this card: Draw a card.)
mana={1}{R} mana={1}{R}
type=Enchantment type=Enchantment
[/card]
[card]
name=Seasoned Pyromancer
auto=draw:2
auto=reject target(<2>*|myhand)
text=When Seasoned Pyromancer enters the battlefield, discard two cards, then draw two cards. For each nonland card discarded this way, create a 1/1 red Elemental creature token. -- [3}{R}{R}, Exile Seasoned Pyromancer from your graveyard: Create two 1/1 red Elemental creature tokens.
mana={1}{R}{R}
type=Creature
subtype=Human Shaman
power=2
toughness=2
[/card] [/card]

View File

@@ -3341,7 +3341,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Cover of Winter name=Cover of Winter
text=Cumulative upkeep {S} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it. {S} can be paid with one mana from a snow permanent.) -- If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on Cover of Winter. -- {S}: Put an age counter on Cover of Winter. text=Cumulative upkeep {S{i} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it. {S{i} can be paid with one mana from a snow permanent.) -- If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on Cover of Winter. -- {S{i}: Put an age counter on Cover of Winter.
mana={2}{W} mana={2}{W}
type=Snow Enchantment type=Snow Enchantment
[/card] [/card]
@@ -6656,7 +6656,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Glacial Plating name=Glacial Plating
text=Enchant creature -- Cumulative upkeep {S} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it. {S} can be paid with one mana from a snow permanent.) -- Enchanted creature gets +3/+3 for each age counter on Glacial Plating. text=Enchant creature -- Cumulative upkeep {S{i} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it. {S{i} can be paid with one mana from a snow permanent.) -- Enchanted creature gets +3/+3 for each age counter on Glacial Plating.
mana={2}{W}{W} mana={2}{W}{W}
type=Snow Enchantment type=Snow Enchantment
subtype=Aura subtype=Aura
@@ -14574,7 +14574,7 @@ type=Sorcery
[card] [card]
name=Rimehorn Aurochs name=Rimehorn Aurochs
abilities=trample abilities=trample
text=Trample -- Whenever Rimehorn Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. -- {2}{S}: Target creature blocks target creature this turn if able. ({S} can be paid with one mana from a snow permanent.) text=Trample -- Whenever Rimehorn Aurochs attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. -- {2}{S{i}: Target creature blocks target creature this turn if able. ({S{i} can be paid with one mana from a snow permanent.)
mana={4}{G} mana={4}{G}
type=Snow Creature type=Snow Creature
subtype=Aurochs subtype=Aurochs

View File

@@ -31,3 +31,5 @@ Author: Michael Nguyen
#define WAGIC_RESOURCE_URL "https://github.com/WagicProject/wagic/releases/download/" WAGIC_RELEASE_NAME "/" WAGIC_RESOURCE_NAME #define WAGIC_RESOURCE_URL "https://github.com/WagicProject/wagic/releases/download/" WAGIC_RELEASE_NAME "/" WAGIC_RESOURCE_NAME
#endif #endif

View File

@@ -189,39 +189,40 @@ int SnowCost::doPay()
result += source->controller()->snowManaC; result += source->controller()->snowManaC;
if (result) if (result)
{ {
// Avoided double payments for Snow Mana cost
if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{1}",NULL,source))) if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{1}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{1}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{1}",NULL,source));
source->controller()->snowManaC -= 1; source->controller()->snowManaC -= 1;
} }
else if (source->controller()->snowManaG && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{g}",NULL,source))) else if (source->controller()->snowManaG && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{g}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{g}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{g}",NULL,source));
source->controller()->snowManaG -= 1; source->controller()->snowManaG -= 1;
} }
else if (source->controller()->snowManaU && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{u}",NULL,source))) else if (source->controller()->snowManaU && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{u}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{u}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{u}",NULL,source));
source->controller()->snowManaU -= 1; source->controller()->snowManaU -= 1;
} }
else if (source->controller()->snowManaR && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{r}",NULL,source))) else if (source->controller()->snowManaR && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{r}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{r}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{r}",NULL,source));
source->controller()->snowManaR -= 1; source->controller()->snowManaR -= 1;
} }
else if (source->controller()->snowManaB && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{b}",NULL,source))) else if (source->controller()->snowManaB && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{b}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{b}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{b}",NULL,source));
source->controller()->snowManaB -= 1; source->controller()->snowManaB -= 1;
} }
else if (source->controller()->snowManaW && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{w}",NULL,source))) else if (source->controller()->snowManaW && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{w}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{w}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{w}",NULL,source));
source->controller()->snowManaW -= 1; source->controller()->snowManaW -= 1;
} }
else if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{c}",NULL,source))) else if (source->controller()->snowManaC && source->controller()->getManaPool()->canAfford(ManaCost::parseManaCost("{c}",NULL,source)))
{ {
source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{c}",NULL,source)); //source->controller()->getManaPool()->pay(ManaCost::parseManaCost("{c}",NULL,source));
source->controller()->snowManaC -= 1; source->controller()->snowManaC -= 1;
} }
else else

View File

@@ -1406,6 +1406,9 @@ bool GameObserver::WaitForExtraPayment(MTGCardInstance * card)
mExtraPayment = NULL; mExtraPayment = NULL;
} }
result = true; result = true;
// Avoid game stucks on current phase till snow mana cost will be paid
if(mExtraPayment && mExtraPayment->costs.size() == 1 && !strcmp(mExtraPayment->costs[0]->mCostRenderString.c_str(), "Snow Mana"))
result = false;
} }
return result; return result;