[M12] Goblin Bangchuckers

This commit is contained in:
magenoxx 2011-08-09 22:37:58 +04:00
parent 395d86f87e
commit 300cc90d56
4 changed files with 126 additions and 4 deletions

View file

@ -171,7 +171,7 @@ public interface Player extends MageItem, Copyable<Player> {
public boolean triggerAbility(TriggeredAbility ability, Game game);
public boolean canBeTargetedBy(MageObject source);
public boolean hasProtectionFrom(MageObject source);
public boolean flipCoin();
public boolean flipCoin(Game game);
public void checkTriggers(GameEvent event, Game game);
public void discard(int amount, Ability source, Game game);
public void discardToMax(Game game);

View file

@ -924,8 +924,10 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
* @return true if player won the toss
*/
@Override
public boolean flipCoin() {
return new Random().nextBoolean();
public boolean flipCoin(Game game) {
boolean result = new Random().nextBoolean();
game.informPlayers("[Flip a coin] " + getName() + (result ? " won." : " lost."));
return result;
}
@Override