mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Merge pull request #57 from magefree/master
Merge https://github.com/magefree/mage
This commit is contained in:
commit
73106139e5
891 changed files with 13085 additions and 10386 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -86,6 +86,7 @@ mage.updater.client/target
|
|||
|
||||
# Mage.Verify
|
||||
Mage.Verify/target
|
||||
Mage.Verify/mageclient.log
|
||||
Mage.Verify/AllCards.json.zip
|
||||
Mage.Verify/AllSets.json.zip
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.2 MiB |
|
@ -0,0 +1,87 @@
|
|||
1 [CMD:193] Desecrator Hag
|
||||
1 [CMD:270] Dimir Aqueduct
|
||||
1 [CMD:62] Slipstream Eel
|
||||
1 [CMD:63] Spell Crumple
|
||||
1 [CMD:271] Dreadship Reef
|
||||
1 [CMD:152] Eternal Witness
|
||||
1 [CMD:275] Golgari Rot Farm
|
||||
1 [CMD:68] Vow of Flight
|
||||
2 [CMD:310] Swamp
|
||||
1 [CMD:236] Vulturous Zombie
|
||||
1 [CMD:235] Vorosh, the Hunter
|
||||
1 [CMD:279] Jwar Isle Refuge
|
||||
2 [CMD:315] Forest
|
||||
2 [CMD:317] Forest
|
||||
1 [CMD:239] Wrexial, the Risen Deep
|
||||
2 [CMD:316] Forest
|
||||
3 [CMD:308] Swamp
|
||||
3 [CMD:307] Swamp
|
||||
3 [CMD:309] Swamp
|
||||
1 [CMD:191] Damia, Sage of Stone
|
||||
1 [CMD:71] Wonder
|
||||
1 [CMD:140] Acidic Slime
|
||||
1 [CMD:73] Avatar of Woe
|
||||
1 [CMD:261] Sol Ring
|
||||
1 [CMD:74] Buried Alive
|
||||
1 [CMD:263] Triskelavus
|
||||
1 [CMD:262] Solemn Simulacrum
|
||||
1 [CMD:70] Windfall
|
||||
1 [CMD:102] Stitch Together
|
||||
1 [CMD:145] Brawn
|
||||
1 [CMD:101] Sign in Blood
|
||||
1 [CMD:266] Barren Moor
|
||||
1 [CMD:148] Cultivate
|
||||
1 [CMD:104] Syphon Mind
|
||||
1 [CMD:269] Command Tower
|
||||
1 [CMD:103] Syphon Flesh
|
||||
1 [CMD:75] Butcher of Malakir
|
||||
1 [CMD:227] Skullbriar, the Walking Grave
|
||||
2 [CMD:304] Island
|
||||
1 [CMD:76] Dark Hatchling
|
||||
1 [CMD:105] Unnerve
|
||||
2 [CMD:303] Island
|
||||
2 [CMD:306] Island
|
||||
1 [CMD:228] Szadek, Lord of Secrets
|
||||
1 [CMD:107] Vow of Malice
|
||||
2 [CMD:305] Island
|
||||
1 [CMD:292] Tranquil Thicket
|
||||
1 [CMD:83] Fleshbag Marauder
|
||||
1 [CMD:291] Terramorphic Expanse
|
||||
1 [CMD:85] Grave Pact
|
||||
1 [CMD:175] Tribute to the Wild
|
||||
1 [CMD:254] Oblivion Stone
|
||||
1 [CMD:81] Extractor Demon
|
||||
1 [CMD:176] Troll Ascetic
|
||||
1 [CMD:253] Lightning Greaves
|
||||
1 [CMD:1] Artisan of Kozilek
|
||||
1 [CMD:179] Yavimaya Elder
|
||||
1 [CMD:178] Vow of Wildness
|
||||
1 [CMD:86] Gravedigger
|
||||
1 [CMD:259] Simic Signet
|
||||
1 [CMD:44] Dreamborn Muse
|
||||
1 [CMD:88] Living Death
|
||||
1 [CMD:89] Mortivore
|
||||
1 [CMD:45] Fact or Fiction
|
||||
1 [CMD:290] Temple of the False God
|
||||
1 [CMD:93] Patron of the Nezumi
|
||||
1 [CMD:281] Lonely Sandbar
|
||||
1 [CMD:50] Memory Erosion
|
||||
1 [CMD:51] Minds Aglow
|
||||
1 [CMD:52] Mulldrifter
|
||||
1 [CMD:96] Rise from the Grave
|
||||
1 [CMD:285] Rupture Spire
|
||||
1 [CMD:165] Lhurgoyf
|
||||
1 [CMD:92] Nezumi Graverobber
|
||||
1 [CMD:168] Relic Crush
|
||||
1 [CMD:289] Svogthos, the Restless Tomb
|
||||
1 [CMD:288] Simic Growth Chamber
|
||||
1 [CMD:59] Riddlekeeper
|
||||
1 [CMD:246] Dimir Signet
|
||||
1 [CMD:97] Scythe Specter
|
||||
1 [CMD:249] Golgari Signet
|
||||
1 [CMD:98] Sewer Nemesis
|
||||
1 [CMD:99] Shared Trauma
|
||||
2 [CMD:318] Forest
|
||||
SB: 1 [CMD:210] The Mimeoplasm
|
||||
LAYOUT MAIN:(2,10)(CMC,true,50)|()()([CMD:92],[CMD:227])([CMD:152],[CMD:83],[CMD:59],[CMD:176],[CMD:179])([CMD:145],[CMD:193],[CMD:44],[CMD:86],[CMD:165],[CMD:89],[CMD:98],[CMD:262],[CMD:71])([CMD:140],[CMD:52],[CMD:236])([CMD:76],[CMD:81],[CMD:97],[CMD:235],[CMD:239])([CMD:75],[CMD:191],[CMD:93],[CMD:62],[CMD:228],[CMD:263])([CMD:73])([CMD:1])([CMD:266],[CMD:269],[CMD:270],[CMD:271],[CMD:315],[CMD:315],[CMD:316],[CMD:316],[CMD:317],[CMD:317],[CMD:318],[CMD:318],[CMD:275],[CMD:303],[CMD:303],[CMD:304],[CMD:304],[CMD:305],[CMD:305],[CMD:306],[CMD:306],[CMD:279],[CMD:281],[CMD:285],[CMD:288],[CMD:289],[CMD:307],[CMD:307],[CMD:307],[CMD:308],[CMD:308],[CMD:308],[CMD:309],[CMD:309],[CMD:309],[CMD:310],[CMD:310],[CMD:290],[CMD:291],[CMD:292])([CMD:51],[CMD:99],[CMD:261])([CMD:101],[CMD:102],[CMD:175],[CMD:246],[CMD:249],[CMD:253],[CMD:259])([CMD:74],[CMD:148],[CMD:70],[CMD:63],[CMD:254],[CMD:50],[CMD:68],[CMD:107],[CMD:178])([CMD:104],[CMD:105],[CMD:45],[CMD:85])([CMD:88],[CMD:96],[CMD:103],[CMD:168])()()()()
|
||||
LAYOUT SIDEBOARD:(1,1)(NONE,false,50)|([CMD:210])
|
|
@ -0,0 +1,90 @@
|
|||
1 [CMD:272] Evolving Wilds
|
||||
1 [CMD:195] Duergar Hedge-Mage
|
||||
1 [CMD:273] Forgotten Cave
|
||||
1 [CMD:111] Avatar of Slaughter
|
||||
1 [CMD:231] Terminate
|
||||
2 [CMD:311] Mountain
|
||||
1 [CMD:24] Orim's Thunder
|
||||
2 [CMD:310] Swamp
|
||||
1 [CMD:25] Path to Exile
|
||||
2 [CMD:313] Mountain
|
||||
2 [CMD:312] Mountain
|
||||
1 [CMD:117] Comet Storm
|
||||
1 [CMD:238] Wrecking Ball
|
||||
2 [CMD:314] Mountain
|
||||
1 [CMD:21] Mother of Runes
|
||||
1 [CMD:116] Cleansing Beam
|
||||
1 [CMD:118] Death by Dragons
|
||||
2 [CMD:308] Swamp
|
||||
2 [CMD:307] Swamp
|
||||
1 [CMD:109] Anger
|
||||
2 [CMD:309] Swamp
|
||||
1 [CMD:18] Lightkeeper of Emeria
|
||||
1 [CMD:184] Basandra, Battle Seraph
|
||||
1 [CMD:261] Sol Ring
|
||||
1 [CMD:30] Serra Angel
|
||||
1 [CMD:186] Boros Guildmage
|
||||
1 [CMD:185] Bladewing the Risen
|
||||
1 [CMD:264] Akoum Refuge
|
||||
1 [CMD:267] Bojuka Bog
|
||||
2 [CMD:300] Plains
|
||||
1 [CMD:79] Dread Cacodemon
|
||||
1 [CMD:35] Voice of All
|
||||
1 [CMD:266] Barren Moor
|
||||
1 [CMD:36] Vow of Duty
|
||||
1 [CMD:269] Command Tower
|
||||
2 [CMD:302] Plains
|
||||
1 [CMD:104] Syphon Mind
|
||||
1 [CMD:268] Boros Garrison
|
||||
2 [CMD:301] Plains
|
||||
1 [CMD:103] Syphon Flesh
|
||||
1 [CMD:31] Shattered Angel
|
||||
1 [CMD:32] Soul Snare
|
||||
1 [CMD:108] Akroma, Angel of Fury
|
||||
1 [CMD:229] Tariel, Reckoner of Souls
|
||||
1 [CMD:77] Diabolic Tutor
|
||||
1 [CMD:107] Vow of Malice
|
||||
1 [CMD:28] Return to Dust
|
||||
1 [CMD:29] Righteous Cause
|
||||
1 [CMD:180] Angel of Despair
|
||||
1 [CMD:82] Fallen Angel
|
||||
1 [CMD:9] Bathe in Light
|
||||
1 [CMD:7] Archangel of Strife
|
||||
1 [CMD:5] Angelic Arbiter
|
||||
1 [CMD:130] Oni of Wild Places
|
||||
1 [CMD:298] Zoetic Cavern
|
||||
1 [CMD:3] Akroma's Vengeance
|
||||
1 [CMD:80] Evincar's Justice
|
||||
1 [CMD:297] Vivid Meadow
|
||||
1 [CMD:253] Lightning Greaves
|
||||
1 [CMD:132] Pyrohemia
|
||||
2 [CMD:299] Plains
|
||||
1 [CMD:211] Mortify
|
||||
1 [CMD:255] Orzhov Signet
|
||||
1 [CMD:137] Sulfurous Blast
|
||||
1 [CMD:257] Rakdos Signet
|
||||
1 [CMD:136] Stranglehold
|
||||
1 [CMD:216] Oros, the Avenger
|
||||
1 [CMD:138] Vow of Lightning
|
||||
1 [CMD:217] Orzhov Guildmage
|
||||
1 [CMD:209] Master Warcraft
|
||||
1 [CMD:208] Malfegor
|
||||
1 [CMD:94] Razorjaw Oni
|
||||
1 [CMD:283] Orzhov Basilica
|
||||
1 [CMD:95] Reiver Demon
|
||||
1 [CMD:282] Molten Slagheap
|
||||
1 [CMD:285] Rupture Spire
|
||||
1 [CMD:120] Dragon Whelp
|
||||
1 [CMD:284] Rakdos Carnarium
|
||||
1 [CMD:243] Boros Signet
|
||||
1 [CMD:286] Secluded Steppe
|
||||
1 [CMD:242] Armillary Sphere
|
||||
1 [CMD:121] Earthquake
|
||||
1 [CMD:124] Furnace Whelp
|
||||
1 [CMD:245] Darksteel Ingot
|
||||
1 [CMD:202] Gwyllion Hedge-Mage
|
||||
1 [CMD:11] Congregate
|
||||
1 [CMD:129] Mana-Charged Dragon
|
||||
SB: 1 [CMD:206] Kaalia of the Vast
|
||||
LAYOUT MAIN:(2,10)(CMC,true,50)|()([CMD:21])([CMD:186],[CMD:217])([CMD:195],[CMD:202])([CMD:109],[CMD:120],[CMD:124],[CMD:18],[CMD:94],[CMD:35])([CMD:184],[CMD:82],[CMD:30],[CMD:31])([CMD:208],[CMD:129],[CMD:130],[CMD:216])([CMD:180],[CMD:5],[CMD:7],[CMD:185],[CMD:229])([CMD:108],[CMD:111],[CMD:95])([CMD:79])([CMD:264],[CMD:266],[CMD:267],[CMD:268],[CMD:269],[CMD:272],[CMD:273],[CMD:282],[CMD:311],[CMD:311],[CMD:312],[CMD:312],[CMD:313],[CMD:313],[CMD:314],[CMD:314],[CMD:283],[CMD:299],[CMD:299],[CMD:300],[CMD:300],[CMD:301],[CMD:301],[CMD:302],[CMD:302],[CMD:284],[CMD:285],[CMD:286],[CMD:307],[CMD:307],[CMD:308],[CMD:308],[CMD:309],[CMD:309],[CMD:310],[CMD:310],[CMD:297],[CMD:298])([CMD:121],[CMD:25],[CMD:261],[CMD:32])([CMD:242],[CMD:9],[CMD:243],[CMD:117],[CMD:253],[CMD:255],[CMD:257],[CMD:231])([CMD:245],[CMD:211],[CMD:24],[CMD:36],[CMD:138],[CMD:107])([CMD:11],[CMD:77],[CMD:80],[CMD:209],[CMD:132],[CMD:28],[CMD:136],[CMD:137],[CMD:104],[CMD:238])([CMD:116],[CMD:29],[CMD:103])([CMD:3],[CMD:118])()()()
|
||||
LAYOUT SIDEBOARD:(1,1)(NONE,false,50)|([CMD:206])
|
|
@ -0,0 +1,86 @@
|
|||
1 [CMD:60] Scattering Stroke
|
||||
1 [CMD:61] Skyscribing
|
||||
1 [CMD:272] Evolving Wilds
|
||||
1 [CMD:194] Dominus of Fealty
|
||||
1 [CMD:63] Spell Crumple
|
||||
1 [CMD:278] Izzet Boilerworks
|
||||
2 [CMD:311] Mountain
|
||||
1 [CMD:68] Vow of Flight
|
||||
1 [CMD:112] Breath of Darigaaz
|
||||
1 [CMD:69] Whirlpool Whelm
|
||||
2 [CMD:313] Mountain
|
||||
1 [CMD:26] Pollen Lullaby
|
||||
2 [CMD:312] Mountain
|
||||
1 [CMD:114] Chaos Warp
|
||||
1 [CMD:27] Prison Term
|
||||
1 [CMD:64] Trade Secrets
|
||||
2 [CMD:314] Mountain
|
||||
1 [CMD:237] Wall of Denial
|
||||
1 [CMD:66] Vedalken Plotter
|
||||
1 [CMD:22] Oblation
|
||||
1 [CMD:118] Death by Dragons
|
||||
1 [CMD:67] Vision Skeins
|
||||
1 [CMD:17] Journey to Nowhere
|
||||
1 [CMD:19] Martyr's Bond
|
||||
1 [CMD:261] Sol Ring
|
||||
1 [CMD:183] Azorius Guildmage
|
||||
1 [CMD:265] Azorius Chancery
|
||||
1 [CMD:221] Ruhan of the Fomori
|
||||
1 [CMD:187] Brion Stoutarm
|
||||
2 [CMD:300] Plains
|
||||
1 [CMD:36] Vow of Duty
|
||||
1 [CMD:269] Command Tower
|
||||
2 [CMD:302] Plains
|
||||
1 [CMD:37] Wall of Omens
|
||||
1 [CMD:268] Boros Garrison
|
||||
2 [CMD:301] Plains
|
||||
1 [CMD:38] Windborn Muse
|
||||
3 [CMD:304] Island
|
||||
3 [CMD:303] Island
|
||||
1 [CMD:32] Soul Snare
|
||||
3 [CMD:306] Island
|
||||
1 [CMD:33] Spurnmage Advocate
|
||||
3 [CMD:305] Island
|
||||
1 [CMD:291] Terramorphic Expanse
|
||||
1 [CMD:8] Austere Command
|
||||
1 [CMD:40] Brainstorm
|
||||
1 [CMD:6] Arbiter of Knollridge
|
||||
1 [CMD:41] Chromeshell Crab
|
||||
1 [CMD:131] Punishing Fire
|
||||
1 [CMD:251] Howling Mine
|
||||
1 [CMD:133] Rapacious One
|
||||
1 [CMD:253] Lightning Greaves
|
||||
1 [CMD:46] Flusterstorm
|
||||
1 [CMD:256] Prophetic Prism
|
||||
2 [CMD:299] Plains
|
||||
1 [CMD:47] Fog Bank
|
||||
1 [CMD:48] Gomazoa
|
||||
1 [CMD:49] Guard Gomazoa
|
||||
1 [CMD:213] Nin, the Pain Artist
|
||||
1 [CMD:139] Wild Ricochet
|
||||
1 [CMD:43] Court Hussar
|
||||
1 [CMD:215] Numot, the Devastator
|
||||
1 [CMD:138] Vow of Lightning
|
||||
1 [CMD:218] Plumeveil
|
||||
1 [CMD:242] Armillary Sphere
|
||||
1 [CMD:13] False Prophet
|
||||
1 [CMD:245] Darksteel Ingot
|
||||
1 [CMD:57] Reins of Power
|
||||
1 [CMD:123] Flametongue Kavu
|
||||
1 [CMD:244] Champion's Helm
|
||||
1 [CMD:14] Ghostly Prison
|
||||
1 [CMD:58] Repulse
|
||||
1 [CMD:247] Dreamstone Hedron
|
||||
1 [CMD:126] Insurrection
|
||||
1 [CMD:125] Goblin Cadets
|
||||
1 [CMD:16] Jotun Grunt
|
||||
1 [CMD:205] Izzet Chronarch
|
||||
1 [CMD:53] Murmurs from Beyond
|
||||
1 [CMD:248] Fellwar Stone
|
||||
1 [CMD:127] Lash Out
|
||||
1 [CMD:54] Perilous Research
|
||||
1 [CMD:55] Propaganda
|
||||
1 [CMD:12] Crescendo of War
|
||||
SB: 1 [CMD:240] Zedruu the Greathearted
|
||||
LAYOUT MAIN:(2,9)(CMC,true,50)|()([CMD:125],[CMD:33])([CMD:183],[CMD:47],[CMD:16],[CMD:213],[CMD:37])([CMD:43],[CMD:48],[CMD:49],[CMD:218],[CMD:66],[CMD:237])([CMD:187],[CMD:13],[CMD:123],[CMD:221],[CMD:38])([CMD:41],[CMD:194],[CMD:205])([CMD:215],[CMD:133])([CMD:6])()([CMD:265],[CMD:268],[CMD:269],[CMD:272],[CMD:303],[CMD:303],[CMD:303],[CMD:304],[CMD:304],[CMD:304],[CMD:305],[CMD:305],[CMD:305],[CMD:306],[CMD:306],[CMD:306],[CMD:278],[CMD:311],[CMD:311],[CMD:312],[CMD:312],[CMD:313],[CMD:313],[CMD:314],[CMD:314],[CMD:299],[CMD:299],[CMD:300],[CMD:300],[CMD:301],[CMD:301],[CMD:302],[CMD:302],[CMD:291])([CMD:40],[CMD:46],[CMD:261],[CMD:32])([CMD:242],[CMD:112],[CMD:248],[CMD:251],[CMD:17],[CMD:127],[CMD:253],[CMD:54],[CMD:26],[CMD:256],[CMD:131],[CMD:61],[CMD:67],[CMD:69])([CMD:244],[CMD:114],[CMD:245],[CMD:14],[CMD:53],[CMD:22],[CMD:27],[CMD:55],[CMD:58],[CMD:63],[CMD:64],[CMD:36],[CMD:68],[CMD:138])([CMD:12],[CMD:57],[CMD:60],[CMD:139])()([CMD:8],[CMD:118],[CMD:247],[CMD:19])()([CMD:126])
|
||||
LAYOUT SIDEBOARD:(1,1)(NONE,false,50)|([CMD:240])
|
|
@ -0,0 +1,31 @@
|
|||
1 [DOM:165] Grunn, the Lonely King
|
||||
3 [DOM:264] Mountain
|
||||
2 [DOM:265] Mountain
|
||||
3 [DOM:262] Mountain
|
||||
2 [DOM:163] Gift of Growth
|
||||
3 [DOM:120] Fire Elemental
|
||||
3 [DOM:263] Mountain
|
||||
2 [DOM:142] Shivan Fire
|
||||
1 [DOM:162] Gaea's Protector
|
||||
1 [DOM:125] Ghitu Chronicler
|
||||
3 [DOM:268] Forest
|
||||
2 [DOM:269] Forest
|
||||
1 [DOM:167] Krosan Druid
|
||||
3 [DOM:266] Forest
|
||||
2 [DOM:168] Llanowar Elves
|
||||
3 [DOM:267] Forest
|
||||
1 [DOM:176] Pierce the Sky
|
||||
1 [DOM:275] Chandra, Bold Pyromancer
|
||||
2 [DOM:276] Chandra's Outburst
|
||||
1 [DOM:177] Primordial Wurm
|
||||
1 [DOM:172] Marwyn, the Nurturer
|
||||
1 [DOM:118] Fiery Intervention
|
||||
1 [DOM:119] Fight with Fire
|
||||
1 [DOM:215] Gilded Lotus
|
||||
4 [DOM:279] Timber Gorge
|
||||
3 [DOM:159] Elfhame Druid
|
||||
3 [DOM:277] Karplusan Hound
|
||||
2 [DOM:156] Baloth Gorger
|
||||
4 [DOM:278] Pyromantic Pilgrim
|
||||
LAYOUT MAIN:(2,7)(CMC,true,50)|()([DOM:168],[DOM:168])([DOM:159],[DOM:159],[DOM:159],[DOM:125])([DOM:172],[DOM:278],[DOM:278],[DOM:278],[DOM:278],[DOM:167])([DOM:277],[DOM:277],[DOM:277],[DOM:162],[DOM:156],[DOM:156])([DOM:120],[DOM:120],[DOM:120])([DOM:165],[DOM:177])([DOM:262],[DOM:262],[DOM:262],[DOM:263],[DOM:263],[DOM:263],[DOM:264],[DOM:264],[DOM:264],[DOM:265],[DOM:265],[DOM:266],[DOM:266],[DOM:266],[DOM:267],[DOM:267],[DOM:267],[DOM:268],[DOM:268],[DOM:268],[DOM:269],[DOM:269],[DOM:279],[DOM:279],[DOM:279],[DOM:279])([DOM:142],[DOM:142])([DOM:163],[DOM:163],[DOM:176])([DOM:119])()([DOM:276],[DOM:276],[DOM:215],[DOM:118])([DOM:275])
|
||||
LAYOUT SIDEBOARD:(0,0)(NONE,false,50)|
|
|
@ -1,6 +1,5 @@
|
|||
XMage.de 1 (Europe/Germany) fast :xmage.de:17171
|
||||
old xmage.de (Europe/Germany) :185.3.232.200:17171
|
||||
xmage.us (North America/USA) :xmage.us:17171
|
||||
XMage Players MTG:xmageplayersmtg.ddns.net:17171
|
||||
XMage.tahiti :xmage.tahiti.one:443
|
||||
Seedds Server (Asia) :115.29.203.80:17171
|
||||
|
|
|
@ -581,7 +581,7 @@ public class MageBook extends JComponent {
|
|||
}
|
||||
int start = page * conf.CARDS_PER_PAGE;
|
||||
int end = page * conf.CARDS_PER_PAGE + conf.CARDS_PER_PAGE;
|
||||
int ttokens = getTotalNumTokens(set);
|
||||
int ttokens = tokens.size();
|
||||
int temblems = getTotalNumEmblems(set);
|
||||
int tplanes = getTotalNumPlanes(set);
|
||||
int numTokensEmblemsPlanes = ttokens + temblems + tplanes;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class AboutDialog extends MageDialog {
|
|||
jLabel2.setText("Courtesy: BetaSteward@googlemail.com. Site: http://XMage.de/");
|
||||
|
||||
jLabel3.setText("Devs: BetaSteward, Noxx, Eugen.Rivniy, North, LevelX2, Jeff, Plopman, dustinconrad, emerald000,");
|
||||
jLabel4.setText("fireshoes, lunaskyrise, mnapoleon, jgod, LoneFox, drmDev, spjspj, L_J, JayDi85.");
|
||||
jLabel4.setText("fireshoes, lunaskyrise, mnapoleon, jgod, LoneFox, drmDev, spjspj, TheElk801, L_J, JayDi85.");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
<Component id="spnNumRounds" min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbAllowSpectators" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="cbPlaneChase" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
|
@ -186,6 +188,7 @@
|
|||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Group type="103" alignment="1" groupAlignment="3" attributes="0">
|
||||
<Component id="cbAllowSpectators" alignment="3" max="32767" attributes="0"/>
|
||||
<Component id="cbPlaneChase" alignment="3" max="32767" attributes="0"/>
|
||||
<Component id="spnNumRounds" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblNumRounds" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
|
@ -454,6 +457,13 @@
|
|||
<Property name="toolTipText" type="java.lang.String" value="Allow other players to watch the games of this table."/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="cbPlaneChase">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Plane Chase"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Use Plane Chase for the tournament."/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component class="javax.swing.JLabel" name="lblPlayer1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
|
|
|
@ -123,6 +123,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
tournamentPlayerPanel.init(i++);
|
||||
}
|
||||
cbAllowSpectators.setSelected(true);
|
||||
cbPlaneChase.setSelected(false);
|
||||
this.setModal(true);
|
||||
this.setLocation(150, 100);
|
||||
}
|
||||
|
@ -173,6 +174,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
jLabel6 = new javax.swing.JLabel();
|
||||
cbDraftTiming = new javax.swing.JComboBox();
|
||||
cbAllowSpectators = new javax.swing.JCheckBox();
|
||||
cbPlaneChase = new javax.swing.JCheckBox();
|
||||
lblPlayer1 = new javax.swing.JLabel();
|
||||
lblConstructionTime = new javax.swing.JLabel();
|
||||
chkRollbackTurnsAllowed = new javax.swing.JCheckBox();
|
||||
|
@ -286,6 +288,9 @@ public class NewTournamentDialog extends MageDialog {
|
|||
cbAllowSpectators.setText("Allow spectators");
|
||||
cbAllowSpectators.setToolTipText("Allow other players to watch the games of this table.");
|
||||
|
||||
cbPlaneChase.setText("Use Plane Chase");
|
||||
cbPlaneChase.setToolTipText("Use Plane Chase variant for the tournament.");
|
||||
|
||||
lblPlayer1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
|
||||
lblPlayer1.setText("Player 1 (You)");
|
||||
|
||||
|
@ -379,7 +384,9 @@ public class NewTournamentDialog extends MageDialog {
|
|||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(spnNumRounds, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cbAllowSpectators))))
|
||||
.addComponent(cbAllowSpectators)
|
||||
.addComponent(cbPlaneChase)
|
||||
)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
|
@ -491,6 +498,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(cbAllowSpectators, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(cbPlaneChase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(spnNumRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(lblNumRounds))
|
||||
.addComponent(lblNbrPlayers, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
|
@ -537,6 +545,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
tOptions.setPassword(txtPassword.getText());
|
||||
tOptions.getPlayerTypes().add(PlayerType.HUMAN);
|
||||
tOptions.setWatchingAllowed(cbAllowSpectators.isSelected());
|
||||
tOptions.setPlaneChase(cbPlaneChase.isSelected());
|
||||
tOptions.setQuitRatio((Integer) spnQuitRatio.getValue());
|
||||
for (TournamentPlayerPanel player : players) {
|
||||
tOptions.getPlayerTypes().add((PlayerType) player.getPlayerType().getSelectedItem());
|
||||
|
@ -1106,6 +1115,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
}
|
||||
}
|
||||
this.cbAllowSpectators.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS + versionStr, "Yes").equals("Yes"));
|
||||
this.cbPlaneChase.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLANE_CHASE + versionStr, "No").equals("Yes"));
|
||||
this.chkRollbackTurnsAllowed.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS + versionStr, "Yes").equals("Yes"));
|
||||
this.chkRated.setSelected(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_RATED + versionStr, "No").equals("Yes"));
|
||||
}
|
||||
|
@ -1191,6 +1201,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
}
|
||||
}
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS + versionStr, (tOptions.isWatchingAllowed() ? "Yes" : "No"));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLANE_CHASE + versionStr, (tOptions.isPlaneChase() ? "Yes" : "No"));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS + versionStr, (tOptions.getMatchOptions().isRollbackTurnsAllowed() ? "Yes" : "No"));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_RATED + versionStr, (tOptions.getMatchOptions().isRated() ? "Yes" : "No"));
|
||||
}
|
||||
|
@ -1205,6 +1216,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
private javax.swing.JButton btnSavedConfiguration1;
|
||||
private javax.swing.JButton btnSavedConfiguration2;
|
||||
private javax.swing.JCheckBox cbAllowSpectators;
|
||||
private javax.swing.JCheckBox cbPlaneChase;
|
||||
private javax.swing.JComboBox cbDeckType;
|
||||
private javax.swing.JComboBox cbDraftCube;
|
||||
private javax.swing.JComboBox cbDraftTiming;
|
||||
|
|
|
@ -264,6 +264,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
public static final String KEY_NEW_TOURNAMENT_PLAYERS_DRAFT = "newTournamentPlayersDraft";
|
||||
public static final String KEY_NEW_TOURNAMENT_DRAFT_TIMING = "newTournamentDraftTiming";
|
||||
public static final String KEY_NEW_TOURNAMENT_ALLOW_SPECTATORS = "newTournamentAllowSpectators";
|
||||
public static final String KEY_NEW_TOURNAMENT_PLANE_CHASE = "newTournamentPlaneChase";
|
||||
public static final String KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS = "newTournamentAllowRollbacks";
|
||||
public static final String KEY_NEW_TOURNAMENT_DECK_FILE = "newTournamentDeckFile";
|
||||
public static final String KEY_NEW_TOURNAMENT_QUIT_RATIO = "newTournamentQuitRatio";
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.mage.plugins.card.images;
|
|||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ComputationException;
|
||||
import com.google.common.collect.MapMaker;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.RoundRectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
@ -13,6 +12,7 @@ import java.util.Map;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.imageio.ImageIO;
|
||||
import mage.client.constants.Constants;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.client.util.TransformedImageCache;
|
||||
import mage.view.CardView;
|
||||
|
@ -22,7 +22,6 @@ import net.java.truevfs.access.TFileOutputStream;
|
|||
import org.apache.log4j.Logger;
|
||||
import org.mage.plugins.card.dl.sources.DirectLinksForDownload;
|
||||
import org.mage.plugins.card.utils.CardImageUtils;
|
||||
import mage.client.constants.Constants;
|
||||
|
||||
/**
|
||||
* This class stores ALL card images in a cache with soft values. this means
|
||||
|
@ -54,6 +53,7 @@ public final class ImageCache {
|
|||
private static final Pattern KEY_PATTERN = Pattern.compile("(.*)#(.*)#(.*)#(.*)#(.*)#(.*)");
|
||||
|
||||
static {
|
||||
// softValues() = Specifies that each value (not key) stored in the map should be wrapped in a SoftReference (by default, strong references are used). Softly-referenced objects will be garbage-collected in a globally least-recently-used manner, in response to memory demand.
|
||||
IMAGE_CACHE = new MapMaker().softValues().makeComputingMap(new Function<String, BufferedImage>() {
|
||||
@Override
|
||||
public BufferedImage apply(String key) {
|
||||
|
@ -130,7 +130,7 @@ public final class ImageCache {
|
|||
thumbnailImage = makeThumbnailByFile(key, file, thumbnailPath);
|
||||
}
|
||||
|
||||
if (cardback){
|
||||
if (cardback) {
|
||||
// unknown tokens on opponent desk
|
||||
thumbnailImage = getRoundCorner(thumbnailImage);
|
||||
}
|
||||
|
@ -140,12 +140,12 @@ public final class ImageCache {
|
|||
return makeThumbnailByFile(key, file, thumbnailPath);
|
||||
}
|
||||
} else {
|
||||
if (cardback){
|
||||
if (cardback) {
|
||||
// need cardback image
|
||||
BufferedImage image = loadImage(file);
|
||||
image = getRoundCorner(image);
|
||||
return image;
|
||||
}else {
|
||||
} else {
|
||||
// need normal card image
|
||||
BufferedImage image = loadImage(file);
|
||||
image = getWizardsCard(image);
|
||||
|
@ -322,7 +322,7 @@ public final class ImageCache {
|
|||
return thumbnailPath;
|
||||
}
|
||||
|
||||
public static BufferedImage getRoundCorner(BufferedImage image){
|
||||
public static BufferedImage getRoundCorner(BufferedImage image) {
|
||||
if (image != null) {
|
||||
BufferedImage cornerImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
|
||||
|
@ -363,7 +363,7 @@ public final class ImageCache {
|
|||
public static boolean isFaceImagePresent(CardView card) {
|
||||
String path;
|
||||
path = CardImageUtils.generateFaceImagePath(card.getName(), card.getExpansionSetCode());
|
||||
|
||||
|
||||
if (path == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -389,10 +389,9 @@ public final class ImageCache {
|
|||
return getImage(getKey(card, card.getName(), ""));
|
||||
}
|
||||
|
||||
public static BufferedImage getImageFaceOriginal(CardView card) {
|
||||
return getFaceImage(getFaceKey(card, card.getName(), card.getExpansionSetCode()));
|
||||
}
|
||||
|
||||
// public static BufferedImage getImageFaceOriginal(CardView card) {
|
||||
// return getFaceImage(getFaceKey(card, card.getName(), card.getExpansionSetCode()));
|
||||
// }
|
||||
public static BufferedImage getImageOriginalAlternateName(CardView card) {
|
||||
return getImage(getKey(card, card.getAlternateName(), ""));
|
||||
}
|
||||
|
@ -447,14 +446,6 @@ public final class ImageCache {
|
|||
return IMAGE_CACHE.containsKey(key) ? IMAGE_CACHE.get(key) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Image corresponding to the key only if it already exists in
|
||||
* the cache.
|
||||
*/
|
||||
private static BufferedImage tryGetFaceImage(String key) {
|
||||
return FACE_IMAGE_CACHE.containsKey(key) ? FACE_IMAGE_CACHE.get(key) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the map key for a card, without any suffixes for the image size.
|
||||
*/
|
||||
|
|
|
@ -45,8 +45,11 @@ public final class CardImageUtils {
|
|||
pathCache.put(card, filePath);
|
||||
return filePath;
|
||||
}
|
||||
|
||||
log.warn("Token image file not found. Set: " + card.getSet() + " Token Set Code: " + card.getTokenSetCode() + " Name: " + card.getName() + " File path: " + filePath);
|
||||
} else {
|
||||
log.warn("Trying to get token path for non token card. Set: " + card.getSet() + " Set Code: " + card.getTokenSetCode() + " Name: " + card.getName());
|
||||
}
|
||||
log.warn("Token image file not found: " + card.getSet() + " - " + card.getTokenSetCode() + " - " + card.getName());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -212,20 +215,11 @@ public final class CardImageUtils {
|
|||
|
||||
String finalFileName = "";
|
||||
if (card.getUsesVariousArt()) {
|
||||
finalFileName = cardName + '.' + card.getCollectorId() + ".full.jpg";
|
||||
// different arts uses name + collector id
|
||||
finalFileName = cardName + prefixType + '.' + card.getCollectorId() + ".full.jpg";
|
||||
} else {
|
||||
if (card.getUsesVariousArt()) {
|
||||
// only various arts can be same name, but different postfixes (a,b,c,d,e)
|
||||
int len = card.getCollectorId().length();
|
||||
if (Character.isLetter(card.getCollectorId().charAt(len - 1))) {
|
||||
finalFileName = cardName + card.getCollectorId().charAt(len - 1) + ".full.jpg";
|
||||
} else {
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
} else {
|
||||
// normal cards with same names;
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
// basic arts uses name
|
||||
finalFileName = cardName + prefixType + ".full.jpg";
|
||||
}
|
||||
|
||||
// if image file exists, correct name (for case sensitive systems)
|
||||
|
|
|
@ -345,6 +345,17 @@
|
|||
|Generate|TOK:C16|Thopter||
|
||||
|Generate|TOK:C16|Worm||
|
||||
|Generate|TOK:C16|Zombie||
|
||||
|Generate|TOK:C17|Bat||
|
||||
|Generate|TOK:C17|Cat||
|
||||
|Generate|TOK:C17|Cat Dragon|||WasitoraCatDragonToken|
|
||||
|Generate|TOK:C17|Cat Warrior||
|
||||
|Generate|TOK:C17|Dragon|1||DragonToken|
|
||||
|Generate|TOK:C17|Dragon|2||UtavaraHellkiteDragonToken|
|
||||
|Generate|TOK:C17|Eldrazi Spawn||
|
||||
|Generate|TOK:C17|Gold||
|
||||
|Generate|TOK:C17|Rat|||DeathtouchRatToken|
|
||||
|Generate|TOK:C17|Vampire|||EdgarMarkovToken|
|
||||
|Generate|TOK:C17|Zombie||
|
||||
|Generate|TOK:CHK|Dragon Spirit|||TatsumaDragonToken|
|
||||
|Generate|TOK:CHK|Elemental|||SeedGuardianToken|
|
||||
|Generate|TOK:CHK|Illusion|||MelokuTheCloudedMirrorToken|
|
||||
|
@ -502,6 +513,20 @@
|
|||
|Generate|TOK:DKA|Vampire|||SorinLordOfInnistradVampireToken|
|
||||
|Generate|TOK:DKA|Wolf|||WolfToken|
|
||||
|Generate|TOK:DKA|Zombie|||ZombieToken|
|
||||
|Generate|TOK:DOM|Cleric|||BelzenlokClericToken|
|
||||
|Generate|TOK:DOM|Construct|||KarnConstructToken|
|
||||
|Generate|TOK:DOM|Demon|||BelzenlokDemonToken|
|
||||
|Generate|TOK:DOM|Elemental|||ValdukElementalToken|
|
||||
|Gererate|TOK:DOM|Goblin||
|
||||
|Generate|TOK:DOM|Karox Bladewing|||KaroxBladewingDragonToken|
|
||||
|Generate|TOK:DOM|Knight|1|
|
||||
|Generate|TOK:DOM|Knight|2|
|
||||
|Generate|TOK:DOM|Nightmare Horror|||ChainersTormentNightmareToken|
|
||||
|Generate|TOK:DOM|Saproling|1|
|
||||
|Generate|TOK:DOM|Saproling|2|
|
||||
|Generate|TOK:DOM|Saproling|3|
|
||||
|Generate|TOK:DOM|Soldier||
|
||||
|Generate|TOK:DOM|Zombie Knight||
|
||||
|Generate|TOK:DRB|Saproling|||SaprolingToken|
|
||||
|Generate|TOK:DST|Beast|||BeastToken|
|
||||
|Generate|TOK:DST|Elemental|1||WandOfTheElementsFirstToken|
|
||||
|
|
|
@ -41,7 +41,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
public final static int MAGE_VERSION_MAJOR = 1;
|
||||
public final static int MAGE_VERSION_MINOR = 4;
|
||||
public final static int MAGE_VERSION_PATCH = 29;
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "V3";
|
||||
public final static String MAGE_VERSION_MINOR_PATCH = "V4";
|
||||
public final static String MAGE_VERSION_INFO = "";
|
||||
|
||||
private final int major;
|
||||
|
|
|
@ -74,13 +74,9 @@ public class Brawl extends Constructed {
|
|||
}
|
||||
}
|
||||
}
|
||||
banned.add("Attune with Aether"); // since 2018-01-15
|
||||
banned.add("Aetherworks Marvel");
|
||||
banned.add("Felidar Guardian");
|
||||
banned.add("Rampaging Ferocidon"); // since 2018-01-15
|
||||
banned.add("Ramunap Ruins"); // since 2018-01-15
|
||||
banned.add("Rogue Refiner"); // since 2018-01-15
|
||||
banned.add("Baral, Chief of Compliance");
|
||||
banned.add("Smuggler's Copter");
|
||||
banned.add("Sorcerers' Spyglass");
|
||||
}
|
||||
|
||||
private static boolean isFallBlock(ExpansionSet set) {
|
||||
|
@ -155,8 +151,20 @@ public class Brawl extends Constructed {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<String> basicsInDeck = new ArrayList<>();
|
||||
if (colorIdentity.isColorless()) {
|
||||
for (Card card : deck.getCards()) {
|
||||
if (basicLandNames.contains(card.getName())) {
|
||||
basicsInDeck.add(card.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Card card : deck.getCards()) {
|
||||
if (!cardHasValidColor(colorIdentity, card)) {
|
||||
if (!cardHasValidColor(colorIdentity, card)
|
||||
&& !(colorIdentity.isColorless()
|
||||
&& basicsInDeck.size() == 1
|
||||
&& basicsInDeck.contains(card.getName()))) {
|
||||
invalid.put(card.getName(), "Invalid color (" + colorIdentity.toString() + ')');
|
||||
valid = false;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.deck;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Constructed;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ModernNoBannedList extends Constructed {
|
||||
|
||||
public ModernNoBannedList() {
|
||||
super("Constructed - Modern - No Banned List");
|
||||
|
||||
Date cutoff = new GregorianCalendar(2003, 6, 28).getTime(); // Eight edition release date
|
||||
for (ExpansionSet set : Sets.getInstance().values()) {
|
||||
if ((set.getReleaseDate().after(cutoff) || set.getReleaseDate().equals(cutoff))
|
||||
&& (set.getSetType() == SetType.CORE || set.getSetType() == SetType.EXPANSION)) {
|
||||
setCodes.add(set.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,300 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.deck;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Constructed;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* This class validates a deck for the Old School 93/94 format, specifically for
|
||||
* the Channel Fireball Rules.
|
||||
*
|
||||
* This was originally made to follow the deck construction rules found at the
|
||||
* Old School Mtg blog found at:
|
||||
* http://oldschool-mtg.blogspot.com/p/banrestriction.html
|
||||
*
|
||||
* There is no mana burn in this version of old school
|
||||
*
|
||||
* @author jmharmon
|
||||
*/
|
||||
public class OldSchool9394CFB extends Constructed {
|
||||
|
||||
public OldSchool9394CFB() {
|
||||
super("Constructed - Old School 93/94 - Channel Fireball Rules");
|
||||
|
||||
// use the set instances to make sure that we get the correct set codes
|
||||
setCodes.add(mage.sets.LimitedEditionAlpha.getInstance().getCode());
|
||||
setCodes.add(mage.sets.LimitedEditionBeta.getInstance().getCode());
|
||||
setCodes.add(mage.sets.UnlimitedEdition.getInstance().getCode());
|
||||
setCodes.add(mage.sets.ArabianNights.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Antiquities.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Legends.getInstance().getCode());
|
||||
setCodes.add(mage.sets.TheDark.getInstance().getCode());
|
||||
setCodes.add(mage.sets.FallenEmpires.getInstance().getCode());
|
||||
setCodes.add(mage.sets.MediaInserts.getInstance().getCode());
|
||||
|
||||
// ante cards and conspiracies banned, with specifically mentioned ones called out.
|
||||
banned.add("Advantageous Proclamation");
|
||||
banned.add("Amulet of Quoz");
|
||||
banned.add("Backup Plan");
|
||||
banned.add("Brago's Favor");
|
||||
banned.add("Bronze Tablet"); ///
|
||||
banned.add("Contract from Below"); ///
|
||||
banned.add("Darkpact"); ///
|
||||
banned.add("Demonic Attorney"); ///
|
||||
banned.add("Double Stroke");
|
||||
banned.add("Immediate Action");
|
||||
banned.add("Iterative Analysis");
|
||||
banned.add("Jeweled Bird"); ///
|
||||
banned.add("Muzzio's Preparations");
|
||||
banned.add("Power Play");
|
||||
banned.add("Rebirth"); ///
|
||||
banned.add("Secret Summoning");
|
||||
banned.add("Secrets of Paradise");
|
||||
banned.add("Sentinel Dispatch");
|
||||
banned.add("Tempest Efreet"); ///
|
||||
banned.add("Timmerian Fiends");
|
||||
banned.add("Unexpected Potential");
|
||||
banned.add("Worldknit");
|
||||
|
||||
//Let Media Inserts Arena and Sewers of Estark being only cards playable
|
||||
banned.add("Acquire");
|
||||
banned.add("Aeronaut Tinkerer");
|
||||
banned.add("Ajani, Caller of the Pride");
|
||||
banned.add("Ajani Steadfast");
|
||||
banned.add("Alhammarret, High Arbiter");
|
||||
banned.add("Angelic Skirmisher");
|
||||
banned.add("Angel of Glory's Rise");
|
||||
banned.add("Ankle Shanker");
|
||||
banned.add("Arashin Sovereign");
|
||||
banned.add("Archfiend of Depravity");
|
||||
banned.add("Archfiend of Ifnir");
|
||||
banned.add("Arrest");
|
||||
banned.add("Assembled Alphas");
|
||||
banned.add("Avalanche Tusker");
|
||||
banned.add("Barrage Tyrant");
|
||||
banned.add("Bloodthrone Vampire");
|
||||
banned.add("Boltwing Marauder");
|
||||
banned.add("Bonescythe Sliver");
|
||||
banned.add("Breath of Malfegor");
|
||||
banned.add("Brion Stoutarm");
|
||||
banned.add("Broodmate Dragon");
|
||||
banned.add("Burning Sun's Avatar");
|
||||
banned.add("Canopy Vista");
|
||||
banned.add("Cathedral of War");
|
||||
banned.add("Celestial Colonnade");
|
||||
banned.add("Chandra, Fire of Kaladesh");
|
||||
banned.add("Chandra, Flamecaller");
|
||||
banned.add("Chandra, Pyromaster");
|
||||
banned.add("Chandra, Pyromaster");
|
||||
banned.add("Chandra, Roaring Flame");
|
||||
banned.add("Chandra, Torch of Defiance");
|
||||
banned.add("Chandra's Fury");
|
||||
banned.add("Chandra's Phoenix");
|
||||
banned.add("Cinder Glade");
|
||||
banned.add("Consume Spirit");
|
||||
banned.add("Corrupt");
|
||||
banned.add("Day of Judgment");
|
||||
banned.add("Deepfathom Skulker");
|
||||
banned.add("Defiant Bloodlord");
|
||||
banned.add("Devil's Play");
|
||||
banned.add("Dragon Fodder");
|
||||
banned.add("Dragonlord's Servant");
|
||||
banned.add("Dragonscale General");
|
||||
banned.add("Dread Defiler");
|
||||
banned.add("Dreg Mangler");
|
||||
banned.add("Drogskol Cavalry");
|
||||
banned.add("Dromoka, the Eternal");
|
||||
banned.add("Drowner of Hope");
|
||||
banned.add("Duress");
|
||||
banned.add("Dwynen, Gilt-Leaf Daen");
|
||||
banned.add("Eidolon of Blossoms");
|
||||
banned.add("Electrolyze");
|
||||
banned.add("Elusive Tormentor");
|
||||
banned.add("Emrakul, the Aeons Torn");
|
||||
banned.add("Evolving Wilds");
|
||||
banned.add("Faithless Looting");
|
||||
banned.add("Fated Conflagration");
|
||||
banned.add("Feast of Blood");
|
||||
banned.add("Flameblade Angel");
|
||||
banned.add("Flamerush Rider");
|
||||
banned.add("Foe-Razer Regent");
|
||||
banned.add("Frost Titan");
|
||||
banned.add("Garruk, Apex Predator");
|
||||
banned.add("Garruk, Caller of Beasts");
|
||||
banned.add("Garruk Wildspeaker");
|
||||
banned.add("Gaze of Granite");
|
||||
banned.add("Genesis Hydra");
|
||||
banned.add("Giant Badger");
|
||||
banned.add("Gideon of the Trials");
|
||||
banned.add("Gideon, Ally of Zendikar");
|
||||
banned.add("Gideon, Battle-Forged");
|
||||
banned.add("Gladehart Cavalry");
|
||||
banned.add("Goblin Dark-Dwellers");
|
||||
banned.add("Goblin Rabblemaster");
|
||||
banned.add("Gravecrawler");
|
||||
banned.add("Grave Titan");
|
||||
banned.add("Guul Draz Assassin");
|
||||
banned.add("Hamletback Goliath");
|
||||
banned.add("Harbinger of the Hunt");
|
||||
banned.add("Hero of Goma Fada");
|
||||
banned.add("Hixus, Prison Warden");
|
||||
banned.add("Honored Hierarch");
|
||||
banned.add("Honor of the Pure");
|
||||
banned.add("Inferno Titan");
|
||||
banned.add("Insidious Mist");
|
||||
banned.add("Ivorytusk Fortress");
|
||||
banned.add("Jace Beleren");
|
||||
banned.add("Jace, Memory Adept");
|
||||
banned.add("Jace, Telepath Unbound");
|
||||
banned.add("Jace, the Living Guildpact");
|
||||
banned.add("Jace, Unraveler of Secrets");
|
||||
banned.add("Jace, Unraveler of Secrets");
|
||||
banned.add("Jace, Vryn's Prodigy");
|
||||
banned.add("Jaya Ballard, Task Mage");
|
||||
banned.add("Karametra's Acolyte");
|
||||
banned.add("Knight Exemplar");
|
||||
banned.add("Kor Skyfisher");
|
||||
banned.add("Kothophed, Soul Hoarder");
|
||||
banned.add("Kytheon, Hero of Akros");
|
||||
banned.add("Lightning Hounds");
|
||||
banned.add("Liliana of the Dark Realms");
|
||||
banned.add("Liliana, Death's Majesty");
|
||||
banned.add("Liliana, Defiant Necromancer");
|
||||
banned.add("Liliana, the Last Hope");
|
||||
banned.add("Liliana Vess");
|
||||
banned.add("Liliana Vess");
|
||||
banned.add("Magister of Worth");
|
||||
banned.add("Mana Crypt");
|
||||
banned.add("Markov Dreadknight");
|
||||
banned.add("Memoricide");
|
||||
banned.add("Merfolk Mesmerist");
|
||||
banned.add("Mirran Crusader");
|
||||
banned.add("Munda's Vanguard");
|
||||
banned.add("Nalathni Dragon");
|
||||
banned.add("Necromaster Dragon");
|
||||
banned.add("Nephalia Moondrakes");
|
||||
banned.add("Niblis of Frost");
|
||||
banned.add("Nicol Bolas, God-Pharaoh");
|
||||
banned.add("Nightveil Specter");
|
||||
banned.add("Nissa Revane");
|
||||
banned.add("Nissa, Sage Animist");
|
||||
banned.add("Nissa, Steward of Elements");
|
||||
banned.add("Nissa, Vastwood Seer");
|
||||
banned.add("Nissa, Voice of Zendikar");
|
||||
banned.add("Nissa, Worldwaker");
|
||||
banned.add("Noosegraf Mob");
|
||||
banned.add("Ogre Arsonist");
|
||||
banned.add("Ogre Battledriver");
|
||||
banned.add("Ojutai's Command");
|
||||
banned.add("Oran-Rief Hydra");
|
||||
banned.add("Phyrexian Rager");
|
||||
banned.add("Pia and Kiran Nalaar");
|
||||
banned.add("Prairie Stream");
|
||||
banned.add("Primordial Hydra");
|
||||
banned.add("Pristine Skywise");
|
||||
banned.add("Rakshasa Vizier");
|
||||
banned.add("Ratchet Bomb");
|
||||
banned.add("Rattleclaw Mystic");
|
||||
banned.add("Ravenous Bloodseeker");
|
||||
banned.add("Relic Seeker");
|
||||
banned.add("Render Silent");
|
||||
banned.add("Retaliator Griffin");
|
||||
banned.add("Ruinous Path");
|
||||
banned.add("Sage-Eye Avengers");
|
||||
banned.add("Sage of the Inward Eye");
|
||||
banned.add("Sanctifier of Souls");
|
||||
banned.add("Sandsteppe Citadel");
|
||||
banned.add("Scavenging Ooze");
|
||||
banned.add("Scrap Trawler");
|
||||
banned.add("Scythe Leopard");
|
||||
banned.add("Seeker of the Way");
|
||||
banned.add("Serra Avatar");
|
||||
banned.add("Shamanic Revelation");
|
||||
banned.add("Siege Rhino");
|
||||
banned.add("Silverblade Paladin");
|
||||
banned.add("Silver Drake");
|
||||
banned.add("Skyship Stalker");
|
||||
banned.add("Smoldering Marsh");
|
||||
banned.add("Soul of Ravnica");
|
||||
banned.add("Soul of Zendikar");
|
||||
banned.add("Soul Swallower");
|
||||
banned.add("Spined Wurm");
|
||||
banned.add("Standstill");
|
||||
banned.add("Stealer of Secrets");
|
||||
banned.add("Steward of Valeron");
|
||||
banned.add("Sultai Charm");
|
||||
banned.add("Sunblast Angel");
|
||||
banned.add("Sunken Hollow");
|
||||
banned.add("Supreme Verdict");
|
||||
banned.add("Surgical Extraction");
|
||||
banned.add("Sylvan Caryatid");
|
||||
banned.add("Temur War Shaman");
|
||||
banned.add("Terastodon");
|
||||
banned.add("Thalia, Heretic Cathar");
|
||||
banned.add("Treasure Hunt");
|
||||
banned.add("Turnabout");
|
||||
banned.add("Tyrant of Valakut");
|
||||
banned.add("Ulvenwald Observer");
|
||||
banned.add("Valorous Stance");
|
||||
banned.add("Vampire Nocturnus");
|
||||
banned.add("Voidmage Husher");
|
||||
banned.add("Warmonger");
|
||||
banned.add("Wash Out");
|
||||
banned.add("Wildfire Eternal");
|
||||
banned.add("Windseeker Centaur");
|
||||
banned.add("Xathrid Necromancer");
|
||||
|
||||
restricted.add("Ancestral Recall");
|
||||
restricted.add("Balance");
|
||||
restricted.add("Black Lotus");
|
||||
restricted.add("Braingeyser");
|
||||
restricted.add("Channel");
|
||||
restricted.add("Chaos Orb");
|
||||
restricted.add("Demonic Tutor");
|
||||
restricted.add("Library of Alexandria");
|
||||
restricted.add("Mana Drain");
|
||||
restricted.add("Maze of Ith");
|
||||
restricted.add("Mind Twist");
|
||||
restricted.add("Mox Emerald");
|
||||
restricted.add("Mox Jet");
|
||||
restricted.add("Mox Pearl");
|
||||
restricted.add("Mox Ruby");
|
||||
restricted.add("Mox Sapphire");
|
||||
restricted.add("Recall");
|
||||
restricted.add("Regrowth");
|
||||
restricted.add("Sol Ring");
|
||||
restricted.add("Strip Mine");
|
||||
restricted.add("Time Vault");
|
||||
restricted.add("Time Walk");
|
||||
restricted.add("Timetwister");
|
||||
restricted.add("Wheel of Fortune");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,301 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.deck;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Constructed;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* This class validates a deck for the Old School 93/94 format, specifically for
|
||||
* the EC Rules.
|
||||
*
|
||||
* This was originally made to follow the deck construction rules found at the
|
||||
* Old School Mtg blog found at:
|
||||
* http://oldschool-mtg.blogspot.com/p/banrestriction.html
|
||||
*
|
||||
* There is no mana burn in this version of old school
|
||||
*
|
||||
* @author jmharmon
|
||||
*/
|
||||
public class OldSchool9394EC extends Constructed {
|
||||
|
||||
public OldSchool9394EC() {
|
||||
super("Constructed - Old School 93/94 - EC Rules");
|
||||
|
||||
// use the set instances to make sure that we get the correct set codes
|
||||
setCodes.add(mage.sets.LimitedEditionAlpha.getInstance().getCode());
|
||||
setCodes.add(mage.sets.LimitedEditionBeta.getInstance().getCode());
|
||||
setCodes.add(mage.sets.UnlimitedEdition.getInstance().getCode());
|
||||
setCodes.add(mage.sets.ArabianNights.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Antiquities.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Legends.getInstance().getCode());
|
||||
setCodes.add(mage.sets.TheDark.getInstance().getCode());
|
||||
setCodes.add(mage.sets.FallenEmpires.getInstance().getCode());
|
||||
setCodes.add(mage.sets.MediaInserts.getInstance().getCode());
|
||||
|
||||
// ante cards and conspiracies banned, with specifically mentioned ones called out.
|
||||
banned.add("Advantageous Proclamation");
|
||||
banned.add("Amulet of Quoz");
|
||||
banned.add("Backup Plan");
|
||||
banned.add("Brago's Favor");
|
||||
banned.add("Bronze Tablet"); ///
|
||||
banned.add("Contract from Below"); ///
|
||||
banned.add("Darkpact"); ///
|
||||
banned.add("Demonic Attorney"); ///
|
||||
banned.add("Double Stroke");
|
||||
banned.add("Immediate Action");
|
||||
banned.add("Iterative Analysis");
|
||||
banned.add("Jeweled Bird"); ///
|
||||
banned.add("Muzzio's Preparations");
|
||||
banned.add("Power Play");
|
||||
banned.add("Rebirth"); ///
|
||||
banned.add("Secret Summoning");
|
||||
banned.add("Secrets of Paradise");
|
||||
banned.add("Sentinel Dispatch");
|
||||
banned.add("Shahrazad");
|
||||
banned.add("Tempest Efreet"); ///
|
||||
banned.add("Timmerian Fiends");
|
||||
banned.add("Unexpected Potential");
|
||||
banned.add("Worldknit");
|
||||
|
||||
//Let Media Inserts Arena and Sewers of Estark being only cards playable
|
||||
banned.add("Acquire");
|
||||
banned.add("Aeronaut Tinkerer");
|
||||
banned.add("Ajani, Caller of the Pride");
|
||||
banned.add("Ajani Steadfast");
|
||||
banned.add("Alhammarret, High Arbiter");
|
||||
banned.add("Angelic Skirmisher");
|
||||
banned.add("Angel of Glory's Rise");
|
||||
banned.add("Ankle Shanker");
|
||||
banned.add("Arashin Sovereign");
|
||||
banned.add("Archfiend of Depravity");
|
||||
banned.add("Archfiend of Ifnir");
|
||||
banned.add("Arrest");
|
||||
banned.add("Assembled Alphas");
|
||||
banned.add("Avalanche Tusker");
|
||||
banned.add("Barrage Tyrant");
|
||||
banned.add("Bloodthrone Vampire");
|
||||
banned.add("Boltwing Marauder");
|
||||
banned.add("Bonescythe Sliver");
|
||||
banned.add("Breath of Malfegor");
|
||||
banned.add("Brion Stoutarm");
|
||||
banned.add("Broodmate Dragon");
|
||||
banned.add("Burning Sun's Avatar");
|
||||
banned.add("Canopy Vista");
|
||||
banned.add("Cathedral of War");
|
||||
banned.add("Celestial Colonnade");
|
||||
banned.add("Chandra, Fire of Kaladesh");
|
||||
banned.add("Chandra, Flamecaller");
|
||||
banned.add("Chandra, Pyromaster");
|
||||
banned.add("Chandra, Pyromaster");
|
||||
banned.add("Chandra, Roaring Flame");
|
||||
banned.add("Chandra, Torch of Defiance");
|
||||
banned.add("Chandra's Fury");
|
||||
banned.add("Chandra's Phoenix");
|
||||
banned.add("Cinder Glade");
|
||||
banned.add("Consume Spirit");
|
||||
banned.add("Corrupt");
|
||||
banned.add("Day of Judgment");
|
||||
banned.add("Deepfathom Skulker");
|
||||
banned.add("Defiant Bloodlord");
|
||||
banned.add("Devil's Play");
|
||||
banned.add("Dragon Fodder");
|
||||
banned.add("Dragonlord's Servant");
|
||||
banned.add("Dragonscale General");
|
||||
banned.add("Dread Defiler");
|
||||
banned.add("Dreg Mangler");
|
||||
banned.add("Drogskol Cavalry");
|
||||
banned.add("Dromoka, the Eternal");
|
||||
banned.add("Drowner of Hope");
|
||||
banned.add("Duress");
|
||||
banned.add("Dwynen, Gilt-Leaf Daen");
|
||||
banned.add("Eidolon of Blossoms");
|
||||
banned.add("Electrolyze");
|
||||
banned.add("Elusive Tormentor");
|
||||
banned.add("Emrakul, the Aeons Torn");
|
||||
banned.add("Evolving Wilds");
|
||||
banned.add("Faithless Looting");
|
||||
banned.add("Fated Conflagration");
|
||||
banned.add("Feast of Blood");
|
||||
banned.add("Flameblade Angel");
|
||||
banned.add("Flamerush Rider");
|
||||
banned.add("Foe-Razer Regent");
|
||||
banned.add("Frost Titan");
|
||||
banned.add("Garruk, Apex Predator");
|
||||
banned.add("Garruk, Caller of Beasts");
|
||||
banned.add("Garruk Wildspeaker");
|
||||
banned.add("Gaze of Granite");
|
||||
banned.add("Genesis Hydra");
|
||||
banned.add("Giant Badger");
|
||||
banned.add("Gideon of the Trials");
|
||||
banned.add("Gideon, Ally of Zendikar");
|
||||
banned.add("Gideon, Battle-Forged");
|
||||
banned.add("Gladehart Cavalry");
|
||||
banned.add("Goblin Dark-Dwellers");
|
||||
banned.add("Goblin Rabblemaster");
|
||||
banned.add("Gravecrawler");
|
||||
banned.add("Grave Titan");
|
||||
banned.add("Guul Draz Assassin");
|
||||
banned.add("Hamletback Goliath");
|
||||
banned.add("Harbinger of the Hunt");
|
||||
banned.add("Hero of Goma Fada");
|
||||
banned.add("Hixus, Prison Warden");
|
||||
banned.add("Honored Hierarch");
|
||||
banned.add("Honor of the Pure");
|
||||
banned.add("Inferno Titan");
|
||||
banned.add("Insidious Mist");
|
||||
banned.add("Ivorytusk Fortress");
|
||||
banned.add("Jace Beleren");
|
||||
banned.add("Jace, Memory Adept");
|
||||
banned.add("Jace, Telepath Unbound");
|
||||
banned.add("Jace, the Living Guildpact");
|
||||
banned.add("Jace, Unraveler of Secrets");
|
||||
banned.add("Jace, Unraveler of Secrets");
|
||||
banned.add("Jace, Vryn's Prodigy");
|
||||
banned.add("Jaya Ballard, Task Mage");
|
||||
banned.add("Karametra's Acolyte");
|
||||
banned.add("Knight Exemplar");
|
||||
banned.add("Kor Skyfisher");
|
||||
banned.add("Kothophed, Soul Hoarder");
|
||||
banned.add("Kytheon, Hero of Akros");
|
||||
banned.add("Lightning Hounds");
|
||||
banned.add("Liliana of the Dark Realms");
|
||||
banned.add("Liliana, Death's Majesty");
|
||||
banned.add("Liliana, Defiant Necromancer");
|
||||
banned.add("Liliana, the Last Hope");
|
||||
banned.add("Liliana Vess");
|
||||
banned.add("Liliana Vess");
|
||||
banned.add("Magister of Worth");
|
||||
banned.add("Mana Crypt");
|
||||
banned.add("Markov Dreadknight");
|
||||
banned.add("Memoricide");
|
||||
banned.add("Merfolk Mesmerist");
|
||||
banned.add("Mirran Crusader");
|
||||
banned.add("Munda's Vanguard");
|
||||
banned.add("Nalathni Dragon");
|
||||
banned.add("Necromaster Dragon");
|
||||
banned.add("Nephalia Moondrakes");
|
||||
banned.add("Niblis of Frost");
|
||||
banned.add("Nicol Bolas, God-Pharaoh");
|
||||
banned.add("Nightveil Specter");
|
||||
banned.add("Nissa Revane");
|
||||
banned.add("Nissa, Sage Animist");
|
||||
banned.add("Nissa, Steward of Elements");
|
||||
banned.add("Nissa, Vastwood Seer");
|
||||
banned.add("Nissa, Voice of Zendikar");
|
||||
banned.add("Nissa, Worldwaker");
|
||||
banned.add("Noosegraf Mob");
|
||||
banned.add("Ogre Arsonist");
|
||||
banned.add("Ogre Battledriver");
|
||||
banned.add("Ojutai's Command");
|
||||
banned.add("Oran-Rief Hydra");
|
||||
banned.add("Phyrexian Rager");
|
||||
banned.add("Pia and Kiran Nalaar");
|
||||
banned.add("Prairie Stream");
|
||||
banned.add("Primordial Hydra");
|
||||
banned.add("Pristine Skywise");
|
||||
banned.add("Rakshasa Vizier");
|
||||
banned.add("Ratchet Bomb");
|
||||
banned.add("Rattleclaw Mystic");
|
||||
banned.add("Ravenous Bloodseeker");
|
||||
banned.add("Relic Seeker");
|
||||
banned.add("Render Silent");
|
||||
banned.add("Retaliator Griffin");
|
||||
banned.add("Ruinous Path");
|
||||
banned.add("Sage-Eye Avengers");
|
||||
banned.add("Sage of the Inward Eye");
|
||||
banned.add("Sanctifier of Souls");
|
||||
banned.add("Sandsteppe Citadel");
|
||||
banned.add("Scavenging Ooze");
|
||||
banned.add("Scrap Trawler");
|
||||
banned.add("Scythe Leopard");
|
||||
banned.add("Seeker of the Way");
|
||||
banned.add("Serra Avatar");
|
||||
banned.add("Shamanic Revelation");
|
||||
banned.add("Siege Rhino");
|
||||
banned.add("Silverblade Paladin");
|
||||
banned.add("Silver Drake");
|
||||
banned.add("Skyship Stalker");
|
||||
banned.add("Smoldering Marsh");
|
||||
banned.add("Soul of Ravnica");
|
||||
banned.add("Soul of Zendikar");
|
||||
banned.add("Soul Swallower");
|
||||
banned.add("Spined Wurm");
|
||||
banned.add("Standstill");
|
||||
banned.add("Stealer of Secrets");
|
||||
banned.add("Steward of Valeron");
|
||||
banned.add("Sultai Charm");
|
||||
banned.add("Sunblast Angel");
|
||||
banned.add("Sunken Hollow");
|
||||
banned.add("Supreme Verdict");
|
||||
banned.add("Surgical Extraction");
|
||||
banned.add("Sylvan Caryatid");
|
||||
banned.add("Temur War Shaman");
|
||||
banned.add("Terastodon");
|
||||
banned.add("Thalia, Heretic Cathar");
|
||||
banned.add("Treasure Hunt");
|
||||
banned.add("Turnabout");
|
||||
banned.add("Tyrant of Valakut");
|
||||
banned.add("Ulvenwald Observer");
|
||||
banned.add("Valorous Stance");
|
||||
banned.add("Vampire Nocturnus");
|
||||
banned.add("Voidmage Husher");
|
||||
banned.add("Warmonger");
|
||||
banned.add("Wash Out");
|
||||
banned.add("Wildfire Eternal");
|
||||
banned.add("Windseeker Centaur");
|
||||
banned.add("Xathrid Necromancer");
|
||||
|
||||
restricted.add("Ancestral Recall");
|
||||
restricted.add("Balance");
|
||||
restricted.add("Black Lotus");
|
||||
restricted.add("Braingeyser");
|
||||
restricted.add("Channel");
|
||||
restricted.add("Chaos Orb");
|
||||
restricted.add("Demonic Tutor");
|
||||
restricted.add("Library of Alexandria");
|
||||
restricted.add("Mana Drain");
|
||||
restricted.add("Maze of Ith");
|
||||
restricted.add("Mind Twist");
|
||||
restricted.add("Mox Emerald");
|
||||
restricted.add("Mox Jet");
|
||||
restricted.add("Mox Pearl");
|
||||
restricted.add("Mox Ruby");
|
||||
restricted.add("Mox Sapphire");
|
||||
restricted.add("Recall");
|
||||
restricted.add("Regrowth");
|
||||
restricted.add("Sol Ring");
|
||||
restricted.add("Time Vault");
|
||||
restricted.add("Time Walk");
|
||||
restricted.add("Timetwister");
|
||||
restricted.add("Wheel of Fortune");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.deck;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Constructed;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* This class validates a deck for the Old School 93/94 format, specifically the
|
||||
* EudoGames Rules.
|
||||
*
|
||||
* This was originally made to follow the deck construction rules found at the
|
||||
* Old School Mtg blog found at:
|
||||
* http://oldschool-mtg.blogspot.com/p/banrestriction.html
|
||||
*
|
||||
* There is no mana burn in this version of old school.
|
||||
*
|
||||
* @author jmharmon
|
||||
*/
|
||||
public class OldSchool9394EG extends Constructed {
|
||||
|
||||
public OldSchool9394EG() {
|
||||
super("Constructed - Old School 93/94 - EudoGames Rules");
|
||||
|
||||
// use the set instances to make sure that we get the correct set codes
|
||||
setCodes.add(mage.sets.LimitedEditionAlpha.getInstance().getCode());
|
||||
setCodes.add(mage.sets.LimitedEditionBeta.getInstance().getCode());
|
||||
setCodes.add(mage.sets.UnlimitedEdition.getInstance().getCode());
|
||||
setCodes.add(mage.sets.ArabianNights.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Antiquities.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Legends.getInstance().getCode());
|
||||
setCodes.add(mage.sets.TheDark.getInstance().getCode());
|
||||
setCodes.add(mage.sets.RevisedEdition.getInstance().getCode());
|
||||
setCodes.add(mage.sets.FallenEmpires.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Chronicles.getInstance().getCode());
|
||||
|
||||
// ante cards and conspiracies banned, with specifically mentioned ones called out.
|
||||
banned.add("Advantageous Proclamation");
|
||||
banned.add("Amulet of Quoz");
|
||||
banned.add("Backup Plan");
|
||||
banned.add("Brago's Favor");
|
||||
banned.add("Bronze Tablet"); ///
|
||||
banned.add("Contract from Below"); ///
|
||||
banned.add("Darkpact"); ///
|
||||
banned.add("Demonic Attorney"); ///
|
||||
banned.add("Double Stroke");
|
||||
banned.add("Immediate Action");
|
||||
banned.add("Iterative Analysis");
|
||||
banned.add("Jeweled Bird"); ///
|
||||
banned.add("Muzzio's Preparations");
|
||||
banned.add("Power Play");
|
||||
banned.add("Rebirth"); ///
|
||||
banned.add("Secret Summoning");
|
||||
banned.add("Secrets of Paradise");
|
||||
banned.add("Sentinel Dispatch");
|
||||
banned.add("Shahrazad");
|
||||
banned.add("Tempest Efreet"); ///
|
||||
banned.add("Timmerian Fiends");
|
||||
banned.add("Unexpected Potential");
|
||||
banned.add("Worldknit");
|
||||
|
||||
restricted.add("Ancestral Recall");
|
||||
restricted.add("Balance");
|
||||
restricted.add("Black Lotus");
|
||||
restricted.add("Braingeyser");
|
||||
restricted.add("Channel");
|
||||
restricted.add("Chaos Orb");
|
||||
restricted.add("Demonic Tutor");
|
||||
restricted.add("Library of Alexandria");
|
||||
restricted.add("Mana Drain");
|
||||
restricted.add("Mana Vault");
|
||||
restricted.add("Maze of Ith");
|
||||
restricted.add("Mind Twist");
|
||||
restricted.add("Mishra's Workshop");
|
||||
restricted.add("Mox Emerald");
|
||||
restricted.add("Mox Jet");
|
||||
restricted.add("Mox Pearl");
|
||||
restricted.add("Mox Ruby");
|
||||
restricted.add("Mox Sapphire");
|
||||
restricted.add("Regrowth");
|
||||
restricted.add("Recall");
|
||||
restricted.add("Shahrazad");
|
||||
restricted.add("Sol Ring");
|
||||
restricted.add("Strip Mine");
|
||||
restricted.add("Time Vault");
|
||||
restricted.add("Time Walk");
|
||||
restricted.add("Timetwister");
|
||||
restricted.add("Wheel of Fortune");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.deck;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.cards.Sets;
|
||||
import mage.cards.decks.Constructed;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
* This class validates a deck for the Old School 93/94 format, specifically for
|
||||
* the Italian Rules.
|
||||
*
|
||||
* This was originally made to follow the deck construction rules found at the
|
||||
* Old School Mtg blog found at:
|
||||
* http://oldschool-mtg.blogspot.com/p/banrestriction.html
|
||||
*
|
||||
* There is no mana burn in this version of old school
|
||||
*
|
||||
* @author jmharmon
|
||||
*/
|
||||
public class OldSchool9394Italian extends Constructed{
|
||||
|
||||
public OldSchool9394Italian() {
|
||||
super("Constructed - Old School 93/94 - Italian Rules");
|
||||
|
||||
// use the set instances to make sure that we get the correct set codes
|
||||
setCodes.add(mage.sets.LimitedEditionAlpha.getInstance().getCode());
|
||||
setCodes.add(mage.sets.LimitedEditionBeta.getInstance().getCode());
|
||||
setCodes.add(mage.sets.UnlimitedEdition.getInstance().getCode());
|
||||
setCodes.add(mage.sets.ArabianNights.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Antiquities.getInstance().getCode());
|
||||
setCodes.add(mage.sets.Legends.getInstance().getCode());
|
||||
setCodes.add(mage.sets.TheDark.getInstance().getCode());
|
||||
setCodes.add(mage.sets.RevisedEdition.getInstance().getCode());
|
||||
|
||||
// ante cards and conspiracies banned, with specifically mentioned ones called out.
|
||||
banned.add("Advantageous Proclamation");
|
||||
banned.add("Amulet of Quoz");
|
||||
banned.add("Backup Plan");
|
||||
banned.add("Brago's Favor");
|
||||
banned.add("Bronze Tablet"); ///
|
||||
banned.add("Contract from Below"); ///
|
||||
banned.add("Darkpact"); ///
|
||||
banned.add("Demonic Attorney"); ///
|
||||
banned.add("Double Stroke");
|
||||
banned.add("Immediate Action");
|
||||
banned.add("Iterative Analysis");
|
||||
banned.add("Jeweled Bird"); ///
|
||||
banned.add("Muzzio's Preparations");
|
||||
banned.add("Power Play");
|
||||
banned.add("Rebirth"); ///
|
||||
banned.add("Secret Summoning");
|
||||
banned.add("Secrets of Paradise");
|
||||
banned.add("Sentinel Dispatch");
|
||||
banned.add("Shahrazad");
|
||||
banned.add("Tempest Efreet"); ///
|
||||
banned.add("Timmerian Fiends");
|
||||
banned.add("Unexpected Potential");
|
||||
banned.add("Worldknit");
|
||||
|
||||
restricted.add("Ancestral Recall");
|
||||
restricted.add("Balance");
|
||||
restricted.add("Black Lotus");
|
||||
restricted.add("Braingeyser");
|
||||
restricted.add("Channel");
|
||||
restricted.add("Chaos Orb");
|
||||
restricted.add("Demonic Tutor");
|
||||
restricted.add("Library of Alexandria");
|
||||
restricted.add("Mana Drain");
|
||||
restricted.add("Mind Twist");
|
||||
restricted.add("Mishra's Workshop");
|
||||
restricted.add("Mox Emerald");
|
||||
restricted.add("Mox Jet");
|
||||
restricted.add("Mox Pearl");
|
||||
restricted.add("Mox Ruby");
|
||||
restricted.add("Mox Sapphire");
|
||||
restricted.add("Regrowth");
|
||||
restricted.add("Shahrazad");
|
||||
restricted.add("Sol Ring");
|
||||
restricted.add("Strip Mine");
|
||||
restricted.add("Time Vault");
|
||||
restricted.add("Time Walk");
|
||||
restricted.add("Timetwister");
|
||||
restricted.add("Wheel of Fortune");
|
||||
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@ public class BrawlDuelMatch extends MatchImpl {
|
|||
|
||||
@Override
|
||||
public void startGame() throws GameException {
|
||||
int startLife = 30;
|
||||
int startLife = 20;
|
||||
boolean alsoHand = true;
|
||||
BrawlDuel game = new BrawlDuel(options.getAttackOption(), options.getRange(), options.getFreeMulligans(), startLife);
|
||||
game.setCheckCommanderDamage(false);
|
||||
|
|
|
@ -49,7 +49,7 @@ import mage.players.Player;
|
|||
*
|
||||
* @author nigelzor
|
||||
*/
|
||||
public class MomirGame extends FreeForAll {
|
||||
public class MomirGame extends GameImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
|
@ -96,6 +96,11 @@ public class MomirGame extends FreeForAll {
|
|||
}
|
||||
return opponents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpponent(Player player, UUID playerToCheck) {
|
||||
return !player.getId().equals(playerToCheck) && player.getInRange().contains(playerToCheck);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MomirGame copy() {
|
||||
|
|
|
@ -430,7 +430,7 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
|||
}
|
||||
stackObject.resolve(game);
|
||||
if (stackObject instanceof StackAbility) {
|
||||
game.getStack().remove(stackObject);
|
||||
game.getStack().remove(stackObject, game);
|
||||
}
|
||||
game.applyEffects();
|
||||
game.getPlayers().resetPassed();
|
||||
|
@ -968,7 +968,7 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
|
|||
// swallow
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if(scanner != null) {
|
||||
if (scanner != null) {
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1763,7 +1763,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
//TODO: improve this
|
||||
if (min < max && min == 0) {
|
||||
return RandomUtil.nextInt(max);
|
||||
return RandomUtil.nextInt(max + 1);
|
||||
}
|
||||
return min;
|
||||
}
|
||||
|
|
|
@ -1,179 +1,187 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Config.xsd">
|
||||
<!--
|
||||
serverAddress - ip of the XMage server. Set it to "0.0.0.0" for local host or to the IP the server should use
|
||||
port - the port the primary server socket is bound to
|
||||
secondaryBindPort - the port to which the secondary server socket is to be bound. if "-1" is set , an arbitrary port is selected.
|
||||
backlogSize - the preferred number of unaccepted incoming connections allowed at a given time. The actual number may be greater
|
||||
than the specified backlog. When the queue is full, further connection requests are rejected. The JBoss default value is 200
|
||||
numAcceptThreads - the number of threads listening on the ServerSocket. The JBoss default value is 1
|
||||
maxPoolSize - the maximum number of ServerThreads that can exist at any given time. The JBoss default value is 300
|
||||
leasePeriod - To turn on server side connection failure detection of remoting clients, it is necessary to satisfy two criteria.
|
||||
The first is that the client lease period is set and is a value greater than 0. The value is represented in milliseconds.
|
||||
The client lease period can be set by either the 'clientLeasePeriod' attribute within the Connector configuration or by calling the Connector method
|
||||
socketWriteTimeout - All write operations will time out if they do not complete within the configured period.
|
||||
maxGameThreads - Number of games that can be started simultanously on the server
|
||||
maxSecondsIdle - Number of seconds after that a game is auto conceded by the player that was idle for such a time
|
||||
minUserNameLength - minmal allowed length of a user name to connect to the server
|
||||
maxUserNameLength - maximal allowed length of a user name to connect to the server
|
||||
userNamePattern - pattern for user name validity check
|
||||
maxAiOpponents - number of allowed AI opponents on the server
|
||||
saveGameActivated - allow game save and replay options (not working correctly yet)
|
||||
|
||||
authenticationActivated - "true" = user have to register to signon "false" = user need not to register
|
||||
* mail configs only needed if authentication is activated:
|
||||
* if mailUser = "" mailgun is used otherwise nativ mail server on the system
|
||||
googleAccount - not supported currently
|
||||
mailgunApiKey - key from the mailgun domain e.g. = "key-12121111..."
|
||||
mailgunDomain - domain for the mailgun message sending
|
||||
mailSmtpHost - hostname to send the mail
|
||||
mailSmtpPort - port to send the mail
|
||||
mailUser - username used to send the mail
|
||||
mailPassword - passworf of the used user to send the mail
|
||||
mailFromAddress - sender address
|
||||
-->
|
||||
<server serverAddress="0.0.0.0"
|
||||
serverName="mage-server"
|
||||
port="17171"
|
||||
secondaryBindPort="17179"
|
||||
backlogSize="200"
|
||||
numAcceptThreads="2"
|
||||
maxPoolSize="300"
|
||||
leasePeriod="5000"
|
||||
socketWriteTimeout="10000"
|
||||
maxGameThreads="10"
|
||||
maxSecondsIdle="300"
|
||||
minUserNameLength="3"
|
||||
maxUserNameLength="14"
|
||||
invalidUserNamePattern="[^a-z0-9_]"
|
||||
minPasswordLength="8"
|
||||
maxPasswordLength="100"
|
||||
maxAiOpponents="15"
|
||||
saveGameActivated="false"
|
||||
authenticationActivated="false"
|
||||
googleAccount=""
|
||||
mailgunApiKey="key-d93e81f19a9c9ed243ebb7cc9381385c"
|
||||
mailgunDomain="sandbox401a433f30d445309a5e86b6c53f7812.mailgun.org"
|
||||
mailSmtpHost="smtp.1und1.de"
|
||||
mailSmtpPort="465"
|
||||
mailUser="xmageserver@online.de"
|
||||
mailPassword="24wrsfxv"
|
||||
mailFromAddress="xmageserver@online.de"
|
||||
/>
|
||||
<playerTypes>
|
||||
<playerType name="Human" jar="mage-player-human.jar" className="mage.player.human.HumanPlayer"/>
|
||||
<!--<playerType name="Computer - minimax" jar="mage-player-aiminimax.jar" className="mage.player.ai.ComputerPlayer3"/>-->
|
||||
<playerType name="Computer - mad" jar="mage-player-ai-ma.jar" className="mage.player.ai.ComputerPlayer7"/>
|
||||
<!--<playerType name="Computer - monte carlo" jar="mage-player-aimcts.jar" className="mage.player.ai.ComputerPlayerMCTS"/>-->
|
||||
<playerType name="Computer - draftbot" jar="mage-player-ai-draft-bot.jar" className="mage.player.ai.ComputerDraftPlayer"/>
|
||||
</playerTypes>
|
||||
<gameTypes>
|
||||
<gameType name="Two Player Duel" jar="mage-game-twoplayerduel.jar" className="mage.game.TwoPlayerMatch" typeName="mage.game.TwoPlayerDuelType"/>
|
||||
<gameType name="Free For All" jar="mage-game-freeforall.jar" className="mage.game.FreeForAllMatch" typeName="mage.game.FreeForAllType"/>
|
||||
<gameType name="Commander Two Player Duel" jar="mage-game-commanderduel.jar" className="mage.game.CommanderDuelMatch" typeName="mage.game.CommanderDuelType"/>
|
||||
<gameType name="Commander Free For All" jar="mage-game-commanderfreeforall.jar" className="mage.game.CommanderFreeForAllMatch" typeName="mage.game.CommanderFreeForAllType"/>
|
||||
<gameType name="Tiny Leaders Two Player Duel" jar="mage-game-tinyleadersduel.jar" className="mage.game.TinyLeadersDuelMatch" typeName="mage.game.TinyLeadersDuelType"/>
|
||||
<gameType name="Canadian Highlander Two Player Duel" jar="mage-game-canadianhighlanderduel.jar" className="mage.game.CanadianHighlanderDuelMatch" typeName="mage.game.CanadianHighlanderDuelType"/>
|
||||
<gameType name="Penny Dreadful Commander Free For All" jar="mage-game-pennydreadfulcommanderfreeforall.jar" className="mage.game.PennyDreadfulCommanderFreeForAllMatch" typeName="mage.game.PennyDreadfulCommanderFreeForAllType"/>
|
||||
<gameType name="Freeform Commander Free For All" jar="mage-game-freeformcommanderfreeforall.jar" className="mage.game.FreeformCommanderFreeForAllMatch" typeName="mage.game.FreeformCommanderFreeForAllType"/>
|
||||
<gameType name="Brawl Two Player Duel" jar="mage-game-brawlduel.jar" className="mage.game.BrawlDuelMatch" typeName="mage.game.BrawlDuelType"/>
|
||||
<gameType name="Brawl Free For All" jar="mage-game-brawlfreeforall.jar" className="mage.game.BrawlFreeForAllMatch" typeName="mage.game.BrawlFreeForAllType"/>
|
||||
<gameType name="Momir Basic Two Player Duel" jar="mage-game-momirduel.jar" className="mage.game.MomirDuelMatch" typeName="mage.game.MomirDuelType"/>
|
||||
<gameType name="Momir Basic Free For All" jar="mage-game-momir.jar" className="mage.game.MomirFreeForAllMatch" typeName="mage.game.MomirFreeForAllType"/>
|
||||
</gameTypes>
|
||||
<tournamentTypes>
|
||||
<tournamentType name="Constructed Elimination" jar="mage-tournament-constructed.jar" className="mage.tournament.ConstructedEliminationTournament" typeName="mage.tournament.ConstructedEliminationTournamentType"/>
|
||||
<tournamentType name="Constructed Swiss" jar="mage-tournament-constructed.jar" className="mage.tournament.ConstructedSwissTournament" typeName="mage.tournament.ConstructedSwissTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Random)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RandomBoosterDraftEliminationTournament" typeName="mage.tournament.RandomBoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Rich Man)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RichManDraftEliminationTournament" typeName="mage.tournament.RichManDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Rich Man Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RichManCubeDraftEliminationTournament" typeName="mage.tournament.RichManCubeDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Random)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RandomBoosterDraftSwissTournament" typeName="mage.tournament.RandomBoosterDraftSwissTournamentType"/>
|
||||
<tournamentType name="Sealed Elimination" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedEliminationTournament" typeName="mage.tournament.SealedEliminationTournamentType"/>
|
||||
<tournamentType name="Sealed Elimination (Cube)" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedEliminationTournament" typeName="mage.tournament.SealedEliminationCubeTournamentType"/>
|
||||
<tournamentType name="Sealed Swiss" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissTournamentType"/>
|
||||
<tournamentType name="Sealed Swiss (Cube)" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissCubeTournamentType"/>
|
||||
</tournamentTypes>
|
||||
<draftCubes>
|
||||
<draftCube name="Adam Styborski's Pauper Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.AdamStyborskisPauperCube"/>
|
||||
<draftCube name="Ben's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.BensCube"/>
|
||||
<draftCube name="Cube Tutor 360 Pauper" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor360Pauper"/>
|
||||
<draftCube name="Cube Tutor 720" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor720"/>
|
||||
<draftCube name="Eric Klug's Pro Tour Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.EricKlugsProTourCube"/>
|
||||
<draftCube name="Guillaume Matignon's Jenny's/Johnny's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.GuillaumeMatignonsJennysJohnnysCube"/>
|
||||
<draftCube name="Jim Davis's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.JimDavisCube"/>
|
||||
<draftCube name="Joseph Vasoli's Peasant Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.JosephVasolisPeasantCube"/>
|
||||
<draftCube name="Mono Blue Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MonoBlueCube"/>
|
||||
<draftCube name="Sam Black's No Search Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.SamBlacksCube"/>
|
||||
<draftCube name="Timothee Simonot's Twisted Color Pie Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.TimotheeSimonotsTwistedColorPieCube"/>
|
||||
<draftCube name="MTGO Cube March 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGOMarchCube2014"/>
|
||||
<draftCube name="MTGO Legacy Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCube"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 March" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeMarch2015"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 September" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeSeptember2015"/>
|
||||
<draftCube name="MTGO Legacy Cube 2016 January" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeJanuary2016"/>
|
||||
<draftCube name="MTGO Legacy Cube 2016 September" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeSeptember2016"/>
|
||||
<draftCube name="MTGO Legacy Cube 2017 January" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeJanuary2017"/>
|
||||
<draftCube name="MTGO Legacy Cube 2017 April" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeApril2017"/>
|
||||
<draftCube name="MTGO Legacy Cube 2018 February" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCube2018February"/>
|
||||
<draftCube name="MTGO Legendary Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegendaryCube"/>
|
||||
<draftCube name="MTGO Legendary Cube April 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegendaryCubeApril2016"/>
|
||||
<draftCube name="MTGO Modern Cube 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.ModernCube2017"/>
|
||||
<draftCube name="MTGO Vintage Cube 2013" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2013"/>
|
||||
<draftCube name="MTGO Vintage Cube 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2014"/>
|
||||
<draftCube name="MTGO Vintage Cube 2015" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2015"/>
|
||||
<draftCube name="MTGO Vintage Cube 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2016"/>
|
||||
<draftCube name="MTGO Vintage Cube June 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeJune2016"/>
|
||||
<draftCube name="MTGO Vintage Cube November 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeNovember2016"/>
|
||||
<draftCube name="MTGO Vintage Cube June 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeJune2017"/>
|
||||
<draftCube name="MTGO Vintage Cube December 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeDecember2017"/>
|
||||
<draftCube name="The Peasant's Toolbox" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.PeasantsToolboxCube"/>
|
||||
<draftCube name="www.MTGCube.com" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGCube"/>
|
||||
<draftCube name="Cube From Deck" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeFromDeck"/>
|
||||
</draftCubes>
|
||||
<deckTypes>
|
||||
<deckType name="Constructed - Standard" jar="mage-deck-constructed.jar" className="mage.deck.Standard"/>
|
||||
<deckType name="Constructed - Extended" jar="mage-deck-constructed.jar" className="mage.deck.Extended"/>
|
||||
<deckType name="Constructed - Frontier" jar="mage-deck-constructed.jar" className="mage.deck.Frontier"/>
|
||||
<deckType name="Constructed - Modern" jar="mage-deck-constructed.jar" className="mage.deck.Modern"/>
|
||||
<deckType name="Constructed - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
||||
<deckType name="Constructed - Legacy" jar="mage-deck-constructed.jar" className="mage.deck.Legacy"/>
|
||||
<deckType name="Constructed - Vintage" jar="mage-deck-constructed.jar" className="mage.deck.Vintage"/>
|
||||
<deckType name="Constructed - Pauper" jar="mage-deck-constructed.jar" className="mage.deck.Pauper"/>
|
||||
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed.jar" className="mage.deck.HistoricalType2"/>
|
||||
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed.jar" className="mage.deck.SuperType2"/>
|
||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||
<deckType name="Constructed - Old School 93/94" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394"/>
|
||||
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.AusHighlander"/>
|
||||
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.CanadianHighlander"/>
|
||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||
<deckType name="Variant Magic - Commander" jar="mage-deck-constructed.jar" className="mage.deck.Commander"/>
|
||||
<deckType name="Variant Magic - Duel Commander" jar="mage-deck-constructed.jar" className="mage.deck.DuelCommander"/>
|
||||
<deckType name="Variant Magic - MTGO 1v1 Commander" jar="mage-deck-constructed.jar" className="mage.deck.MTGO1v1Commander"/>
|
||||
<deckType name="Variant Magic - Tiny Leaders" jar="mage-deck-constructed.jar" className="mage.deck.TinyLeaders"/>
|
||||
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed.jar" className="mage.deck.Momir"/>
|
||||
<deckType name="Variant Magic - Penny Dreadful Commander" jar="mage-deck-constructed.jar" className="mage.deck.PennyDreadfulCommander"/>
|
||||
<deckType name="Variant Magic - Freeform Commander" jar="mage-deck-constructed.jar" className="mage.deck.FreeformCommander"/>
|
||||
<deckType name="Variant Magic - Brawl" jar="mage-deck-constructed.jar" className="mage.deck.Brawl"/>
|
||||
<deckType name="Block Constructed - Amonkhet" jar="mage-deck-constructed.jar" className="mage.deck.AmonkhetBlock"/>
|
||||
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
||||
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.InnistradBlock"/>
|
||||
<deckType name="Block Constructed - Ixalan" jar="mage-deck-constructed.jar" className="mage.deck.IxalanBlock"/>
|
||||
<deckType name="Block Constructed - Kaladesh" jar="mage-deck-constructed.jar" className="mage.deck.KaladeshBlock"/>
|
||||
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed.jar" className="mage.deck.KamigawaBlock"/>
|
||||
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
||||
<deckType name="Block Constructed - Lorwyn" jar="mage-deck-constructed.jar" className="mage.deck.LorwynBlock"/>
|
||||
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
||||
<deckType name="Block Constructed - Scars of Mirrodin" jar="mage-deck-constructed.jar" className="mage.deck.ScarsOfMirrodinBlock"/>
|
||||
<deckType name="Block Constructed - Shadowmoor" jar="mage-deck-constructed.jar" className="mage.deck.ShadowmoorBlock"/>
|
||||
<deckType name="Block Constructed - Shadows over Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.ShadowsOverInnistradBlock"/>
|
||||
<deckType name="Block Constructed - Shards of Alara" jar="mage-deck-constructed.jar" className="mage.deck.ShardsOfAlaraBlock"/>
|
||||
<deckType name="Block Constructed - Theros" jar="mage-deck-constructed.jar" className="mage.deck.TherosBlock"/>
|
||||
<deckType name="Block Constructed - Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.ZendikarBlock"/>
|
||||
<deckType name="Block Constructed Custom - Star Wars" jar="mage-deck-constructed.jar" className="mage.deck.StarWarsBlock"/>
|
||||
<deckType name="Limited" jar="mage-deck-limited.jar" className="mage.deck.Limited"/>
|
||||
</deckTypes>
|
||||
</config>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Config.xsd">
|
||||
<!--
|
||||
Official guide to setup public server and NAT: https://www.slightlymagic.net/forum/viewtopic.php?f=70&t=15898
|
||||
|
||||
serverAddress - ip or domain of the XMage server. Set it to "0.0.0.0" for local host or to the IP the server should use
|
||||
Public server should be accessable to all clients by it's name (example: xmage.mydomain.com)
|
||||
port - the port the primary server socket is bound to
|
||||
secondaryBindPort - the port to which the secondary server socket is to be bound. if "-1" is set , an arbitrary port is selected.
|
||||
backlogSize - the preferred number of unaccepted incoming connections allowed at a given time. The actual number may be greater
|
||||
than the specified backlog. When the queue is full, further connection requests are rejected. The JBoss default value is 200
|
||||
numAcceptThreads - the number of threads listening on the ServerSocket. The JBoss default value is 1
|
||||
maxPoolSize - the maximum number of ServerThreads that can exist at any given time. The JBoss default value is 300
|
||||
leasePeriod - To turn on server side connection failure detection of remoting clients, it is necessary to satisfy two criteria.
|
||||
The first is that the client lease period is set and is a value greater than 0. The value is represented in milliseconds.
|
||||
The client lease period can be set by either the 'clientLeasePeriod' attribute within the Connector configuration or by calling the Connector method
|
||||
socketWriteTimeout - All write operations will time out if they do not complete within the configured period.
|
||||
maxGameThreads - Number of games that can be started simultanously on the server
|
||||
maxSecondsIdle - Number of seconds after that a game is auto conceded by the player that was idle for such a time
|
||||
minUserNameLength - minmal allowed length of a user name to connect to the server
|
||||
maxUserNameLength - maximal allowed length of a user name to connect to the server
|
||||
userNamePattern - pattern for user name validity check
|
||||
maxAiOpponents - number of allowed AI opponents on the server
|
||||
saveGameActivated - allow game save and replay options (not working correctly yet)
|
||||
|
||||
authenticationActivated - "true" = user have to register to signon "false" = user need not to register
|
||||
* mail configs only needed if authentication is activated:
|
||||
* if mailUser = "" mailgun is used otherwise nativ mail server on the system
|
||||
googleAccount - not supported currently
|
||||
mailgunApiKey - key from the mailgun domain e.g. = "key-12121111..."
|
||||
mailgunDomain - domain for the mailgun message sending
|
||||
mailSmtpHost - hostname to send the mail
|
||||
mailSmtpPort - port to send the mail
|
||||
mailUser - username used to send the mail
|
||||
mailPassword - passworf of the used user to send the mail
|
||||
mailFromAddress - sender address
|
||||
-->
|
||||
<server serverAddress="0.0.0.0"
|
||||
serverName="mage-server"
|
||||
port="17171"
|
||||
secondaryBindPort="17179"
|
||||
backlogSize="200"
|
||||
numAcceptThreads="2"
|
||||
maxPoolSize="300"
|
||||
leasePeriod="5000"
|
||||
socketWriteTimeout="10000"
|
||||
maxGameThreads="10"
|
||||
maxSecondsIdle="300"
|
||||
minUserNameLength="3"
|
||||
maxUserNameLength="14"
|
||||
invalidUserNamePattern="[^a-z0-9_]"
|
||||
minPasswordLength="8"
|
||||
maxPasswordLength="100"
|
||||
maxAiOpponents="15"
|
||||
saveGameActivated="false"
|
||||
authenticationActivated="false"
|
||||
googleAccount=""
|
||||
mailgunApiKey="key-d93e81f19a9c9ed243ebb7cc9381385c"
|
||||
mailgunDomain="sandbox401a433f30d445309a5e86b6c53f7812.mailgun.org"
|
||||
mailSmtpHost="smtp.1und1.de"
|
||||
mailSmtpPort="465"
|
||||
mailUser="xmageserver@online.de"
|
||||
mailPassword="24wrsfxv"
|
||||
mailFromAddress="xmageserver@online.de"
|
||||
/>
|
||||
<playerTypes>
|
||||
<playerType name="Human" jar="mage-player-human.jar" className="mage.player.human.HumanPlayer"/>
|
||||
<!--<playerType name="Computer - minimax" jar="mage-player-aiminimax.jar" className="mage.player.ai.ComputerPlayer3"/>-->
|
||||
<playerType name="Computer - mad" jar="mage-player-ai-ma.jar" className="mage.player.ai.ComputerPlayer7"/>
|
||||
<!--<playerType name="Computer - monte carlo" jar="mage-player-aimcts.jar" className="mage.player.ai.ComputerPlayerMCTS"/>-->
|
||||
<playerType name="Computer - draftbot" jar="mage-player-ai-draft-bot.jar" className="mage.player.ai.ComputerDraftPlayer"/>
|
||||
</playerTypes>
|
||||
<gameTypes>
|
||||
<gameType name="Two Player Duel" jar="mage-game-twoplayerduel.jar" className="mage.game.TwoPlayerMatch" typeName="mage.game.TwoPlayerDuelType"/>
|
||||
<gameType name="Free For All" jar="mage-game-freeforall.jar" className="mage.game.FreeForAllMatch" typeName="mage.game.FreeForAllType"/>
|
||||
<gameType name="Commander Two Player Duel" jar="mage-game-commanderduel.jar" className="mage.game.CommanderDuelMatch" typeName="mage.game.CommanderDuelType"/>
|
||||
<gameType name="Commander Free For All" jar="mage-game-commanderfreeforall.jar" className="mage.game.CommanderFreeForAllMatch" typeName="mage.game.CommanderFreeForAllType"/>
|
||||
<gameType name="Tiny Leaders Two Player Duel" jar="mage-game-tinyleadersduel.jar" className="mage.game.TinyLeadersDuelMatch" typeName="mage.game.TinyLeadersDuelType"/>
|
||||
<gameType name="Canadian Highlander Two Player Duel" jar="mage-game-canadianhighlanderduel.jar" className="mage.game.CanadianHighlanderDuelMatch" typeName="mage.game.CanadianHighlanderDuelType"/>
|
||||
<gameType name="Penny Dreadful Commander Free For All" jar="mage-game-pennydreadfulcommanderfreeforall.jar" className="mage.game.PennyDreadfulCommanderFreeForAllMatch" typeName="mage.game.PennyDreadfulCommanderFreeForAllType"/>
|
||||
<gameType name="Freeform Commander Free For All" jar="mage-game-freeformcommanderfreeforall.jar" className="mage.game.FreeformCommanderFreeForAllMatch" typeName="mage.game.FreeformCommanderFreeForAllType"/>
|
||||
<gameType name="Brawl Two Player Duel" jar="mage-game-brawlduel.jar" className="mage.game.BrawlDuelMatch" typeName="mage.game.BrawlDuelType"/>
|
||||
<gameType name="Brawl Free For All" jar="mage-game-brawlfreeforall.jar" className="mage.game.BrawlFreeForAllMatch" typeName="mage.game.BrawlFreeForAllType"/>
|
||||
<gameType name="Momir Basic Two Player Duel" jar="mage-game-momirduel.jar" className="mage.game.MomirDuelMatch" typeName="mage.game.MomirDuelType"/>
|
||||
<gameType name="Momir Basic Free For All" jar="mage-game-momir.jar" className="mage.game.MomirFreeForAllMatch" typeName="mage.game.MomirFreeForAllType"/>
|
||||
</gameTypes>
|
||||
<tournamentTypes>
|
||||
<tournamentType name="Constructed Elimination" jar="mage-tournament-constructed.jar" className="mage.tournament.ConstructedEliminationTournament" typeName="mage.tournament.ConstructedEliminationTournamentType"/>
|
||||
<tournamentType name="Constructed Swiss" jar="mage-tournament-constructed.jar" className="mage.tournament.ConstructedSwissTournament" typeName="mage.tournament.ConstructedSwissTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Random)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RandomBoosterDraftEliminationTournament" typeName="mage.tournament.RandomBoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Rich Man)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RichManDraftEliminationTournament" typeName="mage.tournament.RichManDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Rich Man Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RichManCubeDraftEliminationTournament" typeName="mage.tournament.RichManCubeDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Cube)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Random)" jar="mage-tournament-booster-draft.jar" className="mage.tournament.RandomBoosterDraftSwissTournament" typeName="mage.tournament.RandomBoosterDraftSwissTournamentType"/>
|
||||
<tournamentType name="Sealed Elimination" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedEliminationTournament" typeName="mage.tournament.SealedEliminationTournamentType"/>
|
||||
<tournamentType name="Sealed Elimination (Cube)" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedEliminationTournament" typeName="mage.tournament.SealedEliminationCubeTournamentType"/>
|
||||
<tournamentType name="Sealed Swiss" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissTournamentType"/>
|
||||
<tournamentType name="Sealed Swiss (Cube)" jar="mage-tournament-sealed.jar" className="mage.tournament.SealedSwissTournament" typeName="mage.tournament.SealedSwissCubeTournamentType"/>
|
||||
</tournamentTypes>
|
||||
<draftCubes>
|
||||
<draftCube name="Adam Styborski's Pauper Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.AdamStyborskisPauperCube"/>
|
||||
<draftCube name="Ben's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.BensCube"/>
|
||||
<draftCube name="Cube Tutor 360 Pauper" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor360Pauper"/>
|
||||
<draftCube name="Cube Tutor 720" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeTutor720"/>
|
||||
<draftCube name="Eric Klug's Pro Tour Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.EricKlugsProTourCube"/>
|
||||
<draftCube name="Guillaume Matignon's Jenny's/Johnny's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.GuillaumeMatignonsJennysJohnnysCube"/>
|
||||
<draftCube name="Jim Davis's Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.JimDavisCube"/>
|
||||
<draftCube name="Joseph Vasoli's Peasant Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.JosephVasolisPeasantCube"/>
|
||||
<draftCube name="Mono Blue Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MonoBlueCube"/>
|
||||
<draftCube name="Sam Black's No Search Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.SamBlacksCube"/>
|
||||
<draftCube name="Timothee Simonot's Twisted Color Pie Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.TimotheeSimonotsTwistedColorPieCube"/>
|
||||
<draftCube name="MTGO Cube March 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGOMarchCube2014"/>
|
||||
<draftCube name="MTGO Legacy Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCube"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 March" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeMarch2015"/>
|
||||
<draftCube name="MTGO Legacy Cube 2015 September" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeSeptember2015"/>
|
||||
<draftCube name="MTGO Legacy Cube 2016 January" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeJanuary2016"/>
|
||||
<draftCube name="MTGO Legacy Cube 2016 September" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeSeptember2016"/>
|
||||
<draftCube name="MTGO Legacy Cube 2017 January" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeJanuary2017"/>
|
||||
<draftCube name="MTGO Legacy Cube 2017 April" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCubeApril2017"/>
|
||||
<draftCube name="MTGO Legacy Cube 2018 February" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegacyCube2018February"/>
|
||||
<draftCube name="MTGO Legendary Cube" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegendaryCube"/>
|
||||
<draftCube name="MTGO Legendary Cube April 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.LegendaryCubeApril2016"/>
|
||||
<draftCube name="MTGO Modern Cube 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.ModernCube2017"/>
|
||||
<draftCube name="MTGO Vintage Cube 2013" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2013"/>
|
||||
<draftCube name="MTGO Vintage Cube 2014" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2014"/>
|
||||
<draftCube name="MTGO Vintage Cube 2015" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2015"/>
|
||||
<draftCube name="MTGO Vintage Cube 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCube2016"/>
|
||||
<draftCube name="MTGO Vintage Cube June 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeJune2016"/>
|
||||
<draftCube name="MTGO Vintage Cube November 2016" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeNovember2016"/>
|
||||
<draftCube name="MTGO Vintage Cube June 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeJune2017"/>
|
||||
<draftCube name="MTGO Vintage Cube December 2017" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.VintageCubeDecember2017"/>
|
||||
<draftCube name="The Peasant's Toolbox" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.PeasantsToolboxCube"/>
|
||||
<draftCube name="www.MTGCube.com" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.MTGCube"/>
|
||||
<draftCube name="Cube From Deck" jar="mage-tournament-booster-draft.jar" className="mage.tournament.cubes.CubeFromDeck"/>
|
||||
</draftCubes>
|
||||
<deckTypes>
|
||||
<deckType name="Constructed - Standard" jar="mage-deck-constructed.jar" className="mage.deck.Standard"/>
|
||||
<deckType name="Constructed - Extended" jar="mage-deck-constructed.jar" className="mage.deck.Extended"/>
|
||||
<deckType name="Constructed - Frontier" jar="mage-deck-constructed.jar" className="mage.deck.Frontier"/>
|
||||
<deckType name="Constructed - Modern" jar="mage-deck-constructed.jar" className="mage.deck.Modern"/>
|
||||
<deckType name="Constructed - Modern - No Banned List" jar="mage-deck-constructed.jar" className="mage.deck.ModernNoBannedList"/>
|
||||
<deckType name="Constructed - Eternal" jar="mage-deck-constructed.jar" className="mage.deck.Eternal"/>
|
||||
<deckType name="Constructed - Legacy" jar="mage-deck-constructed.jar" className="mage.deck.Legacy"/>
|
||||
<deckType name="Constructed - Vintage" jar="mage-deck-constructed.jar" className="mage.deck.Vintage"/>
|
||||
<deckType name="Constructed - Pauper" jar="mage-deck-constructed.jar" className="mage.deck.Pauper"/>
|
||||
<deckType name="Constructed - Historical Type 2" jar="mage-deck-constructed.jar" className="mage.deck.HistoricalType2"/>
|
||||
<deckType name="Constructed - Super Type 2" jar="mage-deck-constructed.jar" className="mage.deck.SuperType2"/>
|
||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||
<deckType name="Constructed - Old School 93/94" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394"/>
|
||||
<deckType name="Constructed - Old School 93/94 - Italian Rules" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394Italian"/>
|
||||
<deckType name="Constructed - Old School 93/94 - Channel Fireball Rules" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394CFB"/>
|
||||
<deckType name="Constructed - Old School 93/94 - EudoGames Rules" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394EG"/>
|
||||
<deckType name="Constructed - Old School 93/94 - EC Rules" jar="mage-deck-constructed.jar" className="mage.deck.OldSchool9394EC"/>
|
||||
<deckType name="Constructed - Australian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.AusHighlander"/>
|
||||
<deckType name="Constructed - Canadian Highlander" jar="mage-deck-constructed.jar" className="mage.deck.CanadianHighlander"/>
|
||||
<deckType name="Constructed - Freeform" jar="mage-deck-constructed.jar" className="mage.deck.Freeform"/>
|
||||
<deckType name="Variant Magic - Commander" jar="mage-deck-constructed.jar" className="mage.deck.Commander"/>
|
||||
<deckType name="Variant Magic - Duel Commander" jar="mage-deck-constructed.jar" className="mage.deck.DuelCommander"/>
|
||||
<deckType name="Variant Magic - MTGO 1v1 Commander" jar="mage-deck-constructed.jar" className="mage.deck.MTGO1v1Commander"/>
|
||||
<deckType name="Variant Magic - Tiny Leaders" jar="mage-deck-constructed.jar" className="mage.deck.TinyLeaders"/>
|
||||
<deckType name="Variant Magic - Momir Basic" jar="mage-deck-constructed.jar" className="mage.deck.Momir"/>
|
||||
<deckType name="Variant Magic - Penny Dreadful Commander" jar="mage-deck-constructed.jar" className="mage.deck.PennyDreadfulCommander"/>
|
||||
<deckType name="Variant Magic - Freeform Commander" jar="mage-deck-constructed.jar" className="mage.deck.FreeformCommander"/>
|
||||
<deckType name="Variant Magic - Brawl" jar="mage-deck-constructed.jar" className="mage.deck.Brawl"/>
|
||||
<deckType name="Block Constructed - Amonkhet" jar="mage-deck-constructed.jar" className="mage.deck.AmonkhetBlock"/>
|
||||
<deckType name="Block Constructed - Battle for Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.BattleForZendikarBlock"/>
|
||||
<deckType name="Block Constructed - Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.InnistradBlock"/>
|
||||
<deckType name="Block Constructed - Ixalan" jar="mage-deck-constructed.jar" className="mage.deck.IxalanBlock"/>
|
||||
<deckType name="Block Constructed - Kaladesh" jar="mage-deck-constructed.jar" className="mage.deck.KaladeshBlock"/>
|
||||
<deckType name="Block Constructed - Kamigawa" jar="mage-deck-constructed.jar" className="mage.deck.KamigawaBlock"/>
|
||||
<deckType name="Block Constructed - Khans of Tarkir" jar="mage-deck-constructed.jar" className="mage.deck.KhansOfTarkirBlock"/>
|
||||
<deckType name="Block Constructed - Lorwyn" jar="mage-deck-constructed.jar" className="mage.deck.LorwynBlock"/>
|
||||
<deckType name="Block Constructed - Return to Ravnica" jar="mage-deck-constructed.jar" className="mage.deck.ReturnToRavnicaBlock"/>
|
||||
<deckType name="Block Constructed - Scars of Mirrodin" jar="mage-deck-constructed.jar" className="mage.deck.ScarsOfMirrodinBlock"/>
|
||||
<deckType name="Block Constructed - Shadowmoor" jar="mage-deck-constructed.jar" className="mage.deck.ShadowmoorBlock"/>
|
||||
<deckType name="Block Constructed - Shadows over Innistrad" jar="mage-deck-constructed.jar" className="mage.deck.ShadowsOverInnistradBlock"/>
|
||||
<deckType name="Block Constructed - Shards of Alara" jar="mage-deck-constructed.jar" className="mage.deck.ShardsOfAlaraBlock"/>
|
||||
<deckType name="Block Constructed - Theros" jar="mage-deck-constructed.jar" className="mage.deck.TherosBlock"/>
|
||||
<deckType name="Block Constructed - Zendikar" jar="mage-deck-constructed.jar" className="mage.deck.ZendikarBlock"/>
|
||||
<deckType name="Block Constructed Custom - Star Wars" jar="mage-deck-constructed.jar" className="mage.deck.StarWarsBlock"/>
|
||||
<deckType name="Limited" jar="mage-deck-limited.jar" className="mage.deck.Limited"/>
|
||||
</deckTypes>
|
||||
</config>
|
|
@ -41,6 +41,8 @@ public final class SystemUtil {
|
|||
private static final String COMMAND_CLEAR_BATTLEFIELD = "@clear battlefield";
|
||||
private static final String COMMAND_SHOW_OPPONENT_HAND = "@show opponent hand";
|
||||
private static final String COMMAND_SHOW_OPPONENT_LIBRARY = "@show opponent library";
|
||||
private static final String COMMAND_SHOW_MY_HAND = "@show my hand";
|
||||
private static final String COMMAND_SHOW_MY_LIBRARY = "@show my library";
|
||||
private static final Map<String, String> supportedCommands = new HashMap<>();
|
||||
|
||||
static {
|
||||
|
@ -50,6 +52,8 @@ public final class SystemUtil {
|
|||
supportedCommands.put(COMMAND_CLEAR_BATTLEFIELD, "CLAR BATTLEFIELD");
|
||||
supportedCommands.put(COMMAND_SHOW_OPPONENT_HAND, "SHOW OPPONENT HAND");
|
||||
supportedCommands.put(COMMAND_SHOW_OPPONENT_LIBRARY, "SHOW OPPONENT LIBRARY");
|
||||
supportedCommands.put(COMMAND_SHOW_MY_HAND, "SHOW MY HAND");
|
||||
supportedCommands.put(COMMAND_SHOW_MY_LIBRARY, "SHOW MY LIBRARY");
|
||||
}
|
||||
|
||||
private static final Pattern patternGroup = Pattern.compile("\\[(.+)\\]"); // [test new card]
|
||||
|
@ -57,7 +61,8 @@ public final class SystemUtil {
|
|||
private static final Pattern patternCardInfo = Pattern.compile("([\\S ]+):([\\S ]+)"); // Island:XLN
|
||||
|
||||
// show ext info for special commands
|
||||
private static final String PARAM_COLOR = "color";
|
||||
private static final String PARAM_COLOR_COST = "color cost";
|
||||
private static final String PARAM_COLOR_COMMANDER = "color commander";
|
||||
private static final String PARAM_PT = "pt"; // power toughness
|
||||
private static final String PARAM_ABILITIES_COUNT = "abilities count";
|
||||
private static final String PARAM_ABILITIES_LIST = "abilities list";
|
||||
|
@ -114,7 +119,10 @@ public final class SystemUtil {
|
|||
ArrayList<String> resInfo = new ArrayList<>();
|
||||
for (String param : commandParams) {
|
||||
switch (param) {
|
||||
case PARAM_COLOR:
|
||||
case PARAM_COLOR_COST:
|
||||
resInfo.add(card.getColor(game).toString());
|
||||
break;
|
||||
case PARAM_COLOR_COMMANDER:
|
||||
resInfo.add(card.getColorIdentity().toString());
|
||||
break;
|
||||
case PARAM_PT:
|
||||
|
@ -359,6 +367,20 @@ public final class SystemUtil {
|
|||
game.informPlayer(feedbackPlayer, info);
|
||||
}
|
||||
break;
|
||||
|
||||
case COMMAND_SHOW_MY_HAND:
|
||||
if (feedbackPlayer != null) {
|
||||
String info = getCardsListForSpecialInform(game, feedbackPlayer.getHand(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
}
|
||||
break;
|
||||
|
||||
case COMMAND_SHOW_MY_LIBRARY:
|
||||
if (feedbackPlayer != null) {
|
||||
String info = getCardsListForSpecialInform(game, feedbackPlayer.getLibrary().getCardList(), runGroup.commands);
|
||||
game.informPlayer(feedbackPlayer, info);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -52,7 +52,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class AbbotOfKeralKeep extends CardImpl {
|
||||
|
||||
public AbbotOfKeralKeep(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.MONK);
|
||||
this.power = new MageInt(2);
|
||||
|
@ -97,7 +97,7 @@ class AbbotOfKeralKeepExileEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourcePermanent != null && controller != null && controller.getLibrary().hasCards()) {
|
||||
Library library = controller.getLibrary();
|
||||
Card card = library.removeFromTop(game);
|
||||
Card card = library.getFromTop(game);
|
||||
if (card != null) {
|
||||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled>";
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
|
|
|
@ -51,7 +51,7 @@ import mage.players.Player;
|
|||
public class Abundance extends CardImpl {
|
||||
|
||||
public Abundance(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{G}");
|
||||
|
||||
// If you would draw a card, you may instead choose land or nonland and reveal cards from the top of your library until you reveal a card of the chosen kind. Put that card into your hand and put all other cards revealed this way on the bottom of your library in any order.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AbundanceReplacementEffect()));
|
||||
|
@ -94,22 +94,29 @@ class AbundanceReplacementEffect extends ReplacementEffectImpl {
|
|||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
FilterCard filter = new FilterCard();
|
||||
if (controller.chooseUse(Outcome.Benefit, "Choose land? (No = nonland)", source, game)) {
|
||||
if (controller.chooseUse(Outcome.Detriment, "Choose card type:",
|
||||
source.getSourceObject(game).getLogName(), "land", "nonland", source, game)) {
|
||||
game.informPlayers(controller.getLogName() + "chooses land.");
|
||||
filter.add(new CardTypePredicate(CardType.LAND));
|
||||
} else {
|
||||
game.informPlayers(controller.getLogName() + "chooses nonland.");
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
while (controller.getLibrary().hasCards()) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
Cards toReveal = new CardsImpl();
|
||||
Card selectedCard = null;
|
||||
for (Card card : controller.getLibrary().getCards(game)) {
|
||||
toReveal.add(card);
|
||||
if (filter.match(card, source.getSourceId(), source.getControllerId(), game)) {
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
selectedCard = card;
|
||||
break;
|
||||
}
|
||||
cards.add(card);
|
||||
|
||||
}
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
controller.moveCards(selectedCard, Zone.HAND, source, game);
|
||||
controller.revealCards(sourceObject.getIdName(), toReveal, game);
|
||||
toReveal.remove(selectedCard);
|
||||
controller.putCardsOnBottomOfLibrary(toReveal, game, source, true);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -124,7 +131,8 @@ class AbundanceReplacementEffect extends ReplacementEffectImpl {
|
|||
if (event.getPlayerId().equals(source.getControllerId())) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
return player.chooseUse(Outcome.Benefit, "Choose land or nonland?", source, game);
|
||||
return player.chooseUse(Outcome.Detriment, "Choose:", source.getSourceObject(game).getLogName(),
|
||||
"land or nonland and reveal cards from the top", "normal card draw", source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -54,7 +54,7 @@ import mage.target.common.TargetCardInHand;
|
|||
public class AcademyResearchers extends CardImpl {
|
||||
|
||||
public AcademyResearchers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
|
@ -104,7 +104,7 @@ class AcademyResearchersEffect extends OneShotEffect {
|
|||
Card auraInHand = game.getCard(target.getFirstTarget());
|
||||
if (auraInHand != null) {
|
||||
game.getState().setValue("attachTo:" + auraInHand.getId(), academyResearchers);
|
||||
auraInHand.putOntoBattlefield(game, Zone.HAND, source.getSourceId(), controller.getId());
|
||||
controller.moveCards(auraInHand, Zone.BATTLEFIELD, source, game);
|
||||
if (academyResearchers.addAttachment(auraInHand.getId(), game)) {
|
||||
game.informPlayers(controller.getLogName() + " put " + auraInHand.getLogName() + " on the battlefield attached to " + academyResearchers.getLogName() + '.');
|
||||
return true;
|
||||
|
|
|
@ -37,10 +37,10 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.i.InfectiousCurse;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.i.InfectiousCurse;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -55,7 +55,7 @@ import mage.util.CardUtil;
|
|||
public class AccursedWitch extends CardImpl {
|
||||
|
||||
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(4);
|
||||
|
@ -106,8 +106,7 @@ class AccursedWitchReturnTransformedEffect extends OneShotEffect {
|
|||
//note: should check for null after game.getCard
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (card != null) {
|
||||
card.removeFromZone(game, Zone.GRAVEYARD, source.getSourceId());
|
||||
card.putOntoBattlefield(game, Zone.BATTLEFIELD, source.getSourceId(), source.getControllerId(), false);
|
||||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -27,19 +27,21 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Library;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,8 +50,7 @@ import mage.players.Player;
|
|||
public class ActOnImpulse extends CardImpl {
|
||||
|
||||
public ActOnImpulse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
|
||||
|
||||
// Exile the top three cards of your library. Until end of turn, you may play cards exiled this way.
|
||||
this.getSpellAbility().addEffect(new ActOnImpulseExileEffect());
|
||||
|
@ -66,12 +67,12 @@ public class ActOnImpulse extends CardImpl {
|
|||
}
|
||||
|
||||
class ActOnImpulseExileEffect extends OneShotEffect {
|
||||
|
||||
|
||||
public ActOnImpulseExileEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Exile the top three cards of your library. Until end of turn, you may play cards exiled this way.";
|
||||
}
|
||||
|
||||
|
||||
public ActOnImpulseExileEffect(final ActOnImpulseExileEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
@ -80,69 +81,58 @@ class ActOnImpulseExileEffect extends OneShotEffect {
|
|||
public ActOnImpulseExileEffect copy() {
|
||||
return new ActOnImpulseExileEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Library library = controller.getLibrary();
|
||||
List<Card> cards = new ArrayList<>();
|
||||
int count = Math.min(3, library.size());
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = library.removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
Set<Card> cards = new HashSet<>(controller.getLibrary().getTopCards(game, 3));
|
||||
if (!cards.isEmpty()) {
|
||||
List<UUID> cardsId = new ArrayList<>();
|
||||
controller.moveCardsToExile(cards, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||
// remove cards that could not be moved to exile
|
||||
for (Card card : cards) {
|
||||
card.moveToExile(source.getSourceId(), "Act on Impulse", source.getSourceId(), game);
|
||||
cardsId.add(card.getId());
|
||||
if (!Zone.EXILED.equals(game.getState().getZone(card.getId()))) {
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
ContinuousEffect effect = new ActOnImpulseMayPlayExiledEffect();
|
||||
effect.setTargetPointer(new FixedTargets(cards, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
game.addEffect(new ActOnImpulseMayPlayExiledEffect(cardsId), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class ActOnImpulseMayPlayExiledEffect extends AsThoughEffectImpl {
|
||||
|
||||
public List<UUID> cards = new ArrayList<>();
|
||||
|
||||
public ActOnImpulseMayPlayExiledEffect(List<UUID> cards) {
|
||||
public ActOnImpulseMayPlayExiledEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
||||
this.cards.addAll(cards);
|
||||
}
|
||||
|
||||
|
||||
public ActOnImpulseMayPlayExiledEffect(final ActOnImpulseMayPlayExiledEffect effect) {
|
||||
super(effect);
|
||||
this.cards.addAll(effect.cards);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActOnImpulseMayPlayExiledEffect copy() {
|
||||
return new ActOnImpulseMayPlayExiledEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||
Card card = game.getCard(sourceId);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && card != null && game.getState().getZone(sourceId) == Zone.EXILED) {
|
||||
if (cards.contains(sourceId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return affectedControllerId.equals(source.getControllerId())
|
||||
&& getTargetPointer().getTargets(game, source).contains(objectId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ class AdNauseamEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
while (controller.chooseUse(outcome, message, source, game) && controller.getLibrary().hasCards()) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
int cmc = card.getConvertedManaCost();
|
||||
|
|
|
@ -35,7 +35,6 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -44,6 +43,7 @@ import mage.constants.AsThoughEffectType;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Library;
|
||||
|
@ -103,7 +103,7 @@ class AerialCaravanExileEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourcePermanent != null && controller != null && controller.getLibrary().hasCards()) {
|
||||
Library library = controller.getLibrary();
|
||||
Card card = library.removeFromTop(game);
|
||||
Card card = library.getFromTop(game);
|
||||
if (card != null) {
|
||||
String exileName = sourcePermanent.getIdName() + " <this card may be played the turn it was exiled>";
|
||||
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), exileName);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class AerieWorshippers extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// <i>Inspired</i> - Whenever Aerie Worshipers becomes untapped, you may pay {2}{U}. If you do, create a 2/2 blue Bird enchantment creature token with flying.
|
||||
// <i>Inspired</i> — Whenever Aerie Worshipers becomes untapped, you may pay {2}{U}. If you do, create a 2/2 blue Bird enchantment creature token with flying.
|
||||
this.addAbility(new InspiredAbility(new DoIfCostPaid(new CreateTokenEffect(new AerieWorshippersBirdToken()), new ManaCostsImpl("{2}{U}"))));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
|
@ -38,6 +39,7 @@ import mage.cards.*;
|
|||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
@ -49,8 +51,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public class AethermagesTouch extends CardImpl {
|
||||
|
||||
public AethermagesTouch(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{W}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}{U}");
|
||||
|
||||
// Reveal the top four cards of your library. You may put a creature card from among them onto the battlefield. It gains "At the beginning of your end step, return this creature to its owner's hand." Then put the rest of the cards revealed this way on the bottom of your library in any order.
|
||||
this.getSpellAbility().addEffect(new AethermagesTouchEffect());
|
||||
|
@ -65,12 +66,11 @@ public class AethermagesTouch extends CardImpl {
|
|||
return new AethermagesTouch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AethermagesTouchEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreatureCard filterPutOntoBattlefield = new FilterCreatureCard("a creature card to put onto the battlefield");
|
||||
|
||||
public AethermagesTouchEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "Reveal the top four cards of your library. You may put a creature card from among them onto the battlefield. It gains \"At the beginning of your end step, return this creature to its owner's hand.\" Then put the rest of the cards revealed this way on the bottom of your library in any order";
|
||||
}
|
||||
|
||||
|
@ -85,40 +85,32 @@ class AethermagesTouchEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
|
||||
boolean properCardFound = false;
|
||||
int count = Math.min(player.getLibrary().size(), 4);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if (filterPutOntoBattlefield.match(card, source.getSourceId(), source.getControllerId(), game)) {
|
||||
properCardFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 4));
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards("Aethermage's Touch", cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, filterPutOntoBattlefield);
|
||||
if (properCardFound && player.choose(Outcome.PutCreatureInPlay, cards, target, game)) {
|
||||
FilterCreatureCard filter = new FilterCreatureCard("a creature card to put onto the battlefield");
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, filter);
|
||||
if (cards.count(filter, game) > 0 && controller.choose(outcome, cards, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
if (card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId())) {
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
// It gains \"At the beginning of your end step, return this creature to its owner's hand.\"
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), TargetController.YOU, null, false);
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true), TargetController.YOU, null, false);
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
player.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, true);
|
||||
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.BasicManaEffect;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -82,7 +82,7 @@ public class AkoumHellkite extends CardImpl {
|
|||
|
||||
class AkoumHellkiteTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final String text = "<i>Landfall</i> - Whenever a land enters the battlefield under your control, {this} deals 1 damage to any target. "
|
||||
private static final String text = "<i>Landfall</i> — Whenever a land enters the battlefield under your control, {this} deals 1 damage to any target. "
|
||||
+ "If that land is a Mountain, Akoum Hellkite deals 2 damage to that permanent or player instead.";
|
||||
|
||||
public AkoumHellkiteTriggeredAbility() {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class AkroanConscriptor extends CardImpl {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn.
|
||||
Ability ability = new HeroicAbility(new GainControlTargetEffect(Duration.EndOfTurn, true), false);
|
||||
Effect effect = new UntapTargetEffect();
|
||||
effect.setText("Untap that creature");
|
||||
|
|
|
@ -54,7 +54,7 @@ public class AkroanSkyguard extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Akroan Skyguard, put a +1/+1 counter on Akroan Skyguard.
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Akroan Skyguard, put a +1/+1 counter on Akroan Skyguard.
|
||||
this.addAbility(new HeroicAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true)));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,15 +51,14 @@ import mage.target.TargetCard;
|
|||
public class AladdinsLamp extends CardImpl {
|
||||
|
||||
public AladdinsLamp(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{10}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{10}");
|
||||
|
||||
// {X}, {tap}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AladdinsLampEffect(), new ManaCostsImpl("{X}"));
|
||||
// {X}, {T}: The next time you would draw a card this turn, instead look at the top X cards of your library, put all but one of them on the bottom of your library in a random order, then draw a card. X can't be 0.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AladdinsLampEffect(), new ManaCostsImpl("{X}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public AladdinsLamp(final AladdinsLamp card) {
|
||||
super(card);
|
||||
|
@ -88,53 +87,32 @@ class AladdinsLampEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl();
|
||||
int count = source.getManaCostsToPay().getX();
|
||||
count = Math.min(player.getLibrary().size(), count);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);// I'd like to use .getTopCards(game, count), but it returns a set which I dunno how to work with and would break the copied code adding to effort/time;
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, source.getManaCostsToPay().getX()));
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to stay at the top of library"));
|
||||
if (controller.choose(outcome, cards, target, game)) {
|
||||
cards.remove(target.getFirstTarget());
|
||||
}
|
||||
player.lookAtCards("Aladdin's Lamp", cards, game);
|
||||
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard());
|
||||
|
||||
if (player.choose(outcome, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Put the rest on the bottom of your library in a random order
|
||||
while (!cards.isEmpty()) {
|
||||
Card card = cards.getRandom(game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
//player.drawCards(1, game); // Technically I should move it to the top and then draw but, I cant confirm that flag above refers to bottom of library
|
||||
controller.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
game.applyEffects();
|
||||
controller.drawCards(1, game, event.getAppliedEffects());
|
||||
discard();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DRAW_CARD;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return source.getControllerId().equals(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
@ -101,18 +101,12 @@ class AllHallowsEveEffect extends OneShotEffect {
|
|||
allHallowsEve.getCounters(game).removeCounter(CounterType.SCREAM, 1);
|
||||
if (allHallowsEve.getCounters(game).getCount(CounterType.SCREAM) == 0) {
|
||||
allHallowsEve.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
|
||||
Cards creatures = new CardsImpl();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
for (Card creatureCard : player.getGraveyard().getCards(new FilterCreatureCard(), game)) {
|
||||
creatures.add(creatureCard);
|
||||
}
|
||||
player.moveCards(player.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game), Zone.BATTLEFIELD, source, game);
|
||||
}
|
||||
}
|
||||
for (Card card : creatures.getCards(game)) {
|
||||
card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getId(), card.getOwnerId());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ class AllianceOfArmsEffect extends OneShotEffect {
|
|||
|
||||
public AllianceOfArmsEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "<i>Join forces</i> - Starting with you, each player may pay any amount of mana. Each player creates X 1/1 white Soldier creature tokens, where X is the total amount of mana paid this way";
|
||||
this.staticText = "<i>Join forces</i> — Starting with you, each player may pay any amount of mana. Each player creates X 1/1 white Soldier creature tokens, where X is the total amount of mana paid this way";
|
||||
}
|
||||
|
||||
public AllianceOfArmsEffect(final AllianceOfArmsEffect effect) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import mage.filter.common.FilterControlledPermanent;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -69,9 +70,12 @@ public class AmbushCommander extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Forests you control are 1/1 green Elf creatures that are still lands.
|
||||
ContinuousEffect effect = new BecomesCreatureAllEffect(new AmbushCommanderToken(), "lands", filter2, Duration.WhileOnBattlefield);
|
||||
ContinuousEffect effect = new BecomesCreatureAllEffect(
|
||||
new CreatureToken(1, 1, "1/1 green Elf creature").withColor("G").withSubType(SubType.ELF),
|
||||
"lands", filter2, Duration.WhileOnBattlefield, true);
|
||||
effect.getDependencyTypes().add(DependencyType.BecomeForest);
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
|
||||
// {1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(3, 3, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{1}{G}"));
|
||||
|
@ -89,23 +93,3 @@ public class AmbushCommander extends CardImpl {
|
|||
return new AmbushCommander(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AmbushCommanderToken extends TokenImpl {
|
||||
|
||||
public AmbushCommanderToken() {
|
||||
super("Elf", "1/1 green Elf creatures");
|
||||
subtype.add(SubType.ELF);
|
||||
cardType.add(CardType.CREATURE);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
color.setGreen(true);
|
||||
}
|
||||
public AmbushCommanderToken(final AmbushCommanderToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AmbushCommanderToken copy() {
|
||||
return new AmbushCommanderToken(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,15 +51,14 @@ import mage.target.TargetCard;
|
|||
public class AncestralKnowledge extends CardImpl {
|
||||
|
||||
public AncestralKnowledge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
// Cumulative upkeep {1}
|
||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl<>("{1}")));
|
||||
|
||||
|
||||
// When Ancestral Knowledge enters the battlefield, look at the top ten cards of your library, then exile any number of them and put the rest back on top of your library in any order.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new AncestralKnowledgeEffect()));
|
||||
|
||||
|
||||
// When Ancestral Knowledge leaves the battlefield, shuffle your library.
|
||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ShuffleLibrarySourceEffect(), false));
|
||||
}
|
||||
|
@ -75,53 +74,34 @@ public class AncestralKnowledge extends CardImpl {
|
|||
}
|
||||
|
||||
class AncestralKnowledgeEffect extends OneShotEffect {
|
||||
|
||||
|
||||
AncestralKnowledgeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "look at the top ten cards of your library, then exile any number of them and put the rest back on top of your library in any order";
|
||||
}
|
||||
|
||||
|
||||
AncestralKnowledgeEffect(final AncestralKnowledgeEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AncestralKnowledgeEffect copy() {
|
||||
return new AncestralKnowledgeEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
int numCards = Math.min(10, player.getLibrary().size());
|
||||
if (numCards > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (int i = 0; i < numCards; i++) {
|
||||
cards.add(player.getLibrary().removeFromTop(game));
|
||||
}
|
||||
TargetCard target = new TargetCard(0, numCards, Zone.LIBRARY, new FilterCard("cards to exile"));
|
||||
player.choose(Outcome.Exile, cards, target, game);
|
||||
for (UUID cardId : target.getTargets()) {
|
||||
Card card = cards.get(cardId, game);
|
||||
if (card != null) {
|
||||
player.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
while (cards.size() > 1) {
|
||||
target = new TargetCard(1, Zone.LIBRARY, new FilterCard("card to put on top of library (last put is first drawn)"));
|
||||
player.choose(Outcome.Benefit, cards, target, game);
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false);
|
||||
cards.remove(card);
|
||||
}
|
||||
if (cards.size() == 1) {
|
||||
Card card = cards.get(cards.iterator().next(), game);
|
||||
if (card != null) {
|
||||
player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, true, false);
|
||||
}
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 10));
|
||||
if (cards.size() > 0) {
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(0, Integer.MAX_VALUE, Zone.LIBRARY, new FilterCard("cards to exile"));
|
||||
controller.choose(Outcome.Exile, cards, target, game);
|
||||
Cards toExile = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(toExile, Zone.EXILED, source, game);
|
||||
cards.removeAll(toExile);
|
||||
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -27,19 +27,21 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
|
@ -47,11 +49,11 @@ import java.util.UUID;
|
|||
public class AncestralMemories extends CardImpl {
|
||||
|
||||
public AncestralMemories(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{U}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}{U}");
|
||||
|
||||
// Look at the top seven cards of your library. Put two of them into your hand and the rest into your graveyard.
|
||||
this.getSpellAbility().addEffect(new AncestralMemoriesEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(7), false, new StaticValue(2),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
}
|
||||
|
||||
public AncestralMemories(final AncestralMemories card) {
|
||||
|
@ -82,32 +84,18 @@ class AncestralMemoriesEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
int cardsCount = Math.min(7, player.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 7));
|
||||
if (!cards.isEmpty()) {
|
||||
player.lookAtCards("Ancestral Memories", cards, game);
|
||||
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand"));
|
||||
if (player.choose(Outcome.Benefit, cards, target, game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = cards.get(targetId, game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
if (controller.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Cards toHand = new CardsImpl(target.getTargets());
|
||||
controller.moveCards(cards, Zone.HAND, source, game);
|
||||
cards.removeAll(toHand);
|
||||
}
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ package mage.cards.a;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.mana.ConditionalAnyColorManaAbility;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -44,7 +46,6 @@ import mage.filter.common.FilterCreatureCard;
|
|||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
|
@ -54,7 +55,7 @@ import mage.players.Player;
|
|||
public class AngelOfGlorysRise extends CardImpl {
|
||||
|
||||
public AngelOfGlorysRise(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}");
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
|
||||
this.power = new MageInt(4);
|
||||
|
@ -79,14 +80,6 @@ public class AngelOfGlorysRise extends CardImpl {
|
|||
|
||||
class AngelOfGlorysRiseEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreatureCard filterHuman = new FilterCreatureCard();
|
||||
private static final FilterCreaturePermanent filterZombie = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterZombie.add(new SubtypePredicate(SubType.ZOMBIE));
|
||||
filterHuman.add(new SubtypePredicate(SubType.HUMAN));
|
||||
}
|
||||
|
||||
public AngelOfGlorysRiseEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
staticText = "Exile all Zombies, then return all Human creature cards from your graveyard to the battlefield";
|
||||
|
@ -103,14 +96,14 @@ class AngelOfGlorysRiseEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
for (Permanent zombie : game.getBattlefield().getActivePermanents(filterZombie, source.getControllerId(), source.getSourceId(), game)) {
|
||||
zombie.moveToExile(source.getSourceId(), zombie.getName(), source.getSourceId(), game);
|
||||
}
|
||||
for (Card human : player.getGraveyard().getCards(filterHuman, game)) {
|
||||
human.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId());
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Set<Card> toExile = new HashSet<>(game.getBattlefield()
|
||||
.getActivePermanents(new FilterCreaturePermanent(SubType.ZOMBIE, "Zombie"), source.getControllerId(), source.getSourceId(), game));
|
||||
controller.moveCards(toExile, Zone.EXILED, source, game);
|
||||
FilterCreatureCard filterHuman = new FilterCreatureCard();
|
||||
filterHuman.add(new SubtypePredicate(SubType.HUMAN));
|
||||
controller.moveCards(controller.getGraveyard().getCards(filterHuman, game), Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -63,7 +62,7 @@ public class AngelOfJubilation extends CardImpl {
|
|||
}
|
||||
|
||||
public AngelOfJubilation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}{W}");
|
||||
this.subtype.add(SubType.ANGEL);
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
@ -117,36 +116,36 @@ class AngelOfJubilationEffect extends ContinuousEffectImpl {
|
|||
|
||||
class AngelOfJubilationSacrificeFilterEffect extends CostModificationEffectImpl {
|
||||
|
||||
public AngelOfJubilationSacrificeFilterEffect() {
|
||||
public AngelOfJubilationSacrificeFilterEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, CostModificationType.SET_COST);
|
||||
staticText = "Players can't pay life or sacrifice creatures to cast spells or activate abilities";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected AngelOfJubilationSacrificeFilterEffect(AngelOfJubilationSacrificeFilterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
for (Cost cost : abilityToModify.getCosts()) {
|
||||
if(cost instanceof SacrificeTargetCost) {
|
||||
SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;
|
||||
Filter filter = sacrificeCost.getTargets().get(0).getFilter();
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
}
|
||||
if (cost instanceof SacrificeTargetCost) {
|
||||
SacrificeTargetCost sacrificeCost = (SacrificeTargetCost) cost;
|
||||
Filter filter = sacrificeCost.getTargets().get(0).getFilter();
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
return abilityToModify.getAbilityType() == AbilityType.ACTIVATED ||
|
||||
abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility;
|
||||
return abilityToModify.getAbilityType() == AbilityType.ACTIVATED
|
||||
|| abilityToModify instanceof SpellAbility;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelOfJubilationSacrificeFilterEffect copy() {
|
||||
return new AngelOfJubilationSacrificeFilterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AngelOfJubilationSacrificeFilterEffect copy() {
|
||||
return new AngelOfJubilationSacrificeFilterEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.CreatureEntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
|
||||
|
@ -39,18 +40,23 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public class AngelsTomb extends CardImpl {
|
||||
|
||||
public AngelsTomb(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// Whenever a creature enters the battlefield under your control, you may have Angel's Tomb become a 3/3 white Angel artifact creature with flying until end of turn.
|
||||
this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new BecomesCreatureSourceEffect(new AngelTombToken(), "", Duration.EndOfTurn), true));
|
||||
this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(3, 3, "3/3 white Angel artifact creature with flying")
|
||||
.withColor("W")
|
||||
.withSubType(SubType.ANGEL)
|
||||
.withAbility(FlyingAbility.getInstance()),
|
||||
"", Duration.EndOfTurn), true));
|
||||
}
|
||||
|
||||
public AngelsTomb(final AngelsTomb card) {
|
||||
|
@ -61,26 +67,4 @@ public class AngelsTomb extends CardImpl {
|
|||
public AngelsTomb copy() {
|
||||
return new AngelsTomb(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AngelTombToken extends TokenImpl {
|
||||
|
||||
public AngelTombToken() {
|
||||
super("", "3/3 white Angel artifact creature with flying");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
|
||||
subtype.add(SubType.ANGEL);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(3);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
public AngelTombToken(final AngelTombToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AngelTombToken copy() {
|
||||
return new AngelTombToken(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,9 +36,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -111,15 +109,11 @@ class AnimarCostReductionEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
|
||||
if (abilityToModify instanceof SpellAbility) {
|
||||
if (abilityToModify.getControllerId().equals(source.getControllerId())) {
|
||||
Spell spell = (Spell) game.getStack().getStackObject(abilityToModify.getId());
|
||||
if (spell != null) {
|
||||
return spell.isCreature();
|
||||
} else {
|
||||
// used at least for flashback ability because Flashback ability doesn't use stack or for getPlayables where spell is not cast yet
|
||||
Card sourceCard = game.getCard(abilityToModify.getSourceId());
|
||||
return sourceCard != null && sourceCard.isCreature();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +49,7 @@ public class AnimateLand extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
|
||||
|
||||
// Until end of turn, target land becomes a 3/3 creature that's still a land.
|
||||
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetLandPermanent());
|
||||
}
|
||||
|
||||
|
@ -60,21 +61,4 @@ public class AnimateLand extends CardImpl {
|
|||
public AnimateLand copy() {
|
||||
return new AnimateLand(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedLand extends TokenImpl {
|
||||
|
||||
public AnimatedLand() {
|
||||
super("", "3/3 creature");
|
||||
this.cardType.add(CardType.CREATURE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
}
|
||||
public AnimatedLand(final AnimatedLand token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AnimatedLand copy() {
|
||||
return new AnimatedLand(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -81,7 +81,7 @@ class AnthemOfRakdosHellbentEffect extends ReplacementEffectImpl {
|
|||
|
||||
public AnthemOfRakdosHellbentEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Damage);
|
||||
staticText = "<i>Hellbent</i> - As long as you have no cards in hand, if a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead.";
|
||||
staticText = "<i>Hellbent</i> — As long as you have no cards in hand, if a source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead.";
|
||||
}
|
||||
|
||||
public AnthemOfRakdosHellbentEffect(final AnthemOfRakdosHellbentEffect effect) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import mage.constants.SuperType;
|
|||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -58,8 +59,8 @@ public class AnthousaSetessanHero extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands.
|
||||
Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new AnthousaWarriorToken(), false, true, Duration.EndOfTurn));
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands.
|
||||
Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new CreatureToken(2, 2, "2/2 Warrior creature", SubType.WARRIOR),false,true, Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetControlledPermanent(0,3,new FilterControlledLandPermanent("lands"), false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -72,23 +73,4 @@ public class AnthousaSetessanHero extends CardImpl {
|
|||
public AnthousaSetessanHero copy() {
|
||||
return new AnthousaSetessanHero(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AnthousaWarriorToken extends TokenImpl {
|
||||
|
||||
public AnthousaWarriorToken() {
|
||||
super("", "2/2 Warrior creatures");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.WARRIOR);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
}
|
||||
public AnthousaWarriorToken(final AnthousaWarriorToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AnthousaWarriorToken copy() {
|
||||
return new AnthousaWarriorToken(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -79,29 +79,7 @@ class ApproachOfTheSecondSunEffect extends OneShotEffect {
|
|||
}
|
||||
Card spellCard = game.getStack().getSpell(source.getSourceId()).getCard();
|
||||
if (spellCard != null) {
|
||||
List<Card> top6 = new ArrayList<>();
|
||||
// Cut the top 6 cards off into a temporary array
|
||||
for (int i = 0; i < 6 && controller.getLibrary().hasCards(); ++i) {
|
||||
top6.add(controller.getLibrary().removeFromTop(game));
|
||||
}
|
||||
|
||||
// Is the library now empty, thus the rise is on the bottom (for the message to the players)?
|
||||
boolean isOnBottom = controller.getLibrary().size() < 6;
|
||||
// Put this card (if the ability came from an ApproachOfTheSecondSun spell card) on top
|
||||
spellCard.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
|
||||
// put the top 6 we took earlier back on top (going in reverse order this time to get them back
|
||||
// on top in the proper order)
|
||||
for (int i = top6.size() - 1; i >= 0; --i) {
|
||||
controller.getLibrary().putOnTop(top6.get(i), game);
|
||||
}
|
||||
|
||||
// Inform the players
|
||||
if (isOnBottom) {
|
||||
game.informPlayers(controller.getLogName() + " puts " + spell.getLogName() + " on the bottom of their library.");
|
||||
} else {
|
||||
game.informPlayers(controller.getLogName() + " puts " + spell.getLogName() + " into their library 7th from the top.");
|
||||
}
|
||||
controller.putCardOnTopXOfLibrary(spellCard, game, source, 7);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ArachnusSpinner extends CardImpl {
|
|||
}
|
||||
|
||||
public ArachnusSpinner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}");
|
||||
this.subtype.add(SubType.SPIDER);
|
||||
|
||||
this.power = new MageInt(5);
|
||||
|
@ -98,8 +98,10 @@ public class ArachnusSpinner extends CardImpl {
|
|||
class ArachnusSpinnerEffect extends OneShotEffect {
|
||||
|
||||
public ArachnusSpinnerEffect() {
|
||||
super(Outcome.UnboostCreature);
|
||||
this.staticText = "Search your graveyard and/or library for a card named Arachnus Web and put it onto the battlefield attached to target creature. If you search your library this way, shuffle it";
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "Search your graveyard and/or library for a card named Arachnus Web "
|
||||
+ "and put it onto the battlefield attached to target creature. "
|
||||
+ "If you search your library this way, shuffle it";
|
||||
}
|
||||
|
||||
public ArachnusSpinnerEffect(final ArachnusSpinnerEffect effect) {
|
||||
|
@ -113,8 +115,8 @@ class ArachnusSpinnerEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -122,34 +124,28 @@ class ArachnusSpinnerEffect extends OneShotEffect {
|
|||
filter.add(new NamePredicate("Arachnus Web"));
|
||||
|
||||
Card card = null;
|
||||
Zone zone = null;
|
||||
if (player.chooseUse(Outcome.Neutral, "Search your graveyard for Arachnus Web?", source, game)) {
|
||||
if (controller.chooseUse(Outcome.Neutral, "Search your graveyard for Arachnus Web?", source, game)) {
|
||||
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(filter);
|
||||
if (player.choose(Outcome.PutCardInPlay, player.getGraveyard(), target, game)) {
|
||||
if (controller.choose(Outcome.PutCardInPlay, controller.getGraveyard(), target, game)) {
|
||||
card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
zone = Zone.GRAVEYARD;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (card == null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (controller.searchLibrary(target, game)) {
|
||||
card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
zone = Zone.LIBRARY;
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(source, game);
|
||||
controller.shuffleLibrary(source, game);
|
||||
}
|
||||
if (card != null) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
game.getState().setValue("attachTo:" + card.getId(), permanent.getId());
|
||||
card.putOntoBattlefield(game, zone, source.getSourceId(), source.getControllerId());
|
||||
return permanent.addAttachment(card.getId(), game);
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
permanent.addAttachment(card.getId(), game); // shouldn't this be done automatically by the logic using the "attachTo:" calue?
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ArahboRoarOfTheWorld extends CardImpl {
|
|||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new BeginningOfCombatTriggeredAbility(Zone.ALL, new BoostTargetEffect(3, 3, Duration.EndOfTurn), TargetController.YOU, false, false),
|
||||
SourceOnBattlefieldOrCommandZoneCondition.instance,
|
||||
"<i>Eminence</i> - At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn.");
|
||||
"<i>Eminence</i> — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn.");
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.setAbilityWord(AbilityWord.EMINENCE);
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.abilities.keyword.InspiredAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.*;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
@ -62,7 +62,7 @@ public class ArbiterOfTheIdeal extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// <i>Inspired</i> - Whenever Arbiter of the Ideal becomes untapped, reveal the top card of your library. If it's an artifact, creature, or land card, you may put it onto the battlefield with a manifestation counter on it. It's an enchantment in addition to its other types.
|
||||
// <i>Inspired</i> — Whenever Arbiter of the Ideal becomes untapped, reveal the top card of your library. If it's an artifact, creature, or land card, you may put it onto the battlefield with a manifestation counter on it. It's an enchantment in addition to its other types.
|
||||
this.addAbility(new InspiredAbility(new ArbiterOfTheIdealEffect()));
|
||||
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class ArbiterOfTheIdealEffect extends OneShotEffect {
|
|||
controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(new Counter("Manifestation"), source, game);
|
||||
permanent.addCounters(CounterType.MANIFESTATION.createInstance(), source, game);
|
||||
ContinuousEffect effect = new AddCardTypeTargetEffect(Duration.Custom, CardType.ENCHANTMENT);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
|
|
|
@ -32,7 +32,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -82,7 +81,7 @@ class ArcaneMeleeCostReductionEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if (abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) {
|
||||
if (abilityToModify instanceof SpellAbility) {
|
||||
Card sourceCard = game.getCard((abilityToModify).getSourceId());
|
||||
if (sourceCard != null && (sourceCard.isInstant() || sourceCard.isSorcery())) {
|
||||
return true;
|
||||
|
|
|
@ -49,7 +49,7 @@ import mage.target.TargetPlayer;
|
|||
public class ArchitectsOfWill extends CardImpl {
|
||||
|
||||
public ArchitectsOfWill(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}{U}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
|
@ -95,19 +95,11 @@ class ArchitectsOfWillEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (targetPlayer == null
|
||||
|| controller == null) {
|
||||
if (targetPlayer == null || controller == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
int count = Math.min(targetPlayer.getLibrary().size(), 3);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
controller.lookAtCards("Architects of Will", cards, game);
|
||||
Cards cards = new CardsImpl(targetPlayer.getLibrary().getTopCards(game, 3));
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
controller.putCardsOnTopOfLibrary(cards, game, source, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ArtisanOfForms extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability.
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Artisan of Forms, you may have Artisan of Forms become a copy of target creature and gain this ability.
|
||||
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new ArtisanOfFormsApplyToPermanent(), true);
|
||||
effect.setText("have {this} become a copy of target creature and gain this ability");
|
||||
Ability ability = new HeroicAbility(effect, true);
|
||||
|
|
|
@ -51,7 +51,7 @@ public class AshioksAdept extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// <i>Heroic</i> - Whenever you cast a spell that targets Ashiok's Adept, each opponent discards a card.
|
||||
// <i>Heroic</i> — Whenever you cast a spell that targets Ashiok's Adept, each opponent discards a card.
|
||||
this.addAbility(new HeroicAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT)));
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -44,9 +43,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
|
@ -57,7 +54,7 @@ import mage.target.TargetPlayer;
|
|||
public class AshnodsCylix extends CardImpl {
|
||||
|
||||
public AshnodsCylix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
|
||||
|
||||
// {3}, {T}: Target player looks at the top three cards of their library, puts one of them back on top of their library, then exiles the rest.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AshnodsCylixEffect(), new GenericManaCost(3));
|
||||
|
@ -77,49 +74,38 @@ public class AshnodsCylix extends CardImpl {
|
|||
}
|
||||
|
||||
class AshnodsCylixEffect extends OneShotEffect {
|
||||
|
||||
|
||||
AshnodsCylixEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Target player looks at the top three cards of their library, puts one of them back on top of their library, then exiles the rest";
|
||||
}
|
||||
|
||||
|
||||
AshnodsCylixEffect(final AshnodsCylixEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AshnodsCylixEffect copy() {
|
||||
return new AshnodsCylixEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
int count = Math.min(player.getLibrary().size(), 3);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
//~ player.revealCards(source.getSourceObject(game).getIdName(), cards, game);
|
||||
Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));
|
||||
player.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put on top of your library"));
|
||||
if (player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
if (player.choose(Outcome.Benefit, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
player.getLibrary().putOnTop(card, game);
|
||||
game.informPlayers(source.getSourceObject(game).getIdName() + ": " + player.getLogName() + " puts a card on top of their library");
|
||||
game.informPlayers(source.getSourceObject(game).getIdName() + ": " + player.getLogName() + " puts a card back on top of their library");
|
||||
}
|
||||
}
|
||||
for (UUID cardId : cards) {
|
||||
Card card = game.getCard(cardId);
|
||||
card.moveToExile(null, "", source.getSourceId(), game);
|
||||
}
|
||||
player.moveCards(cards, Zone.EXILED, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -35,7 +34,7 @@ import mage.abilities.common.EntersBattlefieldAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceColor;
|
||||
|
@ -53,13 +52,13 @@ import mage.players.Player;
|
|||
public class AstralCornucopia extends CardImpl {
|
||||
|
||||
public AstralCornucopia(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{X}{X}{X}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{X}{X}{X}");
|
||||
|
||||
// Astral Cornucopia enters the battlefield with X charge counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.CHARGE.createInstance())));
|
||||
|
||||
// {T}: Choose a color. Add one mana of that color for each charge counter on Astral Cornucopia.
|
||||
this.addAbility(new AstralCornucopiaManaAbility());
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AstralCornucopiaManaEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
public AstralCornucopia(final AstralCornucopia card) {
|
||||
|
@ -72,35 +71,6 @@ public class AstralCornucopia extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class AstralCornucopiaManaAbility extends ActivatedManaAbilityImpl {
|
||||
|
||||
public AstralCornucopiaManaAbility() {
|
||||
super(Zone.BATTLEFIELD, new AstralCornucopiaManaEffect(), new TapSourceCost());
|
||||
}
|
||||
|
||||
public AstralCornucopiaManaAbility(final AstralCornucopiaManaAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AstralCornucopiaManaAbility copy() {
|
||||
return new AstralCornucopiaManaAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Mana> getNetMana(Game game) {
|
||||
netMana.clear();
|
||||
Permanent sourcePermanent = game.getPermanent(getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int counters = sourcePermanent.getCounters(game).getCount(CounterType.CHARGE.getName());
|
||||
if (counters > 0) {
|
||||
netMana.add(new Mana(0, 0, 0, 0, 0, 0, counters, 0));
|
||||
}
|
||||
}
|
||||
return netMana;
|
||||
}
|
||||
}
|
||||
|
||||
class AstralCornucopiaManaEffect extends ManaEffect {
|
||||
|
||||
private final Mana computedMana;
|
||||
|
@ -125,42 +95,55 @@ class AstralCornucopiaManaEffect extends ManaEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
choice.setMessage("Choose a color to add mana of that color");
|
||||
if (controller.choose(outcome, choice, game)) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (choice.getChoice() != null) {
|
||||
String color = choice.getChoice();
|
||||
int counters = sourcePermanent.getCounters(game).getCount(CounterType.CHARGE.getName());
|
||||
switch (color) {
|
||||
case "Red":
|
||||
computedMana.setRed(counters);
|
||||
break;
|
||||
case "Blue":
|
||||
computedMana.setBlue(counters);
|
||||
break;
|
||||
case "White":
|
||||
computedMana.setWhite(counters);
|
||||
break;
|
||||
case "Black":
|
||||
computedMana.setBlack(counters);
|
||||
break;
|
||||
case "Green":
|
||||
computedMana.setGreen(counters);
|
||||
break;
|
||||
}
|
||||
}
|
||||
checkToFirePossibleEvents(computedMana, game, source);
|
||||
controller.getManaPool().addMana(computedMana, game, source);
|
||||
return true;
|
||||
}
|
||||
checkToFirePossibleEvents(getMana(game, source), game, source);
|
||||
controller.getManaPool().addMana(getMana(game, source), game, source);
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
return null;
|
||||
public Mana produceMana(boolean netMana, Game game, Ability source) {
|
||||
Mana mana = new Mana();
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int counters = sourcePermanent.getCounters(game).getCount(CounterType.CHARGE.getName());
|
||||
if (counters > 0) {
|
||||
if (netMana) {
|
||||
return new Mana(0, 0, 0, 0, 0, 0, counters, 0);
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
choice.setMessage("Choose a color to add mana of that color");
|
||||
if (controller.choose(outcome, choice, game)) {
|
||||
if (choice.getChoice() != null) {
|
||||
String color = choice.getChoice();
|
||||
switch (color) {
|
||||
case "Red":
|
||||
mana.setRed(counters);
|
||||
break;
|
||||
case "Blue":
|
||||
mana.setBlue(counters);
|
||||
break;
|
||||
case "White":
|
||||
mana.setWhite(counters);
|
||||
break;
|
||||
case "Black":
|
||||
mana.setBlack(counters);
|
||||
break;
|
||||
case "Green":
|
||||
mana.setGreen(counters);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mana;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbili
|
|||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
|
|
|
@ -51,7 +51,7 @@ public class AtarkaBeastbreaker extends CardImpl {
|
|||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Formidable</i> - {4}{G}: Atarka Beastbreaker gets +4/+4 until end of turn. Activate this only if creatures you control have total power 8 or greater.
|
||||
// <i>Formidable</i> — {4}{G}: Atarka Beastbreaker gets +4/+4 until end of turn. Activate this only if creatures you control have total power 8 or greater.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(4,4, Duration.EndOfTurn),
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
@ -43,23 +44,28 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class AtarkaMonument extends CardImpl {
|
||||
|
||||
public AtarkaMonument(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// {T}: Add {R} or {G}.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
|
||||
|
||||
// {4}{R}{G}: Atarka Monument becomes a 4/4 red and green Dragon artifact creature with flying until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect
|
||||
(new AtarkaMonumentToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{4}{R}{G}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(4, 4, "4/4 red and green Dragon artifact creature with flying")
|
||||
.withColor("RG")
|
||||
.withSubType(SubType.DRAGON)
|
||||
.withType(CardType.ARTIFACT)
|
||||
.withAbility(FlyingAbility.getInstance()),
|
||||
"", Duration.EndOfTurn), new ManaCostsImpl("{4}{R}{G}")));
|
||||
}
|
||||
|
||||
public AtarkaMonument(final AtarkaMonument card) {
|
||||
|
@ -70,25 +76,4 @@ public class AtarkaMonument extends CardImpl {
|
|||
public AtarkaMonument copy() {
|
||||
return new AtarkaMonument(this);
|
||||
}
|
||||
|
||||
private static class AtarkaMonumentToken extends TokenImpl {
|
||||
AtarkaMonumentToken() {
|
||||
super("", "4/4 red and green Dragon artifact creature with flying");
|
||||
this.cardType.add(CardType.ARTIFACT);
|
||||
this.cardType.add(CardType.CREATURE);
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
public AtarkaMonumentToken(final AtarkaMonumentToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AtarkaMonumentToken copy() {
|
||||
return new AtarkaMonumentToken(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class AtarkaPummeler extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// <i>Formidable</i> - {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creature you control have total power 8 or greater. (They can't be blocked except by two or more creatures.)
|
||||
// <i>Formidable</i> — {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creature you control have total power 8 or greater. (They can't be blocked except by two or more creatures.)
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new GainAbilityAllEffect(new MenaceAbility(), Duration.EndOfTurn, filter),
|
||||
|
|
|
@ -29,7 +29,6 @@ package mage.cards.a;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -48,7 +47,7 @@ import mage.players.Player;
|
|||
public class AuguryAdept extends CardImpl {
|
||||
|
||||
public AuguryAdept(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/U}{W/U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W/U}{W/U}");
|
||||
this.subtype.add(SubType.KITHKIN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
|
||||
|
@ -87,22 +86,18 @@ class AuguryAdeptEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null || sourceObject == null) {
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl();
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
Card card = controller.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, true);
|
||||
|
||||
int cmc = card.getConvertedManaCost();
|
||||
if (cmc > 0) {
|
||||
controller.gainLife(cmc, game, source);
|
||||
}
|
||||
cards.add(card);
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
controller.revealCards(source, new CardsImpl(card), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -88,28 +88,32 @@ class AuratouchedMageEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent auratouchedMage = game.getPermanentOrLKIBattlefield(source.getSourceId()); //must be LKI to resolve
|
||||
if (controller != null && auratouchedMage != null) {
|
||||
FilterCard filter = new FilterCard("aura that could enchant " + auratouchedMage.getName());
|
||||
|
||||
if (controller != null) {
|
||||
FilterCard filter = new FilterCard("aura that could enchant " + source.getSourceObject(game).getName());
|
||||
filter.add(new SubtypePredicate(SubType.AURA));
|
||||
filter.add(new AuraCardCanAttachToLKIPermanentId(auratouchedMage.getId()));
|
||||
filter.add(new AuraCardCanAttachToLKIPermanentId(source.getSourceId()));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
target.setNotTarget(true);
|
||||
if (controller.searchLibrary(target, game)) {
|
||||
if (target.getFirstTarget() != null) {
|
||||
Card aura = game.getCard(target.getFirstTarget());
|
||||
if (game.getBattlefield().containsPermanent(auratouchedMage.getId())) { //verify that it is still on the battlefield
|
||||
Permanent auratouchedMage = source.getSourcePermanentIfItStillExists(game);
|
||||
if (aura != null && auratouchedMage != null
|
||||
&& game.getState().getZoneChangeCounter(source.getSourceId()) == source.getSourceObjectZoneChangeCounter()) {
|
||||
game.getState().setValue("attachTo:" + aura.getId(), auratouchedMage);
|
||||
aura.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), controller.getId());
|
||||
return auratouchedMage.addAttachment(aura.getId(), game);
|
||||
if (controller.moveCards(aura, Zone.BATTLEFIELD, source, game)) {
|
||||
auratouchedMage.addAttachment(aura.getId(), game);
|
||||
}
|
||||
} else {
|
||||
Cards auraRevealed = new CardsImpl(aura);
|
||||
controller.revealCards(source, auraRevealed, game);
|
||||
controller.moveCards(aura, Zone.HAND, source, game);
|
||||
}
|
||||
Cards auraRevealed = new CardsImpl();
|
||||
auraRevealed.add(aura);
|
||||
controller.revealCards(auratouchedMage.getName(), auraRevealed, game);
|
||||
controller.putInHand(aura, game);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -42,8 +42,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
/**
|
||||
|
@ -52,14 +51,8 @@ import mage.target.common.TargetAnyTarget;
|
|||
*/
|
||||
public class AuroraEidolon extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a multicolored spell");
|
||||
|
||||
static {
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public AuroraEidolon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
@ -70,7 +63,7 @@ public class AuroraEidolon extends CardImpl {
|
|||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
// Whenever you cast a multicolored spell, you may return Aurora Eidolon from your graveyard to your hand.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), filter, true, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), StaticFilters.FILTER_SPELL_A_MULTICOLORED, true, false));
|
||||
}
|
||||
|
||||
public AuroraEidolon(final AuroraEidolon card) {
|
||||
|
|
|
@ -36,7 +36,6 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.AdjustingSourceCosts;
|
||||
import mage.abilities.effects.common.combat.CanBlockAdditionalCreatureEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -52,7 +51,7 @@ import mage.util.CardUtil;
|
|||
public class AvatarOfHope extends CardImpl {
|
||||
|
||||
public AvatarOfHope(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{W}{W}");
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
|
||||
this.power = new MageInt(4);
|
||||
|
@ -93,7 +92,7 @@ class AdjustingCostsAbility extends SimpleStaticAbility implements AdjustingSour
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "If you have 3 or less life, Avatar of Hope costs {6} less to cast";
|
||||
return "If you have 3 or less life, {this} costs {6} less to cast";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -101,7 +100,7 @@ class AdjustingCostsAbility extends SimpleStaticAbility implements AdjustingSour
|
|||
if (ability.getAbilityType() == AbilityType.SPELL) {
|
||||
Player player = game.getPlayer(ability.getControllerId());
|
||||
if (player != null && player.getLife() < 4) {
|
||||
CardUtil.adjustCost((SpellAbility)ability, 6);
|
||||
CardUtil.adjustCost((SpellAbility) ability, 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,10 +118,10 @@ class AdjustingCostsEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
SpellAbility spellAbility = (SpellAbility)abilityToModify;
|
||||
SpellAbility spellAbility = (SpellAbility) abilityToModify;
|
||||
Mana mana = spellAbility.getManaCostsToPay().getMana();
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
|
||||
|
||||
if (mana.getGeneric() > 0 && player != null && player.getLife() < 4) {
|
||||
int newCount = mana.getGeneric() - 6;
|
||||
if (newCount < 0) {
|
||||
|
@ -137,7 +136,7 @@ class AdjustingCostsEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
if ((abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility)
|
||||
if ((abilityToModify instanceof SpellAbility)
|
||||
&& abilityToModify.getSourceId().equals(source.getSourceId())) {
|
||||
return true;
|
||||
}
|
||||
|
|
97
Mage.Sets/src/mage/cards/a/AvenWarcraft.java
Normal file
97
Mage.Sets/src/mage/cards/a/AvenWarcraft.java
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainProtectionFromColorAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class AvenWarcraft extends CardImpl {
|
||||
|
||||
public AvenWarcraft(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Creatures you control get +0/+2 until end of turn.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(0, 2, Duration.EndOfTurn));
|
||||
|
||||
// Threshold - If seven or more cards are in your graveyard, choose a color. Creatures you control also gain protection from the chosen color until end of turn.
|
||||
this.getSpellAbility().addEffect(new AvenWarcraftEffect());
|
||||
}
|
||||
|
||||
public AvenWarcraft(final AvenWarcraft card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvenWarcraft copy() {
|
||||
return new AvenWarcraft(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AvenWarcraftEffect extends OneShotEffect {
|
||||
|
||||
AvenWarcraftEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "<br><br><i>Threshold</i> — If seven or more cards are in your graveyard, "
|
||||
+ "choose a color. Creatures you control also gain protection from the chosen color until end of turn";
|
||||
}
|
||||
|
||||
AvenWarcraftEffect(final AvenWarcraftEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AvenWarcraftEffect copy() {
|
||||
return new AvenWarcraftEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
if (new CardsInControllerGraveCondition(7).apply(game, source)) {
|
||||
game.addEffect(new GainProtectionFromColorAllEffect(
|
||||
Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURES
|
||||
), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -65,7 +65,8 @@ public class AwakenTheAncient extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted Mountain is a 7/7 red Giant creature with haste. It's still a land.
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAttachedEffect(new GiantToken(), "Enchanted Mountain is a 7/7 red Giant creature with haste. It's still a land", Duration.WhileOnBattlefield));
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BecomesCreatureAttachedEffect(
|
||||
new GiantToken(), "Enchanted Mountain is a 7/7 red Giant creature with haste. It's still a land", Duration.WhileOnBattlefield, BecomesCreatureAttachedEffect.LoseType.COLOR));
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
|
|
@ -71,8 +71,13 @@ public class AzcantaTheSunkenRuin extends CardImpl {
|
|||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// {2}{U} , {T} : Look at the top four cards of your library. You may reveal a noncreature, nonland card from among them and put it into your hand. Put the rest on the bottom of your library in any order.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(1), filter, false), new ManaCostsImpl<>("{2}{U}"));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new LookLibraryAndPickControllerEffect(
|
||||
new StaticValue(4), false, new StaticValue(1),
|
||||
filter, Zone.LIBRARY, false, true, true
|
||||
), new ManaCostsImpl<>("{2}{U}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
@ -43,6 +44,7 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
|
@ -50,14 +52,20 @@ import mage.game.permanent.token.Token;
|
|||
public class AzoriusKeyrune extends CardImpl {
|
||||
|
||||
public AzoriusKeyrune(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// {T}: Add {W} or {U}.
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
|
||||
// {W}{U}: Azorius Keyrune becomes a 2/2 white and blue Bird artifact creature with flying until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new AzoriusKeyruneToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{W}{U}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(2, 2, "2/2 white and blue Bird artifact creature with flying")
|
||||
.withColor("WU")
|
||||
.withSubType(SubType.BIRD)
|
||||
.withType(CardType.ARTIFACT)
|
||||
.withAbility(FlyingAbility.getInstance()),
|
||||
"", Duration.EndOfTurn), new ManaCostsImpl("{W}{U}")));
|
||||
}
|
||||
|
||||
public AzoriusKeyrune(final AzoriusKeyrune card) {
|
||||
|
@ -68,25 +76,4 @@ public class AzoriusKeyrune extends CardImpl {
|
|||
public AzoriusKeyrune copy() {
|
||||
return new AzoriusKeyrune(this);
|
||||
}
|
||||
|
||||
private static class AzoriusKeyruneToken extends TokenImpl {
|
||||
AzoriusKeyruneToken() {
|
||||
super("", "2/2 white and blue Bird artifact creature with flying");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
color.setBlue(true);
|
||||
this.subtype.add(SubType.BIRD);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
public AzoriusKeyruneToken(final AzoriusKeyruneToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AzoriusKeyruneToken copy() {
|
||||
return new AzoriusKeyruneToken(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,14 +37,13 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
@ -52,11 +51,10 @@ import mage.players.Player;
|
|||
public class AzorsElocutors extends CardImpl {
|
||||
|
||||
public AzorsElocutors(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W/U}{W/U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W/U}{W/U}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ADVISOR);
|
||||
|
||||
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
|
@ -65,7 +63,6 @@ public class AzorsElocutors extends CardImpl {
|
|||
|
||||
// Whenever a source deals damage to you, remove a filibuster counter from Azor's Elocutors.
|
||||
this.addAbility(new AzorsElocutorsTriggeredAbility());
|
||||
|
||||
}
|
||||
|
||||
public AzorsElocutors(final AzorsElocutors card) {
|
||||
|
@ -77,10 +74,11 @@ public class AzorsElocutors extends CardImpl {
|
|||
return new AzorsElocutors(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AzorsElocutorsTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public AzorsElocutorsTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(new Counter("filibuster")), false);
|
||||
super(Zone.BATTLEFIELD, new RemoveCounterSourceEffect(CounterType.FILIBUSTER.createInstance()), false);
|
||||
}
|
||||
|
||||
public AzorsElocutorsTriggeredAbility(final AzorsElocutorsTriggeredAbility ability) {
|
||||
|
@ -124,8 +122,8 @@ class AzorsElocutorsEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
permanent.addCounters(new Counter("filibuster"), source, game);
|
||||
if (permanent.getCounters(game).getCount("filibuster") > 4) {
|
||||
permanent.addCounters(CounterType.FILIBUSTER.createInstance(), source, game);
|
||||
if (permanent.getCounters(game).getCount(CounterType.FILIBUSTER) > 4) {
|
||||
Player player = game.getPlayer(permanent.getControllerId());
|
||||
if (player != null) {
|
||||
player.won(game);
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.filter.common.FilterLandPermanent;
|
|||
import mage.filter.predicate.mageobject.SupertypePredicate;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -63,7 +64,7 @@ public class BalduvianConjurer extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {tap}: Target snow land becomes a 2/2 creature until end of turn. It's still a land.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new AnimatedLand(), false, true, Duration.EndOfTurn), new TapSourceCost());
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new CreatureToken(2, 2), false, true, Duration.EndOfTurn), new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -77,20 +78,3 @@ public class BalduvianConjurer extends CardImpl {
|
|||
return new BalduvianConjurer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AnimatedLand extends TokenImpl {
|
||||
|
||||
public AnimatedLand() {
|
||||
super("", "2/2 creature");
|
||||
this.cardType.add(CardType.CREATURE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
}
|
||||
public AnimatedLand(final AnimatedLand token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public AnimatedLand copy() {
|
||||
return new AnimatedLand(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ package mage.cards.b;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -53,7 +52,7 @@ import mage.target.TargetPlayer;
|
|||
public class BalustradeSpy extends CardImpl {
|
||||
|
||||
public BalustradeSpy(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.subtype.add(SubType.VAMPIRE, SubType.ROGUE);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
@ -97,26 +96,20 @@ class BalustradeSpyEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null || sourceObject == null) {
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
CardsImpl cards = new CardsImpl();
|
||||
boolean landFound = false;
|
||||
while (controller.getLibrary().hasCards() && !landFound) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
CardsImpl toGraveyard = new CardsImpl();
|
||||
for (Card card : controller.getLibrary().getCards(game)) {
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
toGraveyard.add(card);
|
||||
if (card.isLand()) {
|
||||
landFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
controller.revealCards(source, toGraveyard, game);
|
||||
controller.moveCards(toGraveyard, Zone.GRAVEYARD, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,36 +28,41 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.CompoundCondition;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
|
||||
/**
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class BarrenGlory extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
public BarrenGlory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}");
|
||||
|
||||
// At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, you win the game.
|
||||
Condition condition = new CardsInHandCondition(ComparisonType.EQUAL_TO, 0);
|
||||
TriggeredAbility ability = new BarrenGloryTriggeredAbility();
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability,
|
||||
condition,
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false),
|
||||
new CompoundCondition(
|
||||
new CardsInHandCondition(ComparisonType.EQUAL_TO, 0),
|
||||
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0)
|
||||
),
|
||||
"At the beginning of your upkeep, if you control no permanents other than {this} and have no cards in hand, you win the game"));
|
||||
}
|
||||
|
||||
|
@ -70,45 +75,3 @@ public class BarrenGlory extends CardImpl {
|
|||
return new BarrenGlory(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BarrenGloryTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filter.add(new AnotherPredicate());
|
||||
}
|
||||
|
||||
BarrenGloryTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new WinGameSourceControllerEffect());
|
||||
}
|
||||
|
||||
BarrenGloryTriggeredAbility(final BarrenGloryTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarrenGloryTriggeredAbility copy() {
|
||||
return new BarrenGloryTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UPKEEP_STEP_PRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getPlayerId().equals(this.controllerId)) {
|
||||
if (game.getBattlefield().count(filter, this.getSourceId(), this.getControllerId(), game) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of your upkeep, if you control no permanents other than {this} and have no cards in hand, you win the game";
|
||||
}
|
||||
}
|
|
@ -30,7 +30,7 @@ package mage.cards.b;
|
|||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DynamicManaEffect;
|
||||
import mage.abilities.effects.mana.DynamicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
92
Mage.Sets/src/mage/cards/b/BattlefieldMedic.java
Normal file
92
Mage.Sets/src/mage/cards/b/BattlefieldMedic.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class BattlefieldMedic extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(SubType.CLERIC));
|
||||
}
|
||||
|
||||
public BattlefieldMedic(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Prevent the next X damage that would be dealt to target creature this turn, where X is the number of Clerics on the battlefield.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new PreventDamageToTargetEffect(
|
||||
Duration.EndOfTurn,
|
||||
false,
|
||||
true,
|
||||
new PermanentsOnBattlefieldCount(filter)
|
||||
).setText(
|
||||
"prevent the next X damage "
|
||||
+ "that would be dealt to target creature this turn, "
|
||||
+ "where X is the number of Clerics on the battlefield"
|
||||
),
|
||||
new TapSourceCost()
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public BattlefieldMedic(final BattlefieldMedic card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BattlefieldMedic copy() {
|
||||
return new BattlefieldMedic(this);
|
||||
}
|
||||
}
|
|
@ -58,7 +58,7 @@ public class BellowingSaddlebrute extends CardImpl {
|
|||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(4)),
|
||||
new InvertCondition(RaidCondition.instance),
|
||||
"<i>Raid</i> - When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn"
|
||||
"<i>Raid</i> — When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn"
|
||||
), new PlayerAttackedWatcher());
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class BiteOfTheBlackRoseEffect extends OneShotEffect {
|
|||
|
||||
BiteOfTheBlackRoseEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "<i>Will of the council</i> - Starting with you, each player votes for sickness or psychosis. If sickness gets more votes, creatures your opponents control get -2/-2 until end of turn. If psychosis gets more votes or the vote is tied, each opponent discards two cards";
|
||||
this.staticText = "<i>Will of the council</i> — Starting with you, each player votes for sickness or psychosis. If sickness gets more votes, creatures your opponents control get -2/-2 until end of turn. If psychosis gets more votes or the vote is tied, each opponent discards two cards";
|
||||
}
|
||||
|
||||
BiteOfTheBlackRoseEffect(final BiteOfTheBlackRoseEffect effect) {
|
||||
|
|
|
@ -28,17 +28,13 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,11 +43,11 @@ import mage.target.TargetCard;
|
|||
public class BitterRevelation extends CardImpl {
|
||||
|
||||
public BitterRevelation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
|
||||
// Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard. You lose 2 life.
|
||||
this.getSpellAbility().addEffect(new BitterRevelationEffect());
|
||||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(4), false, new StaticValue(2),
|
||||
StaticFilters.FILTER_CARD, Zone.GRAVEYARD, false, false, false, Zone.HAND, false));
|
||||
this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
|
||||
}
|
||||
|
||||
|
@ -64,53 +60,3 @@ public class BitterRevelation extends CardImpl {
|
|||
return new BitterRevelation(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BitterRevelationEffect extends OneShotEffect {
|
||||
|
||||
BitterRevelationEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Look at the top four cards of your library. Put two of them into your hand and the rest into your graveyard";
|
||||
}
|
||||
|
||||
BitterRevelationEffect(final BitterRevelationEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BitterRevelationEffect copy() {
|
||||
return new BitterRevelationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
int cardsCount = Math.min(4, player.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
if (!cards.isEmpty()) {
|
||||
Cards cardsToHand = new CardsImpl();
|
||||
player.lookAtCards("Bitter Revelation", cards, game);
|
||||
TargetCard target = new TargetCard(Math.min(2, cards.size()), Zone.LIBRARY, new FilterCard("two cards to put in your hand"));
|
||||
if (player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
Card card = cards.get(targetId, game);
|
||||
if (card != null) {
|
||||
cardsToHand.add(card);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.moveCards(cardsToHand, Zone.HAND, source, game);
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
|
@ -27,11 +27,9 @@
|
|||
*/
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.ReboundAbility;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
|
@ -51,24 +49,22 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
* @author fireshoes
|
||||
*/
|
||||
public class BlessedReincarnation extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls");
|
||||
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.OPPONENT));
|
||||
}
|
||||
|
||||
public BlessedReincarnation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}");
|
||||
|
||||
// Exile target creature an opponent controls.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
|
||||
// Exile target creature an opponent controls.
|
||||
// That player reveals cards from the top of their library until a creature card is revealed.
|
||||
// The player puts that card onto the battlefield, then shuffles the rest into their library.
|
||||
this.getSpellAbility().addEffect(new BlessedReincarnationEffect());
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
|
||||
|
||||
// Rebound
|
||||
this.addAbility(new ReboundAbility());
|
||||
}
|
||||
|
@ -87,7 +83,7 @@ class BlessedReincarnationEffect extends OneShotEffect {
|
|||
|
||||
public BlessedReincarnationEffect() {
|
||||
super(Outcome.PutCreatureInPlay);
|
||||
this.staticText = "That player reveals cards from the top of their library until a creature card is revealed. The player puts that card onto the battlefield, then shuffles the rest into their library";
|
||||
this.staticText = "Exile target creature an opponent controls. That player reveals cards from the top of their library until a creature card is revealed. The player puts that card onto the battlefield, then shuffles the rest into their library";
|
||||
}
|
||||
|
||||
public BlessedReincarnationEffect(final BlessedReincarnationEffect effect) {
|
||||
|
@ -101,37 +97,31 @@ class BlessedReincarnationEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent == null) {
|
||||
permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
|
||||
}
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null && controller != null) {
|
||||
controller.moveCards(permanent, Zone.EXILED, source, game);
|
||||
game.applyEffects();
|
||||
|
||||
if (permanent != null) {
|
||||
Player player = game.getPlayer(permanent.getControllerId());
|
||||
if (player != null) {
|
||||
Library library = player.getLibrary();
|
||||
Player permanentController = game.getPlayer(permanent.getControllerId());
|
||||
if (permanentController != null) {
|
||||
Library library = permanentController.getLibrary();
|
||||
if (library.hasCards()) {
|
||||
Cards cards = new CardsImpl();
|
||||
Card card = library.removeFromTop(game);
|
||||
cards.add(card);
|
||||
while (!card.isCreature() && library.hasCards()) {
|
||||
card = library.removeFromTop(game);
|
||||
cards.add(card);
|
||||
Cards toReveal = new CardsImpl();
|
||||
for (Card card : library.getCards(game)) {
|
||||
toReveal.add(card);
|
||||
if (card.isCreature()) {
|
||||
permanentController.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (card.isCreature()) {
|
||||
card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), player.getId());
|
||||
}
|
||||
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards("BlessedReincarnation", cards, game);
|
||||
Set<Card> cardsToShuffle = cards.getCards(game);
|
||||
cardsToShuffle.remove(card);
|
||||
library.addAll(cardsToShuffle, game);
|
||||
permanentController.revealCards(source, toReveal, game);
|
||||
if (toReveal.size() > 1) {
|
||||
library.shuffle();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
@ -48,6 +49,7 @@ import mage.filter.FilterPermanent;
|
|||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -62,14 +64,19 @@ public class BlinkmothNexus extends CardImpl {
|
|||
}
|
||||
|
||||
public BlinkmothNexus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},null);
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, null);
|
||||
|
||||
// {T}: Add {C}to your mana pool.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
|
||||
// {1}: Blinkmoth Nexus becomes a 1/1 Blinkmoth artifact creature with flying until end of turn. It's still a land.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new BlinkmothNexusToken(), "land", Duration.EndOfTurn), new GenericManaCost(1)));
|
||||
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(1, 1, "1/1 Blinkmoth artifact creature with flying")
|
||||
.withSubType(SubType.BLINKMOTH)
|
||||
.withType(CardType.ARTIFACT)
|
||||
.withAbility(FlyingAbility.getInstance()),
|
||||
"land", Duration.EndOfTurn), new GenericManaCost(1)));
|
||||
|
||||
// {1}, {T}: Target Blinkmoth creature gets +1/+1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
@ -88,22 +95,3 @@ public class BlinkmothNexus extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class BlinkmothNexusToken extends TokenImpl {
|
||||
public BlinkmothNexusToken() {
|
||||
super("Blinkmoth", "1/1 Blinkmoth artifact creature with flying");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
this.subtype.add(SubType.BLINKMOTH);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
public BlinkmothNexusToken(final BlinkmothNexusToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public BlinkmothNexusToken copy() {
|
||||
return new BlinkmothNexusToken(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,17 +53,16 @@ public class BloodletterQuill extends CardImpl {
|
|||
public BloodletterQuill(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
Counter bloodCounter = new Counter("blood");
|
||||
// {2}, {T}, Put a blood counter on Bloodletter Quill: Draw a card, then lose 1 life for each blood counter on Bloodletter Quill.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2));
|
||||
ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(bloodCounter.getName()))
|
||||
ability.addEffect(new LoseLifeSourceControllerEffect(new CountersSourceCount(CounterType.BLOOD))
|
||||
.setText(", then lose 1 life for each blood counter on {this}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new PutCountersSourceCost(bloodCounter));
|
||||
ability.addCost(new PutCountersSourceCost(CounterType.BLOOD.createInstance()));
|
||||
this.addAbility(ability);
|
||||
// {U}{B}: Remove a blood counter from Bloodletter Quill.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new RemoveCounterSourceEffect(bloodCounter), new ManaCostsImpl("{U}{B}")));
|
||||
new RemoveCounterSourceEffect(CounterType.BLOOD.createInstance()), new ManaCostsImpl("{U}{B}")));
|
||||
}
|
||||
|
||||
public BloodletterQuill(final BloodletterQuill card) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BloodsoakedChampion extends CardImpl {
|
|||
// Bloodstained Brave can't block.
|
||||
this.addAbility(new CantBlockAbility());
|
||||
|
||||
// <i>Raid</i> - {1}{B}: Return Bloodstained Brave from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn.
|
||||
// <i>Raid</i> — {1}{B}: Return Bloodstained Brave from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.GRAVEYARD,
|
||||
new ReturnSourceFromGraveyardToBattlefieldEffect(),
|
||||
|
|
|
@ -50,7 +50,7 @@ import mage.players.Player;
|
|||
public class BloomTender extends CardImpl {
|
||||
|
||||
public BloomTender(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.ELF, SubType.DRUID);
|
||||
|
||||
this.power = new MageInt(1);
|
||||
|
@ -93,38 +93,32 @@ class BloomTenderEffect extends ManaEffect {
|
|||
if (controller != null) {
|
||||
Mana mana = getMana(game, source);
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
controller.getManaPool().addMana(mana, game, source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mana getMana(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Mana mana = new Mana();
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
|
||||
if (mana.getBlack() == 0 && permanent.getColor(game).isBlack()) {
|
||||
mana.increaseBlack();
|
||||
}
|
||||
if (mana.getBlue() == 0 && permanent.getColor(game).isBlue()) {
|
||||
mana.increaseBlue();
|
||||
}
|
||||
if (mana.getRed() == 0 && permanent.getColor(game).isRed()) {
|
||||
mana.increaseRed();
|
||||
}
|
||||
if (mana.getGreen() == 0 && permanent.getColor(game).isGreen()) {
|
||||
mana.increaseGreen();
|
||||
}
|
||||
if (mana.getWhite() == 0 && permanent.getColor(game).isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
public Mana produceMana(boolean netMana, Game game, Ability source) {
|
||||
Mana mana = new Mana();
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
|
||||
if (mana.getBlack() == 0 && permanent.getColor(game).isBlack()) {
|
||||
mana.increaseBlack();
|
||||
}
|
||||
if (mana.getBlue() == 0 && permanent.getColor(game).isBlue()) {
|
||||
mana.increaseBlue();
|
||||
}
|
||||
if (mana.getRed() == 0 && permanent.getColor(game).isRed()) {
|
||||
mana.increaseRed();
|
||||
}
|
||||
if (mana.getGreen() == 0 && permanent.getColor(game).isGreen()) {
|
||||
mana.increaseGreen();
|
||||
}
|
||||
if (mana.getWhite() == 0 && permanent.getColor(game).isWhite()) {
|
||||
mana.increaseWhite();
|
||||
}
|
||||
return mana;
|
||||
}
|
||||
return null;
|
||||
return mana;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
@ -43,22 +44,28 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BorosKeyrune extends CardImpl {
|
||||
|
||||
public BorosKeyrune(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// {T}: Add {R} or {W}.
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
|
||||
// {R}{W}: Boros Keyrune becomes a 1/1 red and white Soldier artifact creature with double strike until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(new BorosKeyruneToken(), "", Duration.EndOfTurn), new ManaCostsImpl("{R}{W}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
|
||||
new CreatureToken(1, 1, "1/1 red and white Soldier artifact creature with double strike")
|
||||
.withColor("RW")
|
||||
.withSubType(SubType.SOLDIER)
|
||||
.withType(CardType.ARTIFACT)
|
||||
.withAbility(DoubleStrikeAbility.getInstance()),
|
||||
"", Duration.EndOfTurn), new ManaCostsImpl("{R}{W}")));
|
||||
}
|
||||
|
||||
public BorosKeyrune(final BorosKeyrune card) {
|
||||
|
@ -69,25 +76,4 @@ public class BorosKeyrune extends CardImpl {
|
|||
public BorosKeyrune copy() {
|
||||
return new BorosKeyrune(this);
|
||||
}
|
||||
|
||||
private static class BorosKeyruneToken extends TokenImpl {
|
||||
BorosKeyruneToken() {
|
||||
super("Soldier", "1/1 red and white Soldier artifact creature with double strike");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
color.setWhite(true);
|
||||
subtype.add(SubType.SOLDIER);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(DoubleStrikeAbility.getInstance());
|
||||
}
|
||||
public BorosKeyruneToken(final BorosKeyruneToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public BorosKeyruneToken copy() {
|
||||
return new BorosKeyruneToken(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,9 +44,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SpellAbilityType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.MulticoloredPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -61,12 +59,6 @@ import mage.target.common.TargetControlledPermanent;
|
|||
*/
|
||||
public class BoundDetermined extends SplitCard {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("multicolored spell");
|
||||
|
||||
static {
|
||||
filter.add(new MulticoloredPredicate());
|
||||
}
|
||||
|
||||
public BoundDetermined(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{G}", "{G}{U}", SpellAbilityType.SPLIT);
|
||||
|
||||
|
|
72
Mage.Sets/src/mage/cards/b/BountifulPromenade.java
Normal file
72
Mage.Sets/src/mage/cards/b/BountifulPromenade.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.OneOpponentCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.TapSourceEffect;
|
||||
import mage.abilities.mana.GreenManaAbility;
|
||||
import mage.abilities.mana.WhiteManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class BountifulPromenade extends CardImpl {
|
||||
|
||||
public BountifulPromenade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// Bountiful Promenade enters the battlefield tapped unless you have two or more opponents.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new ConditionalOneShotEffect(
|
||||
new TapSourceEffect(),
|
||||
OneOpponentCondition.instance,
|
||||
"tapped unless you have two or more opponents"
|
||||
), "tapped unless you have two or more opponents"
|
||||
));
|
||||
|
||||
// {T}: Add {G} or {W}.
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
}
|
||||
|
||||
public BountifulPromenade(final BountifulPromenade card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BountifulPromenade copy() {
|
||||
return new BountifulPromenade(this);
|
||||
}
|
||||
}
|
|
@ -94,15 +94,15 @@ class EnteringReturnFromGraveyardToBattlefieldEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Target target = new TargetCardInGraveyard(new FilterCreatureCard());
|
||||
target.setNotTarget(true);
|
||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)
|
||||
&& player.chooseTarget(outcome, target, source, game)) {
|
||||
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
if (card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId())) {
|
||||
if (controller.moveCards(card, Zone.BATTLEFIELD, source, game)) {
|
||||
ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addEffect(effect, source);
|
||||
|
|
|
@ -36,7 +36,6 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -93,25 +92,27 @@ class BreathstealersCryptEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player player = game.getPlayer(event.getPlayerId());
|
||||
PayLifeCost cost = new PayLifeCost(3);
|
||||
if (player != null) {
|
||||
Card cardDrawn = player.getLibrary().removeFromTop(game);
|
||||
if (cardDrawn != null) {
|
||||
player.moveCardToHandWithInfo(cardDrawn, source.getSourceId(), game);
|
||||
Cards cards = new CardsImpl();
|
||||
cards.add(cardDrawn);
|
||||
player.revealCards("The card drawn from " + player.getName() + "'s library", cards, game);
|
||||
if (cardDrawn.isCreature()) {
|
||||
game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded.");
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
&& player.chooseUse(outcome, "Do you wish to pay 3 life to keep the drawn creature card? If not, you discard it.", source, game)) {
|
||||
return cost.pay(source, game, source.getSourceId(), player.getId(), true, cost);
|
||||
} else {
|
||||
game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so the creature card will be discarded.");
|
||||
return player.discard(cardDrawn, source, game);
|
||||
Cards oldHand = player.getHand().copy();
|
||||
if (player.drawCards(1, game, event.getAppliedEffects()) > 0) {
|
||||
Cards drawnCards = player.getHand().copy();
|
||||
drawnCards.removeAll(oldHand);
|
||||
player.revealCards(source, "The card drawn from " + player.getName() + "'s library.", drawnCards, game);
|
||||
for (Card cardDrawn : drawnCards.getCards(game)) {
|
||||
if (cardDrawn.isCreature()) {
|
||||
game.informPlayers("The card drawn by " + player.getName() + " is a creature card. He/she must pay 3 life or that card gets discarded.");
|
||||
PayLifeCost cost = new PayLifeCost(3);
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
|
||||
&& player.chooseUse(outcome, "Do you wish to pay 3 life to keep the card " + cardDrawn.getIdName() + "? If not, you discard it.", source, game)) {
|
||||
cost.pay(source, game, source.getSourceId(), player.getId(), true, cost);
|
||||
} else {
|
||||
game.informPlayers("The cost of 3 life was not paid by " + player.getName() + ", so " + cardDrawn.getIdName() + " will be discarded.");
|
||||
player.discard(cardDrawn, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -51,15 +51,15 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class BribersPurse extends CardImpl {
|
||||
|
||||
public BribersPurse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{X}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{X}");
|
||||
|
||||
// Briber's Purse enters the battlefield with X gem counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(new Counter("gem"))));
|
||||
this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.GEM.createInstance())));
|
||||
|
||||
// {1}, {T}, Remove a gem counter from Briber's Purse: Target creature can't attack or block this turn.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantAttackBlockTargetEffect(Duration.EndOfTurn), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new RemoveCountersSourceCost(new Counter("gem")));
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.GEM.createInstance()));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.cards.b;
|
|||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.DynamicManaEffect;
|
||||
import mage.abilities.effects.mana.DynamicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
|
@ -48,7 +48,7 @@ import mage.target.TargetCard;
|
|||
public class Browse extends CardImpl {
|
||||
|
||||
public Browse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
||||
// {2}{U}{U}: Look at the top five cards of your library, put one of them into your hand, and exile the rest.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BrowseEffect(), new ManaCostsImpl("{2}{U}{U}"));
|
||||
|
@ -83,33 +83,20 @@ class BrowseEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
|
||||
if (player != null) {
|
||||
Cards cards = new CardsImpl();
|
||||
int cardsCount = Math.min(5, player.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
player.lookAtCards("Browse", cards, game);
|
||||
|
||||
controller.lookAtCards(source, null, cards, game);
|
||||
TargetCard target = new TargetCard(Zone.LIBRARY, new FilterCard("card to put in your hand"));
|
||||
if (player.choose(Outcome.Benefit, cards, target, game)) {
|
||||
if (controller.choose(Outcome.Benefit, cards, target, game)) {
|
||||
Card card = cards.get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
cards.remove(card);
|
||||
}
|
||||
}
|
||||
|
||||
for (Card card : cards.getCards(game)) {
|
||||
card.moveToExile(null, null, source.getSourceId(), game);
|
||||
}
|
||||
controller.moveCards(cards, Zone.EXILED, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue