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