mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[CMR] Implemented Ardenn, Intrepid Archaeologist
This commit is contained in:
parent
5c96250e9e
commit
df32ab751f
2 changed files with 102 additions and 0 deletions
101
Mage.Sets/src/mage/cards/a/ArdennIntrepidArchaeologist.java
Normal file
101
Mage.Sets/src/mage/cards/a/ArdennIntrepidArchaeologist.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.PartnerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetPermanentOrPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ArdennIntrepidArchaeologist extends CardImpl {
|
||||
|
||||
public ArdennIntrepidArchaeologist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.KOR);
|
||||
this.subtype.add(SubType.SCOUT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// At the beginning of combat on your turn, you may attach any number of Auras and Equipment you control to target permanent or player.
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||
new ArdennIntrepidArchaeologistEffect(), TargetController.YOU, true
|
||||
);
|
||||
ability.addTarget(new TargetPermanentOrPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Partner
|
||||
this.addAbility(PartnerAbility.getInstance());
|
||||
}
|
||||
|
||||
private ArdennIntrepidArchaeologist(final ArdennIntrepidArchaeologist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArdennIntrepidArchaeologist copy() {
|
||||
return new ArdennIntrepidArchaeologist(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArdennIntrepidArchaeologistEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent("Auras and Equipment you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.AURA.getPredicate(),
|
||||
SubType.EQUIPMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
ArdennIntrepidArchaeologistEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "attach any number of Auras and Equipment you control to target permanent or player";
|
||||
}
|
||||
|
||||
private ArdennIntrepidArchaeologistEffect(final ArdennIntrepidArchaeologistEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArdennIntrepidArchaeologistEffect copy() {
|
||||
return new ArdennIntrepidArchaeologistEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (controller == null || (player == null && permanent == null)) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
controller.choose(outcome, target, source.getSourceId(), game);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
if (player != null) {
|
||||
player.addAttachment(targetId, game);
|
||||
} else if (permanent != null) {
|
||||
permanent.addAttachment(targetId, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -38,6 +38,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Arcane Signet", 297, Rarity.UNCOMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Archelos, Lagoon Mystic", 268, Rarity.RARE, mage.cards.a.ArchelosLagoonMystic.class));
|
||||
cards.add(new SetCardInfo("Archon of Coronation", 9, Rarity.MYTHIC, mage.cards.a.ArchonOfCoronation.class));
|
||||
cards.add(new SetCardInfo("Ardenn, Intrepid Archaeologist", 10, Rarity.UNCOMMON, mage.cards.a.ArdennIntrepidArchaeologist.class));
|
||||
cards.add(new SetCardInfo("Armillary Sphere", 298, Rarity.COMMON, mage.cards.a.ArmillarySphere.class));
|
||||
cards.add(new SetCardInfo("Armix, Filigree Thrasher", 108, Rarity.UNCOMMON, mage.cards.a.ArmixFiligreeThrasher.class));
|
||||
cards.add(new SetCardInfo("Armorcraft Judge", 218, Rarity.UNCOMMON, mage.cards.a.ArmorcraftJudge.class));
|
||||
|
|
Loading…
Reference in a new issue