merge latest trunk

This commit is contained in:
myk
2013-03-08 10:27:40 +00:00
10 changed files with 99 additions and 397 deletions

View File

@@ -28,7 +28,18 @@ public class RevealEffect extends RevealEffectBase {
if (handChoices.size() > 0) {
final List<Card> revealed = new ArrayList<Card>();
if (sa.hasParam("Random")) {
revealed.add(Aggregates.random(handChoices));
if (sa.hasParam("NumCards")) {
final int num = AbilityUtils.calculateAmount(host, sa.getParam("NumCards"), sa);
final int revealnum = Math.min(handChoices.size(), num);
final List<Card> hand = new ArrayList<Card>(handChoices);
for (int i = 0; i < revealnum; i++) {
final Card random = Aggregates.random(hand);
revealed.add(random);
hand.remove(random);
}
} else {
revealed.add(Aggregates.random(handChoices));
}
GuiChoose.oneOrNone("Revealed card(s)", revealed);
} else {
List<Card> valid = new ArrayList<Card>(handChoices);
@@ -36,11 +47,11 @@ public class RevealEffect extends RevealEffectBase {
if (sa.hasParam("RevealValid")) {
valid = CardLists.getValidCards(valid, sa.getParam("RevealValid"), p, host);
}
if (sa.hasParam("AnyNumber")) {
if (anyNumber) {
max = valid.size();
}
else if (sa.hasParam("NumCards")) {
max = Math.min(valid.size(), AbilityUtils.calculateAmount(sa.getSourceCard(), sa.getParam("NumCards"), sa));
max = Math.min(valid.size(), AbilityUtils.calculateAmount(host, sa.getParam("NumCards"), sa));
}
//revealed.addAll(getRevealedList(sa.getActivatingPlayer(), valid, max, anyNumber));
revealed.addAll(getRevealedList(p, valid, max, anyNumber));

View File

@@ -69,8 +69,8 @@ public class QuestUtilUnlockSets {
for (CardEdition ed : getUnlockableEditions(qData)) {
int price = UNLOCK_COST;
if (mapPrices.containsKey(ed.getName() + " Booster Pack")) {
price = Math.max(new Double(60 * Math.pow(Math.sqrt(mapPrices.get(ed.getName()
+ " Booster Pack")), 1.65)).intValue(), UNLOCK_COST);
price = Math.max(new Double(30 * Math.pow(Math.sqrt(mapPrices.get(ed.getName()
+ " Booster Pack")), 1.70)).intValue(), UNLOCK_COST);
}
setPrices.add(ImmutablePair.of(ed, price));
}