mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Refactored RegenerateTargetEffect to use targetPointer.
This commit is contained in:
parent
6eb6532614
commit
0cc7945720
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ public class RegenerateTargetEffect extends ReplacementEffectImpl<RegenerateTar
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
//20110204 - 701.11
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
Permanent permanent = game.getPermanent(targetPointer.getFirst(source));
|
||||
if (permanent != null) {
|
||||
permanent.tap(game);
|
||||
permanent.removeFromCombat(game);
|
||||
|
@ -79,7 +79,7 @@ public class RegenerateTargetEffect extends ReplacementEffectImpl<RegenerateTar
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
//20110204 - 701.11c - event.getAmount() is used to signal if regeneration is allowed
|
||||
if (event.getType() == EventType.DESTROY_PERMANENT && event.getAmount() == 0 && event.getTargetId().equals(source.getFirstTarget()) && !this.used) {
|
||||
if (event.getType() == EventType.DESTROY_PERMANENT && event.getAmount() == 0 && event.getTargetId().equals(targetPointer.getFirst(source)) && !this.used) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue