Reworked asThough effects:

* Game: improved asThough effects processing and combo with different cards/abilities (e.g. adventure cards, play from non own hand, etc);
 * AI: computer can see and play non hand cards with dynamic effects in all zones (not only graveyard);
 * AI: computer can see and play "as though" mana and alternative costs;
 * UI: added non hand cards highlights of available abilities/cards;
This commit is contained in:
Oleg Agafonov 2019-12-14 18:47:56 +04:00
parent 6791aea98e
commit d271feb0cb
6 changed files with 258 additions and 70 deletions

View file

@ -4,7 +4,8 @@ import mage.abilities.Abilities;
import mage.abilities.AbilitiesImpl;
import mage.abilities.Ability;
import mage.abilities.SpellAbility;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.game.Game;
import java.util.List;
@ -26,7 +27,7 @@ public abstract class AdventureCard extends CardImpl {
public AdventureCard(AdventureCard card) {
super(card);
this.spellCard = card.getSpellCard().copy();
((AdventureCardSpell)this.spellCard).setParentCard(this);
((AdventureCardSpell) this.spellCard).setParentCard(this);
}
public Card getSpellCard() {
@ -91,6 +92,11 @@ public abstract class AdventureCard extends CardImpl {
return allAbilities;
}
public Abilities<Ability> getSharedAbilities() {
// abilities without spellcard
return super.getAbilities();
}
@Override
public void setOwnerId(UUID ownerId) {
super.setOwnerId(ownerId);