* GUI: new reworked GUI and card render engine, card icons and dozens of other fixes (see full list in related PR);

This commit is contained in:
Oleg Agafonov 2021-01-30 16:38:55 +04:00
parent df98cc3e62
commit a1da5ef437
304 changed files with 7266 additions and 5093 deletions

View file

@ -15,6 +15,7 @@ import mage.abilities.effects.Effects;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.mana.ManaEffect;
import mage.abilities.hint.Hint;
import mage.abilities.icon.CardIcon;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.cards.Card;
import mage.cards.SplitCard;
@ -70,6 +71,7 @@ public abstract class AbilityImpl implements Ability {
protected TargetAdjuster targetAdjuster = null;
protected CostAdjuster costAdjuster = null;
protected List<Hint> hints = new ArrayList<>();
protected List<CardIcon> icons = new ArrayList<>();
protected Outcome customOutcome = null; // uses for AI decisions instead effects
protected MageIdentifier identifier; // used to identify specific ability (e.g. to match with corresponding watcher)
protected String appendToRule = null;
@ -120,6 +122,9 @@ public abstract class AbilityImpl implements Ability {
for (Hint hint : ability.getHints()) {
this.hints.add(hint.copy());
}
for (CardIcon icon : ability.getIcons()) {
this.icons.add(icon.copy());
}
this.customOutcome = ability.customOutcome;
this.identifier = ability.identifier;
this.activated = ability.activated;
@ -1294,6 +1299,17 @@ public abstract class AbilityImpl implements Ability {
return this;
}
@Override
public List<CardIcon> getIcons() {
return this.icons;
}
@Override
public Ability addIcon(CardIcon cardIcon) {
this.icons.add(cardIcon);
return this;
}
@Override
public Ability addCustomOutcome(Outcome customOutcome) {
this.customOutcome = customOutcome;