From ee74c7547c7a234aec378b22132f1341b1ec7927 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 28 Nov 2019 23:52:23 +0400 Subject: [PATCH] Missing comments --- .../mage/cards/s/SwordOfFeastAndFamine.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java b/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java index ea4a9d0d289..28862d5ab70 100644 --- a/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java +++ b/Mage.Sets/src/mage/cards/s/SwordOfFeastAndFamine.java @@ -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()) {