mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
Test framework: fixed support of chooseAbilityForCast for commanders, added destroy target custom effect (#7593);
This commit is contained in:
parent
a377999f57
commit
650acf9e1e
4 changed files with 30 additions and 3 deletions
|
|
@ -1521,7 +1521,14 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
public static LinkedHashMap<UUID, ActivatedAbility> getSpellAbilities(UUID playerId, MageObject object, Zone zone, Game game) {
|
||||
LinkedHashMap<UUID, ActivatedAbility> useable = new LinkedHashMap<>();
|
||||
for (Ability ability : object.getAbilities()) {
|
||||
Abilities<Ability> allAbilities;
|
||||
if (object instanceof Card) {
|
||||
allAbilities = ((Card) object).getAbilities(game);
|
||||
} else {
|
||||
allAbilities = object.getAbilities();
|
||||
}
|
||||
|
||||
for (Ability ability : allAbilities) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
switch (((SpellAbility) ability).getSpellAbilityType()) {
|
||||
case BASE_ALTERNATE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue