mirror of
https://github.com/correl/mage.git
synced 2025-03-29 17:00:07 -09:00
Merge origin/master
This commit is contained in:
commit
75b8a4b165
2 changed files with 10 additions and 2 deletions
Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human
Mage.Sets/src/mage/cards/s
|
@ -152,8 +152,16 @@ public class HumanPlayer extends PlayerImpl {
|
|||
protected void waitResponseOpen() {
|
||||
// wait response open for answer process
|
||||
int numTimesWaiting = 0;
|
||||
while (!responseOpenedForAnswer && canRespond() && numTimesWaiting < 300) {
|
||||
while (!responseOpenedForAnswer && canRespond()) {
|
||||
numTimesWaiting ++;
|
||||
if (numTimesWaiting >= 300) {
|
||||
// game freezed -- need to report about error and continue to execute
|
||||
String s = "Game freezed in waitResponseOpen for user " + getName();
|
||||
Throwable th = new IllegalStateException(s);
|
||||
logger.error(s, th);
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class SwordOfWarAndPeaceAbility extends TriggeredAbilityImpl {
|
|||
public SwordOfWarAndPeaceAbility() {
|
||||
super(Zone.BATTLEFIELD, new SwordOfWarAndPeaceDamageEffect());
|
||||
this.addEffect(new GainLifeEffect(new CardsInControllerHandCount()));
|
||||
this.addTarget(new TargetPlayer());
|
||||
this.addTarget(new TargetPlayer(1, 1, true));
|
||||
}
|
||||
|
||||
public SwordOfWarAndPeaceAbility(final SwordOfWarAndPeaceAbility ability) {
|
||||
|
|
Loading…
Add table
Reference in a new issue