From dfe1e2ef5af231879dbf9a5d61b6c8b49011af66 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 28 Aug 2015 16:52:33 +0200 Subject: [PATCH] Some minor changes. --- .../client/plugins/adapters/MageActionCallback.java | 4 ++-- .../src/mage/sets/magicorigins/DwynensElite.java | 4 ++-- .../mage/sets/magicorigins/SeismicElemental.java | 6 +++--- .../mage/test/AI/basic/TargetsAreChosenTest.java | 13 +++++++++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java index 83ba8b763d..c236a42741 100644 --- a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java +++ b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java @@ -135,10 +135,10 @@ public class MageActionCallback implements ActionCallback { ArrowUtil.drawArrowsForPairedCards(data, parentPoint); ArrowUtil.drawArrowsForEnchantPlayers(data, parentPoint); - showPopup(data, parentComponent, parentPoint); + showTooltipPopup(data, parentComponent, parentPoint); } - private void showPopup(final TransferData data, final Component parentComponent, final Point parentPoint) { + private void showTooltipPopup(final TransferData data, final Component parentComponent, final Point parentPoint) { if (data.component != null) { String showTooltips = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE, "true"); if (showTooltips.equals("false")) { diff --git a/Mage.Sets/src/mage/sets/magicorigins/DwynensElite.java b/Mage.Sets/src/mage/sets/magicorigins/DwynensElite.java index d13a3b9fcf..6ad3180ae6 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/DwynensElite.java +++ b/Mage.Sets/src/mage/sets/magicorigins/DwynensElite.java @@ -48,7 +48,7 @@ import mage.game.permanent.token.ElfToken; * @author fireshoes */ public class DwynensElite extends CardImpl { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Elf"); static { @@ -69,7 +69,7 @@ public class DwynensElite extends CardImpl { this.addAbility(new ConditionalTriggeredAbility( triggeredAbility, new PermanentsOnTheBattlefieldCondition(filter, CountType.MORE_THAN, 0), - "When {this} enters the battlefield, if you control another Elf, put a 1/1 green Elf Warrior creature token onto the battlefield")); + "When {this} enters the battlefield, if you control another Elf, put a 1/1 green Elf Warrior creature token onto the battlefield.")); } public DwynensElite(final DwynensElite card) { diff --git a/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java b/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java index 3f67be9e03..ea83725bd9 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java +++ b/Mage.Sets/src/mage/sets/magicorigins/SeismicElemental.java @@ -45,13 +45,13 @@ import mage.filter.predicate.mageobject.AbilityPredicate; * @author LevelX2 */ public class SeismicElemental extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures without flying"); + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures without flying"); static { filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); } - + public SeismicElemental(UUID ownerId) { super(ownerId, 161, "Seismic Elemental", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}{R}"); this.expansionSetCode = "ORI"; diff --git a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetsAreChosenTest.java b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetsAreChosenTest.java index 31a037b721..4859e3af03 100644 --- a/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetsAreChosenTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/AI/basic/TargetsAreChosenTest.java @@ -63,7 +63,7 @@ public class TargetsAreChosenTest extends CardTestPlayerBaseAI { /** * Check that the AI does not cast Rack and Ruin if it would destroy the - * owly creature on the battlefield owned by the AI + * only creature on the battlefield owned by the AI */ @Test public void testRackAndRuin2() { @@ -196,7 +196,7 @@ public class TargetsAreChosenTest extends CardTestPlayerBaseAI { } /** - * Test that AI counters creatire spell + * Test that AI counters creature spell */ @Test @Ignore // counter spells don't seem to be cast by AI @@ -222,4 +222,13 @@ public class TargetsAreChosenTest extends CardTestPlayerBaseAI { } + /** + * Target selection from EntersTheBattlefield is not varied in the AI + * calculation, so value is only calculated for the one selected target set. + * + * E.g. If AI casts an Eyeblight Assassin and opponent has a 3/1 and a 2/2, + * the AI should target the 3/1. + * + * Add test to check such situations + */ }