Play card without mana cost - fixed that AI and other players can play cards without additional cost in some use cases (#6760);

This commit is contained in:
Oleg Agafonov 2020-07-06 21:06:49 +04:00
parent b679087284
commit 802aca942a
2 changed files with 38 additions and 4 deletions

View file

@ -1075,9 +1075,10 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override
public void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts<ManaCost> manaCosts, Costs<Cost> costs) {
// cost must be copied for data consistence between game simulations
castSourceIdWithAlternateMana.add(sourceId);
castSourceIdManaCosts.put(sourceId, manaCosts);
castSourceIdCosts.put(sourceId, costs);
castSourceIdManaCosts.put(sourceId, manaCosts != null ? manaCosts.copy() : null);
castSourceIdCosts.put(sourceId, costs != null ? costs.copy() : null);
}
@Override