mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
* Cumulative Upkeep - Fixed that a permanent with CU was wrongly sacrificed if the control of the permanent has changed since CU begin of upkeep trigger was put on the stack. Added tests for CU.
This commit is contained in:
parent
94f6cfc03f
commit
29184316f2
2 changed files with 113 additions and 1 deletions
|
|
@ -89,7 +89,9 @@ class CumulativeUpkeepEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
game.fireEvent(new GameEvent(GameEvent.EventType.DIDNT_PAY_CUMULATIVE_UPKEEP, permanent.getId(), source, player.getId(), ageCounter, false));
|
||||
permanent.sacrifice(source, game);
|
||||
if (source.getControllerId().equals(permanent.getControllerId())) { // Permanent can only be sacrificed if you still control it
|
||||
permanent.sacrifice(source, game);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
CostsImpl<Cost> totalCost = new CostsImpl<>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue