diff --git a/Mage/src/main/java/mage/cards/AdventureCard.java b/Mage/src/main/java/mage/cards/AdventureCard.java index d100ae2770..1cb62d410a 100644 --- a/Mage/src/main/java/mage/cards/AdventureCard.java +++ b/Mage/src/main/java/mage/cards/AdventureCard.java @@ -1,5 +1,7 @@ package mage.cards; +import java.util.List; +import java.util.UUID; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; import mage.abilities.Ability; @@ -8,9 +10,6 @@ import mage.constants.CardType; import mage.constants.Zone; import mage.game.Game; -import java.util.List; -import java.util.UUID; - /** * @author TheElk801 */ @@ -92,9 +91,9 @@ public abstract class AdventureCard extends CardImpl { return allAbilities; } - public Abilities getSharedAbilities() { + public Abilities getSharedAbilities(Game game) { // abilities without spellcard - return super.getAbilities(); + return super.getAbilities(game); } @Override diff --git a/Mage/src/main/java/mage/cards/SplitCard.java b/Mage/src/main/java/mage/cards/SplitCard.java index a602c2a663..21c58c6c13 100644 --- a/Mage/src/main/java/mage/cards/SplitCard.java +++ b/Mage/src/main/java/mage/cards/SplitCard.java @@ -1,5 +1,8 @@ package mage.cards; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; import mage.MageObject; import mage.abilities.Abilities; import mage.abilities.AbilitiesImpl; @@ -10,10 +13,6 @@ import mage.constants.SpellAbilityType; import mage.constants.Zone; import mage.game.Game; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - /** * @author LevelX2 */ @@ -128,8 +127,8 @@ public abstract class SplitCard extends CardImpl { * * @return */ - public Abilities getSharedAbilities() { - return super.getAbilities(); + public Abilities getSharedAbilities(Game game) { + return super.getAbilities(game); } @Override diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 084a717f0a..361f99c32e 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1574,7 +1574,8 @@ public abstract class PlayerImpl implements Player, Serializable { } } } - @Override + + @Override public LinkedHashMap getUseableActivatedAbilities(MageObject object, Zone zone, Game game) { // TODO: replace with getPlayableFromNonHandCardAll (uses for all tests) boolean previousState = game.inCheckPlayableState(); @@ -1590,16 +1591,16 @@ public abstract class PlayerImpl implements Player, Serializable { getUseableActivatedAbilitiesHalfImpl(splitCard.getRightHalfCard(), zone, game, splitCard.getRightHalfCard().getAbilities(game), useable); getUseableActivatedAbilitiesHalfImpl(splitCard, - zone, game, splitCard.getSharedAbilities(), useable); - } else if (object instanceof Card){ + zone, game, splitCard.getSharedAbilities(game), useable); + } else if (object instanceof Card) { getUseableActivatedAbilitiesHalfImpl(object, - zone, game, ((Card)object).getAbilities(game), useable); + zone, game, ((Card) object).getAbilities(game), useable); } else if (object != null) { getUseableActivatedAbilitiesHalfImpl(object, zone, game, object.getAbilities(), useable); getOtherUseableActivatedAbilities(object, zone, game, useable); } - + game.setCheckPlayableState(previousState); return useable; } @@ -3245,12 +3246,12 @@ public abstract class PlayerImpl implements Player, Serializable { SplitCard splitCard = (SplitCard) card; getPlayableFromNonHandCardSingle(game, fromZone, splitCard.getLeftHalfCard(), splitCard.getLeftHalfCard().getAbilities(), availableMana, output); getPlayableFromNonHandCardSingle(game, fromZone, splitCard.getRightHalfCard(), splitCard.getRightHalfCard().getAbilities(), availableMana, output); - getPlayableFromNonHandCardSingle(game, fromZone, splitCard, splitCard.getSharedAbilities(), availableMana, output); + getPlayableFromNonHandCardSingle(game, fromZone, splitCard, splitCard.getSharedAbilities(game), availableMana, output); } else if (card instanceof AdventureCard) { // adventure must use different card characteristics for different spells (main or adventure) AdventureCard adventureCard = (AdventureCard) card; getPlayableFromNonHandCardSingle(game, fromZone, adventureCard.getSpellCard(), adventureCard.getSpellCard().getAbilities(), availableMana, output); - getPlayableFromNonHandCardSingle(game, fromZone, adventureCard, adventureCard.getSharedAbilities(), availableMana, output); + getPlayableFromNonHandCardSingle(game, fromZone, adventureCard, adventureCard.getSharedAbilities(game), availableMana, output); } else { getPlayableFromNonHandCardSingle(game, fromZone, card, card.getAbilities(), availableMana, output); }