reworked landhome ability, to fix a reported bug where it simply becomes tapped on opponents turn for no reason.
This commit is contained in:
@@ -3665,12 +3665,15 @@ public:
|
|||||||
|
|
||||||
void Update(float dt)
|
void Update(float dt)
|
||||||
{
|
{
|
||||||
if (source->isAttacker())
|
if (newPhase != currentPhase && (newPhase == Constants::MTG_PHASE_COMBATBEGIN || newPhase == Constants::MTG_PHASE_COMBATATTACKERS))
|
||||||
{
|
{
|
||||||
if (!game->opponent()->game->inPlay->hasType(land))
|
if (source->controller()->opponent()->game->inPlay->hasType(land))
|
||||||
{
|
{
|
||||||
source->toggleAttacker();
|
source->basicAbilities[Constants::CANTATTACK] = 0;
|
||||||
//TODO Improve, there can be race conditions here
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
source->basicAbilities[Constants::CANTATTACK] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Player * player = source->controller();
|
Player * player = source->controller();
|
||||||
|
|||||||
Reference in New Issue
Block a user