mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Fixed some prroblems with can't cast effects and morph ability (related to Reflector Mage, Exclusion Ritual and Alhammarret High Arbiter).
This commit is contained in:
parent
3f57012c85
commit
4674b18a51
4 changed files with 30 additions and 13 deletions
|
|
@ -2580,9 +2580,17 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
playable.add(ability);
|
||||
}
|
||||
}
|
||||
} else if (card.getCardType().contains(CardType.LAND) && ability instanceof AlternativeSourceCosts) {
|
||||
if (canLandPlayAlternateSourceCostsAbility(card, availableMana, ability, game)) { // e.g. Land with Morph
|
||||
playable.add(ability);
|
||||
} else if (ability instanceof AlternativeSourceCosts) {
|
||||
if (card.getCardType().contains(CardType.LAND)) {
|
||||
if (canLandPlayAlternateSourceCostsAbility(card, availableMana, ability, game)) { // e.g. Land with Morph
|
||||
playable.add(ability);
|
||||
}
|
||||
} else if (card.getCardType().contains(CardType.CREATURE)) { // e.g. makes a card available for play by Morph if the card may not be cast normally
|
||||
if (!playable.contains(card.getSpellAbility())) {
|
||||
if (((AlternativeSourceCosts) ability).isAvailable(card.getSpellAbility(), game)) {
|
||||
playable.add(card.getSpellAbility());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2701,7 +2709,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
*
|
||||
*/
|
||||
@Override
|
||||
public Set<UUID> getPlayableInHand(Game game) {
|
||||
public Set<UUID> getPlayableInHand(Game game
|
||||
) {
|
||||
Set<UUID> playable = new HashSet<>();
|
||||
if (!shouldSkipGettingPlayable(game)) {
|
||||
ManaOptions available = getManaAvailable(game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue