mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
* Fixed possible exception during choosing replacement effect resolve order.
This commit is contained in:
parent
34d7141821
commit
bda59fafcf
1 changed files with 7 additions and 5 deletions
|
@ -197,12 +197,14 @@ public class HumanPlayer extends PlayerImpl {
|
|||
} else {
|
||||
replacementEffectChoice.setChoiceByKey(response.getString());
|
||||
}
|
||||
int index = 0;
|
||||
for (String key : rEffects.keySet()) {
|
||||
if (replacementEffectChoice.getChoiceKey().equals(key)) {
|
||||
return index;
|
||||
if (replacementEffectChoice.getChoiceKey() != null) {
|
||||
int index = 0;
|
||||
for (String key : rEffects.keySet()) {
|
||||
if (replacementEffectChoice.getChoiceKey().equals(key)) {
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue