mirror of
https://github.com/correl/mage.git
synced 2025-04-11 17:00:08 -09: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
Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords
Mage/src/main/java/mage/game/permanent
|
@ -155,26 +155,28 @@ public class TransformTest extends CardTestPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* 4G
|
||||
* Creature - Human Shaman
|
||||
* Whenever a permanent you control transforms into a non-Human creature, put a 2/2 green Wolf creature token onto the battlefield.
|
||||
*
|
||||
* Reported bug: "It appears to trigger either when a non-human creature transforms OR when a creature transforms from a non-human
|
||||
* into a human (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."
|
||||
* 4G Creature - Human Shaman Whenever a permanent you control transforms
|
||||
* into a non-Human creature, put a 2/2 green Wolf creature token onto the
|
||||
* battlefield.
|
||||
*
|
||||
* Reported bug: "It appears to trigger either when a non-human creature
|
||||
* transforms OR when a creature transforms from a non-human into a human
|
||||
* (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
|
||||
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");
|
||||
// {1}{G} - Human Werewolf
|
||||
// At the beginning of each upkeep, if no spells were cast last turn, transform 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.
|
||||
setStopAt(2, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
|
||||
assertPermanentCount(playerA, "Cult of the Waxing Moon", 1);
|
||||
assertPermanentCount(playerA, "Timber Shredder", 1); // Night-side card of Hinterland Logger, Werewolf (non-human)
|
||||
assertPermanentCount(playerA, "Wolf", 1); // wolf token created
|
||||
|
|
|
@ -512,7 +512,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
if (canTransform) {
|
||||
if (!replaceEvent(EventType.TRANSFORM, game)) {
|
||||
setTransformed(!transformed);
|
||||
fireEvent(EventType.TRANSFORMED, game);
|
||||
game.applyEffects();
|
||||
game.addSimultaneousEvent(GameEvent.getEvent(EventType.TRANSFORMED, getId(), getControllerId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue