forked from External/mage
Reworked selected modes handling. That fixed the Subtle Strike targeting problem.
This commit is contained in:
parent
0b118d074e
commit
c9bb0be016
33 changed files with 163 additions and 131 deletions
|
|
@ -99,7 +99,8 @@ public class StackAbilityView extends CardView {
|
|||
|
||||
private void updateTargets(Game game, StackAbility ability) {
|
||||
List<String> names = new ArrayList<>();
|
||||
for (Mode mode : ability.getModes().getSelectedModes()) {
|
||||
for (UUID modeId : ability.getModes().getSelectedModes()) {
|
||||
Mode mode = ability.getModes().get(modeId);
|
||||
if (mode.getTargets().size() > 0) {
|
||||
setTargets(mode.getTargets());
|
||||
} else {
|
||||
|
|
@ -132,7 +133,8 @@ public class StackAbilityView extends CardView {
|
|||
// show for modal ability, which mode was choosen
|
||||
if (ability.isModal()) {
|
||||
Modes modes = ability.getModes();
|
||||
for (Mode mode : modes.getSelectedModes()) {
|
||||
for (UUID modeId : modes.getSelectedModes()) {
|
||||
Mode mode = modes.get(modeId);
|
||||
this.rules.add("<span color='green'><i>Chosen mode: " + mode.getEffects().getText(mode) + "</i></span>");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue