forked from External/mage
Improved commander support for mdf/split/adventure cards (additional fixes for ac98a3a31a)
This commit is contained in:
parent
9416c6140a
commit
9b8df48183
12 changed files with 148 additions and 60 deletions
|
|
@ -127,7 +127,8 @@ public abstract class SplitCard extends CardImpl {
|
|||
public Abilities<Ability> getAbilities() {
|
||||
Abilities<Ability> allAbilites = new AbilitiesImpl<>();
|
||||
for (Ability ability : super.getAbilities()) {
|
||||
// ignore split abilities TODO: why it here, for GUI's cleanup in card texts? Maybe it can be removed
|
||||
// ignore split abilities
|
||||
// TODO: why it here, for GUI's cleanup in card texts? Maybe it can be removed, see mdf cards
|
||||
if (ability instanceof SpellAbility
|
||||
&& (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT
|
||||
|| ((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH)) {
|
||||
|
|
@ -140,6 +141,12 @@ public abstract class SplitCard extends CardImpl {
|
|||
return allAbilites;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Abilities<Ability> getInitAbilities() {
|
||||
// must init only full split card aiblities like fuse, parts must be init separately
|
||||
return super.getAbilities();
|
||||
}
|
||||
|
||||
/**
|
||||
* Currently only gets the fuse SpellAbility if there is one, but generally
|
||||
* gets any abilities on a split card as a whole, and not on either half
|
||||
|
|
@ -155,7 +162,8 @@ public abstract class SplitCard extends CardImpl {
|
|||
public Abilities<Ability> getAbilities(Game game) {
|
||||
Abilities<Ability> allAbilites = new AbilitiesImpl<>();
|
||||
for (Ability ability : super.getAbilities(game)) {
|
||||
// ignore split abilities TODO: why it here, for GUI's cleanup in card texts? Maybe it can be removed
|
||||
// ignore split abilities
|
||||
// TODO: why it here, for GUI's cleanup in card texts? Maybe it can be removed, see mdf cards
|
||||
if (ability instanceof SpellAbility
|
||||
&& (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT
|
||||
|| ((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue