* Backlash - fixed that it deals damage from source instead from target permanent (#7211);

This commit is contained in:
Oleg Agafonov 2020-12-26 00:28:55 +04:00
parent 053bd88973
commit 743ff0e114

View file

@ -63,16 +63,15 @@ class BacklashEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
boolean applied = false;
Permanent targetCreature = game.getPermanent(targetPointer.getFirst(game, source));
if (targetCreature != null) {
applied = targetCreature.tap(source, game);
targetCreature.tap(source, game);
Player controller = game.getPlayer(targetCreature.getControllerId());
if (controller != null) {
controller.damage(targetCreature.getPower().getValue(), source.getSourceId(), source, game);
applied = true;
controller.damage(targetCreature.getPower().getValue(), targetCreature.getId(), source, game);
return true;
}
}
return applied;
return false;
}
}