* Fixed provisional game freezing bugs of the show playable cards feature #457 (caused by DelverAbility, OfferingAbility, Rooftop Storm, Omniscience, Aluren).

This commit is contained in:
LevelX2 2014-07-21 13:03:41 +02:00
parent ad9b73c34c
commit 142e95fe42
20 changed files with 106 additions and 34 deletions

View file

@ -1834,8 +1834,12 @@ public abstract class PlayerImpl implements Player, Serializable {
}
protected boolean canPlay(ActivatedAbility ability, ManaOptions available, Game game) {
if (!(ability instanceof ManaAbility) && ability.canActivate(playerId, game)) {
Ability copy = ability.copy();
if (!(ability instanceof ManaAbility)) {
ActivatedAbility copy = ability.copy();
copy.setCheckPlayableMode(); // prevents from endless loops for asking player to use effects by checking this mode
if (!copy.canActivate(playerId, game)) {
return false;
}
game.getContinuousEffects().costModification(copy, game);
Card card = game.getCard(ability.getSourceId());