staticAbilities = ca.getStaticAbilities();
for (final StaticAbility stAb : staticAbilities) {
if (stAb.applyAbility("CantBeActivated", c, this)) {
@@ -101,11 +100,6 @@ public abstract class AbilityActivated extends SpellAbility implements java.io.S
return false;
}
- if (this.isCycling()
- && game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCycling)) {
- return false;
- }
-
if (!(this.getRestrictions().canPlay(c, this))) {
return false;
}
diff --git a/forge-game/src/main/java/forge/game/spellability/AbilityManaPart.java b/forge-game/src/main/java/forge/game/spellability/AbilityManaPart.java
index 9dfae9446b8..da064a4cbd6 100644
--- a/forge-game/src/main/java/forge/game/spellability/AbilityManaPart.java
+++ b/forge-game/src/main/java/forge/game/spellability/AbilityManaPart.java
@@ -17,36 +17,30 @@
*/
package forge.game.spellability;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import forge.card.mana.ManaAtom;
-import forge.game.ability.AbilityKey;
-import forge.game.trigger.Trigger;
-import forge.game.trigger.TriggerHandler;
-import forge.util.TextUtil;
-import org.apache.commons.lang3.StringUtils;
-
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-
import forge.card.ColorSet;
import forge.card.MagicColor;
+import forge.card.mana.ManaAtom;
import forge.game.ability.AbilityFactory;
+import forge.game.ability.AbilityKey;
import forge.game.card.Card;
import forge.game.card.CardFactoryUtil;
import forge.game.card.CounterType;
import forge.game.mana.Mana;
import forge.game.mana.ManaPool;
import forge.game.player.Player;
-import forge.game.replacement.ReplacementEffect;
-import forge.game.replacement.ReplacementHandler;
-import forge.game.replacement.ReplacementLayer;
-import forge.game.replacement.ReplacementResult;
-import forge.game.replacement.ReplacementType;
+import forge.game.replacement.*;
+import forge.game.trigger.Trigger;
+import forge.game.trigger.TriggerHandler;
import forge.game.trigger.TriggerType;
+import forge.util.TextUtil;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
*
@@ -129,7 +123,7 @@ public class AbilityManaPart implements java.io.Serializable {
final ManaPool manaPool = player.getManaPool();
String afterReplace = applyManaReplacement(sa, produced);
final Map repParams = AbilityKey.mapFromAffected(source);
- repParams.put(AbilityKey.Mana, afterReplace);
+ repParams.put(AbilityKey.Mana, produced);
repParams.put(AbilityKey.Player, player);
repParams.put(AbilityKey.AbilityMana, sa);
if (player.getGame().getReplacementHandler().run(ReplacementType.ProduceMana, repParams) != ReplacementResult.NotReplaced) {
@@ -149,14 +143,6 @@ public class AbilityManaPart implements java.io.Serializable {
if (attemptedMana == 0) {
attemptedMana = (byte)ManaAtom.COLORLESS;
}
- // Commander has removed rule #4 (mana generation restriction) due to Colorless mana mattering
- /*
- if (CID != null) {
- if (!CID.hasAnyColor(attemptedMana)) {
- attemptedMana = (byte)ManaAtom.COLORLESS;
- }
- }
- */
this.lastManaProduced.add(new Mana(attemptedMana, source, this));
}
diff --git a/forge-game/src/main/java/forge/game/spellability/AlternativeCost.java b/forge-game/src/main/java/forge/game/spellability/AlternativeCost.java
new file mode 100644
index 00000000000..41f75125da0
--- /dev/null
+++ b/forge-game/src/main/java/forge/game/spellability/AlternativeCost.java
@@ -0,0 +1,18 @@
+package forge.game.spellability;
+
+public enum AlternativeCost {
+ Awaken,
+ Bestow,
+ Cycling, // ActivatedAbility
+ Dash,
+ Emerge,
+ Escape,
+ Evoke,
+ Flashback,
+ Offering,
+ Outlast, // ActivatedAbility
+ Prowl,
+ Spectacle,
+ Surge;
+
+}
diff --git a/forge-game/src/main/java/forge/game/spellability/Spell.java b/forge-game/src/main/java/forge/game/spellability/Spell.java
index 51a83100632..87fbb0d4e84 100644
--- a/forge-game/src/main/java/forge/game/spellability/Spell.java
+++ b/forge-game/src/main/java/forge/game/spellability/Spell.java
@@ -118,7 +118,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
lkicheck = true;
}
- if (hasParam("Bestow") && !card.isBestowed() && !card.isInZone(ZoneType.Battlefield)) {
+ if (isBestow() && !card.isBestowed() && !card.isInZone(ZoneType.Battlefield)) {
// Rule 601.3: cast Bestow with Flash
// for the check the card does need to be animated
// otherwise the StaticAbility will not found them
@@ -184,15 +184,14 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
}
}
- return checkOtherRestrictions();
+ return checkOtherRestrictions(card);
} // canPlay()
- public boolean checkOtherRestrictions() {
- final Card source = this.getHostCard();
+ public boolean checkOtherRestrictions(final Card source) {
Player activator = getActivatingPlayer();
final Game game = activator.getGame();
// CantBeCast static abilities
- final CardCollection allp = new CardCollection(game.getCardsIn(ZoneType.listValueOf("Battlefield,Command")));
+ final CardCollection allp = new CardCollection(game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES));
allp.add(source);
for (final Card ca : allp) {
final FCollectionView staticAbilities = ca.getStaticAbilities();
diff --git a/forge-game/src/main/java/forge/game/spellability/SpellAbility.java b/forge-game/src/main/java/forge/game/spellability/SpellAbility.java
index 55760357af4..66d83c5a483 100644
--- a/forge-game/src/main/java/forge/game/spellability/SpellAbility.java
+++ b/forge-game/src/main/java/forge/game/spellability/SpellAbility.java
@@ -101,19 +101,11 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private int sourceTrigger = -1;
private List