forked from External/mage
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:
parent
08c2fcf82a
commit
08666fcd7b
1 changed files with 9 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue