forked from External/mage
Sonar fixes
This commit is contained in:
parent
1621704b12
commit
178da75e4d
39 changed files with 97 additions and 79 deletions
|
|
@ -6,6 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -140,7 +141,7 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
// handle copies of copies
|
||||
Permanent copyFromPermanent = permanent;
|
||||
for (Effect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) {
|
||||
for (ContinuousEffect effect : game.getState().getContinuousEffects().getLayeredEffects(game)) {
|
||||
if (effect instanceof CopyEffect) {
|
||||
CopyEffect copyEffect = (CopyEffect) effect;
|
||||
// there is another copy effect that our targetPermanent copies stats from
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
|
|
@ -84,7 +85,7 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
return lastAddedTokenId;
|
||||
}
|
||||
|
||||
public ArrayList<UUID> getLastAddedTokenIds() {
|
||||
public List<UUID> getLastAddedTokenIds() {
|
||||
return lastAddedTokenIds;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public class UntapLandsEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
if (target.choose(Outcome.Untap, source.getControllerId(), source.getSourceId(), game)) {
|
||||
for (Object targetId : target.getTargets()) {
|
||||
Permanent p = game.getPermanent((UUID) targetId);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Permanent p = game.getPermanent(targetId);
|
||||
if (p != null) {
|
||||
p.untap(game);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ public class DiscardCardYouChooseTargetEffect extends OneShotEffect {
|
|||
if (numberToDiscard > 0) {
|
||||
TargetCard target = new TargetCard(numberToDiscard, Zone.HAND, filter);
|
||||
if (controller.choose(Outcome.Benefit, revealedCards, target, game)) {
|
||||
for (Object targetId : target.getTargets()) {
|
||||
Card card = revealedCards.get((UUID) targetId, game);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = revealedCards.get(targetId, game);
|
||||
if (card != null) {
|
||||
if (!player.discard(card, source, game)) {
|
||||
result = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue