- Fix the auto-yield shortcut code to allow the player to set up auto-yields for the opponent's abilities.

This commit is contained in:
Agetian
2015-09-11 19:01:29 +00:00
parent d55d81ff08
commit f87d6e7a20

View File

@@ -139,7 +139,7 @@ public class KeyboardShortcuts {
if (!Singletons.getControl().getCurrentScreen().isMatchScreen()) { return; } if (!Singletons.getControl().getCurrentScreen().isMatchScreen()) { return; }
if (matchUI == null) { return; } if (matchUI == null) { return; }
StackItemView si = matchUI.getGameView().peekStack(); StackItemView si = matchUI.getGameView().peekStack();
if (si != null && si.isAbility() && matchUI.isLocalPlayer(si.getActivatingPlayer())) { if (si != null && si.isAbility()) {
matchUI.setShouldAutoYield(si.getKey(), true); matchUI.setShouldAutoYield(si.getKey(), true);
int triggerID = Integer.valueOf(si.getSourceTrigger()); int triggerID = Integer.valueOf(si.getSourceTrigger());
if (si.isOptionalTrigger()) { if (si.isOptionalTrigger()) {
@@ -157,7 +157,7 @@ public class KeyboardShortcuts {
if (!Singletons.getControl().getCurrentScreen().isMatchScreen()) { return; } if (!Singletons.getControl().getCurrentScreen().isMatchScreen()) { return; }
if (matchUI == null) { return; } if (matchUI == null) { return; }
StackItemView si = matchUI.getGameView().peekStack(); StackItemView si = matchUI.getGameView().peekStack();
if (si != null && si.isAbility() && matchUI.isLocalPlayer(si.getActivatingPlayer())) { if (si != null && si.isAbility()) {
matchUI.setShouldAutoYield(si.getKey(), true); matchUI.setShouldAutoYield(si.getKey(), true);
int triggerID = Integer.valueOf(si.getSourceTrigger()); int triggerID = Integer.valueOf(si.getSourceTrigger());
if (si.isOptionalTrigger()) { if (si.isOptionalTrigger()) {