diff --git a/.gitattributes b/.gitattributes index 1f06fca37f9..e460c695aba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1575,6 +1575,7 @@ res/cardsfolder/c/chaos_imps.txt -text res/cardsfolder/c/chaos_lord.txt -text res/cardsfolder/c/chaos_warp.txt svneol=native#text/plain res/cardsfolder/c/chaosphere.txt svneol=native#text/plain +res/cardsfolder/c/chaotic_backlash.txt -text res/cardsfolder/c/chaotic_goo.txt svneol=native#text/plain res/cardsfolder/c/chaotic_strike.txt -text res/cardsfolder/c/chapel_geist.txt -text @@ -1638,6 +1639,7 @@ res/cardsfolder/c/chromatic_star.txt svneol=native#text/plain res/cardsfolder/c/chrome_mox.txt svneol=native#text/plain res/cardsfolder/c/chrome_steed.txt svneol=native#text/plain res/cardsfolder/c/chromescale_drake.txt svneol=native#text/plain +res/cardsfolder/c/chromeshell_crab.txt -text res/cardsfolder/c/chromium.txt svneol=native#text/plain res/cardsfolder/c/chronatog.txt svneol=native#text/plain res/cardsfolder/c/chronatog_avatar.txt -text @@ -1669,6 +1671,7 @@ res/cardsfolder/c/circle_of_protection_green.txt -text res/cardsfolder/c/circle_of_protection_red.txt -text res/cardsfolder/c/circle_of_protection_shadow.txt -text res/cardsfolder/c/circle_of_protection_white.txt -text +res/cardsfolder/c/circle_of_solace.txt -text res/cardsfolder/c/circu_dimir_lobotomist.txt -text res/cardsfolder/c/circular_logic.txt svneol=native#text/plain res/cardsfolder/c/citanul_centaurs.txt svneol=native#text/plain @@ -1804,6 +1807,7 @@ res/cardsfolder/c/commando_raid.txt -text svneol=unset#text/plain res/cardsfolder/c/common_bond.txt -text res/cardsfolder/c/commune_with_nature.txt svneol=native#text/plain res/cardsfolder/c/complex_automaton.txt svneol=native#text/plain +res/cardsfolder/c/complicate.txt -text res/cardsfolder/c/composite_golem.txt svneol=native#text/plain res/cardsfolder/c/compost.txt svneol=native#text/plain res/cardsfolder/c/compulsion.txt svneol=native#text/plain @@ -1946,6 +1950,7 @@ res/cardsfolder/c/cradle_of_vitality.txt svneol=native#text/plain res/cardsfolder/c/cradle_to_grave.txt svneol=native#text/plain res/cardsfolder/c/crafty_pathmage.txt svneol=native#text/plain res/cardsfolder/c/crag_puca.txt svneol=native#text/plain +res/cardsfolder/c/cragganwick_cremator.txt -text res/cardsfolder/c/cranial_extraction.txt svneol=native#text/plain res/cardsfolder/c/cranial_plating.txt -text res/cardsfolder/c/crash.txt svneol=native#text/plain @@ -2955,6 +2960,7 @@ res/cardsfolder/e/embalmed_brawler.txt -text res/cardsfolder/e/embargo.txt svneol=native#text/plain res/cardsfolder/e/ember_beast.txt -text res/cardsfolder/e/ember_fist_zubera.txt svneol=native#text/plain +res/cardsfolder/e/ember_gale.txt -text res/cardsfolder/e/ember_hauler.txt svneol=native#text/plain res/cardsfolder/e/ember_shot.txt svneol=native#text/plain res/cardsfolder/e/ember_weaver.txt svneol=native#text/plain @@ -4653,6 +4659,7 @@ res/cardsfolder/h/honor_guard.txt svneol=native#text/plain res/cardsfolder/h/honor_of_the_pure.txt svneol=native#text/plain res/cardsfolder/h/honor_the_fallen.txt -text res/cardsfolder/h/honor_worn_shaku.txt svneol=native#text/plain +res/cardsfolder/h/honorable_scout.txt -text res/cardsfolder/h/hooded_kavu.txt svneol=native#text/plain res/cardsfolder/h/hoodwink.txt svneol=native#text/plain res/cardsfolder/h/hoof_skulkin.txt svneol=native#text/plain @@ -4793,6 +4800,7 @@ res/cardsfolder/i/ichor_wellspring.txt svneol=native#text/plain res/cardsfolder/i/ichorclaw_myr.txt svneol=native#text/plain res/cardsfolder/i/ichorid.txt svneol=native#text/plain res/cardsfolder/i/icy_manipulator.txt svneol=native#text/plain +res/cardsfolder/i/icy_prison.txt -text res/cardsfolder/i/ideas_unbound.txt -text res/cardsfolder/i/identity_crisis.txt svneol=native#text/plain res/cardsfolder/i/idle_thoughts.txt svneol=native#text/plain @@ -5178,6 +5186,7 @@ res/cardsfolder/k/kaerveks_spite.txt svneol=native#text/plain res/cardsfolder/k/kaerveks_torch.txt -text res/cardsfolder/k/kagemaro_first_to_suffer.txt svneol=native#text/plain res/cardsfolder/k/kagemaros_clutch.txt -text +res/cardsfolder/k/kaho_minamo_historian.txt -text res/cardsfolder/k/kaijin_of_the_vanishing_touch.txt svneol=native#text/plain res/cardsfolder/k/kalastria_highborn.txt svneol=native#text/plain res/cardsfolder/k/kaleidostone.txt svneol=native#text/plain @@ -5305,6 +5314,7 @@ res/cardsfolder/k/kher_keep.txt svneol=native#text/plain res/cardsfolder/k/kiki_jiki_mirror_breaker.txt svneol=native#text/plain res/cardsfolder/k/kiku_nights_flower.txt svneol=native#text/plain res/cardsfolder/k/kikus_shadow.txt svneol=native#text/plain +res/cardsfolder/k/kill_switch.txt -text res/cardsfolder/k/killer_bees.txt svneol=native#text/plain res/cardsfolder/k/killer_instinct.txt -text res/cardsfolder/k/killer_whale.txt svneol=native#text/plain @@ -6276,6 +6286,7 @@ res/cardsfolder/m/mirror_wall.txt svneol=native#text/plain res/cardsfolder/m/mirrorworks.txt svneol=native#text/plain res/cardsfolder/m/miscalculation.txt svneol=native#text/plain res/cardsfolder/m/mischievous_poltergeist.txt svneol=native#text/plain +res/cardsfolder/m/mischievous_quanar.txt -text res/cardsfolder/m/misers_cage.txt svneol=native#text/plain res/cardsfolder/m/misery_charm.txt svneol=native#text/plain res/cardsfolder/m/misfortunes_gain.txt svneol=native#text/plain @@ -6784,6 +6795,7 @@ res/cardsfolder/n/noggle_bridgebreaker.txt svneol=native#text/plain res/cardsfolder/n/noggle_hedge_mage.txt svneol=native#text/plain res/cardsfolder/n/noggle_ransacker.txt svneol=native#text/plain res/cardsfolder/n/nomad_decoy.txt -text svneol=unset#text/plain +res/cardsfolder/n/nomad_mythmaker.txt -text res/cardsfolder/n/nomad_stadium.txt svneol=native#text/plain res/cardsfolder/n/nomadic_elf.txt svneol=native#text/plain res/cardsfolder/n/nomads_assembly.txt -text @@ -7130,6 +7142,7 @@ res/cardsfolder/p/pattern_of_rebirth.txt svneol=native#text/plain res/cardsfolder/p/paupers_cage.txt svneol=native#text/plain res/cardsfolder/p/pavel_maliki.txt svneol=native#text/plain res/cardsfolder/p/pawn_of_ulamog.txt svneol=native#text/plain +res/cardsfolder/p/pay_no_heed.txt -text res/cardsfolder/p/peace_and_quiet.txt svneol=native#text/plain res/cardsfolder/p/peace_of_mind.txt svneol=native#text/plain res/cardsfolder/p/peace_strider.txt svneol=native#text/plain @@ -7287,6 +7300,8 @@ res/cardsfolder/p/pianna_nomad_captain.txt svneol=native#text/plain res/cardsfolder/p/pierce_strider.txt svneol=native#text/plain res/cardsfolder/p/piety.txt svneol=native#text/plain res/cardsfolder/p/piety_charm.txt -text +res/cardsfolder/p/pilgrim_of_justice.txt -text +res/cardsfolder/p/pilgrim_of_virtue.txt -text res/cardsfolder/p/pilgrims_eye.txt svneol=native#text/plain res/cardsfolder/p/pili_pala.txt svneol=native#text/plain res/cardsfolder/p/pillage.txt svneol=native#text/plain @@ -7414,6 +7429,7 @@ res/cardsfolder/p/pox.txt -text res/cardsfolder/p/pradesh_gypsies.txt svneol=native#text/plain res/cardsfolder/p/praetors_counsel.txt svneol=native#text/plain res/cardsfolder/p/praetors_grasp.txt -text +res/cardsfolder/p/prahv_spires_of_order.txt -text res/cardsfolder/p/precinct_captain.txt -text res/cardsfolder/p/precognition.txt svneol=native#text/plain res/cardsfolder/p/predator_dragon.txt svneol=native#text/plain @@ -8105,6 +8121,7 @@ res/cardsfolder/r/rites_of_flourishing.txt svneol=native#text/plain res/cardsfolder/r/rites_of_reaping.txt -text res/cardsfolder/r/rith_the_awakener.txt svneol=native#text/plain res/cardsfolder/r/riths_attendant.txt svneol=native#text/plain +res/cardsfolder/r/riths_charm.txt -text res/cardsfolder/r/riths_grove.txt svneol=native#text/plain res/cardsfolder/r/ritual_of_restoration.txt svneol=native#text/plain res/cardsfolder/r/ritual_of_steel.txt svneol=native#text/plain @@ -8744,6 +8761,7 @@ res/cardsfolder/s/shatterskull_giant.txt svneol=native#text/plain res/cardsfolder/s/shatterstorm.txt svneol=native#text/plain res/cardsfolder/s/shauku_endbringer.txt svneol=native#text/plain res/cardsfolder/s/shaukus_minion.txt svneol=native#text/plain +res/cardsfolder/s/shell_of_the_last_kappa.txt -text res/cardsfolder/s/shell_skulkin.txt svneol=native#text/plain res/cardsfolder/s/shelldock_isle.txt -text res/cardsfolder/s/shelter.txt -text @@ -10390,6 +10408,7 @@ res/cardsfolder/t/touch_of_the_eternal.txt -text res/cardsfolder/t/touch_of_vitae.txt -text svneol=unset#text/plain res/cardsfolder/t/touchstone.txt svneol=native#text/plain res/cardsfolder/t/tourachs_gate.txt -text +res/cardsfolder/t/tower_above.txt -text res/cardsfolder/t/tower_drake.txt svneol=native#text/plain res/cardsfolder/t/tower_gargoyle.txt svneol=native#text/plain res/cardsfolder/t/tower_geist.txt -text diff --git a/res/cardsfolder/c/chaotic_backlash.txt b/res/cardsfolder/c/chaotic_backlash.txt new file mode 100644 index 00000000000..1091f05e23f --- /dev/null +++ b/res/cardsfolder/c/chaotic_backlash.txt @@ -0,0 +1,11 @@ +Name:Chaotic Backlash +ManaCost:4 R +Types:Instant +Text:no text +A:SP$ DealDamage | Cost$ 4 R | NumDmg$ Backlash | TgtPrompt$ Select target player to damage | ValidTgts$ Player | SpellDescription$ CARDNAME deals damage to target player equal to twice the number of white and/or blue permanents he or she controls. +SVar:Backlash:Count$Valid Permanent.Blue+TargetedPlayerCtrl,Permanent.White+TargetedPlayerCtrl/Times.2 +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/chaotic_backlash.jpg +SetInfo:EVE|Uncommon|http://magiccards.info/scans/en/eve/49.jpg +Oracle:Chaotic Backlash deals damage to target player equal to twice the number of white and/or blue permanents he or she controls. +End \ No newline at end of file diff --git a/res/cardsfolder/c/chromeshell_crab.txt b/res/cardsfolder/c/chromeshell_crab.txt new file mode 100644 index 00000000000..23a0eaca4b3 --- /dev/null +++ b/res/cardsfolder/c/chromeshell_crab.txt @@ -0,0 +1,15 @@ +Name:Chromeshell Crab +ManaCost:4 U +Types:Creature Crab Beast +Text:no text +PT:3/3 +K:Morph:4 U +T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ CrabExchange | TriggerZones$ Battlefield | Optional$ True | TriggerDescription$ When CARDNAME is turned face up, you may exchange control of target creature you control and target creature an opponent controls. +SVar:CrabExchange:DB$ ExchangeControl | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | TargetsFromDifferentZone$ True | TargetMin$ 2 | TargetMax$ 2 | SpellDescription$ Exchange control of target creature you control and target creature an opponent controls. +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/chromeshell_crab.jpg +SetInfo:LGN|Rare|http://magiccards.info/scans/en/le/32.jpg +SetInfo:COM|Rare|http://magiccards.info/scans/en/cmd/41.jpg +Oracle:Morph {4}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)\nWhen Chromeshell Crab is turned face up, you may exchange control of target creature you control and target creature an opponent controls. +End \ No newline at end of file diff --git a/res/cardsfolder/c/circle_of_solace.txt b/res/cardsfolder/c/circle_of_solace.txt new file mode 100644 index 00000000000..9848920e0e6 --- /dev/null +++ b/res/cardsfolder/c/circle_of_solace.txt @@ -0,0 +1,17 @@ +Name:Circle of Solace +ManaCost:3 W +Types:Enchantment +Text:no text +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseCT | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose a creature type. +SVar:ChooseCT:AB$ ChooseType | Cost$ 0 | Defined$ You | Type$ Creature | AILogic$ MostProminentHumanControls +A:AB$ ChooseCard | Cost$ 1 W | Choices$ Creature.ChosenType | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SVars$ DBEffect,RPreventNextFromCreature,ExileEffect | SpellDescription$ The next time a creature of the chosen type would deal damage to you this turn, prevent that damage. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromCreature | RememberObjects$ Remembered | SVars$ RPreventNextFromCreature,ExileEffect | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromCreature:Event$ DamageDone | ValidSource$ Card.IsRemembered | ValidTarget$ You | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time a creature of the chosen type would deal damage to you this turn, prevent that damage. +SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/circle_of_solace.jpg +SetInfo:ONS|Rare|http://magiccards.info/scans/en/on/13.jpg +Oracle:As Circle of Solace enters the battlefield, choose a creature type.\n{1}{W}: The next time a creature of the chosen type would deal damage to you this turn, prevent that damage. +End \ No newline at end of file diff --git a/res/cardsfolder/c/complicate.txt b/res/cardsfolder/c/complicate.txt new file mode 100644 index 00000000000..11bc9e69602 --- /dev/null +++ b/res/cardsfolder/c/complicate.txt @@ -0,0 +1,13 @@ +Name:Complicate +ManaCost:2 U +Types:Instant +Text:no text +K:Cycling:2 U +A:SP$ Counter | Cost$ 2 U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 3 | SpellDescription$ Counter target spell unless its controller pays 3. +T:Mode$ Cycled | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When you cycle CARDNAME, you may counter target spell unless its controller pays 1. +SVar:TrigExile:AB$ Counter | Cost$ 0 | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/complicate.jpg +SetInfo:ONS|Uncommon|http://magiccards.info/scans/en/on/76.jpg +Oracle:Counter target spell unless its controller pays {3}.\nCycling {2}{U} ({2}{U}, Discard this card: Draw a card.)\nWhen you cycle Complicate, you may counter target spell unless its controller pays {1}. +End \ No newline at end of file diff --git a/res/cardsfolder/c/cragganwick_cremator.txt b/res/cardsfolder/c/cragganwick_cremator.txt new file mode 100644 index 00000000000..a9858e4921b --- /dev/null +++ b/res/cardsfolder/c/cragganwick_cremator.txt @@ -0,0 +1,15 @@ +Name:Cragganwick Cremator +ManaCost:2 R R +Types:Creature Giant Shaman +Text:no text +PT:5/4 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDiscard | TriggerDescription$ When CARDNAME enters the battlefield, discard a card at random. If you discard a creature card this way, CARDNAME deals damage equal to that card's power to target player. +SVar:TrigDiscard:AB$ Discard | Cost$ 0 | Defined$ You | NumCards$ 1 | Mode$ Random | RememberDiscarded$ True | SubAbility$ DBDmg +SVar:DBDmg:DB$ DealDamage | Cost$ 0 | Tgt$ TgtP | ConditionDefined$ Remembered | ConditionPresent$ Card.Creature | ConditionCompare$ EQ1 | NumDmg$ X | SubAbility$ DBCleanup | References$ X +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:X:Remembered$CardPower +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/cragganwick_cremator.jpg +SetInfo:SHM|Rare|http://magiccards.info/scans/en/shm/87.jpg +Oracle:When Cragganwick Cremator enters the battlefield, discard a card at random. If you discard a creature card this way, Cragganwick Cremator deals damage equal to that card's power to target player. +End \ No newline at end of file diff --git a/res/cardsfolder/e/ember_gale.txt b/res/cardsfolder/e/ember_gale.txt new file mode 100644 index 00000000000..f9817ea87b1 --- /dev/null +++ b/res/cardsfolder/e/ember_gale.txt @@ -0,0 +1,12 @@ +Name:Ember Gale +ManaCost:3 R +Types:Sorcery +Text:no text +A:SP$ Effect | Cost$ 3 R | Name$ Ember Gale Effect | ValidTgts$ Player | TgtPrompt$ Select target player | AILogic$ Evasion | StaticAbilities$ CantBlock | RememberObjects$ Targeted | SubAbility$ DBDamage | SpellDescription$ Creatures target player controls can't block this turn. CARDNAME deals 1 damage to each white and/or blue creature that player controls. +SVar:DBDamage:DB$ DamageAll | NumDmg$ 1 | ValidCards$ Creature.White+TargetedPlayerCtrl,Creature.Blue+TargetedPlayerCtrl | ValidDescription$ each creature that's white or blue that player controls. +SVar:CantBlock:Mode$ Continuous | Affected$ Creature.RememberedPlayerCtrl | AddHiddenKeyword$ HIDDEN CARDNAME can't block. | SubAbility$ DBDamage | SpellDescription$ Creatures targeted player controls can't block this turn. +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/ember_gale.jpg +SetInfo:SHM|Common|http://magiccards.info/scans/en/shm/91.jpg +Oracle:Creatures target player controls can't block this turn. Ember Gale deals 1 damage to each white and/or blue creature that player controls. +End \ No newline at end of file diff --git a/res/cardsfolder/h/honorable_scout.txt b/res/cardsfolder/h/honorable_scout.txt new file mode 100644 index 00000000000..b529063a7c2 --- /dev/null +++ b/res/cardsfolder/h/honorable_scout.txt @@ -0,0 +1,13 @@ +Name:Honorable Scout +ManaCost:W +Types:Creature Human Soldier Scout +Text:no text +PT:1/1 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ HonorGained | TriggerDescription$ When CARDNAME enters the battlefield, you gain 2 life for each black and/or red creature target opponent controls. +SVar:HonorGained:AB$ GainLife | Cost$ 0 | LifeAmount$ ScoutsHonor | Defined$ You | TgtPrompt$ Select target opponent | ValidTgts$ Opponent +SVar:ScoutsHonor:Count$Valid Creature.Black+TargetedPlayerCtrl,Creature.Red+TargetedPlayerCtrl/Times.2 +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/honorable_scout.jpg +SetInfo:PLS|Common|http://magiccards.info/scans/en/ps/8.jpg +Oracle:When Honorable Scout enters the battlefield, you gain 2 life for each black and/or red creature target opponent controls. +End \ No newline at end of file diff --git a/res/cardsfolder/i/icy_prison.txt b/res/cardsfolder/i/icy_prison.txt new file mode 100644 index 00000000000..b8ba89c0a89 --- /dev/null +++ b/res/cardsfolder/i/icy_prison.txt @@ -0,0 +1,18 @@ +Name:Icy Prison +ManaCost:U U +Types:Enchantment +Text:no text +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target creature. +SVar:TrigExile:DB$ ChangeZone | Cost$ 0 | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | ForgetOtherRemembered$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigReturn | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME leaves the battlefield, return the exiled card to the battlefield under its owner's control. +SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | Origin$ Exile | Destination$ Battlefield | Defined$ Remembered +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigSac | TriggerDescription$ At the beginning of your upkeep, sacrifice CARDNAME unless any player pays {3}. +SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Defined$ Self | UnlessCost$ 3 | UnlessPayer$ Player | UnlessAI$ OnlyOwn +SVar:PlayMain1:TRUE +SVar:NeedsToPlayVar:Y GE3 +SVar:Y:Count$Valid Land.YouCtrl +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/icy_prison.jpg +SetInfo:ICE|Rare|http://magiccards.info/scans/en/ia/74.jpg +Oracle:When Icy Prison enters the battlefield, exile target creature.\nAt the beginning of your upkeep, sacrifice Icy Prison unless any player pays {3}.\nWhen Icy Prison leaves the battlefield, return the exiled card to the battlefield under its owner's control. +End \ No newline at end of file diff --git a/res/cardsfolder/k/kaho_minamo_historian.txt b/res/cardsfolder/k/kaho_minamo_historian.txt new file mode 100644 index 00000000000..c0a1ba319ca --- /dev/null +++ b/res/cardsfolder/k/kaho_minamo_historian.txt @@ -0,0 +1,17 @@ +Name:Kaho, Minamo Historian +ManaCost:2 U U +Types:Legendary Creature Human Wizard +Text:no text +PT:2/2 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ Catalogue | TriggerDescription$ When CARDNAME enters the battlefield, search your library for up to three instant cards and exile them. Then shuffle your library. +SVar:Catalogue:DB$ ChangeZone | Origin$ Library | Destination$ Exile | ChangeType$ Instant | ChangeNum$ 3 | RememberChanged$ True | ForgetOtherRemembered$ True +A:AB$ Play | Cost$ X T | Valid$ Card.IsRemembered+cmcEQX | ValidZone$ Exile | WithoutManaCost$ True | Amount$ 1 | Controller$ You | Optional$ True | References$ X | SpellDescription$ You may cast a card with converted mana cost X exiled with Kaho without paying its mana cost. +T:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | Execute$ ForgetCard | Static$ True +SVar:ForgetCard:DB$ Cleanup | ForgetDefined$ TriggeredCard +SVar:X:Count$xPaid +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/kaho_minamo_historian.jpg +SetInfo:SOK|Rare|http://magiccards.info/scans/en/sok/41.jpg +Oracle:When Kaho, Minamo Historian enters the battlefield, search your library for up to three instant cards and exile them. Then shuffle your library.\n{X}, {T}: You may cast a card with converted mana cost X exiled with Kaho without paying its mana cost. +End \ No newline at end of file diff --git a/res/cardsfolder/k/kill_switch.txt b/res/cardsfolder/k/kill_switch.txt new file mode 100644 index 00000000000..859d5f525a5 --- /dev/null +++ b/res/cardsfolder/k/kill_switch.txt @@ -0,0 +1,13 @@ +Name:Kill Switch +ManaCost:3 +Types:Artifact +Text:no text +A:AB$ TapAll | Cost$ 2 T | ValidCards$ Artifact.Other | SubAbility$ DBPumpAll | SpellDescription$ Tap all other artifacts.They don't untap during their controllers' untap steps for as long as CARDNAME remains tapped. +SVar:DBPumpAll:DB$ PumpAll | Cost$ 0 | KW$ HIDDEN CARDNAME doesn't untap during your untap step. | ValidCards$ Artifact.Other | UntilUntaps$ True +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/kill_switch.jpg +SetInfo:NMS|Rare|http://magiccards.info/scans/en/ne/133.jpg +Oracle:{2}, {T}: Tap all other artifacts. They don't untap during their controllers' untap steps for as long as Kill Switch remains tapped. +End \ No newline at end of file diff --git a/res/cardsfolder/m/mischievous_quanar.txt b/res/cardsfolder/m/mischievous_quanar.txt new file mode 100644 index 00000000000..9cd7843e3e1 --- /dev/null +++ b/res/cardsfolder/m/mischievous_quanar.txt @@ -0,0 +1,15 @@ +Name:Mischievous Quanar +ManaCost:4 U +Types:Creature Beast +Text:no text +PT:3/3 +K:Morph:1 U U +A:AB$ SetState | Cost$ 3 U U | Defined$ Self | Mode$ TurnFace | SpellDescription$ Turn CARDNAME face down. +T:Mode$ TurnFaceUp | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ When CARDNAME is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy. +SVar:TrigCopy:AB$ CopySpell | Cost$ 0 | ValidTgts$ Instant,Sorcery +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/mischievous_quanar.jpg +SetInfo:SCG|Rare|http://magiccards.info/scans/en/sc/42.jpg +Oracle:{3}{U}{U}: Turn Mischievous Quanar face down.\nMorph {1}{U}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)\nWhen Mischievous Quanar is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy. +End \ No newline at end of file diff --git a/res/cardsfolder/n/nomad_mythmaker.txt b/res/cardsfolder/n/nomad_mythmaker.txt new file mode 100644 index 00000000000..a1580cc3bc2 --- /dev/null +++ b/res/cardsfolder/n/nomad_mythmaker.txt @@ -0,0 +1,12 @@ +Name:Nomad Mythmaker +ManaCost:2 W +Types:Creature Human Nomad Cleric +Text:no text +PT:2/2 +A:AB$ ChangeZone | Cost$ W T | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Aura | GainControl$ True | AttachedTo$ Creature.CanBeEnchantedBySource+YouCtrl | SpellDescription$ Put target Aura card from a graveyard onto the battlefield under your control attached to a creature you control. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/nomad_mythmaker.jpg +SetInfo:JUD|Rare|http://magiccards.info/scans/en/ju/15.jpg +SetInfo:10E|Rare|http://magiccards.info/scans/en/10e/30.jpg +Oracle:{W}, {T}: Put target Aura card from a graveyard onto the battlefield under your control attached to a creature you control. +End \ No newline at end of file diff --git a/res/cardsfolder/p/pay_no_heed.txt b/res/cardsfolder/p/pay_no_heed.txt new file mode 100644 index 00000000000..1b16ef47ef4 --- /dev/null +++ b/res/cardsfolder/p/pay_no_heed.txt @@ -0,0 +1,13 @@ +Name:Pay No Heed +ManaCost:W +Types:Instant +Text:no text +A:SP$ ChooseSource | Cost$ W | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SVars$ RPreventNextFromSource | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the source would deal this turn. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/pay_no_heed.jpg +SetInfo:TOR|Common|http://magiccards.info/scans/en/tr/12.jpg +Oracle:Prevent all damage a source of your choice would deal this turn. +End \ No newline at end of file diff --git a/res/cardsfolder/p/pilgrim_of_justice.txt b/res/cardsfolder/p/pilgrim_of_justice.txt new file mode 100644 index 00000000000..9e2e255cb15 --- /dev/null +++ b/res/cardsfolder/p/pilgrim_of_justice.txt @@ -0,0 +1,17 @@ +Name:Pilgrim of Justice +ManaCost:2 W +Types:Creature Human Cleric +Text:no text +PT:1/3 +K:Protection from red +A:AB$ ChooseSource | Cost$ W Sac<1/CARDNAME> | Choices$ Card.Red | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time a red source of your choice would deal damage this turn, prevent that damage. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SVars$ RPreventNextFromSource,ExileEffect | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time the chosen source deals damage, prevent that damage. +SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:RemRandomDeck:True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/pilgrim_of_justice.jpg +SetInfo:ODY|Common|http://magiccards.info/scans/en/od/40.jpg +Oracle:Protection from red\n{W}, Sacrifice Pilgrim of Justice: The next time a red source of your choice would deal damage this turn, prevent that damage. +End \ No newline at end of file diff --git a/res/cardsfolder/p/pilgrim_of_virtue.txt b/res/cardsfolder/p/pilgrim_of_virtue.txt new file mode 100644 index 00000000000..9a16ab926d5 --- /dev/null +++ b/res/cardsfolder/p/pilgrim_of_virtue.txt @@ -0,0 +1,17 @@ +Name:Pilgrim of Virtue +ManaCost:2 W +Types:Creature Human Cleric +Text:no text +PT:1/3 +K:Protection from black +A:AB$ ChooseSource | Cost$ W Sac<1/CARDNAME> | Choices$ Card.Black | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time a black source of your choice would deal damage this turn, prevent that damage. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SVars$ RPreventNextFromSource,ExileEffect | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time the chosen source deals damage, prevent that damage. +SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Battlefield | Destination$ Exile +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:RemRandomDeck:True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/pilgrim_of_virtue.jpg +SetInfo:ODY|Common|http://magiccards.info/scans/en/od/41.jpg +Oracle:Protection from black\n{W}, Sacrifice Pilgrim of Virtue: The next time a black source of your choice would deal damage this turn, prevent that damage. +End \ No newline at end of file diff --git a/res/cardsfolder/p/prahv_spires_of_order.txt b/res/cardsfolder/p/prahv_spires_of_order.txt new file mode 100644 index 00000000000..13cd97a8b06 --- /dev/null +++ b/res/cardsfolder/p/prahv_spires_of_order.txt @@ -0,0 +1,14 @@ +Name:Prahv, Spires of Order +ManaCost:no cost +Types:Land +Text:no text +A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool. +A:AB$ ChooseSource | Cost$ 4 W U T | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SVars$ RPreventNextFromSource | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the chosen source would deal this turn. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/prahv_spires_of_order.jpg +SetInfo:DIS|Uncommon|http://magiccards.info/scans/en/di/177.jpg +Oracle:{T}: Add {1} to your mana pool.\n{4}{W}{U}, {T}: Prevent all damage a source of your choice would deal this turn. +End \ No newline at end of file diff --git a/res/cardsfolder/r/riths_charm.txt b/res/cardsfolder/r/riths_charm.txt new file mode 100644 index 00000000000..3076344b60e --- /dev/null +++ b/res/cardsfolder/r/riths_charm.txt @@ -0,0 +1,16 @@ +Name:Rith's Charm +ManaCost:R G W +Types:Instant +Text:no text +A:SP$ Charm | Cost$ R G W | CharmNum$ 1 | Choices$ Bash,Token,Prevent | SpellDescription$ Choose one - Destroy target nonbasic land; or put three 1/1 green Saproling creature tokens onto the battlefield; or prevent all damage a source of your choice would deal this turn. +SVar:Bash:DB$ Destroy | ValidTgts$ Land.nonBasic | TgtPrompt$ Select target nonbasic land | SpellDescription$ Destroy target nonbasic land. +SVar:Token:DB$ Token | TokenAmount$ 3 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put three 1/1 green Saproling creature tokens onto the battlefield. +SVar:Prevent:DB$ ChooseSource | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage a source of your choice would deal this turn. +SVar:DBEffect:DB$ Effect | ReplacementEffects$ RPreventNextFromSource | RememberObjects$ Remembered | SVars$ RPreventNextFromSource | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 +SVar:RPreventNextFromSource:Event$ DamageDone | ValidSource$ Card.IsRemembered | Prevent$ True | PreventionEffect$ True | Description$ Prevent all damage the source would deal this turn. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/riths_charm.jpg +SetInfo:PLS|Uncommon|http://magiccards.info/scans/en/ps/122.jpg +Oracle:Choose one - Destroy target nonbasic land; or put three 1/1 green Saproling creature tokens onto the battlefield; or prevent all damage a source of your choice would deal this turn. +End \ No newline at end of file diff --git a/res/cardsfolder/s/shell_of_the_last_kappa.txt b/res/cardsfolder/s/shell_of_the_last_kappa.txt new file mode 100644 index 00000000000..b6da4f14519 --- /dev/null +++ b/res/cardsfolder/s/shell_of_the_last_kappa.txt @@ -0,0 +1,13 @@ +Name:Shell of the Last Kappa +ManaCost:3 +Types:Legendary Artifact +Text:no text +A:AB$ ChangeZone | Cost$ 3 T | Origin$ Stack | Destination$ Exile | TargetValidTargeting$ You | TgtPrompt$ Choose target instant or sorcery spell that targets you | ValidTgts$ Card.Instant,Card.Sorcery | RememberChanged$ True | SpellDescription$ Exile target instant or sorcery spell that targets you. (The spell has no effect.) +A:AB$ Play | Cost$ 3 T Sac<1/CARDNAME> | Valid$ Card.IsRemembered | ValidZone$ Exile | WithoutManaCost$ True | Amount$ 1 | Controller$ You | Optional$ True | SubAbility$ DBCleanup | SpellDescription$ You may cast a card exiled with CARDNAME without paying its mana cost. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/shell_of_the_last_kappa.jpg +SetInfo:CHK|Rare|http://magiccards.info/scans/en/chk/269.jpg +Oracle:{3}, {T}: Exile target instant or sorcery spell that targets you. (The spell has no effect.)\n{3}, {T}, Sacrifice Shell of the Last Kappa: You may cast a card exiled with Shell of the Last Kappa without paying its mana cost. +End \ No newline at end of file diff --git a/res/cardsfolder/t/tower_above.txt b/res/cardsfolder/t/tower_above.txt new file mode 100644 index 00000000000..aefd8c52567 --- /dev/null +++ b/res/cardsfolder/t/tower_above.txt @@ -0,0 +1,15 @@ +Name:Tower Above +ManaCost:2G 2G 2G +Types:Sorcery +Text:no text +A:SP$ Pump | Cost$ 2G 2G 2G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ 4 | NumDef$ 4 | KW$ Trample & Wither | SubAbility$ DBAnimate | SpellDescription$ Until end of turn, CARDNAME gets +4/+4 and gains trample, wither, and "When this creature attacks, target creature blocks it this turn if able." (It deals damage to creatures in the form of -1/-1 counters.) +SVar:DBAnimate:DB$ Animate | Cost$ 0 | Defined$ Targeted | Triggers$ TrigAttack | sVars$ TowerAboveTrigBlock +SVar:TrigAttack:Mode$ Attacks | ValidCard$ Creature.Self | Execute$ TrigBlock | TriggerDescription$ Whenever CARDNAME attacks, target creature blocks it this turn if able +SVar:TowerAboveTrigBlock:AB$ MustBlock | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Target creature blocks CARDNAME this turn if able. +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/tower_above.jpg +SetInfo:SHM|Uncommon|http://magiccards.info/scans/en/shm/131.jpg +Oracle:({2/G} can be paid with any two mana or with {G}. This card's converted mana cost is 6.)\nUntil end of turn, target creature gets +4/+4 and gains trample, wither, and "When this creature attacks, target creature blocks it this turn if able." (It deals damage to creatures in the form of -1/-1 counters.) +End \ No newline at end of file diff --git a/src/main/java/forge/gui/home/variant/CSubmenuVanguard.java b/src/main/java/forge/gui/home/variant/CSubmenuVanguard.java index 00ddc1ed597..36691dde9cd 100644 --- a/src/main/java/forge/gui/home/variant/CSubmenuVanguard.java +++ b/src/main/java/forge/gui/home/variant/CSubmenuVanguard.java @@ -2,6 +2,8 @@ package forge.gui.home.variant; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; import java.util.Random; import javax.swing.SwingUtilities; @@ -21,6 +23,8 @@ import forge.game.player.LobbyPlayer; import forge.game.player.PlayerType; import forge.gui.SOverlayUtils; import forge.gui.framework.ICDoc; +import forge.gui.toolbox.FDeckChooser; +import forge.gui.toolbox.FList; import forge.item.CardPrinted; import forge.properties.ForgePreferences; import forge.properties.ForgePreferences.FPref; @@ -51,8 +55,10 @@ public enum CSubmenuVanguard implements ICDoc { @Override public void initialize() { final ForgePreferences prefs = Singletons.getModel().getPreferences(); - view.getDcAi().initialize(); - view.getDcHuman().initialize(); + for(FDeckChooser fdc : view.getDeckChoosers()) + { + fdc.initialize(); + } // Checkbox event handling view.getBtnStart().addActionListener(new ActionListener() { @@ -111,47 +117,47 @@ public enum CSubmenuVanguard implements ICDoc { final SwingWorker worker = new SwingWorker() { @Override public Object doInBackground() { - Deck humanDeck = VSubmenuVanguard.SINGLETON_INSTANCE.getDcHuman().getDeck(); - Deck aiDeck = VSubmenuVanguard.SINGLETON_INSTANCE.getDcAi().getDeck(); - Object selAiAv = VSubmenuVanguard.SINGLETON_INSTANCE.getAvAi().getSelectedValue(); - Object selHumanAv = VSubmenuVanguard.SINGLETON_INSTANCE.getAvHuman().getSelectedValue(); - - Lobby lobby = Singletons.getControl().getLobby(); - LobbyPlayer humanPlayer = lobby.findLocalPlayer(PlayerType.HUMAN); - LobbyPlayer aiPlayer = lobby.findLocalPlayer(PlayerType.COMPUTER); - - MatchStartHelper helper = new MatchStartHelper(); - - final CardPrinted aiVanguard,humanVanguard; - Iterable all = VSubmenuVanguard.SINGLETON_INSTANCE.getAllAvatars(); - Iterable aiAll = VSubmenuVanguard.SINGLETON_INSTANCE.getAllAiAvatars(); - if(selAiAv instanceof String) + List playerDecks = new ArrayList(); + for(FDeckChooser fdc : view.getDeckChoosers()) { - //Random is the only string in the list so grab a random avatar. - Random r = new Random(); - aiVanguard = Iterables.get(aiAll,r.nextInt(Iterables.size(all))); + playerDecks.add(fdc.getDeck()); } - else - { - aiVanguard = (CardPrinted)selAiAv; - } - if(selHumanAv instanceof String) - { - //Random is the only string in the list so grab a random avatar. - Random r = new Random(); - humanVanguard = Iterables.get(all,r.nextInt(Iterables.size(all))); - } - else - { - humanVanguard = (CardPrinted)selHumanAv; - } - helper.addVanguardPlayer(humanPlayer, humanDeck, humanVanguard); - helper.addVanguardPlayer(aiPlayer, aiDeck, aiVanguard); + List playerAvatars = new ArrayList(); + for(FList fl : view.getAvatarLists()) + { + playerAvatars.add(fl.getSelectedValue()); + } + + Lobby lobby = Singletons.getControl().getLobby(); + MatchStartHelper helper = new MatchStartHelper(); + Random rnd = new Random(); + for(int i=0;i { private final JCheckBox cbArtifacts = new FCheckBox("Remove Artifacts"); private final JCheckBox cbRemoveSmall = new FCheckBox("Remove Small Creatures"); - private final FDeckChooser dcHuman = new FDeckChooser("Select your deck:", PlayerType.HUMAN); - private final FDeckChooser dcAi = new FDeckChooser("Select AI deck:", PlayerType.COMPUTER); - - private final FList avHuman = new FList(); - private final FList avAi = new FList(); - private final JScrollPane scrHuman = new JScrollPane(avHuman, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - private final JScrollPane scrAi = new JScrollPane(avAi, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - private final Predicate avatarTypePred = CardPrinted.Predicates.type("Vanguard"); private final Iterable allAvatars = Iterables.filter(CardDb.instance().getAllCards(), avatarTypePred); private final List allAiAvatars = new ArrayList(); - - private final FLabel lblAvatarHuman = new FLabel.Builder() - .text("Human avatar:") - .fontAlign(SwingConstants.CENTER) - .build(); - private final FLabel lblAvatarAi = new FLabel.Builder() - .text("AI Avatar:") - .fontAlign(SwingConstants.CENTER) - .build(); ////////////////////////////// @@ -103,7 +88,7 @@ public enum VSubmenuVanguard implements IVSubmenu { private final List fieldRadios = new ArrayList(); private final ButtonGroup grpFields = new ButtonGroup(); - private int currentNumTabsShown = 7; + private int currentNumTabsShown = 8; ////////////////////////////// @@ -125,62 +110,28 @@ public enum VSubmenuVanguard implements IVSubmenu { } } - avHuman.setListData(humanListData); - avAi.setListData(aiListData); - avHuman.setSelectedIndex(0); - avAi.setSelectedIndex(0); - //This listener will look for any of the radio buttons being selected //and call the method that shows/hides tabs appropriately. - ChangeListener changeListener = new ChangeListener() { - public void stateChanged(ChangeEvent changEvent) { - FRadioButton aButton = (FRadioButton)changEvent.getSource(); - - System.out.println("radio change fired: " + aButton.getText()); + ItemListener iListener = new ItemListener() { - if(aButton.isSelected()) - { - changeTabs(Integer.parseInt(aButton.getText())); - } - } - }; - - class SelectedListener implements PropertyChangeListener - { - - /* (non-Javadoc) - * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) - */ @Override - public void propertyChange(PropertyChangeEvent arg0) { + public void itemStateChanged(ItemEvent arg0) { FRadioButton aButton = (FRadioButton)arg0.getSource(); - System.out.println("radio change fired(bean): " + aButton.getText()); - - if(aButton.isSelected()) + if(arg0.getStateChange() == ItemEvent.SELECTED) { changeTabs(Integer.parseInt(aButton.getText())); } } - } + }; //Create all 8 player settings panel - FRadioButton tempRadio; + FRadioButton tempRadio = null; FPanel tempPanel; FDeckChooser tempChooser; FList tempList; - for (int i = 1; i < 7; i++) { - tempRadio = new FRadioButton(); - tempRadio.setText(String.valueOf(i)); - tempRadio.setSelected(true); - fieldRadios.add(tempRadio); - grpFields.add(tempRadio); - tempRadio.addChangeListener(changeListener); - tempRadio.addPropertyChangeListener(new SelectedListener()); - } - //Settings panel FPanel settingsPanel = new FPanel(); FPanel radioPane = new FPanel(); @@ -191,6 +142,8 @@ public enum VSubmenuVanguard implements IVSubmenu { tempRadio.setText(String.valueOf(i)); fieldRadios.add(tempRadio); grpFields.add(tempRadio); + tempRadio.setSelected(true); + tempRadio.addItemListener(iListener); radioPane.add(tempRadio,"wrap"); } settingsPanel.add(radioPane); @@ -236,19 +189,19 @@ public enum VSubmenuVanguard implements IVSubmenu { { if(toShow < currentNumTabsShown) { - for(int i=currentNumTabsShown;i>toShow;i--) + for(int i=currentNumTabsShown;i>toShow+1;i--) { - tabPane.remove(i+1); + tabPane.remove(i); } - currentNumTabsShown = toShow; + currentNumTabsShown = tabPane.getComponentCount()-1; } else { - for(int i=toShow+1;i<=8;i++) + for(int i=currentNumTabsShown;i<=toShow;i++) { - tabPane.add(playerPanels.get(i)); + tabPane.add("Player " + (i+1),playerPanels.get(i)); } - currentNumTabsShown = toShow; + currentNumTabsShown = tabPane.getComponentCount()-1; } } @@ -258,16 +211,7 @@ public enum VSubmenuVanguard implements IVSubmenu { @Override public EMenuGroup getGroupEnum() { return EMenuGroup.VARIANT; - } - - public final FDeckChooser getDcHuman() { - return dcHuman; - } - - public final FDeckChooser getDcAi() { - return dcAi; - } - + } /* (non-Javadoc) * @see forge.gui.home.IVSubmenu#getMenuTitle() @@ -298,22 +242,10 @@ public enum VSubmenuVanguard implements IVSubmenu { for(FDeckChooser fdc : deckChoosers) { fdc.populate(); - } - + } VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(tabPane, "gap 0 0 50px 50px, growx, growy"); - - /* - dcAi.populate(); - dcHuman.populate(); - - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(dcAi, "w 44%!, gap 0 0 20px 20px, growy, pushy"); - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(dcHuman, "w 44%!, gap 4% 4% 20px 20px, growy, pushy"); - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblAvatarAi, "w 44%!, gap 0 0 0px 0px"); - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(lblAvatarHuman, "w 44%!, gap 4% 4% 0px 0px"); - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(scrAi, "w 44%!, gap 0 0 20px 20px, growy, pushy"); - VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(scrHuman, "w 44%!, gap 4% 4% 20px 20px, growy, pushy"); - */ + VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().add(pnlStart, "span 1, ax center"); VHomeUI.SINGLETON_INSTANCE.getPnlDisplay().revalidate(); @@ -384,19 +316,24 @@ public enum VSubmenuVanguard implements IVSubmenu { public DragCell getParentCell() { return parentCell; } - + /** - * @return the avHuman + * + * @return a deckchooser for every player */ - public FList getAvHuman() { - return avHuman; + public List getDeckChoosers() + { + return deckChoosers; } - - /** - * @return the avAi - */ - public FList getAvAi() { - return avAi; + + public List getAvatarLists() + { + return avatarLists; + } + + public int getNumPlayers() + { + return currentNumTabsShown-1; } /**