mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
refactoring and cleanup
This commit is contained in:
parent
1de6aa4769
commit
caaa81a42b
5 changed files with 12 additions and 22 deletions
|
@ -28,27 +28,14 @@
|
||||||
|
|
||||||
package mage.sets.scarsofmirrodin;
|
package mage.sets.scarsofmirrodin;
|
||||||
|
|
||||||
import mage.Constants;
|
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Rarity;
|
import mage.Constants.Rarity;
|
||||||
import mage.Mana;
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
|
||||||
import mage.abilities.condition.common.MetalcraftCondition;
|
import mage.abilities.condition.common.MetalcraftCondition;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
|
||||||
import mage.abilities.costs.mana.ManaCost;
|
|
||||||
import mage.abilities.costs.mana.ManaCosts;
|
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
|
||||||
import mage.abilities.effects.CostModificationEffectImpl;
|
|
||||||
import mage.abilities.effects.common.CounterTargetEffect;
|
import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
import mage.cards.Card;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.game.events.ZoneChangeEvent;
|
|
||||||
import mage.game.permanent.Permanent;
|
|
||||||
import mage.target.TargetSpell;
|
import mage.target.TargetSpell;
|
||||||
import mage.watchers.WatcherImpl;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
package mage.abilities;
|
package mage.abilities;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -48,8 +49,8 @@ public class Modes extends HashMap<UUID, Mode> {
|
||||||
|
|
||||||
public Modes(Modes modes) {
|
public Modes(Modes modes) {
|
||||||
this.modeId = modes.modeId;
|
this.modeId = modes.modeId;
|
||||||
for (Mode mode: modes.values()) {
|
for (Map.Entry<UUID, Mode> entry: modes.entrySet()) {
|
||||||
this.put(mode.getId(), mode.copy());
|
this.put(entry.getKey(), entry.getValue().copy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -42,9 +43,9 @@ public class Counters extends HashMap<String, Counter> implements Serializable {
|
||||||
public Counters() {}
|
public Counters() {}
|
||||||
|
|
||||||
public Counters(final Counters counters) {
|
public Counters(final Counters counters) {
|
||||||
for (String key: counters.keySet()) {
|
for (Map.Entry<String, Counter> entry: counters.entrySet()) {
|
||||||
this.put(key, counters.get(key).copy());
|
this.put(entry.getKey(), entry.getValue().copy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Counters copy() {
|
public Counters copy() {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import mage.util.Copyable;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,8 +47,8 @@ public class LookedAt extends HashMap<String, Cards> implements Serializable, Co
|
||||||
public LookedAt() { }
|
public LookedAt() { }
|
||||||
|
|
||||||
public LookedAt(final LookedAt lookedAt) {
|
public LookedAt(final LookedAt lookedAt) {
|
||||||
for (String key: lookedAt.keySet()) {
|
for (Map.Entry<String, Cards> entry: lookedAt.entrySet()) {
|
||||||
this.put(key, lookedAt.get(key).copy());
|
this.put(entry.getKey(), entry.getValue().copy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class Revealed extends HashMap<String, Cards> implements Serializable, Co
|
||||||
public Revealed() { }
|
public Revealed() { }
|
||||||
|
|
||||||
public Revealed(final Revealed revealed) {
|
public Revealed(final Revealed revealed) {
|
||||||
for (String key: revealed.keySet()) {
|
for (Map.Entry<String, Cards> entry: revealed.entrySet()) {
|
||||||
this.put(key, revealed.get(key).copy());
|
this.put(entry.getKey(), entry.getValue().copy());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue