refactor: improved usage of target pointers

This commit is contained in:
Oleg Agafonov 2024-02-18 15:38:53 +04:00
parent 78612ddc91
commit 46d751f996
476 changed files with 548 additions and 563 deletions

View file

@ -42,11 +42,11 @@ public class LoseLifeTargetControllerEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
MageObject targetCard = targetPointer.getFirstTargetPermanentOrLKI(game, source);
MageObject targetCard = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
// if target is a countered spell
if (targetCard == null) {
targetCard = game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
targetCard = game.getLastKnownInformation(getTargetPointer().getFirst(game, source), Zone.STACK);
}
if (targetCard != null) {