mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Fixed that cards without cost (e.g. Ancestral Vision) could be cast from graveyard (e.g. by using Yawgmoth Will). Fixed that cards could be suspended from graveyard (e.g. with Yawgmoth Will).
This commit is contained in:
parent
8bab182f8a
commit
9f22eb0688
6 changed files with 134 additions and 17 deletions
|
|
@ -234,6 +234,10 @@ public class SuspendAbility extends ActivatedAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean canActivate(UUID playerId, Game game) {
|
||||
if (!game.getState().getZone(getSourceId()).equals(Zone.HAND)) {
|
||||
// Supend can only be activated from hand
|
||||
return false;
|
||||
}
|
||||
MageObject object = game.getObject(sourceId);
|
||||
return (object.getCardType().contains(CardType.INSTANT)
|
||||
|| object.hasAbility(FlashAbility.getInstance().getId(), game)
|
||||
|
|
|
|||
|
|
@ -1291,6 +1291,9 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
if (Zone.GRAVEYARD.equals(zone) && canPlayCardsFromGraveyard()) {
|
||||
for (ActivatedAbility ability : object.getAbilities().getPlayableAbilities(Zone.HAND)) {
|
||||
if (canUse || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) {
|
||||
if (ability.getManaCosts().isEmpty() && ability.getCosts().isEmpty() && ability instanceof SpellAbility) {
|
||||
continue; // You can't play spells from graveyard that have no costs
|
||||
}
|
||||
if (ability.canActivate(playerId, game)) {
|
||||
useable.put(ability.getId(), ability);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue