Merge pull request #942 from kevlahnota/master
Crash fix and some card update
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -235,6 +235,7 @@ void GameStateDeckViewer::End()
|
||||
void GameStateDeckViewer::addRemove(MTGCard * card)
|
||||
{
|
||||
if (!card) return;
|
||||
if ((card->getRarity() == Constants::RARITY_T) || (card->getId() < 1)) return;
|
||||
if (mView->deck()->Remove(card, 1, (mView->deck() == myDeck)))
|
||||
{
|
||||
if (mView->deck() == myCollection)
|
||||
|
||||
@@ -271,7 +271,7 @@ void GameStateShop::cancelBooster(int)
|
||||
void GameStateShop::purchaseCard(int controlId)
|
||||
{
|
||||
MTGCard * c = srcCards->getCard(controlId - BOOSTER_SLOTS);
|
||||
if (!c || !c->data || playerdata->credits - mPrices[controlId] < 0)
|
||||
if (!c || !c->data || playerdata->credits - mPrices[controlId] < 0 || (c && c->getRarity() == Constants::RARITY_T))//cant buy tokens....
|
||||
return;
|
||||
myCollection->Add(c);
|
||||
int price = mPrices[controlId];
|
||||
@@ -487,7 +487,7 @@ void GameStateShop::Update(float dt)
|
||||
menu->Add(22, _("Ask about...").c_str());
|
||||
menu->Add(14, _("Check task board").c_str());
|
||||
if (options[Options::CHEATMODE].number)
|
||||
menu->Add(-2, _("Steal 1,000 credits").c_str());
|
||||
menu->Add(-2, _("Steal 2,000 credits").c_str());
|
||||
menu->Add(12, _("Save And Exit").c_str());
|
||||
menu->Add(kCancelMenuID, _("Cancel").c_str());
|
||||
}
|
||||
@@ -860,7 +860,7 @@ void GameStateShop::ButtonPressed(int controllerId, int controlId)
|
||||
beginFilters();
|
||||
break;
|
||||
case -2:
|
||||
playerdata->credits += 1000;
|
||||
playerdata->credits += 2000;
|
||||
default:
|
||||
mStage = STAGE_SHOP_SHOP;
|
||||
}
|
||||
|
||||
@@ -5931,6 +5931,19 @@ int TriggeredAbility::receiveEvent(WEvent * e)
|
||||
resolve();
|
||||
return 1;
|
||||
}
|
||||
WEventCardCycle * cycleCheck = dynamic_cast<WEventCardCycle*>(e);
|
||||
if(cycleCheck && cycleCheck->card == source)
|
||||
{
|
||||
resolve();
|
||||
return 1;
|
||||
//When you cycle this card, first the cycling ability goes on the stack,
|
||||
//then the triggered ability goes on the stack on top of it.
|
||||
//The triggered ability will resolve before you draw a card from the cycling ability.
|
||||
//
|
||||
//The cycling ability and the triggered ability are separate.
|
||||
//If the triggered ability is countered (with Stifle, for example, or if all its targets have become illegal),
|
||||
//the cycling ability will still resolve and you'll draw a card.
|
||||
}
|
||||
WEventZoneChange * stackCheck = dynamic_cast<WEventZoneChange*>(e);
|
||||
if(stackCheck && (stackCheck->to == game->currentPlayer->game->stack||stackCheck->to == game->currentPlayer->opponent()->game->stack))
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
||||
string value = s.substr(start -1,end);
|
||||
if(value == "n{")//"restrictio n{m orbid} would read the n{m as {m} millcost
|
||||
return manaCost;
|
||||
else if(value == "e{")//"variable{ test fix
|
||||
return manaCost;
|
||||
}
|
||||
if (start == string::npos)
|
||||
{
|
||||
|
||||
@@ -272,7 +272,7 @@ bool WCFilterProducesColor::isMatch(MTGCard * c)
|
||||
|
||||
//Retrieve non basic Mana abilities
|
||||
string s = c->data->magicText;
|
||||
size_t t = s.find("add");
|
||||
size_t t = s.find("add{");
|
||||
while (t != string::npos)
|
||||
{
|
||||
s = s.substr(t + 3);
|
||||
|
||||
@@ -1770,12 +1770,14 @@ void WGuiFilters::buildList()
|
||||
{
|
||||
list = NEW WGuiList("");
|
||||
WGuiButton * l = NEW WGuiButton(NEW WGuiItem("Add Filter"), -102, -10, this);
|
||||
WGuiButton * r = NEW WGuiButton(NEW WGuiItem("Done"), -102, -11, this);
|
||||
WGuiButton * r = NEW WGuiButton(NEW WGuiItem("Search"), -102, -11, this);
|
||||
WGuiButton * mid = NEW WGuiButton(NEW WGuiItem("Clear"), -102, -66, this);
|
||||
WGuiSplit * sub = NEW WGuiSplit(mid, r);
|
||||
WGuiSplit * wgs = NEW WGuiSplit(l, sub);
|
||||
//WGuiSplit * sub = NEW WGuiSplit(mid, r);
|
||||
//WGuiSplit * wgs = NEW WGuiSplit(l, sub);
|
||||
WGuiSplit * wgs = NEW WGuiSplit(mid, r);
|
||||
subMenu = NULL;
|
||||
list->Add(NEW WGuiHeader(displayValue));
|
||||
list->Add(l);
|
||||
list->Add(wgs);
|
||||
list->Entering(JGE_BTN_NONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user