game: Australian Highlander point update (#11452)

This commit is contained in:
arcox 2023-11-22 16:29:33 -05:00 committed by GitHub
parent c7007a3de3
commit 31f028d41e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,29 +1,37 @@
package mage.deck; package mage.deck;
import java.util.HashMap;
import java.util.Map;
import mage.cards.Card;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.Sets; import mage.cards.Sets;
import mage.cards.decks.Constructed; import mage.cards.decks.Constructed;
import mage.cards.decks.Deck; import mage.cards.decks.Deck;
import mage.cards.decks.DeckValidatorErrorType; import mage.cards.decks.DeckValidatorErrorType;
import java.util.HashMap;
import java.util.Map;
/** /**
* @author spjspj * @author spjspj
*/ */
public class AusHighlander extends Constructed { public class AusHighlander extends Constructed {
private static final Map<String, Integer> pointMap = new HashMap<>();
public static final Map<String, Integer> pointMap = new HashMap<>(); private static final Map<String, Integer> companionPointMap = new HashMap<>();
static { static {
// pointed as companions only
companionPointMap.put("Lurrus of the Dream-Den", 3);
companionPointMap.put("Lutri, the Spellchaser", 2);
// cards in deck
pointMap.put("Ancestral Recall", 5); pointMap.put("Ancestral Recall", 5);
pointMap.put("Time Walk", 5); pointMap.put("Time Walk", 5);
pointMap.put("Black Lotus", 4); pointMap.put("Black Lotus", 4);
pointMap.put("Mana Crypt", 4);
pointMap.put("Thassa's Oracle", 4); pointMap.put("Thassa's Oracle", 4);
pointMap.put("Time Vault", 4); pointMap.put("Time Vault", 4);
pointMap.put("Demonic Tutor", 3); pointMap.put("Demonic Tutor", 3);
pointMap.put("Mana Crypt", 3); pointMap.put("Flash", 3);
pointMap.put("Mox Emerald", 3); pointMap.put("Mox Emerald", 3);
pointMap.put("Mox Jet", 3); pointMap.put("Mox Jet", 3);
pointMap.put("Mox Pearl", 3); pointMap.put("Mox Pearl", 3);
@ -32,61 +40,59 @@ public class AusHighlander extends Constructed {
pointMap.put("Sol Ring", 3); pointMap.put("Sol Ring", 3);
pointMap.put("Underworld Breach", 3); pointMap.put("Underworld Breach", 3);
pointMap.put("Vampiric Tutor", 3); pointMap.put("Vampiric Tutor", 3);
pointMap.put("Channel", 2); pointMap.put("Channel", 2);
pointMap.put("Dig Through Time", 2); pointMap.put("Dig Through Time", 2);
pointMap.put("Flash", 2);
pointMap.put("Imperial Seal", 2); pointMap.put("Imperial Seal", 2);
pointMap.put("Mind Twist", 2); pointMap.put("Minsc & Boo, Timeless Heroes", 2);
pointMap.put("Mystical Tutor", 2);
pointMap.put("Oko, Thief of Crowns", 2); pointMap.put("Oko, Thief of Crowns", 2);
pointMap.put("Protean Hulk", 2); pointMap.put("Ragavan, Nimble Pilferer", 2);
pointMap.put("Strip Mine", 2); pointMap.put("Strip Mine", 2);
pointMap.put("Tinker", 2); pointMap.put("Tinker", 2);
pointMap.put("Treasure Cruise", 2); pointMap.put("Treasure Cruise", 2);
pointMap.put("True-Name Nemesis", 2); pointMap.put("True-Name Nemesis", 2);
pointMap.put("Uro, Titan of Nature's Wrath", 2);
pointMap.put("Ancient Tomb", 1);
pointMap.put("Balance", 1); pointMap.put("Balance", 1);
pointMap.put("Birthing Pod", 1); pointMap.put("Comet, Stellar Pup", 1);
pointMap.put("Crop Rotation", 1); pointMap.put("Crop Rotation", 1);
pointMap.put("Deathrite Shaman", 1); pointMap.put("Deathrite Shaman", 1);
pointMap.put("Doomsday", 1); pointMap.put("Dreadhorde Arcanist", 1);
pointMap.put("Enlightened Tutor", 1); pointMap.put("Enlightened Tutor", 1);
pointMap.put("Fastbond", 1); pointMap.put("Fastbond", 1);
pointMap.put("Force of Will", 1); pointMap.put("Force of Will", 1);
pointMap.put("Gamble", 1);
pointMap.put("Gifts Ungiven", 1); pointMap.put("Gifts Ungiven", 1);
pointMap.put("Green Sun's Zenith", 1); pointMap.put("Gush", 1);
pointMap.put("Hermit Druid", 1);
pointMap.put("Intuition", 1); pointMap.put("Intuition", 1);
pointMap.put("Jace, the Mind Sculptor", 1);
pointMap.put("Karakas", 1); pointMap.put("Karakas", 1);
pointMap.put("Library of Alexandria", 1); pointMap.put("Library of Alexandria", 1);
pointMap.put("Life from the Loam", 1);
pointMap.put("Lim-Dul's Vault", 1);
pointMap.put("Lurrus of the Dream-Den", 1);
pointMap.put("Lutri, the Spellchaser", 1);
pointMap.put("Mana Drain", 1); pointMap.put("Mana Drain", 1);
pointMap.put("Mana Vault", 1); pointMap.put("Mana Vault", 1);
pointMap.put("Merchant Scroll", 1); pointMap.put("Merchant Scroll", 1);
pointMap.put("Mind Twist", 1);
pointMap.put("Mishra's Workshop", 1); pointMap.put("Mishra's Workshop", 1);
pointMap.put("Mystic Sanctuary", 1); pointMap.put("Murktide Regent", 1);
pointMap.put("Mystical Tutor", 1);
pointMap.put("Natural Order", 1); pointMap.put("Natural Order", 1);
pointMap.put("Oath of Druids", 1); pointMap.put("Oath of Druids", 1);
pointMap.put("Personal Tutor", 1); pointMap.put("Personal Tutor", 1);
pointMap.put("Profane Tutor", 1); pointMap.put("Profane Tutor", 1);
pointMap.put("Seasoned Dungeoneer", 1);
pointMap.put("Sensei's Divining Top", 1); pointMap.put("Sensei's Divining Top", 1);
pointMap.put("Skullclamp", 1); pointMap.put("Skullclamp", 1);
pointMap.put("Snapcaster Mage", 1); pointMap.put("Snapcaster Mage", 1);
pointMap.put("Survival of the Fittest", 1);
pointMap.put("Tainted Pact", 1); pointMap.put("Tainted Pact", 1);
pointMap.put("Time Spiral", 1); pointMap.put("The One Ring", 1);
pointMap.put("Timetwister", 1); pointMap.put("Timetwister", 1);
pointMap.put("Tolarian Academy", 1); pointMap.put("Tolarian Academy", 1);
pointMap.put("Umezawa's Jitte", 1); pointMap.put("Umezawa's Jitte", 1);
pointMap.put("Uro, Titan of Nature's Wrath", 1);
pointMap.put("Urza's Saga", 1); pointMap.put("Urza's Saga", 1);
pointMap.put("Wasteland", 1); pointMap.put("Wasteland", 1);
pointMap.put("White Plume Adventurer", 1);
pointMap.put("Wishclaw Talisman", 1); pointMap.put("Wishclaw Talisman", 1);
pointMap.put("Wrenn and Six", 1); pointMap.put("Wrenn and Six", 1);
pointMap.put("Yawgmoth's Will", 1);
} }
public AusHighlander() { public AusHighlander() {
@ -125,6 +131,12 @@ public class AusHighlander extends Constructed {
addError(DeckValidatorErrorType.OTHER, entry.getKey(), " " + pointMap.get(cn) + " point " + cn, true); addError(DeckValidatorErrorType.OTHER, entry.getKey(), " " + pointMap.get(cn) + " point " + cn, true);
} }
} }
for (Card card : deck.getSideboard()) {
if (companionPointMap.containsKey(card.getName())) {
totalPoints += companionPointMap.get(card.getName());
addError(DeckValidatorErrorType.OTHER, card.getName(), " " + companionPointMap.get(card.getName()) + " point " + card.getName(), true);
}
}
if (totalPoints > 7) { if (totalPoints > 7) {
addError(DeckValidatorErrorType.PRIMARY, "Total points too high", "Your calculated point total was " + totalPoints); addError(DeckValidatorErrorType.PRIMARY, "Total points too high", "Your calculated point total was " + totalPoints);
addError(DeckValidatorErrorType.PRIMARY, "Only you can see this!", "Your opponents will not be able to see this message or what cards are in your deck!"); addError(DeckValidatorErrorType.PRIMARY, "Only you can see this!", "Your opponents will not be able to see this message or what cards are in your deck!");