Page 1 of 5

Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 16:02
by Chris H.
(Quest icons used created by Teekatas, from his Legendora set
http://raindropmemory.deviantart.com)

3989 cards in total.

This version is based upon the revision # 1791 which is found on our SVN. The preferences file settings and the new GUI display are improved in this version. There are some bug fixes and "under the hood" structural changes to the code. You should notice substantial improvements to the mana pool.

There is a new spCounter keyword and this brings in a large number of new counter spells. I believe that the AI can also use these new counters. There is also sereral more new keywords and they allowed us to add some additional new cards.

Some minor improvements were made to the computer's AI. The computer will now cast several hundred cards during main phase 1 before attacking. In the past the computer would always cast these spells during main phase 2.

I removed the ".SVN" and the /res/lib/ folders from this archive as they are not needed. The archives are now compressed using the 7z format. There are utilities for Windows, Mac OS and the various *nix's that can be used to decompress these archives.


Fixes/Features:

- Added CardFactoryUtil.copyTokens(CardList) to support Parallel Evolution.
- Fixed the look and feel preference file bug.
- Card images that are scaled over their original dimensions should look less blurry but more ringing can be observed.
- Minor repairs made to the cards.txt file.
- Added a hard deck centered around Elvish Piper and Quicksilver Amulet with huge creatures called Boromir 3.
- Fixed Wall of Tears / AEther Membrane (should remove tokens from game).
- Fixed the match lost/won dialog showing up whenever the Quests button is clicked.
- Updated the list of cards removed from random constructed decks.
- Fixed Sapphire Leech.
- Added more cards to be removed from generated decks.
- Fixed two "indestructible legends not dying" bug, by using sacrificeDestroy instead of destroy in destroyLegendaryCreatures.
- Fixed some bugs with Qasali Pridemage and improved the AI's targeting a bit.
- Another fix for the look and feel bug.
- Improved the AI of Wrath of God and Damnation by considering indestructible.
- Added getNotKeyword (to filter out cards with certain keywords) to
Cardlist.java.
- More elegant implementation of Mirror Gallery.
- Improved the AI of Soulscour, Day of Judgment, Planar Cleansing and All is Dust by considering indestructible.
- Improved the AI of Consume the Meek, Culling Sun, Retribution of the Meek, Cleanse and Plague Wind by considering indestructible.
- Reverted the changes to Mirror Gallery.
- Removed duplicate "filter" variable in Culling Sun.
- Minor addition to the spBounceTgt AI.
- Converted the following cards to implemented via keyword and commented out the card object for these cards: Boomerang; Deny Reality; Eye of Nowhere; Rescind; Surging AEther.
- Converted the following cards to keyword and commented out the card object for these cards: Regress; Repulse; Temporal Fissure; Temporal Spring and Unsummon.
- Removed a duplicate filter from spBounceTgt.
- Added an AI check for Overwhelming Forces.
- Fixed getValidCards in CardList.java to handle a Restriction of more than one Permanent.#### (before the tmpList wouldn't get updated)
- Fixed the AI of spBounceTgt to accept Type.#### targets.
- Converted the following cards to keyword and commented out the card object for these cards: Celestial Purge; Unmake.
- Added the option ShuffleIntoLibrary to spBounceTgt.
- Added more cards to be removed from generated decks.
- Fixed AI_getMostExpensivePermanent, AI_getBestEnchantment and
AI_getBestArtifact in CardFactoryUtil.java.
- Enabled the AI to use the spDestroyTgt target restrictions it previously
couldn't handle.
- Added a medium quest deck centered around indestructible permanents with lots of mass removal called Gimli 2.
- Provided for cards.txt keyword "SVar:RemAIDeck:True" to replace removed cards list.
- Added BRIBERY counter.
- Added Gwafa Hazid, Profiteer checks in canBlock and canAttack.
- Added "SVar:RemAIDeck:True" to the cards that are to be removed from random generated decks.
- Added hasCounters() to support Kulrath Knight.
- Fixed bug in xCount where Counting Named cards were trying to count "CARDNAME" instead of the original card name.
- The battlefield layout for the new and the old GUI display now use separate display_layout.xml files.
- Replaced the accented character in the spell description for Admonition Angel and Fledgling Griffin.
- Big ManaPool Update. Combined Mana Pool and Snow Mana Pool. Combined ManaCost and Mana_PayCost. Reworked how choices are made when paying for costs.
- Spectral Possession and Flame Javelin can now use the ManaPool to be cast.
- Snow mana can't be used to give yourself infinite mana by canceling abilities.
- Added spaces between all cards that generate more than 1 mana for smooth
parsing.
- Removed a line in Ability_Mana to keep spacing for mana to work with new ManaPool code.
- Added abAllPump keyword.
- Moved getCMC to ManaCost and Mana_Part
- Fixed ConvertedManaCost() bug of split mana costs. Flame Javelin's CMC is 6 not 3.
- Spike Weaver will no longer appear in a randomly generated deck. Used SVar:RemAIDeck:True.
- Improved "Express" Mana choosing for paying costs with mana sources that
produce more than one mana.
- Fixed bug with Invasion sac-lands where the wrong mana is removed from the ManaPool.
- Some creatures were converted to keyword in the past and their card objects were commented-out at that time. I deleted these old commented-out card objects.
- Added new format for sacrificePermanent - takes the prompt as parameter.
- Bugfix: Added missing parenthesis that would make canCastSorcery return true when failing important conditions.
- Added a single check for Changeling to the CostChange keyword. This appears to reduce the cost correctly for Changelings. Works for both the computer and the human.
- Updated Gemstone Array cost string to parse properly with new Mana objects.
- Updated Rarity from Scripts.
- Updated Aven Trailblazer and People of the Woods to have 0 toughness so they don't die before real toughness is calculated.
- Updated Shizo for AI. Will now only target Legendary creatures without Fear or Shroud instead of any creature it controls.
- Added Basking Rootwalla to the list of hard coded names of cards that have a limit to the number of times an ability can be activated.
- Chronatog will no longer appear in a randomly generated deck. Used SVar:RemAIDeck:True.
- Fixed some of the Eldrazi Spawn token creation code ("" for color instead of "C"). Should now be compatible with the new mana pool code.
- This should finish the colorless token creation code edit. Replaced "C" with "" for these three cards: Forbidden Orchard; Tuktuk the Explorer and Urza's Factory.
- Fixed the Akroma's Memorial bug. Akroma's Memorial was giving "Protection from Black" rather than "Protection from black" and the code requires that the color be lowercase.
- Migrated pictures and rarity from other files into cards.txt
- Added migratedCardsScript.py as a replacement for cardsScript.py when the game parses only the single file. Original script is still needed until then. The new script will alphabetize cards.txt instead of writing in random order. Added Mythic and Land rarity for future use.
- Added AI and some functionality to the spike keyword.
- Added missing spell description to Radiant's Dragoons.
- There were two copies of the Martial Coup code object in CardFactory. Deleted the first copy.
- Modified getKey to handle multiple images for cards other than basic land. Modified NewGame to use SVar:PicCount to enable multiple card images for more than just basic land. Added SVar:PicCount:4 to all basic and snow-covered lands. Modified getNeededCards to use SVar:Picture:{URL} instead of card-pictures.txt. Renamed private class "Card" to "mCard" in order to use Card object(Card.java). Modified the SVar keyword to split only 3 elements, to ensure web addresses can be stored. Modified QuestData_BoosterPack to use SVar:Rarity instead of rarity text files. Modified setup to use SVar:Rarity instead of rarity.txt files.
- Fixed an issue with cards with flash and uncastable.
- Removed the braces from the spell description of several of the newer cards.
- Reversed the order of the keywords for Long-Forgotten Gohei. This cleaned up the spell description. Removed the minus from the type line for Path of Anger's Flame.
- Added a missing Space in the description of Soulshift.
- Slight improvement to getText(). "Draw a card." will no longer run into the spell description and will instead appear on the next line. Two cards were not displaying the Cascade keyword in their spell description. Used a similar system to add in this missing Cascade.
- Slight improvement to getText(). Several cards were not displaying the Ripple or the Madness keyword in their spell description. Used a similar system to add in this missing info.
- Fixed Surging Sentinels, it now has the correct capitalized form for "First Strike".
- Added spCounter keyword, migrated old cards to it.
- Also modified ReadCard.Run() to output linenumber on exception.
- Added SVar:PlayMain1:TRUE to the Ally and to the Sliver cards. Added this SVar to miscellaneous cards with "Lord" like effects and to Elvish Vanguard and Juniper Order Ranger. The AI will cast these cards during main phase 1.
- AI will now play a creature with Exalted during main 1.
- Fixed Mad Auntie being able to target itself for regeneration.
- Added the options tapped, enchanted, unenchanted and token to getValidCards in CardList.java.
- Added the keyword spDestroyAll.
- Fixed the with Keyword restriction in getValidCards in CardList.java.
- Added SVar:PlayMain1:TRUE to Bad Moon and Tsunami.
- Fixed the input for Shizo, Death's Storehouse. The human was allowed to target any Legendary card, creature or not.
- Kami of the Crescent Moon type was misspelled. Fixed.
- Added a medium deck called Elrond 2 based on Aura Gnarlid, Rabid Wombat and Uril with lots of auras.
- Added the keyword spBounceAll. Some cosmetic changes to the spBounceAll keyword entry.
- Changed getValidCards to never return the Mana Pool.
- Fixed Inundate.
- Added the destination BottomofLibrary to the keyword spBounceAll.
- Excluded the types snow, arcane, aura and equipment from the changeling check in getType. This prevents changelings from being affected from Serene Heart and Diamond Faerie.
- Fixed Oust (will not put tokens in library anymore). Casting Oust with Library size at zero will now place creature on top of library and will no longer generate an error exception. Improved the AI, computer will only target creats with power > 2 and a canTarget() test was included.
- Added CC-prefix to ExtraActions of spCounter.
- Fixed Cancel not having anything in it's TargetingRestriction section.
- Fixed the Wall of Reverence bug. It appears that the AI was targeting the
first creature to come into play rather than the creature with the highest power.
- Added a canPlayAI() method to Parallel Evolution.
- Added get/set for the whole SVars Hashtable.
- Improved the AI for spBounceAll.
- Added a getTokens CardList filter to CardList.java.
- Added sumCMC function to CardListUtil.java.
- Added a isType function to cards.java that also checks for changelings.
- Changed the staticeffect keyword to now also pump changelings.
- Added "card2.setSVars(card.getSVars());" to the planeswalkers. They all now display a rarity of Rare.
- Added more changeling checks to the staticeffect keyword.
- Another little improvement to the spBounceAll AI.
- Added "newCard.setSVars(card.getSVars());" to the creatures missing a rarity.
- Fixed Countersquall, Dismal Failure, Punish Ignorance and Undermine giving bonuses to the wrong player sometimes.
- Converted these mass destruction spells to the spDestroyAll keyword: Acid Rain; Boil; Boiling Seas; Flashfires; Cleanse; Damnation; Day of Judgment; Mass Calcify; Nature's Ruin; Perish; Virtue's Ruin; Wrath of God; Akroma's Vengeance; Devastation; Jokulhaups; Obliterate; Purify; Shatterstorm; Back to Nature; Cleanfall; Hush; Tempest of Light; Tranquil Path; Tranquility; Planar Cleansing; Soulscour; Guan Yu's 1,000-Li March.
- Added with and without keyword to the staticEffect keyword.
- The AI will no longer target the human's Mana Pool when it's Archon of Justice leaves play.
- Modified doDrawback - Added additional options for GainLife and LoseLife. Added xCount for Targeted card.
- Modified spDestroyTgt to enable Drawback.
- doDrawback - Added one more option for Damage.
- Changed Burning CloakDraback to comply with slight change in ambiguous syntax. (DamageTgtC -> DamageTgtCard)
- Modified OpenDeck to use the multi-line choice list instead of the drop-down.
- Added spell descriptions for spDestroyAll, spBounceTgt and spBounceAll.
- Added Threshold to xCount.
- Fixed Thermal Blast to use Threshold instead of Hellbent.
- Added PlayerHasThreshold... just in case.
- Added a low life emergency restriction to canPlayAI for spBounceAll.
- Changed Evacuation and Rebuild to keyword.
- Improved the AI of spDestroyAll.
- Fixed Reckless One.
- Added SVar:PlayMain1:TRUE and SVar:RemAIDeck:True to some cards.
- Added enchanted as a restriction to the staticeffect keyword.
- Added SVar:RemAIDeck:True to Abyssal Persecutor.
- Added a small section to card.getText(). This will display "CARDNAME can't be countered." in the text panel for Obliterate.
- Added a hard deck called Radiant 3 based on flying Creatures with Radiant, Archangel, Gravitational Shift and Moat.
- Added SVar:RemAIDeck:True to Tethered Griffin.
- Converted Capsize to keyword.
- Added Cost_Payment.java to go through Ability_Cost and pay each Cost in turn. This is enabled in three keywords: abDamage, abPump, and abAllPump. Simplified the ability generation of these keywords by removing the need for Ability_Tap. The AI also uses the same structure to pay for things for these keywords. If available, it will pay in payComputerCosts() in Cost_Payment. Sacrifice Costs are still disabled for the AI until better code is written for sacrifice decisions. Currently, it attempts to sacrifice everything available to it.
- Converted these destroy target spells to the spDestroyTgt keyword: Crumble; Devour in Shadow; Divine Offering.
- Added SVar:PlayMain1:TRUE and SVar:RemAIDeck:True to some additioal cards.
- Added an easy and a medium version of the C3PO Goblin deck.
- Updated the following quest decks: Abraham Lincoln 3, Bart Simpson 1, Bart Simpson 2, Bart Simpson 3, Bela Lugosi 3, Blackbeard 3, C3PO 3, Darth Vador 3, Boba Fett 3, Galahad 1-3, King Edward 3, Mr Slate 3, George of the Jungle 2,3, Joe Kidd 1-3, Magnum 1-3, Comic Book Guy 3.
- Fixed the cards.txt bug with Devour in Shadow and Divine Offering.
- Added a medium version of the Mr Slate deck.
- Fixed the spDiscardTgt bug.
- Added SubCounter<counterType/counterAmount> to Ability_Cost and appropriately pay for it in correct locations. Minor checks for Cost_Payment requirements. Note: SubCounter is not in any cards.txt yet, but has been tested with cards locally. Ex. Triskelion's ability would be: abDamageTgtCP SubCounter<P1P1/1>:1


Many people helped with this version. A special thank you goes out to them:

Dennis Bergkamp
Rob Cashwalker
Snacko
Friar i Sol
Sloth
Hellfish
Saint Waldo
Almost Clever
Chris H


Added many cards, including:

Code: Select all
Aerie Mystics
Agent of Shauku
Allay
Anarchy
Annul
Artifact Blast
Assassinate
Avoid Fate
Barbarian Lunatic
Bind
Blighted Shaman
Brackwater Elemental
Brainspoil
Breeding Pit
Cavalry Master
Child of Thorns
Clout of the Dominus
Confound
Countersquall
Crosswinds
Cumber Stone
Cut the Earthly Bond
Dark Offering
Death of a Thousand Stings
Death Stroke
Deathknell Kami
Deglamer
Desecrated Earth
Despoil
Destructive Force
Diamond Faerie
Dismal Failure
Dispel
Drain the Well
Dream Fracture
Edge of the Divinity
Elven Lyre
Emblem of the Warmind
Envelop
Extinguish
Faerie Trickery
Favor of the Overbeing
Fencer's Magemark
Fervent Denial
Final Judgment
Fists of Ironwood
Fists of the Demigod
Flash Counter
Flashfreeze
Flow of Maggots
Frazzle
Frostwind Invoker
Gainsay
Gerrard's Battle Cry
Ghost Tactician
Goblin Lookout
Goblin Soothsayer
Goldenglow Moth
Gravitational Shift
Greater Auramancy
Grixis Slavedriver
Guardian's Magemark
Guttural Response
Gwafa Hazid, Profiteer
Hallowed Burial
Harmonic Convergence
Haru-Onna
Hibernation
Hideous End
Hisoka's Defiance
Iizuka the Ruthless
Infested Roothold
Intervene
Inundate
Jackalope Herd
Kulrath Knight
Lady Caleria
Lapse of Certainty
Lavafume Invoker
Leonin Sun Standard
Liquify
Lys Alana Huntmaster
Mana Drain
Memory Lapse
Metathran Elite
Mirror Gallery
Misfortune's Gain
Mogg Raider
Mouth of Ronom
Mystic Denial
Nature's Claim
Negate
Overgrown Battlement
Oyobi, Who Split the Heavens
Parallel Evolution
Path of Peace
Plummet
Poison Arrow
Poison the Well
Pyre Zombie
Pyric Salamander
Quicksilver Amulet
Rebuff the Wicked
Reduce to Dreams
Rotlung Reanimator
Ruination
Runes of the Deus
Saprazzan Raider
Seal of Strength
Serene Heart
Serene Offering
Serra Aviary
Sever Soul
Shattering Pulse
Shield Mate
Shield of the Oversoul
Skyshaper
Slinking Giant
Smokespew Invoker
Solemn Offering
Song of Serenity
Squelch
Stalwart Shield-Bearers
Stampede Driver
Steel of the Godhead
Steel Overseer
Stonybrook Schoolmaster
Stormcaller's Boon
Sunder
Sustenance
Symbiotic Beast
Terashi's Grasp
Thoughtbind
Thran Golem
Thunderscape Master
Timid Drake
Tivadar's Crusade
Tor Wauki
Tranquil Domain
Trip Wire
Tsunami
Tukatongue Thallid
Upheaval
Vampiric Sliver
Vendetta
Vengeance
Venomous Vines
Viashino Cutthroat
Viashino Sandscout
Viashino Sandstalker
Voidslime
Wallop
Whirlwind
Wildfire
Winds of Rath
Wing Snare
Zephyr Spirit
Zhao Zilong, Tiger General
`
The links to the various archives:


The Forge 08/20/2010 archive (requires java 6):

forge0820.7z


The opponent icons for Forge 08/20/2010:

Quest_Opponent_icons_08-20-2010.7z


This is the run-forge.jar file found in rev 1802 on the SVN. This jar should allow people to play the draft mode.

Forge Fix r1802.7z


This archive has an updated "run-forge.jar" file. This jar should take care of the Index Out Of Bounds Exception and it should also fix the morph problem with the new GUI.

Forge Fix r1810.7z


This is the newest run-forge.jar file and it is from rev 1821 on the SVN. I re-set my compiler compliance level to 1.5 and built a new project using a JRE environment set also to 1.5. This jar file should be compatible with java 5.

Forge Fix r1821.7z


This jar file should be java 5 compatible:

Forge Fix r1824.7z


Turns out the previous versions contained code that is incompatible with java 5. This is the most recent bug-fix and this version may be java 5 compatible. You should use this "run-forge.jar" file.

Forge Fix r1825.7z
.

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 16:48
by DennisBergkamp
A very big update indeed, thanks for posting Chris =D>

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 17:05
by Rob Cashwalker
Damn we're good.... ;-)

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 17:54
by Chris H.
Forge 08-20 apparently breaks the draft mode of the game. Rob made a last minute fix but I failed to check the SVN. So we have an update. I do not think that there were any other changes made to the jar file in this rev.

This is the run-forge.jar file found in rev 1802 on the SVN. This jar should allow people to play the draft mode.

Forge Fix r1802.7z
`

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 19:06
by weirdingway
Haha Mana Drain. Great update as always guys. And holy smokes @ the number of bug fixes!

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 19:31
by DemoneNero
thanks a lot guys :D almost 4000 cards great =D>

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 19:31
by Sloth
Rob Cashwalker wrote:Damn we're good.... ;-)
I second this.

Big thanks for the release Chris!

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 20:09
by Chris H.
I hope that everyone enjoys this version. Sol improved the mana pool. =D> Sloth and I spent some time improving the AI and some of the quest AI decks.

We had a rush of submissions at the last minute and I was not able to include all of the new work, most, yeah. :D

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 21:44
by juzamjedi
I played a couple of games and had several crashes :-/

To recreate, this happened when AI was playing Fledgling Djinn. During the AI's upkeep after taking damage from the card the following error message came up:

Code: Select all
An error has occured. You can copy/paste this message or save it to a file.
Please report this, plus what you tried to do, to:
   http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
   mtgerror@yahoo.com


Index: 3, Size: 3


Version:
Forge -- official beta: $Date: 2010-05-01 03:21:42 -0400 (Sat, 01 May 2010) $, SVN revision: $Revision: 916 $

OS: Windows XP Version: 5.1 Architecture: x86

Java Version: 1.6.0_21 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
   at java.util.ArrayList.RangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at forge.CardList.getCard(CardList.java:100)
   at forge.CardList.get(CardList.java:104)
   at forge.ComputerAI_General$1.addCard(ComputerAI_General.java:168)
   at forge.CardList.filter(CardList.java:191)
   at forge.ComputerAI_General.getMain1(ComputerAI_General.java:147)
   at forge.ComputerAI_General.playCards(ComputerAI_General.java:35)
   at forge.ComputerAI_General.main1(ComputerAI_General.java:26)
   at forge.ComputerAI_Input.think(ComputerAI_Input.java:41)
   at forge.ComputerAI_Input.showMessage(ComputerAI_Input.java:29)
   at forge.GuiInput.setInput(GuiInput.java:27)
   at forge.GuiInput.update(GuiInput.java:21)
   at java.util.Observable.notifyObservers(Unknown Source)
   at java.util.Observable.notifyObservers(Unknown Source)
   at forge.MyObservable.updateObservers(MyObservable.java:10)
   at forge.Phase.nextPhase(Phase.java:312)
   at forge.GuiDisplay4$25.actionPerformed(GuiDisplay4.java:777)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(Unknown Source)
   at javax.swing.SwingUtilities.notifyAction(Unknown Source)
   at javax.swing.JComponent.processKeyBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
   at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
   at javax.swing.JComponent.processKeyBindings(Unknown Source)
   at javax.swing.JComponent.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 22:38
by Almost_Clever
I bounced my Ethersworn Adjudicator with in response to the Computer playing a Terminate on it Vedalken Mastermind and then the game crashed:
Code: Select all
An error has occured. You can copy/paste this message or save it to a file.
Please report this, plus what you tried to do, to:
   http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
   mtgerror@yahoo.com


Index: 11, Size: 11


Version:
Forge -- official beta: $Date: 2010-05-01 03:21:42 -0400 (Sat, 01 May 2010) $, SVN revision: $Revision: 916 $

OS: Windows Vista Version: 6.0 Architecture: x86

Java Version: 1.6.0_11 Vendor: Sun Microsystems Inc.

Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 11, Size: 11
   at java.util.ArrayList.RangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at forge.CardList.getCard(CardList.java:100)
   at forge.CardList.get(CardList.java:104)
   at forge.ComputerAI_General$1.addCard(ComputerAI_General.java:168)
   at forge.CardList.filter(CardList.java:191)
   at forge.ComputerAI_General.getMain1(ComputerAI_General.java:147)
   at forge.ComputerAI_General.playCards(ComputerAI_General.java:35)
   at forge.ComputerAI_General.main1(ComputerAI_General.java:26)
   at forge.ComputerAI_Input.think(ComputerAI_Input.java:41)
   at forge.ComputerAI_Input.showMessage(ComputerAI_Input.java:29)
   at forge.GuiInput.setInput(GuiInput.java:27)
   at forge.GuiInput.update(GuiInput.java:21)
   at java.util.Observable.notifyObservers(Unknown Source)
   at java.util.Observable.notifyObservers(Unknown Source)
   at forge.MyObservable.updateObservers(MyObservable.java:10)
   at forge.InputControl.resetInput(InputControl.java:25)
   at forge.Input_StackNotEmpty.selectButtonOK(Input_StackNotEmpty.java:75)
   at forge.GuiInput.selectButtonOK(GuiInput.java:36)
   at forge.GuiDisplay3.okButtonActionPerformed(GuiDisplay3.java:999)
   at forge.GuiDisplay3.access$3(GuiDisplay3.java:998)
   at forge.GuiDisplay3$26.actionPerformed(GuiDisplay3.java:793)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
   at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Window.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 20 Aug 2010, 23:05
by Chris H.
Hmmm. Both of these errors look the same in that they both refer to ComputerAI_General.getMain1(). We added several lines of code in this section for the new BuffedBy and AntiBuffedBy SVars which are supposed to help the AI decide if it should cast it's spell during main1 or 2.

I have looked at the code in ComputerAI_General.getMain1() lines 143 through 174 and I am not sure why we have the index out of bounds exception. :(

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 21 Aug 2010, 06:10
by DennisBergkamp
Hmm, I can't reproduce these bugs...

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 21 Aug 2010, 09:16
by Hellfish
Code: Select all
for(int i = 0; i < buffed.size(); i++) {
                   Card buffedcard = antibuffed.get(i);
                   if (buffedcard.getSVar("AntiBuffedBy").length() > 0) {
                         String buffedby = buffedcard.getSVar("AntiBuffedBy");
                         final String bffdby[] = buffedby.split(",");
                         if (c.isValidCard(bffdby)) return true;
                   }       
                }
I believe this is the problem code. I got ALOT of those crashes when testing out Sutured ghoul, and changing the for statement to
Code: Select all
for(int i = 0; i < antibuffed.size(); i++) {
since that is what is actually referenced IN the loop got rid of the crashes for me. Not sure it sill does what it's intended to but hey. :P I'd commit it if I was sure it didn't break antibuffedby in any other way and my local copy wasn't in a complete state of debug.

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 21 Aug 2010, 11:45
by Chris H.
Hellfish wrote:[I believe this is the problem code. I got ALOT of those crashes when testing out Sutured ghoul, and changing the for statement to
Code: Select all
for(int i = 0; i < antibuffed.size(); i++) {
`
Thank you for finding the bug. And a thank you to Snacko for merging the fix into our SVN. :D

I am currently suffering from a bad head cold. I meant to post the new 08-20 beta yesterday and then spend the weekend in bed recovering.



This archive has an updated "run-forge.jar" file. This jar should take care of the Index Out Of Bounds Exception and it should also fix the morph problem with the new GUI.

`

Re: Forge 08/20/2010 (unofficial BETA) version

PostPosted: 21 Aug 2010, 15:18
by Mr.Chaos
Damn you guys are good.
Yup, that about says it all really. :D

Forge is like a fine wine, it gets better as it ages. 8)