mirror of
https://github.com/correl/mage.git
synced 2024-12-29 11:09:17 +00:00
Added card "Rey's Lightsaber" and its abilities and effects
This commit is contained in:
parent
d7936a890c
commit
29bede72f9
1 changed files with 53 additions and 1 deletions
|
@ -1,4 +1,56 @@
|
|||
package mage.cards.r;
|
||||
|
||||
public class ReysLightsaber {
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Merlingilb
|
||||
*/
|
||||
public class ReysLightsaber extends CardImpl {
|
||||
public ReysLightsaber(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.addSubType(SubType.EQUIPMENT);
|
||||
|
||||
//Equipped creature gets +2/+0 and has first strike and protection from red.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 0)));
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT).setText("and has first strike")));
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
ProtectionAbility.from(ObjectColor.RED), AttachmentType.EQUIPMENT).setText("and protection from red")));
|
||||
|
||||
//Whenever equipped creature deals combat damage to a player, target player exiles the top card of their library.
|
||||
//That player may play that card until next turn.
|
||||
DealsCombatDamageToAPlayerTriggeredAbility dealsCombatDamageToAPlayerTriggeredAbility =
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new ExileTopXMayPlayUntilEndOfTurnEffect(1, false), false);
|
||||
dealsCombatDamageToAPlayerTriggeredAbility.addTarget(new TargetPlayer());
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||
dealsCombatDamageToAPlayerTriggeredAbility, AttachmentType.EQUIPMENT)));
|
||||
|
||||
//Equip {2}
|
||||
this.addAbility(new EquipAbility(2, false));
|
||||
}
|
||||
|
||||
public ReysLightsaber(final ReysLightsaber card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReysLightsaber copy() {
|
||||
return new ReysLightsaber(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue