mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Merge pull request #2262 from ingmargoudt/master
removed some contains on sets
This commit is contained in:
commit
8598cf2a33
5 changed files with 16 additions and 26 deletions
|
|
@ -38,12 +38,7 @@ import mage.abilities.effects.common.AttachEffect;
|
|||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
|
@ -54,6 +49,7 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -159,9 +155,8 @@ class DamagedByEnchantedWatcher extends Watcher {
|
|||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
if (enchantment.getAttachedTo().equals(event.getSourceId())) {
|
||||
MageObjectReference mor = new MageObjectReference(event.getTargetId(), game);
|
||||
if (!damagedCreatures.contains(mor)) {
|
||||
damagedCreatures.add(mor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ import mage.game.stack.Spell;
|
|||
import mage.players.Player;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -103,7 +106,7 @@ class MinamosMeddlingCounterTargetEffect extends OneShotEffect {
|
|||
for (SpellAbility spellAbility : spell.getSpellAbilities()) {
|
||||
if (spellAbility.getSpellAbilityType().equals(SpellAbilityType.SPLICE)) {
|
||||
for (Card card: spellController.getHand().getCards(game)) {
|
||||
if (card.getName().equals(spellAbility.getCardName()) && !cardsToDiscard.contains(card.getId())) {
|
||||
if (card.getName().equals(spellAbility.getCardName())) {
|
||||
cardsToDiscard.add(card);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,16 +34,12 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -96,9 +92,8 @@ class SpiritOfTheLabyrinthWatcher extends Watcher {
|
|||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DREW_CARD ) {
|
||||
if (!playersThatDrewCard.contains(event.getPlayerId())) {
|
||||
playersThatDrewCard.add(event.getPlayerId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author maxlebedev
|
||||
|
|
@ -99,9 +100,8 @@ class LeovoldEmissaryOfTrestWatcher extends Watcher {
|
|||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DREW_CARD ) {
|
||||
if (!playersThatDrewCard.contains(event.getPlayerId())) {
|
||||
playersThatDrewCard.add(event.getPlayerId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue