mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[FDN] Implement Cat Collector
This commit is contained in:
parent
defc7cec70
commit
6a324d97ca
3 changed files with 76 additions and 1 deletions
74
Mage.Sets/src/mage/cards/c/CatCollector.java
Normal file
74
Mage.Sets/src/mage/cards/c/CatCollector.java
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.GainLifeFirstTimeTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.CatToken3;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class CatCollector extends CardImpl {
|
||||
|
||||
public CatCollector(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.CITIZEN);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When this creature enters, create a Food token.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new FoodToken())));
|
||||
|
||||
// Whenever you gain life for the first time during each of your turns, create a 1/1 white Cat creature token.
|
||||
this.addAbility(new CatCollectorTriggeredAbility());
|
||||
}
|
||||
|
||||
private CatCollector(final CatCollector card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CatCollector copy() {
|
||||
return new CatCollector(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CatCollectorTriggeredAbility extends GainLifeFirstTimeTriggeredAbility {
|
||||
|
||||
public CatCollectorTriggeredAbility() {
|
||||
super(new CreateTokenEffect(new CatToken3()));
|
||||
}
|
||||
|
||||
private CatCollectorTriggeredAbility(final CatCollectorTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CatCollectorTriggeredAbility copy() {
|
||||
return new CatCollectorTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return super.checkTrigger(event, game) && game.isActivePlayer(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you gain life for the first time during each of your turns, "
|
||||
+ "create a 1/1 white Cat creature token";
|
||||
}
|
||||
}
|
||||
|
|
@ -94,6 +94,7 @@ public final class Foundations extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Campus Guide", 251, Rarity.COMMON, mage.cards.c.CampusGuide.class));
|
||||
cards.add(new SetCardInfo("Cancel", 505, Rarity.COMMON, mage.cards.c.Cancel.class));
|
||||
cards.add(new SetCardInfo("Carnelian Orb of Dragonkind", 534, Rarity.COMMON, mage.cards.c.CarnelianOrbOfDragonkind.class));
|
||||
cards.add(new SetCardInfo("Cat Collector", 4, Rarity.UNCOMMON, mage.cards.c.CatCollector.class));
|
||||
cards.add(new SetCardInfo("Cathar Commando", 139, Rarity.COMMON, mage.cards.c.CatharCommando.class));
|
||||
cards.add(new SetCardInfo("Cemetery Recruitment", 517, Rarity.COMMON, mage.cards.c.CemeteryRecruitment.class));
|
||||
cards.add(new SetCardInfo("Cephalid Inkmage", 32, Rarity.UNCOMMON, mage.cards.c.CephalidInkmage.class));
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class GainLifeFirstTimeTriggeredAbility extends TriggeredAbilityImpl {
|
|||
setTriggerPhrase("When" + (when ? "" : "ever") + " you gain life for the first time each turn, ");
|
||||
}
|
||||
|
||||
private GainLifeFirstTimeTriggeredAbility(final GainLifeFirstTimeTriggeredAbility ability) {
|
||||
protected GainLifeFirstTimeTriggeredAbility(final GainLifeFirstTimeTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.when = ability.when;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue