mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Fixed CostChange abilities affecting unless costs.
This commit is contained in:
@@ -31,7 +31,8 @@ import forge.Singletons;
|
||||
import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.cost.Cost;
|
||||
import forge.card.cost.CostUtil;
|
||||
import forge.card.spellability.AbilityActivated;
|
||||
import forge.card.spellability.Ability;
|
||||
import forge.card.spellability.AbilityStatic;
|
||||
import forge.card.spellability.AbilitySub;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.SpellAbilityCondition;
|
||||
@@ -2739,18 +2740,12 @@ public class AbilityFactory {
|
||||
}*/
|
||||
final Cost cost = new Cost(source, unlessCost, true);
|
||||
|
||||
final SpellAbility ability = new AbilityActivated(source, cost, null) {
|
||||
private static final long serialVersionUID = 2502577469482777440L;
|
||||
final Ability ability = new AbilityStatic(source, cost, null) {
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
// nothing to do here
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbilityActivated getCopy() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
final Command paidCommand = new Command() {
|
||||
|
||||
@@ -23,6 +23,7 @@ import forge.Card;
|
||||
import forge.card.cardfactory.CardFactoryUtil;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.card.spellability.AbilityActivated;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.spellability.Target;
|
||||
import forge.game.player.Player;
|
||||
@@ -66,7 +67,7 @@ public class StaticAbilityCostChange {
|
||||
if (params.get("Type").equals("Spell") && !sa.isSpell()) {
|
||||
return originalCost;
|
||||
}
|
||||
if (params.get("Type").equals("Ability") && !sa.isAbility()) {
|
||||
if (params.get("Type").equals("Ability") && !(sa instanceof AbilityActivated)) {
|
||||
return originalCost;
|
||||
}
|
||||
}
|
||||
@@ -162,7 +163,7 @@ public class StaticAbilityCostChange {
|
||||
if (params.get("Type").equals("Spell") && !sa.isSpell()) {
|
||||
return originalCost;
|
||||
}
|
||||
if (params.get("Type").equals("Ability") && !sa.isAbility()) {
|
||||
if (params.get("Type").equals("Ability") && !(sa instanceof AbilityActivated)) {
|
||||
return originalCost;
|
||||
}
|
||||
if (params.get("Type").equals("Cycling") && !sa.isCycling()) {
|
||||
|
||||
Reference in New Issue
Block a user