* Explore abilities - fixed wrong ability hint text in some cards like Jadelight Ranger (#6958, #6986);

This commit is contained in:
Oleg Agafonov 2020-09-09 01:17:43 +04:00
parent 5831ba81fc
commit 615fba5a72
2 changed files with 6 additions and 7 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.j;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -11,8 +9,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class JadelightRanger extends CardImpl {
@ -26,7 +25,7 @@ public final class JadelightRanger extends CardImpl {
this.toughness = new MageInt(1);
// When Jadelight Ranger enters the battlefield, it explores, then it explores again.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect().setText("it explores"), false);
Ability ability = new EntersBattlefieldTriggeredAbility(new ExploreSourceEffect(false, "it"), false);
ability.addEffect(new ExploreSourceEffect().setText(", then it explores again. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard. Then repeat this process.) "));
this.addAbility(ability);
}

View file

@ -1,6 +1,5 @@
package mage.abilities.effects.keyword;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
@ -14,8 +13,9 @@ import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author TheElk801, JayDi85
*/
public class ExploreSourceEffect extends OneShotEffect {
@ -61,6 +61,7 @@ public class ExploreSourceEffect extends OneShotEffect {
public ExploreSourceEffect(boolean showAbilityHint, String whosExplores) {
super(Outcome.Benefit);
this.showAbilityHint = showAbilityHint;
if (whosExplores != null) {
this.sourceName = whosExplores;
}
@ -71,7 +72,6 @@ public class ExploreSourceEffect extends OneShotEffect {
super(effect);
this.showAbilityHint = effect.showAbilityHint;
this.sourceName = effect.sourceName;
setText();
}
private void setText() {