mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Add missing files from last commit
This commit is contained in:
parent
ce610be087
commit
fbccdd3088
4 changed files with 199 additions and 0 deletions
60
Mage.Sets/src/mage/cards/c/CrownOfAscension.java
Normal file
60
Mage.Sets/src/mage/cards/c/CrownOfAscension.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class CrownOfAscension extends CardImpl {
|
||||
|
||||
public CrownOfAscension(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Enchanted creature has flying.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
FlyingAbility.getInstance(), AttachmentType.AURA
|
||||
)));
|
||||
|
||||
// Sacrifice Crown of Ascension: Enchanted creature and other creatures that share a creature type with it
|
||||
// gain flying until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new GainAbilityAllEffect(
|
||||
FlyingAbility.getInstance(),
|
||||
Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_CREATURE_ENCHANTED_AND_SHARE_TYPE
|
||||
),
|
||||
new SacrificeSourceCost()
|
||||
));
|
||||
}
|
||||
|
||||
private CrownOfAscension(final CrownOfAscension card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrownOfAscension copy() {
|
||||
return new CrownOfAscension(this);
|
||||
}
|
||||
}
|
53
Mage.Sets/src/mage/cards/c/CrownOfSuspicion.java
Normal file
53
Mage.Sets/src/mage/cards/c/CrownOfSuspicion.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class CrownOfSuspicion extends CardImpl {
|
||||
|
||||
public CrownOfSuspicion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Removal));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Enchanted creature gets +2/-1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(2, -1)));
|
||||
|
||||
// Sacrifice Crown of Suspicion: Enchanted creature and other creatures that share a creature type with it
|
||||
// get +2/-1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new BoostAllEffect(2, -1, Duration.EndOfTurn, StaticFilters.FILTER_CREATURE_ENCHANTED_AND_SHARE_TYPE, false),
|
||||
new SacrificeSourceCost()
|
||||
));
|
||||
}
|
||||
|
||||
private CrownOfSuspicion(final CrownOfSuspicion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrownOfSuspicion copy() {
|
||||
return new CrownOfSuspicion(this);
|
||||
}
|
||||
}
|
53
Mage.Sets/src/mage/cards/c/CrownOfVigor.java
Normal file
53
Mage.Sets/src/mage/cards/c/CrownOfVigor.java
Normal file
|
@ -0,0 +1,53 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author awjackson
|
||||
*/
|
||||
public final class CrownOfVigor extends CardImpl {
|
||||
|
||||
public CrownOfVigor(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// Enchanted creature gets +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEnchantedEffect(1, 1)));
|
||||
|
||||
// Sacrifice Crown of Vigor: Enchanted creature and other creatures that share a creature type with it
|
||||
// get +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new BoostAllEffect(1, 1, Duration.EndOfTurn, StaticFilters.FILTER_CREATURE_ENCHANTED_AND_SHARE_TYPE, false),
|
||||
new SacrificeSourceCost()
|
||||
));
|
||||
}
|
||||
|
||||
private CrownOfVigor(final CrownOfVigor card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrownOfVigor copy() {
|
||||
return new CrownOfVigor(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package mage.filter.predicate.permanent;
|
||||
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public enum AttachedOrShareCreatureTypePredicate implements ObjectSourcePlayerPredicate<Permanent> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
|
||||
Permanent attachment = input.getSource().getSourcePermanentOrLKI(game);
|
||||
if (attachment == null) {
|
||||
return false;
|
||||
}
|
||||
UUID attachedId = attachment.getAttachedTo();
|
||||
if (attachedId == null) {
|
||||
return false;
|
||||
}
|
||||
Permanent otherPermanent = input.getObject();
|
||||
if (attachedId.equals(otherPermanent.getId())) {
|
||||
return true;
|
||||
}
|
||||
Permanent attachedPermanent = game.getPermanentOrLKIBattlefield(attachedId);
|
||||
if (attachedPermanent == null) {
|
||||
return false;
|
||||
}
|
||||
return attachedPermanent.shareCreatureTypes(game, otherPermanent);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue