forked from External/mage
Missing comments
This commit is contained in:
parent
2d57c8061e
commit
ee74c7547c
1 changed files with 11 additions and 11 deletions
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -16,11 +13,7 @@ import mage.abilities.keyword.EquipAbility;
|
|||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedPlayerEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -28,18 +21,25 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Viserion
|
||||
*/
|
||||
public final class SwordOfFeastAndFamine extends CardImpl {
|
||||
|
||||
public SwordOfFeastAndFamine(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2)));
|
||||
|
||||
// Equipped creature gets +2/+2 and has protection from black and from green.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ProtectionAbility.from(ObjectColor.GREEN, ObjectColor.BLACK), AttachmentType.EQUIPMENT)));
|
||||
|
||||
// Whenever equipped creature deals combat damage to a player, that player discards a card and you untap all lands you control.
|
||||
this.addAbility(new SwordOfFeastAndFamineAbility());
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ class SwordOfFeastAndFamineAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event;
|
||||
DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event;
|
||||
Permanent p = game.getPermanent(event.getSourceId());
|
||||
if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue