convert transforming "C" cards to single class file

This commit is contained in:
jmlundeen 2025-11-28 10:32:59 -06:00
parent 436ac5bbbd
commit a5d14f91f6
65 changed files with 804 additions and 1623 deletions

View file

@ -1,29 +1,36 @@
package mage.cards.c;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.TransformAbility;
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.TransformingDoubleFacedCard;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.ToughnessGreaterThanPowerPredicate;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author weirddan455
*/
public final class CatapultFodder extends CardImpl {
public final class CatapultFodder extends TransformingDoubleFacedCard {
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(
"you control three or more creatures that each have toughness greater than their power"
@ -39,16 +46,27 @@ public final class CatapultFodder extends CardImpl {
);
public CatapultFodder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
super(ownerId, setInfo,
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ZOMBIE}, "{2}{B}",
"Catapult Captain",
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.ZOMBIE}, "B");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(1);
this.toughness = new MageInt(5);
this.secondSideCardClazz = mage.cards.c.CatapultCaptain.class;
// Catapult Fodder
this.getLeftHalfCard().setPT(1, 5);
// At the beginning of combat on your turn, if you control three or more creatures that each have toughness greater than their power, transform Catapult Fodder.
this.addAbility(new TransformAbility());
this.addAbility(new BeginningOfCombatTriggeredAbility(new TransformSourceEffect()).withInterveningIf(condition));
this.getLeftHalfCard().addAbility(new BeginningOfCombatTriggeredAbility(new TransformSourceEffect()).withInterveningIf(condition).addHint(hint));
// Catapult Captain
this.getRightHalfCard().setPT(2, 6);
// {2}{B}, {T}, Sacrifice another creature: Target opponent loses life equal to the sacrificed creature's toughness.
Ability ability = new SimpleActivatedAbility(new LoseLifeTargetEffect(SacrificeCostCreaturesToughness.instance)
.setText("Target opponent loses life equal to the sacrificed creature's toughness"), new ManaCostsImpl<>("{2}{B}"));
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
ability.addTarget(new TargetOpponent());
this.getRightHalfCard().addAbility(ability);
}
private CatapultFodder(final CatapultFodder card) {