It is currently 26 Apr 2024, 05:41
   
Text Size

MTGForge 01/04 (unofficial BETA) version

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: MTGForge 01/04 (unofficial BETA) version

Postby GandoTheBard » 05 Jan 2009, 23:58

Yeah it seems to me that having the class Card implement different actions based on functionality is a good idea. What I dont get however is why there isn't a member called OnLeavesPlay to go with OnComesIntoPlay as those are the twins here...then you dont actually need to worry if the card is removed or destroyed or bounced or shuffled. If a card has a more specific instruction (when goes to graveyard etc) you add in methods to handle those instructions OnGoesToGrave, OnIsRemovedFromGame.

I dont think bouncing or shuffling actually triggers any seconday effects in any cards.

And with cards like Gaea's Blessing where if it gets milled it shuffles the graveyard to the library you can use OnMilledToGrave, and for Madness etc you can use OnDiscardToGrave. Having this type of control would probably make a ton of cards available which are currently problematic or even undoable.

:) Thank you Dennis for having fun with Rares' code! And thanks again Rares for providing your code for people to play with. :D
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby Chris H. » 06 Jan 2009, 14:25

DennisBergkamp wrote:By the way, can you reproduce that Ajani Goldmane bug and tell me how / what happens exactly? No matter what I try, I can't seem to use his abilities during my opponents turn
I put together a test deck with just the five Planeswalkers and some land. I have set the Menu option to stop at the end of the computer's turn. When the games states:

"Computer's End of Turn - Play Instants and Abilities"

I find that I am still able to use the abilities of all five Planeswalkers. I have tried this several times with the same results. Puzzling.

I have spent some time looking over the source code. It has been many a year since I have done any coding and my skills in this area have atrophied.

There may be a problem that is unique to my system. I have an Apple computer using the Apple supplied Leopard OS and the Java run time that is supplied for this system. I found a system preference that allows me to chose which version of the Java Virtual Machine to use for applets, Java apps, Web Start apps, and command line tools. I have set the preferences to J2SE 5.0 and then tried J2SE 1.4.2.

At this point I think it would be best to step back and take a wait and see type of attitude. Others are downloading and trying the beta version. Someone will likely give the Planeswalkers a thorough test and will report back their own observations.

I would like to thank you and everyone else for participating in this group and in our shared interests. The code base is fairly large and we have so many cards that interact with each other. It is amazing that things work as well as they do.

test-planeswalker:
40 Total Cards

0 Creatures
-------------

20 Spells
----------
4x Ajani Goldmane
4x Chandra Nalaar
4x Elspeth, Knight-Errant
4x Garruk Wildspeaker
4x Liliana Vess

20 Land
--------
10x Scrubland
10x Taiga
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: MTGForge 01/04 (unofficial BETA) version

Postby GandoTheBard » 06 Jan 2009, 14:48

Chris it isnt your machine. Or your version of Java Runtime. It is a bug I can confirm.

Another bug with the newer cards:
Flowstone Charger does not pump up when it attacks as it should
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby GandoTheBard » 06 Jan 2009, 15:04

Brion Stoutarm should give you life when you use its sacrifice ability since it has life link but it doesn't.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby GandoTheBard » 06 Jan 2009, 15:19

Ranger of Eos' ability doesn't work when returned from the graveyard.
visit my personal homepage here: http://outofthebrokensky.com

Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
User avatar
GandoTheBard
Tester
 
Posts: 1043
Joined: 06 Sep 2008, 18:43
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby mtgrares » 06 Jan 2009, 15:22

The conceptual problem I had with zone changing triggers (anything like "when this card comes into play" or "if this card leaves play" or "if this card is put into the graveyard") is at first glance it seems like there could a "master method" like moveCard(Card c, Zone to, Zone from) that would check for all the zone triggers, but "when this comes comes into play" involves moving a card from the stack to the "in play" zone, BUT a "card" isn't on the stack, one of the spells or abilities that a card holds is on the stack so moveCard() doesn't work because of the stack.

In version 2 I'm going to just put Card objects on the stack and get the spell or ability by calling Card.getStackSpellAbility() This way moveCard() would always be called whenever a card is moved from zone to zone and could check for all zone changing trigger event. If you want to move a card at all, you would have to use moveCard().
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: MTGForge 01/04 (unofficial BETA) version

Postby DennisBergkamp » 06 Jan 2009, 16:51

I put together a test deck with just the five Planeswalkers and some land. I have set the Menu option to stop at the end of the computer's turn. When the games states:

"Computer's End of Turn - Play Instants and Abilities"
Ahh, you know what, I didn't even know this was possible! The way I tried playing the Planeswalker's abilities, was by responding to whatever my opponent put on the stack during his turn. And whenever he did, I was unable to, so I thought this was fixed. But I guess not... I'll have a look at it again, with the EOT stop.

Another bug with the newer cards:
Flowstone Charger does not pump up when it attacks as it should

Brion Stoutarm should give you life when you use its sacrifice ability since it has life link but it doesn't.

Ranger of Eos' ability doesn't work when returned from the graveyard.
Hmm, Flowstone Charger I never actually implemented (I mentioned this already on the first beta's thread). I put it in there as a test, when I was testing cards like Hypnotic Specter and Shadowmage Infiltrator. Maybe I'll do it for the next version?

Yikes, Brion Stoutarm I will fix, I just never realized lifelink would trigger when using his ability. Kind of rusty on the magic rules :oops:
Currently, I'm only checking for lifelink on combat damage, this brings up a good point: what if cards like Prodigal Sorcerer get lifelink somehow... anyway I will look into this for sure.

Ranger of Eos, I coded kind of funky. I'll have a look at it again to see if I can do that one the correct way. I seem to remember Flametongue Kavu triggering when bringing it back into play, I'm just not using the stack correctly in this case I think.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby Chris H. » 06 Jan 2009, 18:09

DennisBergkamp wrote:Ahh, you know what, I didn't even know this was possible! The way I tried playing the Planeswalker's abilities, was by responding to whatever my opponent put on the stack during his turn.

Yikes, Brion Stoutarm I will fix, I just never realized lifelink would trigger when using his ability. Kind of rusty on the magic rules.
It is a good thing when complex problems turn out to have a simply solution. =D>

When Brion Stoutarm is fixed I would like to see a deck with Brion Stoutarm, Bitterblossom and Elspeth, Knight-Errant. The king of Tim's. :lol:
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: MTGForge 01/04 (unofficial BETA) version

Postby Chris H. » 06 Jan 2009, 18:12

GandoTheBard wrote:Chris it isnt your machine. Or your version of Java Runtime. It is a bug I can confirm.
Thank you for saving my sanity. :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: MTGForge 01/04 (unofficial BETA) version

Postby jpb » 06 Jan 2009, 20:18

but "when this comes comes into play" involves moving a card from the stack to the "in play" zone, BUT a "card" isn't on the stack, one of the spells or abilities that a card holds is on the stack so moveCard() doesn't work because of the stack.
Don't read this post if you don't want to get technical and nitpick.

But if we do want to get technical I do not believe a card ever comes into play, but instead a <name of the card> comes into.

I believe spells should have a one to one relationship with a card. you should be able to do spell.getCard() and card.getSpell(). I've always envisioned that when you play a spell the card is removed from it's current location (most likely your hand) and then put in an inaccessible zone, this zone does nothing but holds the card for reference by the spell or object in play, etc... The confusion is that in the card game of magic we use the same physical item to represent the card and what it resolves to. Having a relationship between spell and card objects and putting the card object in a new zone would allow you to implement the comes into play very eloquently.

Basically I think the idea of moveCard is incorrect and if mtgforge insists on using it to stay simple it will run into these sorts of problems consistently. It is my understanding that the only places cards exist are in 1) hand 2) graveyard 3) library 4) removed from game 5) in zones created temporarily by specific cards, ie. cold storage
jpb
 
Posts: 132
Joined: 05 Sep 2008, 13:12
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby DennisBergkamp » 06 Jan 2009, 23:05

Hey jpb, good to see you're still around :)
I agree by the way, spells should definitely have a one to one relationship with cards. Hopefully this will be the case in V2 (if it will ever see the light of day... we can only hope).

About some of the previous bugs Chris and Gando found:

- Brion Stoutarm I fixed.
- Ranger of Eos now uses the stack correctly, I don't know what I was smoking when I coded it, but anyway it's fixed now, and its ability triggers when it comes into play through graveyard recursion.
- Planeswalker bug is now (finally) fixed, I was not able to use any of the abilities of Ajani Goldmane during the end of turn step.

- I also coded a few new cards, I found out how to code cards that trigger on "whenever a player plays a spell". So I made Standstill, Gilt-Leaf Archdruid (coding this card gave me a headache), Verduran Enchantress and Sol'Kanar the Swamp King.

I will release another Beta in the next few days, probably as soon as I've added in Orpheu's stuff.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby DennisBergkamp » 07 Jan 2009, 18:43

Flowstone Charger does not pump up when it attacks as it should
I fixed this. When I was fixing this, I noticed Zur the Enchanter and Yore-Tiller Nephilim are STILL bugged. Their ability will only trigger once, then never again.
Another thing to fix :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: MTGForge 01/04 (unofficial BETA) version

Postby Chris H. » 07 Jan 2009, 21:36

DennisBergkamp wrote:Implemented the Exalted keyword.
I'm play testing the new Exalted cards. Are the Exalted effects supposed to be cumulative or not?

I had three creatures in play with Exalted and I attacked with a Covert Operative. The Covert Operative is normally a 3/2 and the computer pumped it up to a 4/3 but no further.

I tried to assign this deck to the computer to see if the computer could play these cards. I clicked on the Start Game button and the game would not start, it stayed at the New Game window. I have noticed this several times before in recent months.

Has anyone else noticed this problem? Any ideas or solutions?
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: MTGForge 01/04 (unofficial BETA) version

Postby Incantus » 07 Jan 2009, 22:02

jpb wrote:Basically I think the idea of moveCard is incorrect and if mtgforge insists on using it to stay simple it will run into these sorts of problems consistently. It is my understanding that the only places cards exist are in 1) hand 2) graveyard 3) library 4) removed from game 5) in zones created temporarily by specific cards, ie. cold storage
This is incorrect. Cards also exist on the stack and in play (where they are called spells and permanents, respectively). Also, if you don't do moveCard, how will you implement cards that have come's into play replacement effects interacting with cards that prevent other cards from coming into play? (like Cloning an animated Forbidding Watchtower when a Worms of the Earth is in play).
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: MTGForge 01/04 (unofficial BETA) version

Postby DennisBergkamp » 07 Jan 2009, 22:21

I'm play testing the new Exalted cards. Are the Exalted effects supposed to be cumulative or not?

I had three creatures in play with Exalted and I attacked with a Covert Operative. The Covert Operative is normally a 3/2 and the computer pumped it up to a 4/3 but no further.

I tried to assign this deck to the computer to see if the computer could play these cards. I clicked on the Start Game button and the game would not start, it stayed at the New Game window. I have noticed this several times before in recent months.

Has anyone else noticed this problem? Any ideas or solutions?
My God, my understanding of the rules is bad. Yes, you're right, they're supposed to be cumulative (a quick search online cleared this up).
I'll try to fix this too.

As for the other problem, I think this happens sometimes when there's not enough cards in the deck you're giving the computer. The land stack logic doesn't work then. I'm not sure what the minimum is, but 30 - 40 cards should be fine.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Forge

Who is online

Users browsing this forum: No registered users and 173 guests


Who is online

In total there are 173 users online :: 0 registered, 0 hidden and 173 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 173 guests

Login Form