pay costs without choices before those with choices so that {T} is before mana cost to avoid cases where {T} cost cannot be paid as permanent was tapped to pay mana cost

master
melvin 2013-10-31 16:35:47 +08:00
parent 1a78daa84f
commit 18f7362cdf
1 changed files with 11 additions and 1 deletions

View File

@ -51,8 +51,18 @@ public class MagicPriorityEvent extends MagicEvent {
// reset payed costs
game.resetPayedCost();
// pay costs without choices first, eg {T}
for (final MagicEvent costEvent : sourceActivation.getCostEvent()) {
game.addEvent(costEvent);
if (costEvent.hasChoice() == false) {
game.addEvent(costEvent);
}
}
// then pay costs with choices. eg mana cost
for (final MagicEvent costEvent : sourceActivation.getCostEvent()) {
if (costEvent.hasChoice() == true) {
game.addEvent(costEvent);
}
}
game.addEvent(sourceActivation.getEvent());