changed some == to .equals()

This commit is contained in:
igoudt 2018-03-22 23:37:07 +01:00
parent ffb4ea647f
commit c535b81bff
5 changed files with 5 additions and 5 deletions

View file

@ -100,7 +100,7 @@ public class SpellAbility extends ActivatedAbilityImpl {
// fix for Gitaxian Probe and casting opponent's spells
if (!game.getContinuousEffects().asThough(getSourceId(), AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, playerId, game)) {
Card card = game.getCard(sourceId);
if (!(card != null && card.getOwnerId() == playerId)) {
if (!(card != null && card.getOwnerId().equals(playerId))) {
return false;
}
}

View file

@ -3058,7 +3058,7 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public void setMonarchId(Ability source, UUID monarchId) {
if (monarchId == getMonarchId()) { // Nothing happens if you're already the monarch
if (monarchId.equals(getMonarchId())) { // Nothing happens if you're already the monarch
return;
}
Player newMonarch = getPlayer(monarchId);

View file

@ -63,7 +63,7 @@ public class CastSpellYourLastTurnWatcher extends Watcher {
lastActivePlayer = game.getActivePlayerId();
if (event.getType() == GameEvent.EventType.SPELL_CAST) {
UUID playerId = event.getPlayerId();
if (playerId != null && lastActivePlayer != null && playerId == lastActivePlayer) {
if (playerId != null && lastActivePlayer != null && playerId.equals(lastActivePlayer)) {
amountOfSpellsCastOnCurrentTurn.putIfAbsent(playerId, 0);
amountOfSpellsCastOnCurrentTurn.compute(playerId, (k, a) -> a + 1);
}