Professor Hojo - fixed that it can’t be used on low mana (#13811)

---------

Co-authored-by: thorsten <info@thorstenhacke.de>
This commit is contained in:
Thorsten Hacke 2025-06-30 20:08:11 +02:00 committed by GitHub
parent 08c2fcf82a
commit 08666fcd7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -101,12 +101,18 @@ class ProfessorHojoEffect extends CostModificationEffectImpl {
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
Set<UUID> targets;
if (game.inCheckPlayableState()) {
targets = CardUtil.getAllPossibleTargets(abilityToModify, game);
} else {
targets = CardUtil.getAllSelectedTargets(abilityToModify, game);
}
return game.isActivePlayer(source.getControllerId())
&& abilityToModify.isControlledBy(source.getControllerId())
&& !ProfessorHojoWatcher.checkPlayer(game, source)
&& CardUtil
.getAllSelectedTargets(abilityToModify, game)
.stream()
&& targets.stream()
.map(game::getPermanent)
.filter(Objects::nonNull)
.filter(permanent -> permanent.isCreature(game))