mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
changed some == to .equals()
This commit is contained in:
parent
ffb4ea647f
commit
c535b81bff
5 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue