From 7af251ba1296d0fef28dae8a6b4c945e54f8aeff Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Thu, 26 Aug 2010 18:56:02 +0000 Subject: [PATCH] Jeck - Resolved (hopefully) issue 383. The problem was faulty "optimization" for PSP. One of the symptoms of this was that, if a set had no mythic cards, and the player succeeded on the 1:8 chance of drawing a mythic, instead of falling back to rares it fell straight to uncommons. --- projects/mtg/src/MTGPack.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/mtg/src/MTGPack.cpp b/projects/mtg/src/MTGPack.cpp index 9c4c38ccf..06b47ace2 100644 --- a/projects/mtg/src/MTGPack.cpp +++ b/projects/mtg/src/MTGPack.cpp @@ -44,13 +44,10 @@ int MTGPackSlot::add(WSrcCards * ocean, MTGDeck *to, int carryover){ if(!myPool) myPool = ocean; for(int i=0;iaddCard(myPool,to)) pos++; - if(pos == entries.size()) fails++; -#else //Fall straight through to next slot - fails = entries[pos]->addCard(myPool,to); -#endif + if(pos == entries.size()) + fails++; } if(myPool != ocean) SAFE_DELETE(myPool); @@ -98,6 +95,8 @@ int MTGPack::assemblePack(MTGDeck *to){ for(size_t i=0;iadd(p,to,carryover); + if(carryover > 0) + carryover = carryover; //This means we're failing. } SAFE_DELETE(p); return carryover;