mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Merge pull request #2597 from spjspj/master
spjspj - Force stop and stop skip for when there's potential attackers
This commit is contained in:
commit
9a4d5ca15e
3 changed files with 8 additions and 6 deletions
|
@ -564,7 +564,6 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
artifactCounter,
|
||||
enchantmentCounter,
|
||||
instantCounter,
|
||||
sorceryCounter,
|
||||
planeswalkerCounter,
|
||||
sorceryCounter,
|
||||
tribalCounter
|
||||
|
|
|
@ -912,10 +912,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
FilterCreatureForCombat filter = filterCreatureForCombat.copy();
|
||||
filter.add(new ControllerIdPredicate(attackingPlayerId));
|
||||
while (!abort) {
|
||||
if (passedAllTurns || passedUntilEndStepBeforeMyTurn
|
||||
|| (!getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction() && (passedTurn || passedTurnSkipStack || passedUntilEndOfTurn || passedUntilNextMain))) {
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Serializable> options = new HashMap<>();
|
||||
|
||||
List<UUID> possibleAttackers = new ArrayList<>();
|
||||
|
@ -927,6 +924,12 @@ public class HumanPlayer extends PlayerImpl {
|
|||
options.put(Constants.Option.POSSIBLE_ATTACKERS, (Serializable) possibleAttackers);
|
||||
if (possibleAttackers.size() > 0) {
|
||||
options.put(Constants.Option.SPECIAL_BUTTON, (Serializable) "All attack");
|
||||
if (getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction()) {
|
||||
resetPlayerPassedActions();
|
||||
}
|
||||
} else if (passedAllTurns || passedUntilEndStepBeforeMyTurn
|
||||
|| (!getUserData().getUserSkipPrioritySteps().isStopOnDeclareAttackersDuringSkipAction() && (passedTurn || passedTurnSkipStack || passedUntilEndOfTurn || passedUntilNextMain))) {
|
||||
return;
|
||||
}
|
||||
|
||||
game.fireSelectEvent(playerId, "Select attackers", options);
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ChatManager {
|
|||
}
|
||||
|
||||
private boolean containsSwearing(String message) {
|
||||
if (message != null && message.toLowerCase().matches("^.*(anal|asshole|balls|bastard|bitch|blowjob|cock|crap|cunt|damn|dick|douche|fag|fuck|idiot|moron|piss|prick|pussy|rape|rapist|sex|screw you|shit|slut|vagina).*$")) {
|
||||
if (message != null && message.toLowerCase().matches("^.*(anal|asshole|balls|bastard|bitch|blowjob|cock|crap|cunt|cum|damn|dick|dildo|douche|fag|fuck|idiot|moron|piss|prick|pussy|rape|rapist|sex|screw|shit|slut|vagina).*$")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue