mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Adding Advantageous Proclamation (CNS)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1540,6 +1540,7 @@ forge-gui/res/cardsfolder/a/adun_oakenshield.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/a/advance_scout.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/a/advanced_hoverguard.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/a/advanced_stitchwing.txt -text
|
||||
forge-gui/res/cardsfolder/a/advantageous_proclamation.txt -text
|
||||
forge-gui/res/cardsfolder/a/advent_of_the_wurm.txt -text
|
||||
forge-gui/res/cardsfolder/a/adventurers_guildhouse.txt -text
|
||||
forge-gui/res/cardsfolder/a/adventuring_gear.txt svneol=native#text/plain
|
||||
|
||||
@@ -114,7 +114,7 @@ public class CardPool extends ItemPool<PaperCard> {
|
||||
|
||||
/**
|
||||
* returns n-th card from this DeckSection. LINEAR time. No fixed order between changes
|
||||
* @param i
|
||||
* @param n
|
||||
* @return
|
||||
*/
|
||||
public PaperCard get(int n) {
|
||||
@@ -125,6 +125,14 @@ public class CardPool extends ItemPool<PaperCard> {
|
||||
return null;
|
||||
}
|
||||
|
||||
public int countByName(String cardName, boolean isCommonCard) {
|
||||
PaperCard pc = isCommonCard
|
||||
? StaticData.instance().getCommonCards().getCard(cardName)
|
||||
: StaticData.instance().getVariantCards().getCard(cardName);
|
||||
|
||||
return this.count(pc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.isEmpty()) { return "[]"; }
|
||||
|
||||
@@ -98,6 +98,7 @@ public enum DeckFormat {
|
||||
private final Range<Integer> sideRange; // null => no check
|
||||
private final int maxCardCopies;
|
||||
private final Predicate<CardRules> cardPoolFilter;
|
||||
private final static String ADVPROCLAMATION = "Advantageous Proclamation";
|
||||
|
||||
private DeckFormat(Range<Integer> mainRange0, Range<Integer> sideRange0, int maxCardCopies0) {
|
||||
this(mainRange0, sideRange0, maxCardCopies0, null);
|
||||
@@ -166,8 +167,11 @@ public enum DeckFormat {
|
||||
int min = getMainRange().getMinimum();
|
||||
int max = getMainRange().getMaximum();
|
||||
|
||||
// TODO "Your minimum deck size is reduced by five."
|
||||
// Adjust minimum base on number of Advantageous Proclamation or similar cards
|
||||
CardPool conspiracies = deck.get(DeckSection.Conspiracy);
|
||||
if (conspiracies != null) {
|
||||
min -= (5 * conspiracies.countByName(ADVPROCLAMATION, true));
|
||||
}
|
||||
|
||||
if (deckSize < min) {
|
||||
return String.format("should have at least %d cards", min);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Name:Advantageous Proclamation
|
||||
ManaCost:no cost
|
||||
Types:Conspiracy
|
||||
K:Your minimum deck size is reduced by five.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/advantageous_proclamation.jpg
|
||||
Oracle:(Start the game with this conspiracy face up in the command zone.)\nYour minimum deck size is reduced by five.
|
||||
Reference in New Issue
Block a user