Reverted wrong changes and missing card hint

This commit is contained in:
Oleg Agafonov 2020-06-20 03:11:58 +04:00
parent fad771e725
commit 271b8d06f4
2 changed files with 43 additions and 6 deletions

View file

@ -1,13 +1,12 @@
package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -16,8 +15,9 @@ import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class ShamanOfThePack extends CardImpl {
@ -30,7 +30,7 @@ public final class ShamanOfThePack extends CardImpl {
}
public ShamanOfThePack(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}");
this.subtype.add(SubType.ELF);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(3);
@ -41,6 +41,7 @@ public final class ShamanOfThePack extends CardImpl {
effect.setText("target opponent loses life equal to the number of Elves you control");
Ability ability = new EntersBattlefieldTriggeredAbility(effect, false);
ability.addTarget(new TargetOpponent());
ability.addHint(new ValueHint("Elves you control", new PermanentsOnBattlefieldCount(filter)));
this.addAbility(ability);
}

View file

@ -6,7 +6,6 @@ import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ExileTargetForSourceEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -21,6 +20,7 @@ import mage.game.stack.Spell;
import mage.players.Player;
import mage.target.common.TargetCardInASingleGraveyard;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.UUID;
@ -39,7 +39,7 @@ public final class SpellweaverHelix extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// Imprint - When Spellweaver Helix enters the battlefield, you may exile two target sorcery cards from a single graveyard.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetForSourceEffect(), true, "Imprint — ");
Ability ability = new EntersBattlefieldTriggeredAbility(new SpellweaverHelixImprintEffect(), true, "Imprint — ");
ability.addTarget(new TargetCardInASingleGraveyard(2, 2, filter));
this.addAbility(ability);
@ -57,6 +57,42 @@ public final class SpellweaverHelix extends CardImpl {
}
}
class SpellweaverHelixImprintEffect extends OneShotEffect {
SpellweaverHelixImprintEffect() {
super(Outcome.Exile);
this.staticText = "you may exile two target sorcery cards from a single graveyard";
}
SpellweaverHelixImprintEffect(final SpellweaverHelixImprintEffect effect) {
super(effect);
}
@Override
public SpellweaverHelixImprintEffect copy() {
return new SpellweaverHelixImprintEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
for (UUID targetId : this.getTargetPointer().getTargets(game, source)) {
Card card = game.getCard(targetId);
if (card != null) {
controller.moveCardsToExile(card, source, game, true, CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()), source.getSourceObject(game).getIdName());
if (sourcePermanent != null) {
sourcePermanent.imprint(targetId, game);
}
}
}
return true;
}
return false;
}
}
class SpellweaverHelixTriggeredAbility extends TriggeredAbilityImpl {
SpellweaverHelixTriggeredAbility() {