* Halana, Kessig Ranger - fixed that it doesn't do damage on trigger (#7286);

This commit is contained in:
Oleg Agafonov 2020-12-28 06:17:18 +04:00
parent 9ec45e796c
commit ced4f44213
3 changed files with 7 additions and 10 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.h;
import java.util.UUID;
import mage.MageInt;
import mage.MageObjectReference;
import mage.abilities.Ability;
@ -11,15 +9,17 @@ import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.keyword.PartnerAbility;
import mage.constants.*;
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
@ -40,7 +40,7 @@ public final class HalanaKessigRanger extends CardImpl {
// Whenever another creature enters the battlefield under your control, you may pay {2}. When you do, that creature deals damage equal to its power to target creature.
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
Zone.BATTLEFIELD, new DoIfCostPaid(new HalanaKessigRangerTriggerEffect(), new GenericManaCost(2)),
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, SetTargetPointer.PERMANENT_TARGET,
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, false, SetTargetPointer.PERMANENT,
"Whenever another creature enters the battlefield under your control, you may pay {2}. " +
"When you do, that creature deals damage equal to its power to target creature."
));

View file

@ -1,4 +1,3 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -92,12 +91,12 @@ public class EntersBattlefieldAllTriggeredAbility extends TriggeredAbilityImpl {
if (setTargetPointer != SetTargetPointer.NONE) {
for (Effect effect : this.getEffects()) {
switch (setTargetPointer) {
case PERMANENT:
effect.setTargetPointer(new FixedTarget(permanent, game));
break;
case PLAYER:
effect.setTargetPointer(new FixedTarget(permanent.getControllerId()));
break;
case PERMANENT:
effect.setTargetPointer(new FixedTarget(permanent, game));
break;
}
}
}

View file

@ -1,8 +1,6 @@
package mage.constants;
/**
*
* @author LevelX2
*/
public enum SetTargetPointer {