add forced interrupt
This commit is contained in:
@@ -230,7 +230,7 @@ public:
|
|||||||
Player * askIfWishesToInterrupt;
|
Player * askIfWishesToInterrupt;
|
||||||
int garbageCollect();
|
int garbageCollect();
|
||||||
int addAction(Interruptible * interruptible);
|
int addAction(Interruptible * interruptible);
|
||||||
Spell * addSpell(MTGCardInstance* card, TargetChooser * tc, ManaCost * mana, int payResult, int storm);
|
Spell * addSpell(MTGCardInstance* card, TargetChooser * tc, ManaCost * mana, int payResult, int storm, bool forcedinterrupt = false);
|
||||||
int AddNextGamePhase();
|
int AddNextGamePhase();
|
||||||
int AddNextCombatStep();
|
int AddNextCombatStep();
|
||||||
int addPutInGraveyard(MTGCardInstance * card);
|
int addPutInGraveyard(MTGCardInstance * card);
|
||||||
|
|||||||
@@ -789,7 +789,7 @@ int ActionStack::addAction(Interruptible * action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Spell * ActionStack::addSpell(MTGCardInstance * _source, TargetChooser * tc, ManaCost * mana, int payResult,
|
Spell * ActionStack::addSpell(MTGCardInstance * _source, TargetChooser * tc, ManaCost * mana, int payResult,
|
||||||
int storm)
|
int storm, bool forcedinterrupt)
|
||||||
{
|
{
|
||||||
DebugTrace("ACTIONSTACK Add spell");
|
DebugTrace("ACTIONSTACK Add spell");
|
||||||
if (storm > 0)
|
if (storm > 0)
|
||||||
@@ -799,7 +799,12 @@ Spell * ActionStack::addSpell(MTGCardInstance * _source, TargetChooser * tc, Man
|
|||||||
Spell * spell = NEW Spell(observer, mObjects.size(), _source, tc, mana, payResult);
|
Spell * spell = NEW Spell(observer, mObjects.size(), _source, tc, mana, payResult);
|
||||||
addAction(spell);
|
addAction(spell);
|
||||||
if (!observer->players[0]->isAI() && _source->controller() == observer->players[0] && 0 == options[Options::INTERRUPTMYSPELLS].number)
|
if (!observer->players[0]->isAI() && _source->controller() == observer->players[0] && 0 == options[Options::INTERRUPTMYSPELLS].number)
|
||||||
interruptDecision[0] = DONT_INTERRUPT;
|
{
|
||||||
|
if(forcedinterrupt)
|
||||||
|
interruptDecision[0] = INTERRUPT;
|
||||||
|
else
|
||||||
|
interruptDecision[0] = DONT_INTERRUPT;
|
||||||
|
}
|
||||||
return spell;
|
return spell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user