mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Helm of the Host: Fix the return values for ability; use getPermanentOrLKIBattlefield to find the equipped creature
This commit is contained in:
parent
661089c590
commit
05e4389993
1 changed files with 4 additions and 5 deletions
|
@ -99,17 +99,16 @@ class HelmOfTheHostEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent equipment = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (equipment == null) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Permanent creature = game.getPermanent(equipment.getAttachedTo());
|
||||
Permanent creature = game.getPermanentOrLKIBattlefield(equipment.getAttachedTo());
|
||||
if (creature == null) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId(), null, true);
|
||||
effect.setTargetPointer(new FixedTarget(creature, game));
|
||||
effect.setIsntLegendary(true);
|
||||
effect.apply(game, source);
|
||||
return true;
|
||||
return effect.apply(game, source);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue