[BLC] Implement Fortune Teller's Talent (#12608)

* Implement Fortune Teller's Talent

* Remove outdated assert from PlayFromTopOfLibraryEffect and update comment
This commit is contained in:
jimga150 2024-07-31 22:45:59 -04:00 committed by GitHub
parent 8ed3c0c12d
commit ee3cab84ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 185 additions and 6 deletions

View file

@ -31,17 +31,12 @@ public class PlayFromTopOfLibraryEffect extends AsThoughEffectImpl {
}
/**
* You may [play lands and/or cast spells, according to filter] from the top of your library
* You may [play lands/cast spells/play cards, according to filter] from the top of your library
*/
public PlayFromTopOfLibraryEffect(FilterCard filter) {
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
this.filter = filter;
this.staticText = "you may " + filter.getMessage() + " from the top of your library";
// verify check: this ability is to allow playing lands or casting spells, not playing a "card"
if (filter.getMessage().toLowerCase(Locale.ENGLISH).contains("card")) {
throw new IllegalArgumentException("Wrong code usage or wrong filter text: PlayTheTopCardEffect");
}
}
protected PlayFromTopOfLibraryEffect(final PlayFromTopOfLibraryEffect effect) {