mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
* Fixed a problem with Licid creatures not dying if the enchanted creature dies.
This commit is contained in:
parent
f0bd9a58d4
commit
7f0d793544
3 changed files with 16 additions and 15 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package org.mage.test.cards.abilities.activated;
|
||||
|
||||
import mage.abilities.common.LicidAbility;
|
||||
|
@ -16,7 +15,6 @@ import org.mage.test.serverside.base.CardTestPlayerBase;
|
|||
*
|
||||
* @author emerald0000
|
||||
*/
|
||||
|
||||
public class LicidAbilityTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
|
@ -29,10 +27,10 @@ public class LicidAbilityTest extends CardTestPlayerBase {
|
|||
// Enchanted creature has haste.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Enraging Licid");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||
|
||||
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R},", "Pillarfield Ox");
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
|
||||
|
||||
execute();
|
||||
|
||||
assertAbility(playerA, "Pillarfield Ox", HasteAbility.getInstance(), true);
|
||||
|
@ -40,7 +38,7 @@ public class LicidAbilityTest extends CardTestPlayerBase {
|
|||
assertType("Enraging Licid", CardType.ENCHANTMENT, true);
|
||||
assertType("Enraging Licid", CardType.CREATURE, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Use special action to remove the continuous effect
|
||||
*/
|
||||
|
@ -52,11 +50,11 @@ public class LicidAbilityTest extends CardTestPlayerBase {
|
|||
// Enchanted creature has haste.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Enraging Licid");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
|
||||
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R},", "Pillarfield Ox");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{R}: End");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
||||
|
||||
execute();
|
||||
|
||||
assertActionsCount(playerA, 0);
|
||||
|
@ -65,12 +63,11 @@ public class LicidAbilityTest extends CardTestPlayerBase {
|
|||
assertType("Enraging Licid", CardType.ENCHANTMENT, false);
|
||||
assertType("Enraging Licid", CardType.CREATURE, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Licid should die if enchanted creature dies
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enraging Licid doesn't die when its enchanted creature dies due to similarity to Bestow")
|
||||
public void EnchantedCreatureDiesTest() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox");
|
||||
// {R}, {T}: Enraging Licid loses this ability and becomes an Aura enchantment with enchant creature. Attach it to target creature. You may pay {R} to end this effect.
|
||||
|
@ -80,13 +77,16 @@ public class LicidAbilityTest extends CardTestPlayerBase {
|
|||
addCard(Zone.HAND, playerB, "Doom Blade");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
|
||||
|
||||
activateAbility(1, PhaseStep.UPKEEP, playerA, "{R},", "Pillarfield Ox");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Doom Blade", "Pillarfield Ox");
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
|
||||
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, 2); // Pillarfield Ox + Enraging Licid
|
||||
assertPermanentCount(playerA, "Enraging Licid", 0);
|
||||
|
||||
assertGraveyardCount(playerA, "Pillarfield Ox", 1);
|
||||
assertGraveyardCount(playerA, "Enraging Licid", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,6 +169,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DESTROYED_PERMANENT:
|
||||
if (isLeavesTheBattlefieldTrigger()) {
|
||||
if (event.getType() == EventType.DESTROYED_PERMANENT) {
|
||||
|
@ -179,12 +180,13 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
|
|||
source = game.getLastKnownInformation(getSourceId(), event.getZone());
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case PHASED_OUT:
|
||||
case PHASED_IN:
|
||||
if (this.zone == Zone.ALL || game.getLastKnownInformation(getSourceId(), zone) != null) {
|
||||
return this.hasSourceObjectAbility(game, source, event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return super.isInUseableZone(game, source, event);
|
||||
|
|
|
@ -1918,8 +1918,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
if (perm.hasSubtype(SubType.AURA, this)) {
|
||||
//20091005 - 704.5n, 702.14c
|
||||
if (perm.getAttachedTo() == null) {
|
||||
Card card = this.getCard(perm.getId());
|
||||
if (card != null && !card.isCreature()) { // no bestow creature
|
||||
if (!perm.isCreature() && !perm.getAbilities(this).containsClass(BestowAbility.class)) {
|
||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||
somethingHappened = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue