mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Scheming Symmetry
This commit is contained in:
parent
5c36acd190
commit
3a99a801ad
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/s/SchemingSymmetry.java
Normal file
76
Mage.Sets/src/mage/cards/s/SchemingSymmetry.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SchemingSymmetry extends CardImpl {
|
||||
|
||||
public SchemingSymmetry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}");
|
||||
|
||||
// Choose two target players. Each of them searches their library for a card, then shuffles their library and puts that card on top of it.
|
||||
this.getSpellAbility().addEffect(new SchemingSymmetryEffect());
|
||||
this.getSpellAbility().addTarget(new TargetPlayer(2));
|
||||
}
|
||||
|
||||
private SchemingSymmetry(final SchemingSymmetry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchemingSymmetry copy() {
|
||||
return new SchemingSymmetry(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SchemingSymmetryEffect extends OneShotEffect {
|
||||
|
||||
SchemingSymmetryEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Choose two target players. Each of them searches their library for a card, " +
|
||||
"then shuffles their library and puts that card on top of it.";
|
||||
}
|
||||
|
||||
private SchemingSymmetryEffect(final SchemingSymmetryEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchemingSymmetryEffect copy() {
|
||||
return new SchemingSymmetryEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
source.getTargets()
|
||||
.get(0)
|
||||
.getTargets()
|
||||
.stream()
|
||||
.map(playerId -> game.getPlayer(playerId))
|
||||
.filter(player -> player != null)
|
||||
.forEach(player -> {
|
||||
TargetCardInLibrary targetCard = new TargetCardInLibrary();
|
||||
if (player.searchLibrary(targetCard, source, game)) {
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(targetCard.getFirstTarget());
|
||||
player.shuffleLibrary(source, game);
|
||||
player.putCardsOnTopOfLibrary(cards, game, source, false);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -150,6 +150,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rotting Regisaur", 111, Rarity.RARE, mage.cards.r.RottingRegisaur.class));
|
||||
cards.add(new SetCardInfo("Rugged Highlands", 250, Rarity.COMMON, mage.cards.r.RuggedHighlands.class));
|
||||
cards.add(new SetCardInfo("Rule of Law", 35, Rarity.UNCOMMON, mage.cards.r.RuleOfLaw.class));
|
||||
cards.add(new SetCardInfo("Scheming Symmetry", 113, Rarity.RARE, mage.cards.s.SchemingSymmetry.class));
|
||||
cards.add(new SetCardInfo("Scholar of the Ages", 74, Rarity.UNCOMMON, mage.cards.s.ScholarOfTheAges.class));
|
||||
cards.add(new SetCardInfo("Scoured Barrens", 251, Rarity.COMMON, mage.cards.s.ScouredBarrens.class));
|
||||
cards.add(new SetCardInfo("Scuttlemutt", 238, Rarity.UNCOMMON, mage.cards.s.Scuttlemutt.class));
|
||||
|
|
Loading…
Reference in a new issue