mirror of
https://github.com/correl/mage.git
synced 2025-04-08 01:01:04 -09:00
Implemented Lovestruck Beast
This commit is contained in:
parent
d98ad896c1
commit
c4cea99bea
3 changed files with 90 additions and 0 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage/constants
88
Mage.Sets/src/mage/cards/l/LovestruckBeast.java
Normal file
88
Mage.Sets/src/mage/cards/l/LovestruckBeast.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.filter.predicate.mageobject.ToughnessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.HumanToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LovestruckBeast extends AdventureCard {
|
||||
|
||||
public LovestruckBeast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{2}{G}", "{G}");
|
||||
|
||||
this.subtype.add(SubType.BEAST);
|
||||
this.subtype.add(SubType.NOBLE);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Lovestruck Beast can't attack unless you control a 1/1 creature.
|
||||
this.addAbility(new SimpleStaticAbility(new LovestruckBeastEffect()));
|
||||
|
||||
// Heart's Desire
|
||||
// Create a 1/1 white Human creature token.
|
||||
this.getAdventureSpellAbility().addEffect(new CreateTokenEffect(new HumanToken()));
|
||||
}
|
||||
|
||||
private LovestruckBeast(final LovestruckBeast card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LovestruckBeast copy() {
|
||||
return new LovestruckBeast(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LovestruckBeastEffect extends RestrictionEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new PowerPredicate(ComparisonType.EQUAL_TO, 1));
|
||||
filter.add(new ToughnessPredicate(ComparisonType.EQUAL_TO, 1));
|
||||
}
|
||||
|
||||
LovestruckBeastEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "{this} can't attack unless you control a 1/1 creature";
|
||||
}
|
||||
|
||||
private LovestruckBeastEffect(final LovestruckBeastEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LovestruckBeastEffect copy() {
|
||||
return new LovestruckBeastEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(Game game, boolean canUseChooseDialogs) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
return permanent.getId().equals(source.getSourceId())
|
||||
&& game.getBattlefield().countAll(filter, source.getControllerId(), game) <= 0;
|
||||
}
|
||||
}
|
|
@ -51,6 +51,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class));
|
||||
cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class));
|
||||
cards.add(new SetCardInfo("Inspiring Veteran", 194, Rarity.UNCOMMON, mage.cards.i.InspiringVeteran.class));
|
||||
cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class));
|
||||
cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class));
|
||||
cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class));
|
||||
cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));
|
||||
|
|
|
@ -240,6 +240,7 @@ public enum SubType {
|
|||
NIGHTMARE("Nightmare", SubTypeSet.CreatureType),
|
||||
NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType),
|
||||
NINJA("Ninja", SubTypeSet.CreatureType),
|
||||
NOBLE("Noble", SubTypeSet.CreatureType),
|
||||
NOGGLE("Noggle", SubTypeSet.CreatureType),
|
||||
NOMAD("Nomad", SubTypeSet.CreatureType),
|
||||
NYMPH("Nymph", SubTypeSet.CreatureType),
|
||||
|
|
Loading…
Add table
Reference in a new issue