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:
+4
-1
@@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
## [master] (https://github.com/WagicProject/wagic/tree/master)
|
## [master] (https://github.com/WagicProject/wagic/tree/master)
|
||||||
|
|
||||||
|
### 20/10/21
|
||||||
|
- *Committed:* 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). ([Vitty85](https://github.com/Vitty85))
|
||||||
|
|
||||||
### 18/10/21
|
### 18/10/21
|
||||||
- *Committed:* Fixed "Krenko Commander" and "Plane of the Apes" decks for AI, added a commandline trace to check which soundtrack file is currently playing. ([Vitty85](https://github.com/Vitty85))
|
- *Committed:* Fixed "Krenko Commander" and "Plane of the Apes" decks for AI, added a commandline trace to check which soundtrack file is currently playing. https://github.com/WagicProject/wagic/commit/fcb073ccd6cdf2c7c9422ab24f9de227202851c6 ([Vitty85](https://github.com/Vitty85))
|
||||||
|
|
||||||
### 17/10/21
|
### 17/10/21
|
||||||
- *Committed:* Added a new deck named "Krenko Commander" for AI (credits to Bob). https://github.com/WagicProject/wagic/commit/5bf5e1dfbae0208a10d93c754aef20f5d06b2148 ([Vitty85](https://github.com/Vitty85))
|
- *Committed:* Added a new deck named "Krenko Commander" for AI (credits to Bob). https://github.com/WagicProject/wagic/commit/5bf5e1dfbae0208a10d93c754aef20f5d06b2148 ([Vitty85](https://github.com/Vitty85))
|
||||||
|
|||||||
@@ -3282,7 +3282,8 @@ public class ImgDownloader {
|
|||||||
|| scryset.equals("AKR") || scryset.equals("ANB") || scryset.equals("PLIST") || scryset.equals("KLR") || scryset.equals("CC1")
|
|| 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("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("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 {
|
try {
|
||||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||||
Elements outlinks = doc.select("body a");
|
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("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("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("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 {
|
try {
|
||||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||||
Elements outlinks = doc.select("body a");
|
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("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("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("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 {
|
try {
|
||||||
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
doc = Jsoup.connect(imageurl + scryset.toLowerCase()).get();
|
||||||
} catch (Exception e) {
|
} 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("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("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("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");
|
Elements metadata = doc.select("head meta");
|
||||||
if(metadata != null) {
|
if(metadata != null) {
|
||||||
for (int j = 0; j < metadata.size(); j++){
|
for (int j = 0; j < metadata.size(); j++){
|
||||||
|
|||||||
@@ -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());
|
_target->addptbonus(wppt->power.getValue(),wppt->toughness.getValue());
|
||||||
}
|
}
|
||||||
if(_target->has(Constants::INDESTRUCTIBLE) && wppt->toughness.getValue() < 0 && _target->toughness <= 0)
|
if(_target->has(Constants::INDESTRUCTIBLE) && wppt->toughness.getValue() < 0 && _target->toughness <= 0)
|
||||||
{
|
_target->toGrave(true); // The indestructible creatures can have different destination zone after death.
|
||||||
_target->controller()->game->putInGraveyard(_target);
|
|
||||||
}
|
|
||||||
return MTGAbility::addToGame();
|
return MTGAbility::addToGame();
|
||||||
}
|
}
|
||||||
int destroy()
|
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
|
//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)
|
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 nb;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ int Damage::resolve()
|
|||||||
_target->counters->addCounter(-1, -1);
|
_target->counters->addCounter(-1, -1);
|
||||||
}
|
}
|
||||||
if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE))
|
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)))
|
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))
|
if(card->life < 1 && !card->has(Constants::INDESTRUCTIBLE))
|
||||||
card->destroy();//manor gargoyle... recheck
|
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 )
|
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();
|
Player * p = controller();
|
||||||
if (basicAbilities[(int)Constants::EXILEDEATH] || basicAbilities[(int)Constants::GAINEDEXILEDEATH] || (basicAbilities[(int)Constants::HASDISTURB] && alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE] == 1))
|
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);
|
ret->counters->addCounter(1, 1, false);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (!basicAbilities[(int)Constants::INDESTRUCTIBLE])
|
// Let's put the creature in the default zone after death (graveyard).
|
||||||
{
|
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
||||||
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
return 1;
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (forced)
|
|
||||||
{
|
|
||||||
p->game->putInZone(this, p->game->inPlay, owner->game->graveyard);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
int MTGCardInstance::destroy()
|
int MTGCardInstance::destroy()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user