Fixed initialisation of targetPointer in BoostEquippedEffect (fixes #790).

This commit is contained in:
LevelX2 2015-03-11 13:24:11 +01:00
parent 2d1755be2e
commit 8d7087d859
5 changed files with 105 additions and 22 deletions

View file

@ -85,13 +85,13 @@ public class BoostEquippedEffect extends ContinuousEffectImpl {
@Override
public void init(Ability source, Game game) {
super.init(source, game);
if (fixedTarget) {
Permanent equipment = game.getPermanent(source.getSourceId());
if (equipment != null && equipment.getAttachedTo() != null) {
this.setTargetPointer(new FixedTarget(equipment.getAttachedTo()));
}
}
super.init(source, game); // inits the target pointer so call it after setting the targetPointer
}
@Override