mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
[BOT] Implement Starscream, Power Hungry // Starscream, Seeker Leader (#10674)
This commit is contained in:
parent
4856c65443
commit
792be8a859
6 changed files with 202 additions and 34 deletions
|
|
@ -1,24 +1,21 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BecomesMonarchSourceControllerTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -52,30 +49,3 @@ public final class CustodiLich extends CardImpl {
|
|||
return new CustodiLich(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BecomesMonarchSourceControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BecomesMonarchSourceControllerTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
setTriggerPhrase("Whenever you become the monarch, ");
|
||||
}
|
||||
|
||||
public BecomesMonarchSourceControllerTriggeredAbility(final BecomesMonarchSourceControllerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.BECOMES_MONARCH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return isControlledBy(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesMonarchSourceControllerTriggeredAbility copy() {
|
||||
return new BecomesMonarchSourceControllerTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
65
Mage.Sets/src/mage/cards/s/StarscreamPowerHungry.java
Normal file
65
Mage.Sets/src/mage/cards/s/StarscreamPowerHungry.java
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.CombatDamageDealtToYouTriggeredAbility;
|
||||
import mage.abilities.common.DrawCardControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.MonarchIsSourceControllerCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class StarscreamPowerHungry extends CardImpl {
|
||||
|
||||
public StarscreamPowerHungry(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ROBOT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
this.secondSideCardClazz = mage.cards.s.StarscreamSeekerLeader.class;
|
||||
|
||||
// More Than Meets the Eye {2}{B}
|
||||
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{2}{B}"));
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you draw a card, if you're the monarch, target opponent loses 2 life.
|
||||
TriggeredAbility trigger = new ConditionalInterveningIfTriggeredAbility(
|
||||
new DrawCardControllerTriggeredAbility(new LoseLifeTargetEffect(2), false),
|
||||
MonarchIsSourceControllerCondition.instance,
|
||||
"Whenever you draw a card, if you're the monarch, target opponent loses 2 life."
|
||||
);
|
||||
trigger.addTarget(new TargetOpponent());
|
||||
this.addAbility(trigger);
|
||||
|
||||
// Whenever one or more creatures deal combat damage to you, convert Starscream.
|
||||
this.addAbility(new CombatDamageDealtToYouTriggeredAbility(
|
||||
new TransformSourceEffect().setText("convert {this}")
|
||||
));
|
||||
}
|
||||
|
||||
private StarscreamPowerHungry(final StarscreamPowerHungry card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarscreamPowerHungry copy() {
|
||||
return new StarscreamPowerHungry(this);
|
||||
}
|
||||
}
|
||||
70
Mage.Sets/src/mage/cards/s/StarscreamSeekerLeader.java
Normal file
70
Mage.Sets/src/mage/cards/s/StarscreamSeekerLeader.java
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BecomesMonarchSourceControllerTriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.condition.common.MonarchIsNotSetCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.BecomesMonarchTargetEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.LivingMetalAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class StarscreamSeekerLeader extends CardImpl {
|
||||
|
||||
public StarscreamSeekerLeader(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
this.color.setBlack(true);
|
||||
this.nightCard = true;
|
||||
|
||||
// Living metal
|
||||
this.addAbility(new LivingMetalAbility());
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility(false));
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever Starscream deals combat damage to a player, if there is no monarch, that player becomes the monarch.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new BecomesMonarchTargetEffect(), false, true),
|
||||
MonarchIsNotSetCondition.instance,
|
||||
"Whenever {this} deals combat damage to a player, if there is no monarch, that player becomes the monarch."
|
||||
));
|
||||
|
||||
// Whenever you become the monarch, convert Starscream.
|
||||
this.addAbility(new BecomesMonarchSourceControllerTriggeredAbility(
|
||||
new TransformSourceEffect().setText("convert {this}")
|
||||
));
|
||||
}
|
||||
|
||||
private StarscreamSeekerLeader(final StarscreamSeekerLeader card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarscreamSeekerLeader copy() {
|
||||
return new StarscreamSeekerLeader(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,8 @@ public final class Transformers extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Megatron, Tyrant", 12, Rarity.MYTHIC, mage.cards.m.MegatronTyrant.class));
|
||||
cards.add(new SetCardInfo("Ratchet, Field Medic", 2, Rarity.MYTHIC, mage.cards.r.RatchetFieldMedic.class));
|
||||
cards.add(new SetCardInfo("Ratchet, Rescue Racer", 2, Rarity.MYTHIC, mage.cards.r.RatchetRescueRacer.class));
|
||||
cards.add(new SetCardInfo("Starscream, Power Hungry", 5, Rarity.MYTHIC, mage.cards.s.StarscreamPowerHungry.class));
|
||||
cards.add(new SetCardInfo("Starscream, Seeker Leader", 5, Rarity.MYTHIC, mage.cards.s.StarscreamSeekerLeader.class));
|
||||
cards.add(new SetCardInfo("Ultra Magnus, Armored Carrier", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusArmoredCarrier.class));
|
||||
cards.add(new SetCardInfo("Ultra Magnus, Tactician", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusTactician.class));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BecomesMonarchSourceControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BecomesMonarchSourceControllerTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
setTriggerPhrase("Whenever you become the monarch, ");
|
||||
}
|
||||
|
||||
private BecomesMonarchSourceControllerTriggeredAbility(final BecomesMonarchSourceControllerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.BECOMES_MONARCH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return isControlledBy(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesMonarchSourceControllerTriggeredAbility copy() {
|
||||
return new BecomesMonarchSourceControllerTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum MonarchIsNotSetCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getMonarchId() == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if there is no monarch";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue