forked from External/mage
Test framework: fixed not working choices for replacement effects;
This commit is contained in:
parent
6c1ae7a049
commit
648026ac0b
2 changed files with 5 additions and 2 deletions
|
|
@ -1406,11 +1406,13 @@ public class TestPlayer implements Player {
|
|||
}
|
||||
if (!choices.isEmpty()) {
|
||||
for (String choice : choices) {
|
||||
for (int index = 0; index < rEffects.size(); index++) {
|
||||
if (choice.equals(rEffects.get(Integer.toString(index)))) {
|
||||
int index = 0;
|
||||
for (Map.Entry<String, String> entry : rEffects.entrySet()) {
|
||||
if (entry.getValue().startsWith(choice)) {
|
||||
choices.remove(choice);
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
// TODO: enable fail checks and fix tests
|
||||
|
|
|
|||
|
|
@ -569,6 +569,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
// set the value for non mana X costs
|
||||
int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variableCost);
|
||||
|
||||
// TODO: rework choose replacement effects to use array, not map (it'a random order now)
|
||||
int chooseReplacementEffect(Map<String, String> abilityMap, Game game);
|
||||
|
||||
TriggeredAbility chooseTriggeredAbility(List<TriggeredAbility> abilities, Game game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue