Added SCRY game event.

This commit is contained in:
LevelX2 2013-09-18 21:14:52 +02:00
parent 57f8fbc543
commit a5b56c31c1
3 changed files with 5 additions and 2 deletions

View file

@ -112,10 +112,11 @@ public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
StringBuilder sb = new StringBuilder();
sb.append("Each players sacrifices ");
if (amount.toString().equals("X")) {
sb.append(amount.toString()).append(" ");
sb.append(amount.toString());
} else {
sb.append(CardUtil.numberToText(amount.toString()));
}
sb.append(" ");
sb.append(filter.getMessage());
staticText = sb.toString();
}

View file

@ -37,6 +37,7 @@ import mage.cards.Cards;
import mage.cards.CardsImpl;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
import mage.target.TargetCard;
import mage.util.CardUtil;
@ -110,6 +111,7 @@ public class ScryEffect extends OneShotEffect<ScryEffect> {
.append(onBottom).append(onBottom == 1 ?" card":" cards")
.append(" on the bottom of his or her library (scry ")
.append(scryNumber).append(")").toString());
game.fireEvent(new GameEvent(GameEvent.EventType.SCRY, source.getControllerId(), source.getSourceId(), source.getControllerId()));
return true;
}
return false;

View file

@ -103,7 +103,7 @@ public class GameEvent {
SHUFFLE_LIBRARY, LIBRARY_SHUFFLED,
ENCHANT_PLAYER, ENCHANTED_PLAYER,
CAN_TAKE_MULLIGAN,
FLIP_COIN,
FLIP_COIN, SCRY,
//permanent events
ENTERS_THE_BATTLEFIELD,