[DSK] Implement Hauntwoods Shrieker, added support to reveal face down permanents (#13277)

* [DSK] Implement Hauntwoods Shrieker.
* Change RevealedView and PlayerImpl.revealCards to reveal face-down permanents.
* Fix #13273 using the new RevealCards capability.
This commit is contained in:
Grath 2025-02-07 10:18:31 -05:00 committed by GitHub
parent 89be55c816
commit 145bda842b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 123 additions and 10 deletions

View file

@ -58,7 +58,7 @@ import java.util.Set;
* entering the battlefield, that card isnt manifested. Its characteristics remain unmodified and it remains in
* its previous zone. If it was face up, it remains face up.
* <p>
* 701.34g TODO: need support it
* 701.34g
* If a manifested permanent thats represented by an instant or sorcery card would turn face up, its controller
* reveals it and leaves it face down. Abilities that trigger whenever a permanent is turned face up wont trigger.
*

View file

@ -7,13 +7,11 @@ import mage.abilities.costs.mana.ManaCost;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.keyword.NightboundAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.Card;
import mage.cards.LevelerCard;
import mage.cards.ModalDoubleFacedCard;
import mage.cards.SplitCard;
import mage.cards.*;
import mage.constants.SpellAbilityType;
import mage.game.Game;
import mage.game.events.ZoneChangeEvent;
import mage.players.Player;
import java.util.UUID;
@ -185,7 +183,10 @@ public class PermanentCard extends PermanentImpl {
// 701.34g. If a manifested permanent that's represented by an instant or sorcery card would turn face up,
// its controller reveals it and leaves it face down. Abilities that trigger whenever a permanent
// is turned face up won't trigger.
// TODO: add reveal effect
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
player.revealCards(source, new CardsImpl(this), game);
}
return false;
}
if (super.turnFaceUp(source, game, playerId)) {

View file

@ -628,6 +628,7 @@ public interface Player extends MageItem, Copyable<Player> {
* <p>
* Warning, if you use it from continuous effect, then check with extra call
* isCanLookAtNextTopLibraryCard
* If you use revealCards with face-down permanents, they will be revealed face up.
*
* @param source
* @param name

View file

@ -1910,7 +1910,11 @@ public abstract class PlayerImpl implements Player, Serializable {
int last = cards.size();
for (Card card : cards.getCards(game)) {
current++;
sb.append(GameLog.getColoredObjectName(card)); // TODO: see same usage in OfferingAbility for hide card's id (is it needs for reveal too?!)
if (card instanceof PermanentCard && card.isFaceDown(game)) {
sb.append(GameLog.getColoredObjectName(card.getMainCard()));
} else {
sb.append(GameLog.getColoredObjectName(card)); // TODO: see same usage in OfferingAbility for hide card's id (is it needs for reveal too?!)
}
if (current < last) {
sb.append(", ");
}