- Momir AI tweaks
- More cards in shop, boosters are cheaper, each card has between 1 and 4 occurrences
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-07 13:38:11 +00:00
parent e46b199a6c
commit 9d0a10756d
4 changed files with 59 additions and 31 deletions

View File

@@ -49,22 +49,25 @@ void GameStateShop::Start()
}
}
if (nbsets){
setIds[0] = sets[(rand() % nbsets)];
setIds[1] = sets[(rand() % nbsets)];
for (int i = 0; i < SHOP_BOOSTERS; i++){
setIds[i] = sets[(rand() % nbsets)];
}
}else{
setIds[0] = (rand() % MtgSets::SetsList->nb_items);
setIds[1] = (rand() % MtgSets::SetsList->nb_items);
for (int i = 0; i < SHOP_BOOSTERS; i++){
setIds[i] = (rand() % MtgSets::SetsList->nb_items);
}
}
JQuad * mBackThumb = GameApp::CommonRes->GetQuad("back_thumb");
shop = NULL;
shop = NEW ShopItems(10, this, itemFont, 10, 0, mParent->collection, setIds);
sprintf(starterBuffer, "%s Booster (15 cards)",MtgSets::SetsList->values[setIds[0]].c_str());
sprintf(boosterBuffer, "%s Booster (15 cards)",MtgSets::SetsList->values[setIds[1]].c_str());
shop->Add(starterBuffer,mBack,mBackThumb, 1900);
shop->Add(boosterBuffer,mBack,mBackThumb, 1900);
for (int i = 0; i < 5; i++){
for (int i = 0; i < SHOP_BOOSTERS; i++){
sprintf(setNames[i], "%s Booster (15 cards)",MtgSets::SetsList->values[setIds[i]].c_str());
shop->Add(setNames[i],mBack,mBackThumb, 1200);
}
for (int i = 0; i < 8; i++){
shop->Add(mParent->collection->randomCardId());
}