added abilities=split second

This commit is contained in:
omegablast2002@yahoo.com
2011-02-03 00:04:11 +00:00
parent 81f3a4c1d5
commit 37adf143c8
3 changed files with 34 additions and 24 deletions
+2 -1
View File
@@ -181,8 +181,9 @@ NONBASICWALK = 92,
STRONG = 93, STRONG = 93,
WEAK = 94, WEAK = 94,
PHASING = 95, PHASING = 95,
SPLITSECOND = 96,
NB_BASIC_ABILITIES = 96, NB_BASIC_ABILITIES = 97,
RARITY_S = 'S', //Special Rarity RARITY_S = 'S', //Special Rarity
+31 -23
View File
@@ -685,7 +685,6 @@ int ActionStack::resolve()
} }
if (action->type == ACTION_DAMAGE) if (action->type == ACTION_DAMAGE)
((Damage *) action)->target->afterDamage(); ((Damage *) action)->target->afterDamage();
if (!getNext(NULL, NOT_RESOLVED)) if (!getNext(NULL, NOT_RESOLVED))
{ {
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
@@ -850,39 +849,48 @@ void ActionStack::Update(float dt)
modal = 0; modal = 0;
if (getLatest(NOT_RESOLVED)) if (getLatest(NOT_RESOLVED))
{ {
int currentPlayerId = 0; Interruptible * currentSpell = (Interruptible *)getLatest(NOT_RESOLVED);
int otherPlayerId = 1; MTGCardInstance * card = currentSpell->source;
if (game->currentlyActing() != game->players[0]) if(card && card->has(Constants::SPLITSECOND))
{ {
currentPlayerId = 1; resolve();
otherPlayerId = 0;
}
if (interruptDecision[currentPlayerId] == NOT_DECIDED)
{
askIfWishesToInterrupt = game->players[currentPlayerId];
game->isInterrupting = game->players[currentPlayerId];
modal = 1;
}
else if (interruptDecision[currentPlayerId] == INTERRUPT)
{
game->isInterrupting = game->players[currentPlayerId];
} }
else else
{ {
if (interruptDecision[otherPlayerId] == NOT_DECIDED) int currentPlayerId = 0;
int otherPlayerId = 1;
if (game->currentlyActing() != game->players[0])
{ {
askIfWishesToInterrupt = game->players[otherPlayerId]; currentPlayerId = 1;
game->isInterrupting = game->players[otherPlayerId]; otherPlayerId = 0;
}
if (interruptDecision[currentPlayerId] == NOT_DECIDED)
{
askIfWishesToInterrupt = game->players[currentPlayerId];
game->isInterrupting = game->players[currentPlayerId];
modal = 1; modal = 1;
} }
else if (interruptDecision[otherPlayerId] == INTERRUPT) else if (interruptDecision[currentPlayerId] == INTERRUPT)
{ {
game->isInterrupting = game->players[otherPlayerId]; game->isInterrupting = game->players[currentPlayerId];
} }
else else
{ {
resolve(); if (interruptDecision[otherPlayerId] == NOT_DECIDED)
{
askIfWishesToInterrupt = game->players[otherPlayerId];
game->isInterrupting = game->players[otherPlayerId];
modal = 1;
}
else if (interruptDecision[otherPlayerId] == INTERRUPT)
{
game->isInterrupting = game->players[otherPlayerId];
}
else
{
resolve();
}
} }
} }
} }
+1
View File
@@ -123,6 +123,7 @@ const char* Constants::MTGBasicAbilities[] = {
"strong",//cant be blocked by creature with less power "strong",//cant be blocked by creature with less power
"weak",//cant block creatures with more power "weak",//cant block creatures with more power
"phasing", "phasing",
"split second",
}; };
map<string,int> Constants::MTGBasicAbilitiesMap; map<string,int> Constants::MTGBasicAbilitiesMap;