diff --git a/Mage.Sets/src/mage/cards/m/ManaCrypt.java b/Mage.Sets/src/mage/cards/m/ManaCrypt.java index 4adb41bbbd6..70afe947fef 100644 --- a/Mage.Sets/src/mage/cards/m/ManaCrypt.java +++ b/Mage.Sets/src/mage/cards/m/ManaCrypt.java @@ -28,7 +28,7 @@ public final class ManaCrypt extends CardImpl { // At the beginning of your upkeep, flip a coin. If you lose the flip, Mana Crypt deals 3 damage to you. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ManaCryptEffect(), TargetController.YOU, false)); - // {tap}: Add {C}{C}. + // {T}: Add {C}{C}. this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.ColorlessMana(2), new TapSourceCost())); } diff --git a/Mage.Sets/src/mage/cards/o/OboshThePreypiercer.java b/Mage.Sets/src/mage/cards/o/OboshThePreypiercer.java index 012eb183e09..721b6159dab 100644 --- a/Mage.Sets/src/mage/cards/o/OboshThePreypiercer.java +++ b/Mage.Sets/src/mage/cards/o/OboshThePreypiercer.java @@ -94,7 +94,7 @@ class OboshThePreypiercerEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - MageObject sourceObject = source.getSourceObjectIfItStillExists(game); + MageObject sourceObject = game.getObject(event.getSourceId()); return sourceObject != null && sourceObject.getConvertedManaCost() % 2 == 1 && game.getControllerId(event.getSourceId()).equals(source.getControllerId()); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/iko/OboshThePreypiercerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/iko/OboshThePreypiercerTest.java new file mode 100644 index 00000000000..5f5b7d467d7 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/iko/OboshThePreypiercerTest.java @@ -0,0 +1,39 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.mage.test.cards.single.iko; + + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Assert; +import org.junit.Test; + +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ + +public class OboshThePreypiercerTest extends CardTestPlayerBase { + + @Test + public void testZeroCMSIsHandledAsOdd() { + setStrictChooseMode(true); + // At the beginning of your upkeep, flip a coin. If you lose the flip, Mana Crypt deals 3 damage to you. + // {T}: Add {C}{C}. + addCard(Zone.BATTLEFIELD, playerA, "Mana Crypt"); + // Companion — Your starting deck contains only cards with odd converted mana costs and land cards. + // If a source you control with an odd converted mana cost would deal damage to a permanent or player, it deals double that damage to that permanent or player instead. + addCard(Zone.BATTLEFIELD, playerA, "Obosh, the Preypiercer"); + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + assertAllCommandsUsed(); + + Assert.assertTrue("Life has to be 20 or 17 but was " + playerA.getLife() , playerA.getLife() == 17 || playerA.getLife() == 20); + } +} \ No newline at end of file