mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Reworked non mana costs with variable amount. The values have now to be announced before targeting. Fixed some wrong implementations (Firestorm, Myr Battlesphere, Skeletal Scrying).
This commit is contained in:
parent
2d9f260b1e
commit
7ebb8a9cbe
46 changed files with 1176 additions and 1187 deletions
|
|
@ -81,6 +81,7 @@ import java.lang.String;
|
|||
import java.util.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map.Entry;
|
||||
import mage.abilities.costs.VariableCost;
|
||||
import mage.cards.repository.ExpansionInfo;
|
||||
import mage.cards.repository.ExpansionRepository;
|
||||
|
||||
|
|
@ -1035,6 +1036,18 @@ public class ComputerPlayer<T extends ComputerPlayer<T>> extends PlayerImpl<T> i
|
|||
return numAvailable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variablCost) {
|
||||
log.debug("announceXMana");
|
||||
//TODO: improve this
|
||||
int value = new Random().nextInt(max+1);
|
||||
if (value < max) {
|
||||
max++;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void abort() {
|
||||
abort = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue