mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Backlash - fixed that it deals damage from source instead from target permanent (#7211);
This commit is contained in:
parent
053bd88973
commit
743ff0e114
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue