It is currently 28 May 2017, 08:45
   
Text Size

MTG Forge 03/10 - with Quest Mode

Moderators: timmermac, moomarc, Chris H., DennisBergkamp, Rob Cashwalker, friarsol, CCGHQ Admins

MTG Forge 03/10 - with Quest Mode

Postby mtgrares » 10 Mar 2009, 18:28

I'm happy to announce that quest mode is working, but there may be a few bugs. Download

The basic idea is that you have to make your deck with the cards you are given and then you have to play in order to win more cards. In Easy mode you will get new cards after every game that you play, if you win or lose. In Medium you get new cards after you win or lose 2 games. Hard 3 games, Very Hard 4 games.

Your data is always saved in questData and if your current questData becomes corrupted you can use your previous questData which will be named something like questData-20. (The quest data is saved often so many backups will be created.)

Hm..what to say about quest mode. First it is awesome and you will get more addicted to Magic (if possible). The "Quest Length" is the number of games that you have to win. The only progression in the quest mode is that you get different titles, "Friday Night Champion", etc.. You can keep playing more games after you get to Level 10, which is World Champion. The user interface tells you this information but I'll tell it to you here, easy is 10 games, medium 20, hard 30, very hard 40. (This next info is not displayed.) In easy you get new cards after every game whether you win or lose. In medium you get new games if you win or lose 2 games (you don't have to win or lose 2 games in a row). Hard 3 games, Very Hard 4 games.

The idea is that even if you lose you are still progressing. And yes you can cheat by starting a game and then conceding.

(I changed from Easy being 50 games to Very Hard being only 40. I don't mind playing with random, crappy cards but I like to use new random, crappy cards also, lol.)

For now the deck editor will let you edit the AI decks, in the "public" version the user won't be able to do this. This will allow you guys to add some good decks for the AI to play. Right now there are only about 8 AI decks, I wanted to add more but I ran out of time and patience. The Deck Editor's rename just works like copy and needs to be fixed. And editing the AI's decks are a little slow since it has to load up all of the cards.

The decks I used for the AI are listed below and well as some suggested people to play against. I found playing against Morpheus more interesting than trying to beat a generic name like Sam. Feel free to add names, remove names, and suggest new ones.

There are a million little things to work on and improve such as custom quests. I made the number of cards that you win as 10 but some people might prefer the usual 15 (or 14 if you don't count the basic land). The more games the user wins, the AI could use better decks. More titles (ranks) could be included, right now there are 11, but there are only 10 "levels" since you start at level 0 Card Flopper.

This is based on the 03/08 version. I kept track of all of my changes which I attached below. A listing of the changes are in the source code in the file aa_change_log.java Most of the important data is in QuestData which adds new cards, keeps track of wins and loses, and decides when you get new cards, etc... Also the "AI Smooth Land" button in Gui_Quest.java doesn't work, I forgot to see how you did it in Gui_NewGame.java

To begin with I thought adding a quest mode wouldn't be too hard and QuestData is very simple by itself but incorporating it into the larger project was hard. I probably spent around 30 hours on this. I'm just glad it works :)

Sorry for the long post, skip over any info that is boring :lol:

AI Decks:
Genghis Khan - green-elvish-piper60
Albert Einstein - red-kiki-jiki
Superman - white-simple
Silver Surfer - blue-battle-wits
Wolverine - 4-Planeswalk-Chandra
Frodo - green-Baru
Luke Skywalker - red3
Morpheus - black-simple

Suggest AI Deck Names:
Abraham Lincoln
Napoleon
Newton
Jimi Hendrix
George Washington
Richard Garfield
Peter Pan
Neo


---------------------------------------
Source code changes

created class QuestData
created class QuestData_BoosterPack
created class Gui_Quest
created class Gui_QuestOptions
created class Gui_Quest_DeckEditor

Changes
1. added variable QuestData to AllZone
2. added "Quest Mode" JButton to gui and modified Gui_NewGame.addListeners()
3. I think you have to update Gui_Quest.playGameButton_actionPerformed(), because it calls AllZone.GameAction.newGame()
4. added line to Gui_NewGame constructor - AllZone.QuestData = null;
5. modified Qui_WinLose.quitButton_actionPerformed()
6. added method to CardList

Code
1. added variable QuestData to AllZone
//////////////////////////////////
class AllZone
{
public static QuestData QuestData = null;


2. added "Quest Mode" JButton to gui and modified Gui_NewGame.addListeners()
//////////////////////////////////

questButton.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
//close this windows
//can't use this.dispose() because "this" object is an ActionListener
Gui_NewGame.this.dispose();

new Gui_QuestOptions();
}
});



4. added line to Gui_NewGame constructor - AllZone.QuestData = null;
/////////////////////////////////////
public Gui_NewGame()
{
AllZone.QuestData = null;



5. modified Qui_WinLose.quitButton_actionPerformed()
//////////////////////////////////////////
void quitButton_actionPerformed(ActionEvent e)
{
//are we on a quest?
if(AllZone.QuestData == null)
new Gui_NewGame();
else
{
WinLose winLose = Constant.Runtime.WinLose;
QuestData quest = AllZone.QuestData;

if(winLose.getWin() == 2)
{
quest.addWin();
if(quest.shouldAddCards())
{
quest.addCards();
JOptionPane.showMessageDialog(null, "You have won new cards");
}
}
else
quest.addLost();

winLose.reset();

QuestData.saveData(quest);
new Gui_Quest();
}//else - on quest

dispose();

//clear Image caches, so the program doesn't get slower and slower
ImageUtil.rotatedCache.clear();
ImageCache.cache.clear();
}


6. added method to CardList
///////////////////////////////

//removes one copy of that card
public void remove(final String cardName)
{
CardList find = this.filter(new CardListFilter()
{
public boolean addCard(Card c)
{
return c.getName().equals(cardName);
}
});

if(0 < find.size())
this.remove(find.get(0));
else
throw new RuntimeException("CardList : remove(String cardname), error - card name not found: " +cardName +" - contents of Arraylist:" +list);

}//remove(String cardName)
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 11 times

Re: MTG Forge 03/10 - with Quest Mode

Postby Huggybaby » 10 Mar 2009, 18:43

Excellent, this will be sweet, thanks rares old chap!
User avatar
Huggybaby
Administrator
 
Posts: 3031
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 541 times
Been thanked: 559 times

Re: MTG Forge 03/10 - with Quest Mode

Postby Chris H. » 10 Mar 2009, 18:59

Thank you Rares for your hard work and dedication. I am sure that I will have a good time play testing the Quest variant. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: MTG Forge 03/10 - with Quest Mode

Postby DennisBergkamp » 10 Mar 2009, 19:28

Awesome, thanks a lot for this!!!
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby mtgrares » 10 Mar 2009, 19:41

Everything seems to work and I actually had a really great time playing the quest mode. I only played a few games, but it was fun trying to beat the computer with such a limited card pool. I actually felt "poor" the first time I start a quest because I had so few cards.

I forgot to mention it but I edited common.txt, uncommon.txt, rare.txt in order to try to make the booster packs better. These files were edited by my own sense of "would I like use this card". I removed many 1 power creatures unless that had flying or some other ability like Mogg Fanatic. As always, feel free to change anything. I included a few of the ulta-new morph cards but I'm sure I missed a few.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 11 times

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 00:45

Awesome news Rares! Id like to suggest that the quest mode files be separated from the normal rarities files. That way a person can download one client for all modes and use them differently.

Also it is probably smart to include things like the pics folder that Dennis has been including.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 02:32

Of course the biggest problem with this is that the AI cheats and exploits the bugs it has insanely (10/10 Baru because the AI managed to get a forest for 6 turns in a row?) As long as Baru is this broken, it is going to be nearly impossible to play against the AI playing this deck. I noticed alot of the AI decks have cards that are clearly not correct. It would be smarter to include ONLY the cards that are not broken/buggy.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby Chris H. » 11 Mar 2009, 02:59

GandoTheBard wrote:Awesome news Rares! Id like to suggest that the quest mode files be separated from the normal rarities files. That way a person can download one client for all modes and use them differently.

Also it is probably smart to include things like the pics folder that Dennis has been including.
I'm noticing that the questData-{number} files have a tendency to build up in number in the root directory. It might be nice to have a "Quest" sub-directory which could contain these save game files and any separate quest-rarity files.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 03:07

The seems to be a problem with how the quest mode decks are saved. In order to not have your deck named "test" which is exceedingly unhelpful as names go, you need to remake your deck from scratch each time you change it, apparently. Needless to say it should just save as the current name selected.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 03:09

Chris H. wrote:
GandoTheBard wrote:Awesome news Rares! Id like to suggest that the quest mode files be separated from the normal rarities files. That way a person can download one client for all modes and use them differently.

Also it is probably smart to include things like the pics folder that Dennis has been including.
I'm noticing that the questData-{number} files have a tendency to build up in number in the root directory. It might be nice to have a "Quest" sub-directory which could contain these save game files and any separate quest-rarity files.
Not only is it ridiculous it seems out of hand. I have played 6 times with the quest mode so far and have 19 quest data files? way out of hand.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 04:21

Another way to ensure difficulty level is enforce deck size minimums for the player. 35 for easy, 40 for normal, 50 for hard and 60 for very hard. This would teach players about how to maximize the potential for a deck based on its size. Could be useful.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 04:41

A bug I wouldn't encounter normally since I don't use this card in normal circumstances since it is incomplete:

White Shield Crusader blocks my mogg fanatic. During normal combat damage assignment I sack my mogg to deal 1 to the player. White Shield Crusader lives with 1 assigned damage on it. Had to kill it with a spell. If I had known it had erroneous protection from red Id have funeral charmed it first. :/
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 04:47

*notes for the 4th time in a row the AI managed to skip my block phase with me having flying blockers* seems pretty darned weird as Ive never had this happen this many times in a row during any normal game.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 05:32

Another thing that needs fixing is the size of the deck editor columns. Dennis fixed these in the regular edition but somehow they have reverted back to narrow equal sized columns that make sorting a pain.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTG Forge 03/10 - with Quest Mode

Postby GandoTheBard » 11 Mar 2009, 05:33

Aside from the normally broken cards is it really ok to use cards like Epic Proportions which are just plain completely wrong? Why not make your own cards instead? That way you could at least claim originality and artistic license? Thats my view anyway.
*notes at least one deck uses Tortuga (with my art :D since I have my artcard in its place.)*

And on that topic I happen to have half a set (almost) completed that I posted on my site just for kicks. I haven't done enough peices to finish it and some of the art really didnt adjust well to downsizing but its there if you want to use any of the cards:

http://outofthebrokensky.com/mse-sets/raven2/ ==edit== replaced that url with a better example. I stopped working on this awhile back after my machine managed to lose about 100 changes. I guess I never got around to uploading the correct files.
Last edited by GandoTheBard on 11 Mar 2009, 06:58, edited 2 times in total.
visit my personal homepage here: http://outofthebrokensky.com
visit my art page here: http://gandothebard.deviantart.com
User avatar
GandoTheBard
Tester
 
Posts: 1038
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Forge

Who is online

Users browsing this forum: cc-drake and 11 guests


Who is online

In total there are 12 users online :: 1 registered, 0 hidden and 11 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: cc-drake and 11 guests

Login Form