mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Added SCRY game event.
This commit is contained in:
parent
57f8fbc543
commit
a5b56c31c1
3 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue