- Attempt to fix a bug which made it possible for the player to use the mana ability of a card with the {Q} (Untap) in its mana cost while paying its own mana cost (e.g. Zhur-Taa Druid + Umbral Mantle).

This commit is contained in:
Agetian
2015-09-26 08:43:27 +00:00
parent 5c9f0e0b2f
commit 6938c66ee5

View File

@@ -183,12 +183,14 @@ public class Cost {
for (int iCp = 0; iCp < costParts.size(); iCp++) { for (int iCp = 0; iCp < costParts.size(); iCp++) {
CostPart cp = costParts.get(iCp); CostPart cp = costParts.get(iCp);
// my guess why Q/T are to be first and are followed by mana parts // untap cost has to be last so that a card can't use e.g. its own mana ability while paying for a part of its own mana cost
// is because Q/T are undoable and mana is interactive, so it well be easy to rollback if player refuses to pay // (e.g. Zhur-Taa Druid equipped with Umbral Mantle, paying the mana cost of {3}, {Q} )
if (cp instanceof CostUntap) { if (cp instanceof CostUntap) {
costParts.remove(iCp); costParts.remove(iCp);
costParts.add(0, cp); costParts.add(cp);
} }
// tap cost has to be first so that a card can't use e.g. its own mana ability while paying for a part of its own mana cost
// (e.g. Ally Encampment with the cost of 1, {T} )
if (cp instanceof CostTap) { if (cp instanceof CostTap) {
costParts.remove(iCp); costParts.remove(iCp);
costParts.add(0, cp); costParts.add(0, cp);