Merge remote-tracking branch 'core/master'

This commit is contained in:
Anthony Calosa
2021-03-29 18:30:55 +08:00
7 changed files with 40 additions and 15 deletions

View File

@@ -266,11 +266,11 @@ public class TargetSelection {
}
if (((CardView) chosen).getZone().equals(ZoneType.Stack)) {
for (final SpellAbilityStackInstance si : game.getStack()) {
// avoid peeking own SI so target is not changed
if (si.compareToSpellAbility(ability)) {
continue;
}
SpellAbility abilityOnStack = si.getSpellAbility(true);
if (si.compareToSpellAbility(ability)) {
// By peeking at stack item, target is set to its SI state. So set it back before adding targets
ability.resetTargets();
}
if (abilityOnStack.getHostCard().getView().equals(chosen)) {
ability.getTargets().add(abilityOnStack);
break;
@@ -293,11 +293,11 @@ public class TargetSelection {
final Game game = ability.getActivatingPlayer().getGame();
for (final SpellAbilityStackInstance si : game.getStack()) {
// avoid peeking own SI so target is not changed
if (si.compareToSpellAbility(ability)) {
continue;
}
SpellAbility abilityOnStack = si.getSpellAbility(true);
if (si.compareToSpellAbility(ability)) {
// By peeking at stack item, target is set to its SI state. So set it back before adding targets
ability.resetTargets();
}
if (ability.canTargetSpellAbility(abilityOnStack)) {
stackItemViewCache.put(si.getView(), si);
selectOptions.add(si.getView());