Added Q06 set, improved Android downloader, fixed bug for indestructible creatures that have to go different zone after death (e.g. if they have exiledeath ability), fixed a bug when indestructible creatures have toughness = 0 (e.g. "March of the Machines" with manacost = 0 artifacts).
This commit is contained in:
@@ -3282,7 +3282,8 @@ public class ImgDownloader {
|
||||
|| scryset.equals("AKR") || scryset.equals("ANB") || scryset.equals("PLIST") || scryset.equals("KLR") || scryset.equals("CC1")
|
||||
|| scryset.equals("ATH") || scryset.equals("HA4") || scryset.equals("TSR") || scryset.equals("HA5") || scryset.equals("H1R")
|
||||
|| scryset.equals("HTR18") || scryset.equals("HTR19") || scryset.equals("DKM") || scryset.equals("S00") || scryset.equals("XLN")
|
||||
|| scryset.equals("SOI") || scryset.equals("UST") || scryset.equals("PLG21") || scryset.equals("J21") || scryset.equals("CC2")){
|
||||
|| scryset.equals("SOI") || scryset.equals("UST") || scryset.equals("PLG21") || scryset.equals("J21") || scryset.equals("CC2")
|
||||
|| scryset.equals("Q06")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
Elements outlinks = doc.select("body a");
|
||||
@@ -3448,7 +3449,8 @@ public class ImgDownloader {
|
||||
&& !scryset.equals("AKR") && !scryset.equals("ANB") && !scryset.equals("PLIST") && !scryset.equals("KLR") && !scryset.equals("CC1")
|
||||
&& !scryset.equals("ATH") && !scryset.equals("HA4") && !scryset.equals("TSR") && !scryset.equals("HA5") && !scryset.equals("H1R")
|
||||
&& !scryset.equals("HTR18") && !scryset.equals("HTR19") && !scryset.equals("DKM") && !scryset.equals("S00") && !scryset.equals("XLN")
|
||||
&& !scryset.equals("SOI") && !scryset.equals("UST") && !scryset.equals("PLG21") && !scryset.equals("J21") && !scryset.equals("CC2")){
|
||||
&& !scryset.equals("SOI") && !scryset.equals("UST") && !scryset.equals("PLG21") && !scryset.equals("J21") && !scryset.equals("CC2")
|
||||
&& !scryset.equals("Q06")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
Elements outlinks = doc.select("body a");
|
||||
@@ -3565,7 +3567,8 @@ public class ImgDownloader {
|
||||
&& !scryset.equals("AKR") && !scryset.equals("ANB") && !scryset.equals("PLIST") && !scryset.equals("KLR") && !scryset.equals("CC1")
|
||||
&& !scryset.equals("ATH") && !scryset.equals("HA4") && !scryset.equals("TSR") && !scryset.equals("HA5") && !scryset.equals("H1R")
|
||||
&& !scryset.equals("HTR18") && !scryset.equals("HTR19") && !scryset.equals("DKM") && !scryset.equals("S00") && !scryset.equals("XLN")
|
||||
&& !scryset.equals("SOI") && !scryset.equals("UST") && !scryset.equals("PLG21") && !scryset.equals("J21") && !scryset.equals("CC2")){
|
||||
&& !scryset.equals("SOI") && !scryset.equals("UST") && !scryset.equals("PLG21") && !scryset.equals("J21") && !scryset.equals("CC2")
|
||||
&& !scryset.equals("Q06")){
|
||||
try {
|
||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||
} catch (Exception e) {
|
||||
@@ -3734,7 +3737,7 @@ public class ImgDownloader {
|
||||
|| scryset.equals("ANB") || scryset.equals("PLIST") || scryset.equals("KLR") || scryset.equals("CC1") || scryset.equals("ATH")
|
||||
|| scryset.equals("HA4") || scryset.equals("TSR") || scryset.equals("HA5") || scryset.equals("H1R") || scryset.equals("HTR18")
|
||||
|| scryset.equals("HTR19") || scryset.equals("DKM") || scryset.equals("S00") || scryset.equals("XLN") || scryset.equals("SOI")
|
||||
|| scryset.equals("UST") || scryset.equals("PLG21") || scryset.equals("J21") || scryset.equals("CC2")){
|
||||
|| scryset.equals("UST") || scryset.equals("PLG21") || scryset.equals("J21") || scryset.equals("CC2") || scryset.equals("Q06")){
|
||||
Elements metadata = doc.select("head meta");
|
||||
if(metadata != null) {
|
||||
for (int j = 0; j < metadata.size(); j++){
|
||||
|
||||
57
projects/mtg/bin/Res/sets/Q06/_cards.dat
Normal file
57
projects/mtg/bin/Res/sets/Q06/_cards.dat
Normal file
@@ -0,0 +1,57 @@
|
||||
[meta]
|
||||
author=Wagic Team
|
||||
name=Pioneer Challenge Decks 2021
|
||||
orderindex=PRO-ZF.Q06
|
||||
year=2021-10-15
|
||||
total=10
|
||||
[/meta]
|
||||
[card]
|
||||
primitive=Approach of the Second Sun
|
||||
id=296830
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Ethereal Armor
|
||||
id=296831
|
||||
rarity=C
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Isolate
|
||||
id=296832
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Silkwrap
|
||||
id=296833
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Hidden Strings
|
||||
id=296834
|
||||
rarity=C
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Chandra, Torch of Defiance
|
||||
id=296835
|
||||
rarity=M
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Searing Blood
|
||||
id=296836
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Wild Slash
|
||||
id=296837
|
||||
rarity=U
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Lurrus of the Dream-Den
|
||||
id=296838
|
||||
rarity=R
|
||||
[/card]
|
||||
[card]
|
||||
primitive=Spell Queller
|
||||
id=296839
|
||||
rarity=R
|
||||
[/card]
|
||||
@@ -2411,9 +2411,8 @@ public:
|
||||
_target->addptbonus(wppt->power.getValue(),wppt->toughness.getValue());
|
||||
}
|
||||
if(_target->has(Constants::INDESTRUCTIBLE) && wppt->toughness.getValue() < 0 && _target->toughness <= 0)
|
||||
{
|
||||
_target->controller()->game->putInGraveyard(_target);
|
||||
}
|
||||
_target->toGrave(true); // The indestructible creatures can have different destination zone after death.
|
||||
|
||||
return MTGAbility::addToGame();
|
||||
}
|
||||
int destroy()
|
||||
|
||||
@@ -2540,7 +2540,7 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M
|
||||
|
||||
//specail cases, indestructible creatures which recieve enough counters to kill it are destroyed as a state based effect
|
||||
if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE) && toughness < 0)
|
||||
_target->controller()->game->putInGraveyard(_target);
|
||||
_target->toGrave(true); // The indestructible cards can have different destination zone after death.
|
||||
return nb;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -183,7 +183,7 @@ int Damage::resolve()
|
||||
_target->counters->addCounter(-1, -1);
|
||||
}
|
||||
if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE))
|
||||
_target->controller()->game->putInGraveyard(_target);
|
||||
_target->toGrave(true); // The indestructible creatures can have different destination zone after death.
|
||||
}
|
||||
else if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && (source->has(Constants::INFECT)||source->has(Constants::POISONDAMAGER)))
|
||||
{
|
||||
|
||||
@@ -927,6 +927,8 @@ void GameObserver::gameStateBasedEffects()
|
||||
{
|
||||
if(card->life < 1 && !card->has(Constants::INDESTRUCTIBLE))
|
||||
card->destroy();//manor gargoyle... recheck
|
||||
if(card->toughness <= 0 && card->has(Constants::INDESTRUCTIBLE))
|
||||
card->toGrave(true);// Fixed a bug when indestructible creatures have toughness = 0 (e.g. March of the Machines with manacost = 0 artifacts).
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -511,6 +511,9 @@ int MTGCardInstance::totem(bool noregen)
|
||||
}
|
||||
int MTGCardInstance::toGrave( bool forced )
|
||||
{
|
||||
if(basicAbilities[(int)Constants::INDESTRUCTIBLE] && !forced)
|
||||
return 0; // Fixed bug for indestructible creatures that have to go different zone after death.
|
||||
|
||||
Player * p = controller();
|
||||
if (basicAbilities[(int)Constants::EXILEDEATH] || basicAbilities[(int)Constants::GAINEDEXILEDEATH] || (basicAbilities[(int)Constants::HASDISTURB] && alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE] == 1))
|
||||
{
|
||||
@@ -542,17 +545,9 @@ int MTGCardInstance::toGrave( bool forced )
|
||||
ret->counters->addCounter(1, 1, false);
|
||||
return 1;
|
||||
}
|
||||
if (!basicAbilities[(int)Constants::INDESTRUCTIBLE])
|
||||
{
|
||||
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
||||
return 1;
|
||||
}
|
||||
if (forced)
|
||||
{
|
||||
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
// Let's put the creature in the default zone after death (graveyard).
|
||||
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
||||
return 1;
|
||||
}
|
||||
int MTGCardInstance::destroy()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user