Skip to content

Commit

Permalink
Little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Jan 9, 2020
1 parent b011ddf commit ab1475d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion Mage.Server/src/main/java/mage/server/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ public boolean isExpired(Date expired) {

private void reconnect() {
logger.trace(userName + " started reconnect");
//lastActivity = new Date(); // ??? comment to test can't reconnect to game on disconnect
for (Entry<UUID, Table> entry : tables.entrySet()) {
ccJoinedTable(entry.getValue().getRoomId(), entry.getValue().getId(), entry.getValue().isTournament());
}
Expand Down
2 changes: 1 addition & 1 deletion Mage.Sets/src/mage/cards/o/OathOfMages.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean apply(Game game, Ability source) {
if (sourceObject == null || firstPlayer == null) {
return false;
}
if (firstPlayer.chooseUse(outcome, "Deal one damage to " + secondPlayer.getLogName() + "?", source, game)) {
if (firstPlayer.chooseUse(Outcome.Benefit, "Deal one damage to " + secondPlayer.getLogName() + "?", source, game)) {
secondPlayer.damage(1, source.getSourceId(), game, false, true);
}
return true;
Expand Down
8 changes: 4 additions & 4 deletions Mage/src/main/java/mage/MageInt.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

package mage;

import mage.util.CardUtil;
import mage.util.Copyable;

import java.io.Serializable;
import java.util.Objects;

import mage.util.Copyable;

public class MageInt implements Serializable, Copyable<MageInt> {

public static final MageInt EmptyMageInt = new MageInt(Integer.MIN_VALUE, "") {
Expand Down Expand Up @@ -80,7 +80,7 @@ public void setValue(int value) {
}

public void boostValue(int amount) {
this.boostedValue += amount;
this.boostedValue = CardUtil.addWithOverflowCheck(this.boostedValue, amount);
}

public void resetToBaseValue() {
Expand Down
10 changes: 5 additions & 5 deletions Mage/src/main/java/mage/game/permanent/PermanentImpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package mage.game.permanent;

import java.util.*;
import mage.MageObject;
import mage.MageObjectReference;
import mage.ObjectColor;
Expand Down Expand Up @@ -38,6 +37,8 @@
import mage.util.ThreadLocalStringBuilder;
import org.apache.log4j.Logger;

import java.util.*;

/**
* @author BetaSteward_at_googlemail.com
*/
Expand Down Expand Up @@ -757,7 +758,7 @@ public void attachTo(UUID attachToObjectId, Game game) {
this.attachedTo = attachToObjectId;
this.attachedToZoneChangeCounter = game.getState().getZoneChangeCounter(attachToObjectId);
for (Ability ability : this.getAbilities()) {
for (Iterator<Effect> ite = ability.getEffects(game, EffectType.CONTINUOUS).iterator(); ite.hasNext();) {
for (Iterator<Effect> ite = ability.getEffects(game, EffectType.CONTINUOUS).iterator(); ite.hasNext(); ) {
ContinuousEffect effect = (ContinuousEffect) ite.next();
game.getContinuousEffects().setOrder(effect);
// It's important to update the timestamp of the copied effect in ContinuousEffects because it does the action
Expand Down Expand Up @@ -812,8 +813,8 @@ public int damage(int damage, UUID sourceId, Game game, boolean combat, boolean
* @param game
* @param preventable
* @param combat
* @param markDamage If true, damage will be dealt later in applyDamage
* method
* @param markDamage If true, damage will be dealt later in applyDamage
* method
* @return
*/
private int damage(int damageAmount, UUID sourceId, Game game, boolean preventable, boolean combat, boolean markDamage, List<UUID> appliedEffects) {
Expand Down Expand Up @@ -952,7 +953,6 @@ protected int damageCreature(int damage, UUID sourceId, Game game, boolean preve
addCounters(CounterType.M1M1.createInstance(actualDamage), damageSourceAbility, game);
}
} else {
// this.damage += actualDamage;
this.damage = CardUtil.addWithOverflowCheck(this.damage, actualDamage);
}
game.fireEvent(new DamagedCreatureEvent(objectId, sourceId, controllerId, actualDamage, combat));
Expand Down

0 comments on commit ab1475d

Please sign in to comment.