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.
This commit is contained in:
@@ -44,13 +44,10 @@ int MTGPackSlot::add(WSrcCards * ocean, MTGDeck *to, int carryover){
|
|||||||
if(!myPool) myPool = ocean;
|
if(!myPool) myPool = ocean;
|
||||||
for(int i=0;i<amt;i++){
|
for(int i=0;i<amt;i++){
|
||||||
size_t pos = rand() % entries.size();
|
size_t pos = rand() % entries.size();
|
||||||
#if defined WIN32 || defined LINUX //First try other entries in slot
|
|
||||||
while(pos < entries.size() && entries[pos]->addCard(myPool,to))
|
while(pos < entries.size() && entries[pos]->addCard(myPool,to))
|
||||||
pos++;
|
pos++;
|
||||||
if(pos == entries.size()) fails++;
|
if(pos == entries.size())
|
||||||
#else //Fall straight through to next slot
|
fails++;
|
||||||
fails = entries[pos]->addCard(myPool,to);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if(myPool != ocean)
|
if(myPool != ocean)
|
||||||
SAFE_DELETE(myPool);
|
SAFE_DELETE(myPool);
|
||||||
@@ -98,6 +95,8 @@ int MTGPack::assemblePack(MTGDeck *to){
|
|||||||
|
|
||||||
for(size_t i=0;i<slots.size();i++){
|
for(size_t i=0;i<slots.size();i++){
|
||||||
carryover = slots[i]->add(p,to,carryover);
|
carryover = slots[i]->add(p,to,carryover);
|
||||||
|
if(carryover > 0)
|
||||||
|
carryover = carryover; //This means we're failing.
|
||||||
}
|
}
|
||||||
SAFE_DELETE(p);
|
SAFE_DELETE(p);
|
||||||
return carryover;
|
return carryover;
|
||||||
|
|||||||
Reference in New Issue
Block a user