mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed handling to show playable cards with alternate costs.
This commit is contained in:
parent
03c7a815f7
commit
73a41aef4a
3 changed files with 19 additions and 10 deletions
|
@ -195,7 +195,9 @@ public class EvokeAbility extends StaticAbility implements AlternativeSourceCost
|
||||||
@Override
|
@Override
|
||||||
public Costs<Cost> getCosts() {
|
public Costs<Cost> getCosts() {
|
||||||
Costs<Cost> alterCosts = new CostsImpl<>();
|
Costs<Cost> alterCosts = new CostsImpl<>();
|
||||||
alterCosts.addAll(evokeCosts);
|
for (AlternativeCost2 aCost: evokeCosts) {
|
||||||
|
alterCosts.add(aCost.getCost());
|
||||||
|
}
|
||||||
return alterCosts;
|
return alterCosts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ import mage.abilities.costs.AlternativeCost2Impl;
|
||||||
import mage.abilities.costs.AlternativeSourceCosts;
|
import mage.abilities.costs.AlternativeSourceCosts;
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.Costs;
|
import mage.abilities.costs.Costs;
|
||||||
|
import mage.abilities.costs.CostsImpl;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
|
@ -200,4 +201,13 @@ public class ProwlAbility extends StaticAbility implements AlternativeSourceCost
|
||||||
|
|
||||||
reminderText = sb.toString();
|
reminderText = sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Costs<Cost> getCosts() {
|
||||||
|
Costs<Cost> alterCosts = new CostsImpl<>();
|
||||||
|
for (AlternativeCost2 aCost: prowlCosts) {
|
||||||
|
alterCosts.add(aCost.getCost());
|
||||||
|
}
|
||||||
|
return alterCosts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2167,9 +2167,6 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
playable.add(ability);
|
playable.add(ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (ability instanceof AlternativeSourceCosts) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2279,12 +2276,12 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {
|
// for (ActivatedAbility ability : card.getAbilities().getActivatedAbilities(Zone.HAND)) {
|
||||||
if (!playable.contains(ability.getSourceId()) && canPlay(ability, available, card, game)) {
|
// if (!playable.contains(ability.getSourceId()) && canPlay(ability, available, card, game)) {
|
||||||
playable.add(card.getId());
|
// playable.add(card.getId());
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue