[AFR] Froghemoth - Remove unneeded getPlayer calls

This commit is contained in:
Daniel Bomar 2021-07-01 21:30:22 -05:00
parent 18b7d40ba3
commit 8e3b246f59
No known key found for this signature in database
GPG key ID: C86C8658F4023918

View file

@ -78,15 +78,11 @@ class FroghemothTriggeredAbility extends DealsCombatDamageToAPlayerTriggeredAbil
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (super.checkTrigger(event, game)) {
Player controller = game.getPlayer(getControllerId());
Player damagedPlayer = game.getPlayer(event.getPlayerId());
if (controller != null && damagedPlayer != null) {
FilterCard filter = new FilterCard("cards from defender's graveyard");
filter.add(new OwnerIdPredicate(damagedPlayer.getId()));
this.getTargets().clear();
this.addTarget(new TargetCardInGraveyard(0, event.getAmount(), filter));
return true;
}
FilterCard filter = new FilterCard("cards from defender's graveyard");
filter.add(new OwnerIdPredicate(event.getPlayerId()));
this.getTargets().clear();
this.addTarget(new TargetCardInGraveyard(0, event.getAmount(), filter));
return true;
}
return false;
}