forked from External/mage
Improved playable abilities and split cards:
* Now human player uses same code for playable abilities search as test framework (old version used different code, so it could not work in one of the modes); * Split cards - improves playable highlights; * Split cards - fixed that it doesn't work with dynamic added abilities like flashback (#6327, #6470, #6549);
This commit is contained in:
parent
47af865bc3
commit
b94344341b
8 changed files with 399 additions and 186 deletions
|
|
@ -110,11 +110,13 @@ 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
|
||||
if (ability instanceof SpellAbility
|
||||
&& ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT
|
||||
&& ((SpellAbility) ability).getSpellAbilityType() != SpellAbilityType.SPLIT_AFTERMATH) {
|
||||
allAbilites.add(ability);
|
||||
&& (((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT
|
||||
|| ((SpellAbility) ability).getSpellAbilityType() == SpellAbilityType.SPLIT_AFTERMATH)) {
|
||||
continue;
|
||||
}
|
||||
allAbilites.add(ability);
|
||||
}
|
||||
allAbilites.addAll(leftHalfCard.getAbilities());
|
||||
allAbilites.addAll(rightHalfCard.getAbilities());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue