mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Added card "Luke's Lightsaber" and its abilities and effects
This commit is contained in:
parent
9b4f06872f
commit
0127e659eb
1 changed files with 54 additions and 1 deletions
|
@ -1,4 +1,57 @@
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
public class LukesLightsaber {
|
import mage.ObjectColor;
|
||||||
|
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.common.GainLifeTargetEffect;
|
||||||
|
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 LukesLightsaber extends CardImpl {
|
||||||
|
public LukesLightsaber(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 black.
|
||||||
|
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.BLACK), AttachmentType.EQUIPMENT
|
||||||
|
).setText("and protection from black")));
|
||||||
|
|
||||||
|
//Whenever equipped creature deals combat damage to a player, target player gains 2 life.
|
||||||
|
DealsCombatDamageToAPlayerTriggeredAbility dealsCombatDamageToAPlayerTriggeredAbility =
|
||||||
|
new DealsCombatDamageToAPlayerTriggeredAbility(new GainLifeTargetEffect(2), false);
|
||||||
|
dealsCombatDamageToAPlayerTriggeredAbility.addTarget(new TargetPlayer());
|
||||||
|
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
|
||||||
|
dealsCombatDamageToAPlayerTriggeredAbility, AttachmentType.EQUIPMENT)));
|
||||||
|
|
||||||
|
//Equip {2}
|
||||||
|
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LukesLightsaber(final LukesLightsaber card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LukesLightsaber copy() {
|
||||||
|
return new LukesLightsaber(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue