mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # Mage.Sets/src/mage/cards/n/NestingGrounds.java
This commit is contained in:
commit
3d3d9b6a97
5 changed files with 33 additions and 42 deletions
|
@ -1,12 +1,11 @@
|
|||
|
||||
package mage.tournament.cubes;
|
||||
|
||||
import mage.game.draft.DraftCube;
|
||||
|
||||
public class MTGACube extends DraftCube {
|
||||
public class MTGACube2020April extends DraftCube {
|
||||
|
||||
public MTGACube() {
|
||||
super("MTGA Cube"); // https://magic.wizards.com/en/articles/archive/magic-digital/mtg-arena-cube-sealed-card-list-2020-04-03
|
||||
public MTGACube2020April() {
|
||||
super("MTGA Cube 2020 April"); // https://magic.wizards.com/en/articles/archive/magic-digital/mtg-arena-cube-sealed-card-list-2020-04-03
|
||||
|
||||
cubeCards.add(new CardIdentity("Adanto Vanguard", ""));
|
||||
cubeCards.add(new CardIdentity("Admiral's Order", ""));
|
|
@ -117,6 +117,7 @@
|
|||
<draftCube name="Mono Blue Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MonoBlueCube"/>
|
||||
<draftCube name="Sam Black's No Search Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.SamBlacksCube"/>
|
||||
<draftCube name="Timothee Simonot's Twisted Color Pie Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.TimotheeSimonotsTwistedColorPieCube"/>
|
||||
<draftCube name="MTGA Cube 2020 April" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGACube2020April"/>
|
||||
<draftCube name="MTGO Cube March 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGOMarchCube2014"/>
|
||||
<draftCube name="MTGO Legacy Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCube"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 March" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeMarch2015"/>
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
<draftCube name="Mono Blue Cube" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.MonoBlueCube"/>
|
||||
<draftCube name="Sam Black's No Search Cube" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.SamBlacksCube"/>
|
||||
<draftCube name="Timothee Simonot's Twisted Color Pie Cube" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.TimotheeSimonotsTwistedColorPieCube"/>
|
||||
<draftCube name="MTGA Cube 2020 April" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.MTGACube2020April"/>
|
||||
<draftCube name="MTGO Cube March 2014" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.MTGOMarchCube2014"/>
|
||||
<draftCube name="MTGO Legacy Cube" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.LegacyCube"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 March" jar="mage-tournament-booster-draft-${project.version}.jar" className="mage.tournament.cubes.LegacyCubeMarch2015"/>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
@ -17,8 +13,8 @@ import mage.cards.CardSetInfo;
|
|||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
|
@ -28,15 +24,17 @@ import mage.game.permanent.Permanent;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class LeechBonder extends CardImpl {
|
||||
|
||||
public LeechBonder(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
this.subtype.add(SubType.MERFOLK);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
|
||||
|
@ -91,11 +89,13 @@ class LeechBonderEffect extends OneShotEffect {
|
|||
|| controller == null) {
|
||||
return false;
|
||||
}
|
||||
Choice choice = new ChoiceImpl();
|
||||
Set<String> possibleChoices = new HashSet<>();
|
||||
for (String counterName : fromPermanent.getCounters(game).keySet()) {
|
||||
possibleChoices.add(counterName);
|
||||
|
||||
Set<String> possibleChoices = new HashSet<>(fromPermanent.getCounters(game).keySet());
|
||||
if (possibleChoices.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Choice choice = new ChoiceImpl();
|
||||
choice.setChoices(possibleChoices);
|
||||
if (controller.choose(outcome, choice, game)) {
|
||||
String chosen = choice.getChoice();
|
||||
|
@ -103,7 +103,7 @@ class LeechBonderEffect extends OneShotEffect {
|
|||
CounterType counterType = CounterType.findByName(chosen);
|
||||
if (counterType != null) {
|
||||
Counter counter = counterType.createInstance();
|
||||
fromPermanent.removeCounters(counter, game);
|
||||
fromPermanent.removeCounters(counterType.getName(), 1, game);
|
||||
toPermanent.addCounters(counter, source, game);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -17,43 +17,31 @@ import mage.counters.Counter;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
* @author anonymous
|
||||
*/
|
||||
public final class NestingGrounds extends CardImpl {
|
||||
|
||||
public NestingGrounds(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {1}, {T}: Move a counter from target permanent you control onto another target permanent. Activate this ability only any time you could cast a sorcery.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NestingGroundsEffect(), new GenericManaCost(1));
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new NestingGroundsEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
TargetControlledPermanent target1 = new TargetControlledPermanent(new FilterControlledPermanent("permanent to remove counter from"));
|
||||
target1.setTargetTag(1);
|
||||
ability.addTarget(target1);
|
||||
|
||||
FilterPermanent filter = new FilterPermanent("permanent to put counter on");
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
TargetPermanent target2 = new TargetPermanent(filter);
|
||||
target2.setTargetTag(2);
|
||||
ability.addTarget(target2);
|
||||
|
||||
ability.addTarget(new TargetPermanent(new FilterControlledPermanent("permanent to remove counter from")));
|
||||
ability.addTarget(new TargetPermanent(new FilterPermanent("permanent to put counter on")));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -74,13 +62,13 @@ class NestingGroundsEffect extends OneShotEffect {
|
|||
this.staticText = "Move a counter from target permanent you control onto another target permanent";
|
||||
}
|
||||
|
||||
public NestingGroundsEffect(final mage.cards.n.NestingGroundsEffect effect) {
|
||||
public NestingGroundsEffect(final NestingGroundsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public mage.cards.n.NestingGroundsEffect copy() {
|
||||
return new mage.cards.n.NestingGroundsEffect(this);
|
||||
public NestingGroundsEffect copy() {
|
||||
return new NestingGroundsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,11 +81,13 @@ class NestingGroundsEffect extends OneShotEffect {
|
|||
|| controller == null) {
|
||||
return false;
|
||||
}
|
||||
Choice choice = new ChoiceImpl();
|
||||
Set<String> possibleChoices = new HashSet<>();
|
||||
for (String counterName : fromPermanent.getCounters(game).keySet()) {
|
||||
possibleChoices.add(counterName);
|
||||
|
||||
Set<String> possibleChoices = new HashSet<>(fromPermanent.getCounters(game).keySet());
|
||||
if (possibleChoices.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Choice choice = new ChoiceImpl();
|
||||
choice.setChoices(possibleChoices);
|
||||
if (controller.choose(outcome, choice, game)) {
|
||||
String chosen = choice.getChoice();
|
||||
|
@ -105,7 +95,7 @@ class NestingGroundsEffect extends OneShotEffect {
|
|||
CounterType counterType = CounterType.findByName(chosen);
|
||||
if (counterType != null) {
|
||||
Counter counter = counterType.createInstance();
|
||||
fromPermanent.removeCounters(counter, game);
|
||||
fromPermanent.removeCounters(counterType.getName(), 1, game);
|
||||
toPermanent.addCounters(counter, source, game);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue