mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Lion's Eye Diamond - Fixed that it now only can be cast at the time an instant spell could be cast.
This commit is contained in:
parent
c958a1af25
commit
8d8a2074f0
5 changed files with 40 additions and 2 deletions
|
|
@ -529,4 +529,6 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
boolean isRequestToShowHandCardsAllowed();
|
||||
Set<UUID> getUsersAllowedToSeeHandCards();
|
||||
|
||||
boolean isInPayManaMode();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,6 +225,8 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
|
||||
// indicates that a sourceId will be cast without paying mana
|
||||
protected UUID castSourceIdWithoutMana;
|
||||
// indicates that the player is in mana payment phase
|
||||
protected boolean payManaMode = false;
|
||||
|
||||
protected UserData userData;
|
||||
|
||||
|
|
@ -321,6 +323,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.reachedNextTurnAfterLeaving = player.reachedNextTurnAfterLeaving;
|
||||
|
||||
this.castSourceIdWithoutMana = player.castSourceIdWithoutMana;
|
||||
this.payManaMode = player.payManaMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -434,6 +437,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
this.canGainLife = true;
|
||||
this.canLoseLife = true;
|
||||
this.topCardRevealed = false;
|
||||
this.payManaMode = false;
|
||||
this.setLife(game.getLife(), game);
|
||||
this.setReachedNextTurnAfterLeaving(false);
|
||||
game.getState().getWatchers().add(new BloodthirstWatcher(playerId));
|
||||
|
|
@ -904,6 +908,11 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return castSourceIdWithoutMana;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInPayManaMode() {
|
||||
return payManaMode;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean cast(SpellAbility ability, Game game, boolean noMana) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue