Fix Twenty-Toed Toad

This commit is contained in:
PurpleCrowbar 2024-08-14 03:01:13 +01:00
parent 1cd28fbfdb
commit f64428ac4b

View file

@ -65,11 +65,7 @@ enum TwentyToedToadCondition implements Condition {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId()); Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (player == null || permanent == null) { return player != null && (player.getHand().size() >= 20 || (permanent != null && permanent.getCounters(game).getTotalCount() >= 20));
return false;
}
return permanent.getCounters(game).getTotalCount() >= 20
|| player.getHand().size() >= 20;
} }
} }