small Sonar fixes

This commit is contained in:
Ingmar Goudt 2021-08-22 12:20:28 +02:00
parent 167d66fdff
commit fed7c2b288
4 changed files with 4 additions and 7 deletions

View file

@ -96,8 +96,7 @@ class PolukranosUnchainedEffect extends OneShotEffect {
int counters = 12;
if (!(spellAbility instanceof EscapeAbility)
|| !spellAbility.getSourceId().equals(source.getSourceId())
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()) {
counters = 6;
}
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");

View file

@ -66,7 +66,7 @@ class ThranTomeEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (sourceObject == null && controller == null) {
if (sourceObject == null || controller == null) {
return false;
}

View file

@ -82,8 +82,7 @@ class TizerusChargerEffect extends OneShotEffect {
SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
if (!(spellAbility instanceof EscapeAbility)
|| !spellAbility.getSourceId().equals(source.getSourceId())
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()) {
return false;
}
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");

View file

@ -83,8 +83,7 @@ class EscapesWithEffect extends OneShotEffect {
SpellAbility spellAbility = (SpellAbility) getValue(EntersBattlefieldEffect.SOURCE_CAST_SPELL_ABILITY);
if (!(spellAbility instanceof EscapeAbility)
|| !spellAbility.getSourceId().equals(source.getSourceId())
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()
|| !spellAbility.getSourceId().equals(source.getSourceId())) {
|| permanent.getZoneChangeCounter(game) != spellAbility.getSourceObjectZoneChangeCounter()) {
return false;
}
List<UUID> appliedEffects = (ArrayList<UUID>) this.getValue("appliedEffects");