From 0d155118c620eaa992e5004f05dda9adfde77959 Mon Sep 17 00:00:00 2001 From: mcrawford620 Date: Wed, 20 Jul 2016 05:42:37 +0000 Subject: [PATCH] Add some more SOI hints and clean up --- .../res/cardsfolder/b/briarbridge_patrol.txt | 2 ++ forge-gui/res/cardsfolder/b/bygone_bishop.txt | 1 + forge-gui/res/cardsfolder/b/byway_courier.txt | 1 + .../res/cardsfolder/c/confirm_suspicions.txt | 1 + .../cardsfolder/c/confront_the_unknown.txt | 1 + .../res/cardsfolder/d/drownyard_explorers.txt | 1 + forge-gui/res/cardsfolder/e/expose_evil.txt | 1 + .../res/cardsfolder/f/fleeting_memories.txt | 1 + forge-gui/res/cardsfolder/g/gone_missing.txt | 1 + .../res/cardsfolder/h/humble_the_brute.txt | 1 + .../res/cardsfolder/j/jaces_scrutiny.txt | 1 + .../res/cardsfolder/m/magnifying_glass.txt | 1 + .../cardsfolder/o/ongoing_investigation.txt | 1 + .../res/cardsfolder/p/press_for_answers.txt | 1 + forge-gui/res/cardsfolder/r/root_out.txt | 1 + .../res/cardsfolder/s/survive_the_night.txt | 1 + .../res/cardsfolder/t/tamiyos_journal.txt | 1 + .../res/cardsfolder/t/thraben_inspector.txt | 1 + .../res/cardsfolder/t/trail_of_evidence.txt | 1 + forge-gui/res/cardsfolder/w/weirding_wood.txt | 1 + .../main/java/forge/limited/CardRanker.java | 14 +++++++------ .../forge/limited/LimitedDeckBuilder.java | 20 ++++++++++++++----- .../java/forge/limited/SealedDeckBuilder.java | 3 +++ 23 files changed, 47 insertions(+), 11 deletions(-) diff --git a/forge-gui/res/cardsfolder/b/briarbridge_patrol.txt b/forge-gui/res/cardsfolder/b/briarbridge_patrol.txt index 0d8f0669b94..e8e0dc6e726 100644 --- a/forge-gui/res/cardsfolder/b/briarbridge_patrol.txt +++ b/forge-gui/res/cardsfolder/b/briarbridge_patrol.txt @@ -16,5 +16,7 @@ T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | CheckSVar$ Clue SVar:TrigCheatCreature:DB$ ChangeZone | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SpellDescription$ You may put a creature card from your hand onto the battlefield. SVar:ClueResearch:Count$SacrificedThisTurn Clue +DeckHints:Ability$Investigate +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/briarbridge_patrol.jpg Oracle:Whenever Briarbridge Patrol deals damage to one or more creatures, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")\nAt the beginning of each end step, if you sacrificed three or more Clues this turn, you may put a creature card from your hand onto the battlefield. diff --git a/forge-gui/res/cardsfolder/b/bygone_bishop.txt b/forge-gui/res/cardsfolder/b/bygone_bishop.txt index 7a03590ad68..5a7e4cf35af 100644 --- a/forge-gui/res/cardsfolder/b/bygone_bishop.txt +++ b/forge-gui/res/cardsfolder/b/bygone_bishop.txt @@ -6,4 +6,5 @@ K:Flying T:Mode$ SpellCast | ValidCard$ Creature.cmcLE3 | ValidActivatingPlayer$ You | Execute$ DBToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a creature spell with converted mana cost 3 or less, investigate. SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate Oracle:Flying\nWhenever you cast a creature spell with converted mana cost 3 or less, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/b/byway_courier.txt b/forge-gui/res/cardsfolder/b/byway_courier.txt index 7e020fcb38b..cec1db202f2 100644 --- a/forge-gui/res/cardsfolder/b/byway_courier.txt +++ b/forge-gui/res/cardsfolder/b/byway_courier.txt @@ -5,6 +5,7 @@ PT:3/2 T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigToken | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/byway_courier.jpg Oracle:When Byway Courier dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/c/confirm_suspicions.txt b/forge-gui/res/cardsfolder/c/confirm_suspicions.txt index cff1504bcf0..0c58131e91a 100644 --- a/forge-gui/res/cardsfolder/c/confirm_suspicions.txt +++ b/forge-gui/res/cardsfolder/c/confirm_suspicions.txt @@ -6,6 +6,7 @@ SVar:DBToken1:DB$Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact SVar:DBToken2:DB$Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | SubAbility$ DBToken3 | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:DBToken3:DB$Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/confirm_suspicions.jpg Oracle:Counter target spell.\nInvestigate three times. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/c/confront_the_unknown.txt b/forge-gui/res/cardsfolder/c/confront_the_unknown.txt index 941d234e038..1066cc68a8d 100644 --- a/forge-gui/res/cardsfolder/c/confront_the_unknown.txt +++ b/forge-gui/res/cardsfolder/c/confront_the_unknown.txt @@ -6,6 +6,7 @@ SVar:DBPump:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | SVar:X:Count$Valid Clue.YouCtrl SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. DeckHints:Ability$Investigate +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/carrion_call.jpg Oracle:Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/d/drownyard_explorers.txt b/forge-gui/res/cardsfolder/d/drownyard_explorers.txt index a7aee03e5fb..91a6ad9fe17 100644 --- a/forge-gui/res/cardsfolder/d/drownyard_explorers.txt +++ b/forge-gui/res/cardsfolder/d/drownyard_explorers.txt @@ -5,6 +5,7 @@ PT:2/4 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/drownyard_explorers.jpg Oracle:When Drownyard Explorers enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/e/expose_evil.txt b/forge-gui/res/cardsfolder/e/expose_evil.txt index 82d53689d18..3b44f81c2df 100644 --- a/forge-gui/res/cardsfolder/e/expose_evil.txt +++ b/forge-gui/res/cardsfolder/e/expose_evil.txt @@ -4,6 +4,7 @@ Types:Instant A:SP$ Tap | Cost$ 1 W | TargetMin$ 0 | TargetMax$ 2 | TgtPrompt$ Choose target creature | ValidTgts$ Creature | SubAbility$ DBToken | SpellDescription$ Tap up to two target creatures. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/expose_evil.jpg Oracle:Tap up to two target creatures.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/f/fleeting_memories.txt b/forge-gui/res/cardsfolder/f/fleeting_memories.txt index 7f9fb2838d9..a9b6968b403 100644 --- a/forge-gui/res/cardsfolder/f/fleeting_memories.txt +++ b/forge-gui/res/cardsfolder/f/fleeting_memories.txt @@ -6,6 +6,7 @@ SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifa SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. T:Mode$ Sacrificed | ValidCard$ Clue.YouCtrl | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. SVar:TrigMill:AB$ Mill | Cost$ 0 | NumCards$ 3 | ValidTgts$ Player | TgtPrompt$ Select target player +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/fleeting_memories.jpg Oracle:When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")\nWhenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. diff --git a/forge-gui/res/cardsfolder/g/gone_missing.txt b/forge-gui/res/cardsfolder/g/gone_missing.txt index a511d0e4b3b..3c40085440a 100644 --- a/forge-gui/res/cardsfolder/g/gone_missing.txt +++ b/forge-gui/res/cardsfolder/g/gone_missing.txt @@ -4,6 +4,7 @@ Types:Sorcery A:SP$ ChangeZone | Cost$ 4 U | ValidTgts$ Permanent | TgtPrompt$ Select target permanent | Origin$ Battlefield | Destination$ Library | LibraryPosition$ 0 | SubAbility$ DBToken | SpellDescription$ Put target permanent on top of its owner's library. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/gone_missing.jpg Oracle:Put target permanent on top of its owner's library.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/h/humble_the_brute.txt b/forge-gui/res/cardsfolder/h/humble_the_brute.txt index c0f4d2c1cc3..706850fc89e 100644 --- a/forge-gui/res/cardsfolder/h/humble_the_brute.txt +++ b/forge-gui/res/cardsfolder/h/humble_the_brute.txt @@ -4,6 +4,7 @@ Types:Instant A:SP$ Destroy | Cost$ 4 W | ValidTgts$ Creature.powerGE4 | SubAbility$ DBToken | TgtPrompt$ Select target creature with power 4 or greater | SpellDescription$ Destroy target creature with power 4 or greater. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/humble_the_brute.jpg Oracle:Destroy target creature with power 4 or greater.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/j/jaces_scrutiny.txt b/forge-gui/res/cardsfolder/j/jaces_scrutiny.txt index 3c1fd5af4ad..456fa51ed59 100644 --- a/forge-gui/res/cardsfolder/j/jaces_scrutiny.txt +++ b/forge-gui/res/cardsfolder/j/jaces_scrutiny.txt @@ -4,6 +4,7 @@ Types:Instant A:SP$ Pump | Cost$ 1 U | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -4 | IsCurse$ True | SubAbility$ DBToken | SpellDescription$ Target creature gets -4/-0 until end of turn. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/jaces_scrutiny.jpg Oracle:Target creature gets -4/-0 until end of turn.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/m/magnifying_glass.txt b/forge-gui/res/cardsfolder/m/magnifying_glass.txt index 4461917c5e7..641d4525fc0 100644 --- a/forge-gui/res/cardsfolder/m/magnifying_glass.txt +++ b/forge-gui/res/cardsfolder/m/magnifying_glass.txt @@ -4,6 +4,7 @@ Types:Artifact A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C} to your mana pool. A:AB$ Token | Cost$ 4 T | TokenAmount$ 1 |TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | SpellDescription$ Investigate (Put a colorless Clue artifact token onto the battlefield with "2, Sacrifice this artifact: Draw a card.") | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/magnifying_glass.jpg Oracle:{T}: Add {C} to your mana pool.\n{4}, {T}: Investigate (Put a colorless Clue artifact token onto the battlefield with "2, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/o/ongoing_investigation.txt b/forge-gui/res/cardsfolder/o/ongoing_investigation.txt index 01387666c29..40c7e8ac44f 100644 --- a/forge-gui/res/cardsfolder/o/ongoing_investigation.txt +++ b/forge-gui/res/cardsfolder/o/ongoing_investigation.txt @@ -7,6 +7,7 @@ A:AB$ Token | Cost$ 1 G ExileFromGrave<1/Creature> | TokenAmount$ 1 | TokenName$ SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ 2 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. SVar:PlayMain1:TRUE +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/ongoing_investigation.jpg Oracle:Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")\n{1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. diff --git a/forge-gui/res/cardsfolder/p/press_for_answers.txt b/forge-gui/res/cardsfolder/p/press_for_answers.txt index 2e4659d3031..b04ac8da34a 100644 --- a/forge-gui/res/cardsfolder/p/press_for_answers.txt +++ b/forge-gui/res/cardsfolder/p/press_for_answers.txt @@ -5,6 +5,7 @@ A:SP$ Tap | Cost$ 1 U | ValidTgts$ Creature | SubAbility$ DBPump | SpellDescript SVar:DBPump:DB$ Pump | Cost$ 0 | Defined$ Targeted | KW$ HIDDEN This card doesn't untap during your next untap step. | Permanent$ True | SubAbility$ DBToken SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/press_for_answers.jpg Oracle:Tap target creature. It doesn't untap during its controller's next untap step.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/r/root_out.txt b/forge-gui/res/cardsfolder/r/root_out.txt index f8f7a2f1dfd..016e874d4bd 100644 --- a/forge-gui/res/cardsfolder/r/root_out.txt +++ b/forge-gui/res/cardsfolder/r/root_out.txt @@ -4,6 +4,7 @@ Types:Sorcery A:SP$ Destroy | Cost$ 2 G | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment | SubAbility$ DBToken | SpellDescription$ Destroy target artifact or enchantment. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/root_out.jpg Oracle:Destroy target artifact or enchantment.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/s/survive_the_night.txt b/forge-gui/res/cardsfolder/s/survive_the_night.txt index 221db18b8c5..0f901302bbf 100644 --- a/forge-gui/res/cardsfolder/s/survive_the_night.txt +++ b/forge-gui/res/cardsfolder/s/survive_the_night.txt @@ -4,6 +4,7 @@ Types:Instant A:SP$ Pump | Cost$ 2 W | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +1 | KW$ Indestructible | SubAbility$ DBToken | SpellDescription$ Target creature gets +1/+0 and gains indestructible until end of turn. Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/survive_the_night.jpg Oracle:Target creature gets +1/+0 and gains indestructible until end of turn.\nInvestigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/t/tamiyos_journal.txt b/forge-gui/res/cardsfolder/t/tamiyos_journal.txt index 11c683ef1f1..cf37b481b4d 100644 --- a/forge-gui/res/cardsfolder/t/tamiyos_journal.txt +++ b/forge-gui/res/cardsfolder/t/tamiyos_journal.txt @@ -5,6 +5,7 @@ T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | E SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 A:AB$ ChangeZone | Cost$ T Sac<3/Clue> | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | SpellDescription$ Search your library for a card and put that card into your hand. Then shuffle your library. SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/tamiyos_journal.jpg Oracle:At the beginning of your upkeep, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")\n{T}, Sacrifice three Clues: Search your library for a card and put that card into your hand. Then shuffle your library. diff --git a/forge-gui/res/cardsfolder/t/thraben_inspector.txt b/forge-gui/res/cardsfolder/t/thraben_inspector.txt index 2b54f7d89d3..880b721dac6 100644 --- a/forge-gui/res/cardsfolder/t/thraben_inspector.txt +++ b/forge-gui/res/cardsfolder/t/thraben_inspector.txt @@ -5,6 +5,7 @@ PT:1/2 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 | TokenAbilities$ ABDraw SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/thraben_inspector.jpg Oracle:When Thraben Inspector enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/t/trail_of_evidence.txt b/forge-gui/res/cardsfolder/t/trail_of_evidence.txt index 71208894dc2..42bf834cbcd 100644 --- a/forge-gui/res/cardsfolder/t/trail_of_evidence.txt +++ b/forge-gui/res/cardsfolder/t/trail_of_evidence.txt @@ -4,5 +4,6 @@ Types:Enchantment T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | Execute$ DBToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifact,Clue | TokenOwner$ You | TokenColors$ Colorless | TokenImage$ c clue | TokenAbilities$ ABDraw | TokenAltImages$ c_clue2,c_clue3,c_clue4,c_clue5,c_clue6 SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. +DeckHas:Ability$Investigate Oracle:Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") diff --git a/forge-gui/res/cardsfolder/w/weirding_wood.txt b/forge-gui/res/cardsfolder/w/weirding_wood.txt index e0efb05ee2b..cd160f09100 100644 --- a/forge-gui/res/cardsfolder/w/weirding_wood.txt +++ b/forge-gui/res/cardsfolder/w/weirding_wood.txt @@ -8,5 +8,6 @@ SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenName$ Clue | TokenTypes$ Artifa SVar:ABDraw:AB$ Draw | Cost$ 2 Sac<1/CARDNAME> | NumCards$ 1 | SpellDescription$ Draw a card. S:Mode$ Continuous | Affected$ Card.EnchantedBy | AddAbility$ WeirdingWoodTap | Description$ Enchanted land has "{T}: Add two mana of any one color to your mana pool." SVar:WeirdingWoodTap:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 2 | SpellDescription$ Add two mana of any one color to your mana pool. +DeckHas:Ability$Investigate SVar:Picture:http://www.wizards.com/global/images/magic/general/weirding_wood.jpg Oracle:Enchant land\nWhen Weirding Wood enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.")\nEnchanted land has "{T}: Add two mana of any one color to your mana pool." \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/limited/CardRanker.java b/forge-gui/src/main/java/forge/limited/CardRanker.java index 0a18fb1a902..5c4742ed90c 100644 --- a/forge-gui/src/main/java/forge/limited/CardRanker.java +++ b/forge-gui/src/main/java/forge/limited/CardRanker.java @@ -14,12 +14,14 @@ import java.util.Map; public class CardRanker { private static final double SCORE_UNPICKABLE = -100.0; + // These factors determine the amount of boost given to a card's ranking for each other + // card that matches it's deckhints. private static final Map typeFactors = ImmutableMap.builder() - .put(DeckHints.Type.ABILITY, 5) + .put(DeckHints.Type.ABILITY, 3) .put(DeckHints.Type.COLOR, 1) - .put(DeckHints.Type.KEYWORD, 5) - .put(DeckHints.Type.NAME, 20) - .put(DeckHints.Type.TYPE, 5) + .put(DeckHints.Type.KEYWORD, 3) + .put(DeckHints.Type.NAME, 10) + .put(DeckHints.Type.TYPE, 3) .build(); private static boolean logToConsole = false; @@ -148,7 +150,7 @@ public class CardRanker { Iterable cards = cardsByType.get(type); score += Iterables.size(cards) * typeFactors.get(type); if (logToConsole && Iterables.size(cards) > 0) { - System.out.println(" -- Found " + Iterables.size(cards) + " cards for " + type); + System.out.println(" - " + card.getName() + ": Found " + Iterables.size(cards) + " cards for " + type); } } } @@ -159,7 +161,7 @@ public class CardRanker { Iterable cards = cardsByType.get(type); score += Iterables.size(cards) * typeFactors.get(type); if (logToConsole && Iterables.size(cards) > 0) { - System.out.println(" -- Found " + Iterables.size(cards) + " cards for " + type); + System.out.println(" - " + card.getName() + ": Found " + Iterables.size(cards) + " cards for " + type); } } } diff --git a/forge-gui/src/main/java/forge/limited/LimitedDeckBuilder.java b/forge-gui/src/main/java/forge/limited/LimitedDeckBuilder.java index 230e44d9398..1e1fb9d384a 100644 --- a/forge-gui/src/main/java/forge/limited/LimitedDeckBuilder.java +++ b/forge-gui/src/main/java/forge/limited/LimitedDeckBuilder.java @@ -66,7 +66,7 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { private Iterable onColorCreatures; private Iterable onColorNonCreatures; - protected static final boolean logToConsole = true; + protected static final boolean logToConsole = false; /** * @@ -337,8 +337,12 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { // total of all ClrCnts int totalColor = 0; + int numColors = 0; for (int i = 0; i < 5; i++) { totalColor += clrCnts[i]; + if (clrCnts[i] > 0) { + numColors++; + } } if (totalColor == 0) { throw new RuntimeException("Add Lands to empty deck list!"); @@ -349,7 +353,13 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { for (int i = 0; i < 5; i++) { if (clrCnts[i] > 0) { // calculate number of lands for each color - final float p = (float) clrCnts[i] / (float) totalColor; + float p = (float) clrCnts[i] / (float) totalColor; + if (numColors == 2) { + // In the normal two-color case, constrain to within 40% and 60% so that the AI + // doesn't put too few lands of the lesser color, risking getting screwed on that color. + // Don't do this for the odd case where a third color had to be added to the deck. + p = Math.min(Math.max(p, 0.4f), 0.6f); + } int nLand = Math.round(landsNeeded * p); // desired truncation to int if (logToConsole) { System.out.printf("Basics[%s]: %d/%d = %f%% = %d cards%n", MagicColor.Constant.BASIC_LANDS.get(i), clrCnts[i], totalColor, 100*p, nLand); @@ -369,9 +379,9 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { } } - // A common problem at this point is that nLand in the above loop was exactly 1/2, - // and it rounds up for both colors, and too many lands were added. - // If the deck size is > 40, remove the last land added. + // A common problem at this point is that p in the above loop was exactly 1/2, + // and nLand rounded up for both colors, so that one too many lands was added. + // So if the deck size is > 40, remove the last land added. // Otherwise, the fixDeckSize() method would remove random cards. while (deckList.size() > 40) { deckList.remove(deckList.size() - 1); diff --git a/forge-gui/src/main/java/forge/limited/SealedDeckBuilder.java b/forge-gui/src/main/java/forge/limited/SealedDeckBuilder.java index 0903f1575f4..a27e916ee1c 100644 --- a/forge-gui/src/main/java/forge/limited/SealedDeckBuilder.java +++ b/forge-gui/src/main/java/forge/limited/SealedDeckBuilder.java @@ -33,6 +33,9 @@ public class SealedDeckBuilder extends LimitedDeckBuilder { private ColorSet chooseColors() { // choose colors based on top 33% of cards final List colorChooserList = new ArrayList(); + // this is not exactly right, because the rankings here are taking into account deckhints + // for the whole set of cards, when some of those cards could be in colors that won't + // make it into the deck List initialRanked = ranker.rankCardsInDeck(getAiPlayables()); double limit = getAiPlayables().size() * .33; for (int i = 0; i < limit; i++) {