implement [MH3] Nethergoyf, refactor targets usages by game param (#12267)

This commit is contained in:
Susucre 2024-05-21 13:34:38 +02:00 committed by GitHub
parent 88b6f4036f
commit 754b382e78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 592 additions and 285 deletions

View file

@ -143,7 +143,7 @@ public abstract class TargetImpl implements Target {
}
@Override
public String getMessage() {
public String getMessage(Game game) {
// UI choose message
String suffix = "";
if (this.chooseHint != null) {
@ -215,7 +215,7 @@ public abstract class TargetImpl implements Target {
}
@Override
public boolean isChosen() {
public boolean isChosen(Game game) {
if (getMaxNumberOfTargets() == 0 && getNumberOfTargets() == 0) {
return true;
}
@ -223,7 +223,7 @@ public abstract class TargetImpl implements Target {
}
@Override
public boolean doneChoosing() {
public boolean doneChoosing(Game game) {
return getMaxNumberOfTargets() != 0 && targets.size() == getMaxNumberOfTargets();
}
@ -332,7 +332,7 @@ public abstract class TargetImpl implements Target {
return chosen;
}
chosen = targets.size() >= getNumberOfTargets();
} while (!isChosen() && !doneChoosing());
} while (!isChosen(game) && !doneChoosing(game));
return chosen;
}
@ -375,7 +375,7 @@ public abstract class TargetImpl implements Target {
}
}
chosen = targets.size() >= getNumberOfTargets();
} while (!isChosen() && !doneChoosing());
} while (!isChosen(game) && !doneChoosing(game));
return chosen;
}