Merge pull request #3767 from Card-Forge/kevlahnota-patch-5

skip adventure spell if card is already onadventure
This commit is contained in:
kevlahnota
2023-09-17 16:31:38 +08:00
committed by GitHub

View File

@@ -6810,6 +6810,11 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
// this can only be called by the Human
final List<SpellAbility> abilities = Lists.newArrayList();
for (SpellAbility sa : getSpellAbilities()) {
//adventure spell check
if (isAdventureCard() && sa.isAdventure()) {
if (getExiledWith() != null && CardStateName.Adventure.equals(getExiledWith().getCurrentStateName()))
continue; // skip since it's already on adventure
}
//add alternative costs as additional spell abilities
abilities.add(sa);
abilities.addAll(GameActionUtil.getAlternativeCosts(sa, player));