mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
Fixed that transformed event was triggerd while the transforming was not applied yet (e.g. Cult of the Waxing Moon - fixes #1687).
This commit is contained in:
parent
705daab22f
commit
8780a6101a
2 changed files with 14 additions and 11 deletions
|
|
@ -155,26 +155,28 @@ public class TransformTest extends CardTestPlayerBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4G
|
* 4G Creature - Human Shaman Whenever a permanent you control transforms
|
||||||
* Creature - Human Shaman
|
* into a non-Human creature, put a 2/2 green Wolf creature token onto the
|
||||||
* Whenever a permanent you control transforms into a non-Human creature, put a 2/2 green Wolf creature token onto the battlefield.
|
* battlefield.
|
||||||
*
|
*
|
||||||
* Reported bug: "It appears to trigger either when a non-human creature transforms OR when a creature transforms from a non-human
|
* Reported bug: "It appears to trigger either when a non-human creature
|
||||||
* into a human (as in when a werewolf flips back to the sun side), rather than when a creature transforms into a non-human,
|
* transforms OR when a creature transforms from a non-human into a human
|
||||||
* as is the intended function and wording of the card."
|
* (as in when a werewolf flips back to the sun side), rather than when a
|
||||||
|
* creature transforms into a non-human, as is the intended function and
|
||||||
|
* wording of the card."
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testCultOfTheWaxingMoon() {
|
public void testCultOfTheWaxingMoon() {
|
||||||
|
// Whenever a permanent you control transforms into a non-Human creature, put a 2/2 green Wolf creature token onto the battlefield.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Cult of the Waxing Moon");
|
addCard(Zone.BATTLEFIELD, playerA, "Cult of the Waxing Moon");
|
||||||
// {1}{G} - Human Werewolf
|
// {1}{G} - Human Werewolf
|
||||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Hinterland Logger.
|
// At the beginning of each upkeep, if no spells were cast last turn, transform Hinterland Logger.
|
||||||
addCard(Zone.BATTLEFIELD, playerA, "Hinterland Logger");
|
addCard(Zone.BATTLEFIELD, playerA, "Hinterland Logger");
|
||||||
|
|
||||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder.
|
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder.
|
||||||
setStopAt(2, PhaseStep.DRAW);
|
setStopAt(2, PhaseStep.DRAW);
|
||||||
execute();
|
execute();
|
||||||
|
|
||||||
assertPermanentCount(playerA, "Cult of the Waxing Moon", 1);
|
assertPermanentCount(playerA, "Cult of the Waxing Moon", 1);
|
||||||
assertPermanentCount(playerA, "Timber Shredder", 1); // Night-side card of Hinterland Logger, Werewolf (non-human)
|
assertPermanentCount(playerA, "Timber Shredder", 1); // Night-side card of Hinterland Logger, Werewolf (non-human)
|
||||||
assertPermanentCount(playerA, "Wolf", 1); // wolf token created
|
assertPermanentCount(playerA, "Wolf", 1); // wolf token created
|
||||||
|
|
|
||||||
|
|
@ -512,7 +512,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
||||||
if (canTransform) {
|
if (canTransform) {
|
||||||
if (!replaceEvent(EventType.TRANSFORM, game)) {
|
if (!replaceEvent(EventType.TRANSFORM, game)) {
|
||||||
setTransformed(!transformed);
|
setTransformed(!transformed);
|
||||||
fireEvent(EventType.TRANSFORMED, game);
|
game.applyEffects();
|
||||||
|
game.addSimultaneousEvent(GameEvent.getEvent(EventType.TRANSFORMED, getId(), getControllerId()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue