[SNC] Implemented For the Family

This commit is contained in:
Daniel Bomar 2022-04-16 11:20:34 -05:00
parent c31ea3b3d8
commit 243b48ba83
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.f;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author weirddan455
*/
public final class ForTheFamily extends CardImpl {
public ForTheFamily(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
// Target creature gets +2/+2 until end of turn. If you control four or more creatures, that creature gets +4/+4 until end of turn instead.
this.getSpellAbility().addEffect(new ForTheFamilyEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}
private ForTheFamily(final ForTheFamily card) {
super(card);
}
@Override
public ForTheFamily copy() {
return new ForTheFamily(this);
}
}
class ForTheFamilyEffect extends OneShotEffect {
public ForTheFamilyEffect() {
super(Outcome.BoostCreature);
this.staticText = "Target creature gets +2/+2 until end of turn. If you control four or more creatures, that creature gets +4/+4 until end of turn instead";
}
private ForTheFamilyEffect(final ForTheFamilyEffect effect) {
super(effect);
}
@Override
public ForTheFamilyEffect copy() {
return new ForTheFamilyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
int boost;
if (game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, source.getControllerId(), source, game) >= 4) {
boost = 4;
} else {
boost = 2;
}
game.addEffect(new BoostTargetEffect(boost, boost), source);
return true;
}
}

View file

@ -102,6 +102,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
cards.add(new SetCardInfo("Fatal Grudge", 187, Rarity.UNCOMMON, mage.cards.f.FatalGrudge.class));
cards.add(new SetCardInfo("Fight Rigging", 145, Rarity.RARE, mage.cards.f.FightRigging.class));
cards.add(new SetCardInfo("Fleetfoot Dancer", 188, Rarity.RARE, mage.cards.f.FleetfootDancer.class));
cards.add(new SetCardInfo("For the Family", 146, Rarity.COMMON, mage.cards.f.ForTheFamily.class));
cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forge Boss", 189, Rarity.UNCOMMON, mage.cards.f.ForgeBoss.class));
cards.add(new SetCardInfo("Freelance Muscle", 147, Rarity.UNCOMMON, mage.cards.f.FreelanceMuscle.class));