readded modified rule
This commit is contained in:
@@ -142,6 +142,7 @@ class GameObserver{
|
||||
|
||||
int receiveEvent(WEvent * event);
|
||||
bool connectRule;
|
||||
bool LPWeffect;
|
||||
|
||||
void logAction(Player* player, const string& s="");
|
||||
void logAction(int playerId, const string& s="") {
|
||||
|
||||
@@ -192,7 +192,7 @@ void MTGRevealingCards::Update(float dt)
|
||||
//if any carddisplays are open, dont do anything until theyre closed, then wait your turn if multiple reveals trigger.
|
||||
return;
|
||||
}
|
||||
if (game->mLayers->actionLayer()->menuObject)
|
||||
if (game->mLayers->actionLayer()->menuObject || game->LPWeffect)
|
||||
return;//dont do any of this if a menuobject exist.
|
||||
if (!source->getObserver()->mLayers->actionLayer()->getCurrentTargetChooser() && !revealDisplay && !initCD)
|
||||
{
|
||||
|
||||
@@ -50,6 +50,7 @@ void GameObserver::cleanup()
|
||||
replacementEffects = NEW ReplacementEffects();
|
||||
combatStep = BLOCKERS;
|
||||
connectRule = false;
|
||||
LPWeffect = false;
|
||||
actionsList.clear();
|
||||
gameTurn.clear();
|
||||
OpenedDisplay = NULL;
|
||||
@@ -106,6 +107,7 @@ GameObserver::GameObserver(WResourceManager *output, JGE* input)
|
||||
combatStep = BLOCKERS;
|
||||
mRules = NULL;
|
||||
connectRule = false;
|
||||
LPWeffect = false;
|
||||
mLoading = false;
|
||||
mLayers = NULL;
|
||||
mTrash = new Trash();
|
||||
@@ -1052,6 +1054,7 @@ void GameObserver::gameStateBasedEffects()
|
||||
userRequestNextGamePhase();
|
||||
}
|
||||
|
||||
this->LPWeffect = false;
|
||||
//WEventGameStateBasedChecked event checked
|
||||
receiveEvent(NEW WEventGameStateBasedChecked());
|
||||
}
|
||||
|
||||
@@ -3257,17 +3257,18 @@ int MTGLegendRule::added(MTGCardInstance * card)
|
||||
{
|
||||
map<MTGCardInstance *, bool>::iterator it;
|
||||
int destroy = 0;
|
||||
vector<MTGCardInstance*>oldCards;
|
||||
//vector<MTGCardInstance*>oldCards;
|
||||
for (it = cards.begin(); it != cards.end(); it++)
|
||||
{
|
||||
MTGCardInstance * comparison = (*it).first;
|
||||
if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName())))
|
||||
if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()))
|
||||
{
|
||||
oldCards.push_back(comparison);
|
||||
//oldCards.push_back(comparison);
|
||||
destroy = 1;
|
||||
game->LPWeffect = true;
|
||||
}
|
||||
}/*
|
||||
}
|
||||
if(destroy)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
@@ -3290,9 +3291,9 @@ int MTGLegendRule::added(MTGCardInstance * card)
|
||||
SAFE_DELETE(LegendruleGeneric);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), NULL, myClone,true,selection,card->controller(),"Legendary Rule");
|
||||
menuChoice->addToGame();
|
||||
}*/
|
||||
}
|
||||
//reverted to old since this new code conflicts with reveal targetchooser
|
||||
if(destroy)
|
||||
/*if(destroy)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
MultiAbility * multi = NEW MultiAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
|
||||
@@ -3311,7 +3312,7 @@ int MTGLegendRule::added(MTGCardInstance * card)
|
||||
selection.push_back(b1);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule");
|
||||
menuChoice->addToGame();
|
||||
}
|
||||
}*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3360,17 +3361,18 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
|
||||
{
|
||||
map<MTGCardInstance *, bool>::iterator it;
|
||||
int destroy = 0;
|
||||
vector<MTGCardInstance*>oldCards;
|
||||
//vector<MTGCardInstance*>oldCards;
|
||||
for (it = cards.begin(); it != cards.end(); it++)
|
||||
{
|
||||
MTGCardInstance * comparison = (*it).first;
|
||||
if (comparison != card && comparison->types == card->types && comparison->controller() == card->controller())
|
||||
if (!(game->getCurrentTargetChooser() || game->mLayers->actionLayer()->isWaitingForAnswer()))
|
||||
{
|
||||
oldCards.push_back(comparison);
|
||||
//oldCards.push_back(comparison);
|
||||
destroy = 1;
|
||||
game->LPWeffect = true;
|
||||
}
|
||||
}/*
|
||||
}
|
||||
if (destroy)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
@@ -3393,9 +3395,9 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
|
||||
SAFE_DELETE(PWruleGeneric);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), NULL, myClone,true,selection,card->controller(),"Planeswalker Uniqueness Rule");
|
||||
menuChoice->addToGame();
|
||||
}*/
|
||||
}
|
||||
//reverted to old since this new code conflicts with reveal targetchooser
|
||||
if (destroy)
|
||||
/*if (destroy)
|
||||
{
|
||||
vector<MTGAbility*>selection;
|
||||
|
||||
@@ -3415,7 +3417,7 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
|
||||
selection.push_back(b1);
|
||||
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule");
|
||||
menuChoice->addToGame();
|
||||
}
|
||||
}*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user