added stack check, modified life check
if activating ability, playing a land or casting sorcery spell at sorcery level(timing restriction), if the stack is not empty, don't allow it. Modified the life state check, if any of the players would lose the game, allow the gamestateeffects to check... added reduceto:value for ali from cairo...
This commit is contained in:
@@ -739,6 +739,20 @@ int MTGCardInstance::getCurrentToughness()
|
||||
return toughness;
|
||||
}
|
||||
|
||||
//check stack
|
||||
bool MTGCardInstance::StackIsEmptyandSorcerySpeed()
|
||||
{
|
||||
if((getObserver()->mLayers->stackLayer()->count(0, NOT_RESOLVED) == 0) &&
|
||||
(getObserver()->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN ||
|
||||
getObserver()->getCurrentGamePhase() == MTG_PHASE_SECONDMAIN) &&
|
||||
controller() == getObserver()->currentPlayer &&
|
||||
!getObserver()->isInterrupting)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int MTGCardInstance::canBlock()
|
||||
{
|
||||
if (tapped)
|
||||
|
||||
Reference in New Issue
Block a user