Fixed primitives, avoided a crash when destroying "transforms" ability for cards in library, added random deck selection to Stone Hewer Basic mode, fixed random deck selection from Commander mode, improved exclusive color filter to include monocolored artifacts, added PSP_LARGE_MEMORY define to Makefile to allow more RAM for PSP version.
This commit is contained in:
@@ -2,8 +2,14 @@
|
||||
|
||||
## [master] (https://github.com/WagicProject/wagic/tree/master)
|
||||
|
||||
### 02/12/21
|
||||
- *Committed:* Fixed primitives, avoided a crash when destroying "transforms" ability for cards in library, added random deck selection to Stone Hewer Basic mode, fixed random deck selection from Commander mode, improved exclusive color filter to include monocolored artifacts, added PSP_LARGE_MEMORY define to Makefile to allow more RAM for PSP version. ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
### 30/11/21
|
||||
- *Committed:* Bug fixes and Egg creature type update. https://github.com/WagicProject/wagic/commit/d969b6ce7ae66af17c25037e32adffa564bf0cee ([EduardoMunozGomez](https://github.com/EduardoMunozGomez))
|
||||
|
||||
### 26/11/21
|
||||
- *Committed:* Fixed "Oko, Thief of Crowns" primitive. ([Vitty85](https://github.com/Vitty85))
|
||||
- *Committed:* Fixed "Oko, Thief of Crowns" primitive. https://github.com/WagicProject/wagic/commit/b5c1b09c0486bdd9a114ae62479ad6edd5bb0c3e ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
### 22/11/21
|
||||
- *Committed:* Improved zones management for commandzone and sideboard (e.g. now the game consider those zone as all the others for every ability such as "lord" and "aslongas"). https://github.com/WagicProject/wagic/commit/e47f3f547143ba22b4d25772dc14aa050f3fec2e ([Vitty85](https://github.com/Vitty85))
|
||||
|
||||
@@ -68,6 +68,7 @@ EXTRA_TARGETS = EBOOT.PBP
|
||||
PSP_EBOOT_TITLE = Wagic, the Homebrew?!
|
||||
PSP_EBOOT_ICON = icon.png
|
||||
#PSP_EBOOT_ICON1 = icon1.pmf
|
||||
PSP_LARGE_MEMORY = 1
|
||||
PSP_EBOOT_UNKPNG = pic0.png
|
||||
PSP_EBOOT_PIC1 = pic1.png
|
||||
INCDIR = ../../JGE/include ../../JGE/src/zipFS ../../JGE/include/psp ../../JGE/include/psp/freetype2 ../../JGE/src ../../projects/mtg/include ../../Boost
|
||||
|
||||
@@ -996,7 +996,7 @@ type=Enchantment
|
||||
[card]
|
||||
name=Akim, the Soaring Wind
|
||||
abilities=flying
|
||||
auto=@movedTo(*[token]|myBattlefield):token(Bird,creature Bird,1/1,white,flying) limit:1
|
||||
auto=@movedTo(*[token]|myBattlefield) turnlimited:token(Bird,creature Bird,1/1,white,flying)
|
||||
auto={3}{U}{R}{W}:all(creature[token]|myBattlefield)) double strike ueot
|
||||
text=Flying -- Whenever you create one or more tokens for the first time each turn, create a 1/1 white Bird creature token with flying. -- {3}{U}{R}{W}: Creature tokens you control gain double strike until end of turn.
|
||||
mana={2}{U}{R}{W}
|
||||
@@ -2159,7 +2159,7 @@ toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
name=Annihilation Rooms
|
||||
abilities=doublefacedeath,nomovetrigger
|
||||
abilities=doublefacedeath,nomovetrigger,nofizzle
|
||||
other={0} name(Sandfall Cell)
|
||||
kicker={0} name(Veils of Fear)
|
||||
auto=count(type:*[twodngtrg]:myBattlefield)
|
||||
@@ -12385,7 +12385,7 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=City's Blessing
|
||||
abilities=shroud,indestructible,doublefacedeath
|
||||
abilities=shroud,indestructible,doublefacedeath,nofizzle
|
||||
type=Emblem
|
||||
[/card]
|
||||
[card]
|
||||
@@ -16349,7 +16349,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Davriel Conditions
|
||||
abilities=doublefacedeath,nomovetrigger
|
||||
abilities=doublefacedeath,nomovetrigger,nofizzle
|
||||
auto=choice name(You lose six life) life:-6 controller
|
||||
auto=if type(*|myhand)~equalto~0 then choice name(Exile two cards from your hand) name(Exile two cards from your hand) draw:2 opponent
|
||||
auto=if type(*|myhand)~equalto~1 then choice name(Exile two cards from your hand) name(Exile two cards from your hand) target(*|myHand) moveto(exile) and!( transforms((,newability[draw:2 opponent])) oneshot )!
|
||||
@@ -16364,7 +16364,7 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Davriel Offers
|
||||
abilities=doublefacedeath,nomovetrigger
|
||||
abilities=doublefacedeath,nomovetrigger,nofizzle
|
||||
auto=choice name(Draw three cards) draw:3 controller
|
||||
auto=choice name(Conjure a Manor Guardian) conjure cards(Manor Guardian) zone(myhand)
|
||||
auto=choice name(Return two creatures) moverandom(creature) from(mygraveyard) to(myhand) and!( counter(1/1.1.PerpetualPT) )!
|
||||
@@ -16566,7 +16566,7 @@ toughness=*
|
||||
[/card]
|
||||
[card]
|
||||
name=Day
|
||||
abilities=shroud,indestructible,doublefacedeath
|
||||
abilities=shroud,indestructible,doublefacedeath,nofizzle
|
||||
backside=Night
|
||||
auto=@each endofturn:name(Check if day or night) moveto(opponentbattlefield) and!( if thisturn(*|opponentstack)~equalto~0 then name(It becomes night next turn) name(It becomes night next turn) phaseaction[untap once sourceinplay] flip(backside) )!
|
||||
auto=lord(*[nightbound]|battlefield) flip(backside)
|
||||
@@ -17279,8 +17279,9 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Defense Grid
|
||||
auto=this(variable{controllerturn}>0) lord(*|opponentzones) altercost(colorless,+3)
|
||||
auto=this(variable{opponentturn}>0) lord(*|myzones) altercost(colorless,+3)
|
||||
auto=this(variable{controllerturn}=0) lord(*[-land]|mycastingzone) becomes(affected)
|
||||
auto=this(variable{controllerturn}>0) lord(*[-land]|opponentcastingzone) becomes(affected)
|
||||
auto=lord(*[-land;affected]|graveyard,hand,exile,commandzone,library) transforms((,newability[changecost(colorless:+3) forcedalive]))
|
||||
text=Each spell costs {3} more to cast except during its controller's turn.
|
||||
mana={2}
|
||||
type=Artifact
|
||||
@@ -17394,7 +17395,7 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Deliver Unto Evil
|
||||
auto=moveto(exile) all(this)
|
||||
abilities=exiledeath
|
||||
auto=if type(planeswalker[bolas]|mybattlefield)~morethan~0 then target(<upto:4>*|mygraveyard) moveto(myhand)
|
||||
auto=if type(planeswalker[bolas]|mybattlefield)~equalto~0 then ability$!name(Choose 2 cards) name(Choose 2 cards) target(<2>*|opponentgraveyard) moveto(opponenthand)!$ opponent
|
||||
text=Choose up to four target cards in your graveyard. If you control a Bolas planeswalker, return those cards to your hand. Otherwise, an opponent chooses two of them. Leave the chosen cards in your graveyard and put the rest into your hand. -- Exile Deliver Unto Evil.
|
||||
@@ -18968,7 +18969,7 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Divine Visitation
|
||||
auto=@movedto(creature[token]|mybattlefield):all(trigger) destroy && token(Angel,Creature Angel,4/4,white,flying,vigilance)
|
||||
auto=@movedto(creature[token;-visitation]|mybattlefield):all(trigger) destroy && token(Angel,Creature Angel Visitation,4/4,white,flying,vigilance)
|
||||
text=If one or more creature tokens would be created under your control, that many 4/4 white Angel creature tokens with flying and vigilance are created instead.
|
||||
mana={3}{W}{W}
|
||||
type=Enchantment
|
||||
@@ -23429,9 +23430,9 @@ type=Enchantment
|
||||
[/card]
|
||||
[card]
|
||||
name=Experimental Overload
|
||||
abilities=exiledeath
|
||||
auto=token(Weird Exp,Creature Weird,type:*[instant;sorcery]:myGraveyard/type:*[instant;sorcery]:myGraveyard,blue,red)
|
||||
auto=may moveTo(myHand) target(*[instant;sorcery]|myGraveyard)
|
||||
auto=moveTo(exile) all(this)
|
||||
text=Create an X/X blue and red Weird creature token, where X is the number of instant and sorcery cards in your graveyard. Then you may return an instant or sorcery card from your graveyard to your hand. Exile Experimental Overload.
|
||||
mana={2}{U}{R}
|
||||
type=Sorcery
|
||||
@@ -32379,7 +32380,7 @@ type=Enchantment
|
||||
name=Hanged Executioner
|
||||
abilities=flying
|
||||
auto=create(Spirit:creature Spirit:1/1:white:flying)
|
||||
auto={3}{W}:moveTo(exile) target(creature) && moveTo(exile) all(this)
|
||||
auto={3}{W}{E}:moveTo(exile) target(creature)
|
||||
text=Flying -- When Hanged Executioner enters the battlefield, create a 1/1 white Spirit creature token with flying. -- {3}{W}, Exile Hanged Executioner: Exile target creature.
|
||||
mana={2}{W}
|
||||
type=Creature
|
||||
@@ -47231,8 +47232,8 @@ auto=lord(*[-artifact]|battlefield) becomes(Artifact)
|
||||
auto=lord(*|myzones) devoid
|
||||
auto=lord(*|opponentzones) devoid
|
||||
auto=lord(*|reveal) devoid
|
||||
auto=lord(*|mycastingzones) anytypeofmana
|
||||
auto=lord(*|opponentcastingzones) anytypeofmana
|
||||
auto=lord(*|mycastingzone) anytypeofmana
|
||||
auto=lord(*|opponentcastingzone) anytypeofmana
|
||||
auto=lord(*|myzones) anytypeofmanaability
|
||||
auto=lord(*|opponentzones) anytypeofmanaability
|
||||
text=All permanents are artifacts in addition to their other types. -- All cards that aren't on the battlefield, spells, and permanents are colorless. -- Players may spend mana as though it were mana of any color.
|
||||
@@ -47909,7 +47910,7 @@ toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Necromantic Selection
|
||||
auto=moveto(exile) all(this)
|
||||
abilities=exiledeath
|
||||
auto=destroy all(creature|battlefield)
|
||||
auto=moveto(mybattlefield) target(creature[fresh]|graveyard) and!(transforms((Zombie,newcolors[black])) forever)!
|
||||
text=Destroy all creatures, then return a creature card put into a graveyard this way to the battlefield under your control. It's a black Zombie in addition to its other colors and types. Exile Necromantic Selection.
|
||||
@@ -48492,7 +48493,7 @@ toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Night
|
||||
abilities=shroud,indestructible,doublefacedeath
|
||||
abilities=shroud,indestructible,doublefacedeath,nofizzle
|
||||
backside=Day
|
||||
auto=@each endofturn:name(Check if day or night) moveto(opponentbattlefield) and!( if thisturn(*|opponentstack)~morethan~1 then name(It becomes day next turn) name(It becomes day next turn) phaseaction[untap once sourceinplay] flip(backside) )!
|
||||
auto=lord(*[daybound]|battlefield) flip(backside)
|
||||
@@ -54766,8 +54767,8 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Pull from the Deep
|
||||
abilities=exiledeath
|
||||
target=<upto:1>*[instant]|mygraveyard
|
||||
auto=moveto(exile) all(this)
|
||||
auto=moveto(myhand)
|
||||
auto=moveto(myhand) target(<upto:1>*[sorcery]|mygraveyard)
|
||||
text=Return up to one target instant card and up to one target sorcery card from your graveyard to your hand. Exile Pull from the Deep.
|
||||
@@ -64446,7 +64447,7 @@ toughness=3
|
||||
[card]
|
||||
name=Sigil of Valor
|
||||
auto={1}:equip
|
||||
auto=transforms((,newability[@combat(attackedalone) source(this):foreach(other creature|myBattlefield) 1/1 ueot])) forever
|
||||
auto=teach(creature) transforms((,newability[@combat(attackedalone) source(this):foreach(other creature|myBattlefield) 1/1 ueot]))
|
||||
text=Whenever equipped creature attacks alone, it gets +1/+1 until end of turn for each other creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.)
|
||||
mana={2}
|
||||
type=Artifact
|
||||
@@ -67742,8 +67743,8 @@ type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
name=Spelltwine
|
||||
abilities=exiledeath
|
||||
target=*[instant;sorcery]|mygraveyard
|
||||
auto=moveto(exile) all(this)
|
||||
auto=moveto(myexile) && activate castcard(copied)
|
||||
auto=target(*[instant;sorcery]|opponentgraveyard) moveto(opponentexile) && activate castcard(copied)
|
||||
text=Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana costs. Exile Spelltwine.
|
||||
@@ -69931,12 +69932,12 @@ toughness=4
|
||||
[/card]
|
||||
[card]
|
||||
name=Storvald Effect
|
||||
abilities=doublefacedeath,nomovetrigger
|
||||
abilities=doublefacedeath,nomovetrigger,nofizzle
|
||||
auto=choice name(Creature becomes 7/7) target(creature|battlefield) transforms((,setpower=7,settoughness=7)) ueot
|
||||
auto=choice name(Creature becomes 1/1) target(creature|battlefield) transforms((,setpower=1,settoughness=1)) ueot
|
||||
auto=choice name(Choose both) target(creature|battlefield) transforms((,setpower=7,settoughness=7,newability[name(Creature becomes 1/1) target(other creature|battlefield) transforms((,setpower=1,settoughness=1)) ueot])) ueot
|
||||
text=Choose one or both -- Target creature has base power and toughness 7/7 until end of turn. -- Target creature has base power and toughness 1/1 until end of turn.
|
||||
mana={G}{U}
|
||||
color=blue,white,green
|
||||
type=Instant
|
||||
[/card]
|
||||
[card]
|
||||
@@ -73404,7 +73405,7 @@ subtype=Saga
|
||||
[/card]
|
||||
[card]
|
||||
name=The Monarch
|
||||
abilities=shroud,indestructible,doublefacedeath
|
||||
abilities=shroud,indestructible,doublefacedeath,nofizzle
|
||||
auto=becomesmonarch controller
|
||||
auto=@each my endofturn restriction{compare(pmonarch)~morethan~0}:name(Monarch draw a card) draw:1 controller
|
||||
auto=@combatdamageof(player) restriction{compare(pmonarch)~morethan~0} turnlimited:name(Opponent becomes monarch) moveto(opponentBattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )!
|
||||
@@ -79682,9 +79683,9 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Volcanic Vision
|
||||
abilities=exiledeath
|
||||
target=*[instant;sorcery]|mygraveyard
|
||||
auto=moveto(myhand) && damage:manacost all(creature|opponentbattlefield)
|
||||
auto=moveto(exile) all(this)
|
||||
text=Return target instant or sorcery card from your graveyard to your hand. Volcanic Vision deals damage equal to that card's converted mana cost to each creature your opponents control. Exile Volcanic Vision.
|
||||
mana={5}{R}{R}
|
||||
type=Sorcery
|
||||
|
||||
@@ -8713,7 +8713,7 @@ toughness=2
|
||||
[card]
|
||||
name=Balthor the Defiled
|
||||
auto=lord(minion) 1/1
|
||||
auto={B}{B}{B}:moveTo(myBattlefield) all(creature[black;red]|mygraveyard) && moveTo(opponentBattlefield) all(creature[black;red]|opponentgraveyard) && moveTo(exile) all(this) limit:1
|
||||
auto={B}{B}{B}{E}:moveTo(myBattlefield) all(creature[black;red]|mygraveyard) && moveTo(opponentBattlefield) all(creature[black;red]|opponentgraveyard) limit:1
|
||||
text=Minion creatures get +1/+1. -- {B}{B}{B}, Exile Balthor the Defiled: Each player returns all black and all red creature cards from his or her graveyard to the battlefield.
|
||||
mana={2}{B}{B}
|
||||
type=Legendary Creature
|
||||
@@ -15186,7 +15186,7 @@ toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Brittle Effigy
|
||||
auto={4}{T}:moveTo(exile) target(creature) && moveTo(exile) all(this)
|
||||
auto={4}{T}{E}:moveTo(exile) target(creature)
|
||||
text={4},{T}, exile Brittle Effigy: Exile target creature.
|
||||
mana={1}
|
||||
type=Artifact
|
||||
@@ -57144,7 +57144,8 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
name=Ill-Gotten Gains
|
||||
auto=reject all(*|hand) && moveto(exile) all(this)
|
||||
abilities=exiledeath
|
||||
auto=reject all(*|hand)
|
||||
auto=ability$!moveto(ownerhand) notatarget(<upto:3>*|mygraveyard)!$ controller && ability$!moveto(ownerhand) notatarget(<upto:3>*|mygraveyard)!$ opponent
|
||||
text=Exile Ill-Gotten Gains. Each player discards his or her hand, then returns up to three cards from his or her graveyard to his or her hand.
|
||||
mana={2}{B}{B}
|
||||
@@ -94474,9 +94475,9 @@ toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Restock
|
||||
abilities=exiledeath
|
||||
target=<2>*|mygraveyard
|
||||
auto=moveTo(myhand)
|
||||
auto=moveTo(exile) all(this)
|
||||
text=Return two target cards from your graveyard to your hand. Exile Restock.
|
||||
mana={3}{G}{G}
|
||||
type=Sorcery
|
||||
@@ -101762,9 +101763,9 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Seeds of Renewal
|
||||
abilities=exiledeath
|
||||
target=<2>*|mygraveyard
|
||||
auto=moveTo(myhand)
|
||||
auto=moveto(exile) all(this)
|
||||
anyzone=changecost(colorless:-1) forcedalive
|
||||
text=Undaunted (This spell costs {1} less to cast for each opponent.) -- Return up to two target cards from your graveyard to your hand. Exile Seeds of Renewal.
|
||||
mana={6}{G}
|
||||
@@ -118927,8 +118928,8 @@ type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
name=Temporal Trespass
|
||||
abilities=exiledeath
|
||||
auto=turns:+1 controller
|
||||
auto=moveto(exile) all(this)
|
||||
text=Delve (Each card you exile from your graveyard while casting this spell pays for {1}.) -- Take an extra turn after this one. Exile Temporal Trespass.
|
||||
mana={8}{U}{U}{U}
|
||||
other={delve} name(Delve)
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
void leaveOutAIvsAIMatches();
|
||||
void updateScoreforTournament();
|
||||
int getHardRandomDeck();
|
||||
int getRandomDeck(bool noEasyDecks);
|
||||
int getRandomDeck(bool noEasyDecks, GameType type);
|
||||
int remainingDecksToNextStage();
|
||||
private:
|
||||
bool mCompetition;
|
||||
|
||||
@@ -7847,7 +7847,7 @@ int ATransformer::destroy()
|
||||
for (unsigned int i = 0;i < newAbilities[_target].size(); i++)
|
||||
{
|
||||
// The mutated cards probably cause a double free error and a crash in Wagic, so for now they have been exluded...
|
||||
if(newAbilities[_target].at(i) && !_target->mutation)
|
||||
if(newAbilities[_target].at(i) && !_target->mutation && _target->currentZone != _target->owner->game->library)
|
||||
{
|
||||
newAbilities[_target].at(i)->forceDestroy = 1;
|
||||
newAbilities[_target].at(i)->removeFromGame();
|
||||
|
||||
@@ -428,6 +428,10 @@ void GameStateDuel::ConstructOpponentMenu()
|
||||
}
|
||||
|
||||
}
|
||||
} else if (mParent->gameType == GAME_TYPE_STONEHEWER && mParent->players[1] == PLAYER_TYPE_CPU){
|
||||
opponentMenu->Add(MENUITEM_RANDOM_AI, "Random");
|
||||
if (mParent->players[0] == PLAYER_TYPE_HUMAN)
|
||||
opponentMenu->Add(MENUITEM_RANDOM_AI_HARD, "Random (Not easy)",_("Selects a random AI deck with hard or normal difficulty.").c_str());
|
||||
}
|
||||
if (options[Options::EVILTWIN_MODE_UNLOCKED].number && !tournamentSelection)
|
||||
opponentMenu->Add(MENUITEM_EVIL_TWIN, "Evil Twin", _("Can you defeat yourself?").c_str());
|
||||
@@ -1421,8 +1425,14 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId)
|
||||
switch (controlId)
|
||||
{
|
||||
case MENUITEM_RANDOM_AI:
|
||||
game->loadPlayer(1, mParent->players[1]);
|
||||
tournament->addDeck(1,game->players.at(1)->deckId,mParent->players[1]);
|
||||
{
|
||||
int deck = tournament->getRandomDeck(false, mParent->gameType);
|
||||
if (deck>0)
|
||||
{
|
||||
game->loadPlayer(1, mParent->players[1], deck);
|
||||
tournament->addDeck(1,game->players.at(1)->deckId,mParent->players[1]);
|
||||
}
|
||||
}
|
||||
setAISpeed();
|
||||
if (opponentMenu) opponentMenu->Close();
|
||||
if (tournamentSelection)
|
||||
@@ -1432,7 +1442,7 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId)
|
||||
break;
|
||||
case MENUITEM_RANDOM_AI_HARD:
|
||||
{
|
||||
int deck=tournament->getRandomDeck(true);
|
||||
int deck = tournament->getRandomDeck(true, mParent->gameType);
|
||||
if (deck>0)
|
||||
{
|
||||
game->loadPlayer(1, mParent->players[1], deck, premadeDeck);
|
||||
@@ -1453,7 +1463,7 @@ void GameStateDuel::ButtonPressed(int controllerId, int controlId)
|
||||
int deck=0;
|
||||
do
|
||||
{
|
||||
deck=tournament->getRandomDeck(controlId==MENUITEM_FILL_NEXT_STAGE_HARD);
|
||||
deck = tournament->getRandomDeck(controlId==MENUITEM_FILL_NEXT_STAGE_HARD, mParent->gameType);
|
||||
if (deck>0)
|
||||
{
|
||||
game->loadPlayer(1, mParent->players[1], deck, premadeDeck);
|
||||
@@ -1977,7 +1987,7 @@ void Tournament::initTournamentResults()
|
||||
|
||||
|
||||
|
||||
int Tournament::getRandomDeck(bool noEasyDecks)
|
||||
int Tournament::getRandomDeck(bool noEasyDecks, GameType type)
|
||||
{
|
||||
DeckManager *deckManager = DeckManager::GetInstance();
|
||||
vector<DeckMetaData *> *deckList = deckManager->getAIDeckOrderList();
|
||||
@@ -1987,15 +1997,21 @@ int Tournament::getRandomDeck(bool noEasyDecks)
|
||||
int k=0;
|
||||
bool isDouble=true;
|
||||
vector<unsigned int> decks;
|
||||
for (unsigned int i=0;i<deckList->size();i++)
|
||||
if (noEasyDecks && (deckList->at(i)->getDifficulty()==HARD || deckList->at(i)->getDifficulty()==NORMAL))
|
||||
{
|
||||
decks.push_back(i);
|
||||
//printf("hard deck%i/%i\n",i,deckList->size());
|
||||
} else
|
||||
decks.push_back(i);
|
||||
|
||||
|
||||
for (unsigned int i=0;i<deckList->size();i++){
|
||||
if(type == GAME_TYPE_COMMANDER && deckList->at(i)->isCommanderDeck()){
|
||||
if (noEasyDecks && (deckList->at(i)->getDifficulty()==HARD || deckList->at(i)->getDifficulty()==NORMAL)){
|
||||
decks.push_back(i);
|
||||
} else {
|
||||
decks.push_back(i);
|
||||
}
|
||||
} else if(type != GAME_TYPE_COMMANDER){
|
||||
if (noEasyDecks && (deckList->at(i)->getDifficulty()==HARD || deckList->at(i)->getDifficulty()==NORMAL)){
|
||||
decks.push_back(i);
|
||||
} else {
|
||||
decks.push_back(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
while(isDouble && decks.size()>0)
|
||||
{
|
||||
isDouble=false;
|
||||
|
||||
@@ -302,7 +302,7 @@ WCFilterNotColor::WCFilterNotColor(string arg)
|
||||
bool WCFilterOnlyColor::isMatch(MTGCard * c)
|
||||
{
|
||||
if (!c || !c->data) return false;
|
||||
for (int i = 0; i < Constants::NB_Colors; i++)
|
||||
for (int i = 1; i < Constants::NB_Colors; i++)
|
||||
{
|
||||
if (i == color) continue;
|
||||
if (c->data->hasColor(i)) return false;
|
||||
|
||||
Reference in New Issue
Block a user