r u sure?superhiro wrote:Minor fix needed: Darklit Gargoyle has flying listed under auto= instead of abilities=.
Bugs SVN
Forum rules
Do not post Features/Improvments request here (i.e : AI being stupid is not a bug, not being able to do a mulligan is not a bug, etc..etc..)
Before posting, please read the Bugs reporting guideline
Do not post Features/Improvments request here (i.e : AI being stupid is not a bug, not being able to do a mulligan is not a bug, etc..etc..)
Before posting, please read the Bugs reporting guideline
Re: Bugs SVN
????????????????????????????????????????????????????
Re: Bugs SVN
Hi all. Please excuse my report in poor english.
There is a bug in rev 375 (since rev 314), which starting the shop mode can cause a crash.
DeckDataWrapper::countByName() should be fixed (and improved) as bellow:
There is a bug in rev 375 (since rev 314), which starting the shop mode can cause a crash.
DeckDataWrapper::countByName() should be fixed (and improved) as bellow:
Code: Select all
Index: src/DeckDataWrapper.cpp
===================================================================
--- src/DeckDataWrapper.cpp (revision 375)
+++ src/DeckDataWrapper.cpp (working copy)
@@ -84,12 +84,12 @@
int DeckDataWrapper::countByName(MTGCard * card){
string name = card->name;
int total = 0;
- map<MTGCard *,int,Cmp1>::iterator it;
+ map<MTGCard *,int,Cmp1>::iterator it,it_origin;
it = cards.find(card);
- if(cards.find(card) == cards.end()){
+ if(it == cards.end()){
cards[card] = 0;
it = cards.find(card);
}
+ it_origin = it;
while(it !=cards.end()){
MTGCard * _card = (*it).first;
@@ -101,7 +102,10 @@
}
}
- it = cards.find(card);
+ it = it_origin;
+ if (it == cards.begin())
+ return total;
+
it--;
while(1){
MTGCard * _card = (*it).first;
Re: Bugs SVN
Thanks a lot, I experienced random crashes in the shop, and this could definitely be the cause for it.
I applied your patch to the latest revision.
Oh, and may I add that this is the first time I actually received a real patch for a bug in the code, so many thanks for that
I applied your patch to the latest revision.
Oh, and may I add that this is the first time I actually received a real patch for a bug in the code, so many thanks for that
-
- Posts: 975
- Joined: Mon Dec 15, 2008 5:12 pm
- Location: Germany
Re: Bugs SVN
wow! great work!
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Re: Bugs SVN
Ah, I'm sorry, I messed up. It is "abilitites" instead of "abilities".leungclj wrote:r u sure?superhiro wrote:Minor fix needed: Darklit Gargoyle has flying listed under auto= instead of abilities=.
By the way, how can one get write access to the SVN?
-
- Posts: 975
- Joined: Mon Dec 15, 2008 5:12 pm
- Location: Germany
Re: Bugs SVN
my fault....
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Re: Bugs SVN
r396: Sphinx Summoner and Goblin Matron don't work, you can't target your library.
Also: You can't search for cards with shroud in the library, for example with Demonic Tutor.
Also: You can't search for cards with shroud in the library, for example with Demonic Tutor.
Re: Bugs SVN
Akron Legionnaire bug:
If you have 2 Akron Legionnaire cards in play, none of them can attack.
If both you and the AI have 2 Akron Legionnaire each (for example in Momir), you can play for as long as you wish, without anybody being able to attack...which gives:
If you have 2 Akron Legionnaire cards in play, none of them can attack.
If both you and the AI have 2 Akron Legionnaire each (for example in Momir), you can play for as long as you wish, without anybody being able to attack...which gives:
Re: Bugs SVN
OMG, that looks so sick xD
Sorry for the spam, but I just had to say it ^^
Sorry for the spam, but I just had to say it ^^
Re: Bugs SVN
Superhiro, please refrain from putting deck names longer than 8-9 characters for the AI, otherwise it causes graphical issues during deck selection, thanks