Remove obsolete adjustCosts and adjustTargets methods from MageObject interface

This commit is contained in:
Alex W. Jackson 2022-03-12 19:01:59 -05:00
parent a5e21b8c9e
commit 79b7a0a627
15 changed files with 13 additions and 116 deletions

View file

@ -124,8 +124,7 @@ public class SimulatedPlayer2 extends ComputerPlayer {
// calculate the mana that can be used for the x part
int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().manaValue();
Card card = game.getCard(ability.getSourceId());
if (card != null && numAvailable > 0) {
if (numAvailable > 0) {
// check if variable mana costs is included and get the multiplier
VariableManaCost variableManaCost = null;
for (ManaCost cost : ability.getManaCostsToPay()) {
@ -159,7 +158,7 @@ public class SimulatedPlayer2 extends ComputerPlayer {
if (varCost != null) {
varCost.setPaid();
}
card.adjustTargets(newAbility, game);
newAbility.adjustTargets(game);
// add the different possible target option for the specific X value
if (!newAbility.getTargets().getUnchosen().isEmpty()) {
addTargetOptions(options, newAbility, targetNum, game);