[ZNR] Improved modal double faces cards implementation and more tests (#7012)

This commit is contained in:
Oleg Agafonov 2020-10-27 22:07:34 +04:00
parent 19cd742f40
commit e4c8ba046a
3 changed files with 163 additions and 21 deletions

View file

@ -309,7 +309,8 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
// workaround to add dynamic flashback ability from main card to all parts (example: Snapcaster Mage gives flashback to split card)
if (!this.getId().equals(this.getMainCard().getId())) {
CardState mainCardState = game.getState().getCardState(this.getMainCard().getId());
if (mainCardState != null
if (this.getSpellAbility() != null // lands can't be casted (haven't spell ability), so ignore it
&& mainCardState != null
&& !mainCardState.hasLostAllAbilities()
&& mainCardState.getAbilities().containsClass(FlashbackAbility.class)) {
FlashbackAbility flash = new FlashbackAbility(this.getManaCost(), this.isInstant() ? TimingRule.INSTANT : TimingRule.SORCERY);