mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Fixes phase skipping for human
This commit is contained in:
@@ -49,14 +49,12 @@ public abstract class PlayerController {
|
|||||||
|
|
||||||
|
|
||||||
public boolean mayAutoPass(PhaseType phase) {
|
public boolean mayAutoPass(PhaseType phase) {
|
||||||
|
|
||||||
return phase.isBefore(autoPassUntil);
|
return phase.isBefore(autoPassUntil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
||||||
boolean isLocalPlayer = getPlayer().equals(Singletons.getControl().getPlayer());
|
return false; // human has it's overload
|
||||||
return isLocalPlayer && !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ import forge.item.CardPrinted;
|
|||||||
*/
|
*/
|
||||||
public class PlayerControllerHuman extends PlayerController {
|
public class PlayerControllerHuman extends PlayerController {
|
||||||
|
|
||||||
|
|
||||||
private PhaseType autoPassUntil = null;
|
|
||||||
|
|
||||||
private final Input defaultInput;
|
private final Input defaultInput;
|
||||||
private final Input blockInput;
|
private final Input blockInput;
|
||||||
private final Input cleanupInput;
|
private final Input cleanupInput;
|
||||||
@@ -55,15 +52,9 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
cleanupInput = new InputCleanup(game);
|
cleanupInput = new InputCleanup(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean mayAutoPass(PhaseType phase) {
|
@Override
|
||||||
|
|
||||||
return phase.isBefore(autoPassUntil);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
public boolean isUiSetToSkipPhase(final Player turn, final PhaseType phase) {
|
||||||
boolean isLocalPlayer = getPlayer().equals(Singletons.getControl().getPlayer());
|
return !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
||||||
return isLocalPlayer && !CMatchUI.SINGLETON_INSTANCE.stopAtPhase(turn, phase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user