fixed some formatting issues.
changed conditional for lord and thises evaluation from hardcoded value to length of the array being evaluated. This doesn't change current functionality, but minimizes code change if these arrays were ever to change in size.
This commit is contained in:
@@ -1393,7 +1393,8 @@ void GameStateDeckViewer::Render()
|
||||
JRenderer * r = JRenderer::GetInstance();
|
||||
|
||||
r->ClearScreen(ARGB(0,0,0,0));
|
||||
if (displayed_deck == myDeck && mStage != STAGE_MENU) renderDeckBackground();
|
||||
if (displayed_deck == myDeck && mStage != STAGE_MENU)
|
||||
renderDeckBackground();
|
||||
int order[3] = { 1, 2, 3 };
|
||||
if (mRotation < 0.5 && mRotation > -0.5)
|
||||
{
|
||||
@@ -1601,7 +1602,7 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId)
|
||||
break;
|
||||
|
||||
case MENU_ITEM_SWITCH_DECKS_NO_SAVE:
|
||||
updateDecks();
|
||||
//updateDecks();
|
||||
mStage = STAGE_WELCOME;
|
||||
mSwitching = true;
|
||||
break;
|
||||
|
||||
@@ -637,9 +637,9 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
||||
for (inner_iterator attacker = attackers.begin(); attacker != attackers.end(); ++attacker)
|
||||
autoaffectDamage(*attacker, step);
|
||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||
(*it)->show = ((*it)->card->has(Constants::DOUBLESTRIKE) || ((*it)->card->has(Constants::FIRSTSTRIKE) ^ (DAMAGE
|
||||
== step))) && (((*it)->card->has(Constants::TRAMPLE) ? (size_t) 0 : (size_t) 1)
|
||||
< (*it)->blockers.size());
|
||||
(*it)->show = ((*it)->card->has(Constants::DOUBLESTRIKE)
|
||||
|| ((*it)->card->has(Constants::FIRSTSTRIKE) ^ (DAMAGE == step)))
|
||||
&& (((*it)->card->has(Constants::TRAMPLE) ? (size_t) 0 : (size_t) 1) < (*it)->blockers.size());
|
||||
repos<AttackerDamaged> (attackers.begin(), attackers.end(), 0);
|
||||
active = activeAtk = NULL;
|
||||
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
|
||||
@@ -656,7 +656,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
|
||||
cursor_pos = ATK;
|
||||
}
|
||||
else
|
||||
go->nextCombatStep();
|
||||
go->nextCombatStep();
|
||||
return 1;
|
||||
case END_DAMAGE:
|
||||
step = END_DAMAGE;
|
||||
|
||||
@@ -708,7 +708,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
string thises[] = { "this(", "thisforeach(" };
|
||||
found = string::npos;
|
||||
int i = -1;
|
||||
for (int j = 0; j < 2; ++j)
|
||||
for (int j = 0; j < thises->length(); ++j)
|
||||
{
|
||||
size_t found2 = s.find(thises[j]);
|
||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||
@@ -792,7 +792,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
string lords[] = { "lord(", "foreach(", "aslongas(", "teach(", "all(" };
|
||||
found = string::npos;
|
||||
i = -1;
|
||||
for (int j = 0; j < 5; ++j)
|
||||
for (int j = 0; j < lords->length(); ++j)
|
||||
{
|
||||
size_t found2 = s.find(lords[j]);
|
||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||
|
||||
Reference in New Issue
Block a user