mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
* Sultai Soothsayer - Fixed that the cards that go to graveyard did not trigger Sidisi Brood Tyrant's ability, if it includes at least one creature.
This commit is contained in:
parent
e9d31b9265
commit
d7fba16c07
1 changed files with 7 additions and 13 deletions
|
|
@ -29,6 +29,7 @@ package mage.sets.khansoftarkir;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -96,22 +97,15 @@ class SultaiSoothsayerEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
if (controller != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
Cards cards = new CardsImpl(Zone.PICK);
|
Cards cards = new CardsImpl();
|
||||||
int cardsCount = Math.min(4, controller.getLibrary().size());
|
cards.addAll(controller.getLibrary().getTopCards(game, 4));
|
||||||
for (int i = 0; i < cardsCount; i++) {
|
|
||||||
Card card = controller.getLibrary().removeFromTop(game);
|
|
||||||
if (card != null) {
|
|
||||||
cards.add(card);
|
|
||||||
game.setZone(card.getId(), Zone.PICK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cards.size() > 0) {
|
if (cards.size() > 0) {
|
||||||
controller.lookAtCards("Sultai Soothsayer", cards, game);
|
controller.lookAtCards(sourceObject.getLogName(), cards, game);
|
||||||
|
|
||||||
TargetCard target = new TargetCard(Zone.PICK, new FilterCard("card to put in your hand"));
|
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
|
||||||
if (controller.choose(Outcome.Benefit, cards, target, game)) {
|
if (controller.choose(Outcome.Benefit, cards, target, game)) {
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
Card card = cards.get(target.getFirstTarget(), game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue