* Look at card abilities -- improved dialog (now it's shown that card have extra abilities to call on "no" button);

This commit is contained in:
Oleg Agafonov 2019-04-23 17:09:26 +04:00
parent 00915c65d7
commit e49be97879
5 changed files with 28 additions and 21 deletions

View file

@ -654,9 +654,10 @@ public interface Player extends MageItem, Copyable<Player> {
*
* @param card
* @param game
* @param abilitiesToActivate extra info about abilities that can be activated on NO option
* @return player looked at the card
*/
boolean lookAtFaceDownCard(Card card, Game game);
boolean lookAtFaceDownCard(Card card, Game game, int abilitiesToActivate);
/**
* Set seconds left to play the game.

View file

@ -3458,10 +3458,13 @@ public abstract class PlayerImpl implements Player, Serializable {
}
@Override
public boolean lookAtFaceDownCard(Card card, Game game
) {
public boolean lookAtFaceDownCard(Card card, Game game, int abilitiesToActivate) {
if (null != game.getContinuousEffects().asThough(card.getId(), AsThoughEffectType.LOOK_AT_FACE_DOWN, card.getSpellAbility(), this.getId(), game)) {
if (chooseUse(Outcome.Benefit, "Look at that card?", null, game)) {
// two modes: look at card or not to look and activate other abilities
String lookMessage = abilitiesToActivate > 0 ? "Look at that card (it's have " + abilitiesToActivate + " abilities to activate)?" : "Look at that card?";
String lookYes = "Yes, look at card";
String lookNo = abilitiesToActivate > 0 ? "No, activate ability" : "No";
if (chooseUse(Outcome.Benefit, lookMessage, "", lookYes, lookNo, null, game)) {
Cards cards = new CardsImpl(card);
this.lookAtCards(getName() + " - " + sdf.format(System.currentTimeMillis()), cards, game);
return true;