PDA

View Full Version : Losing cards in TT



Bahamut2000X
11-13-2012, 11:09 PM
So I seem to find bugs (like the game dropping cards but nothing showing up, and the game breaking then taking my cards for "quitting" when the game can't end any other way).

Though I just had a game where it ended in a draw, no biggie, I click to do a new game, and notice all the cards I had in that match are now missing, which saddens me as I finally worked my way up to some decent level 2 cards. T_T

Is there anyway to get this fixed? Or will I forever be grinding my way to level 2 cards and hoping I don't encounter bugs stealing my entire deck?

EDIT: Looking at it a little more, the bug goes deeper. When I beat an opponent now who has card types of the ones I lost, it says I have X number of that type of monster (in one case I had 4, lost to the bug) but when I pick my cards for a match, I can't select it, and it says I have 0.

Rantz
11-13-2012, 11:24 PM
Under the Triple Triad tab, check the Active Battles menu. The game where you "lost" your cards is probably still there. Finished, but not ended. If so, click it and then click the Leave Match button to seal the deal and get your cards back. :D

Bahamut2000X
11-13-2012, 11:30 PM
Well that would do it. >.>

CimminyCricket
11-14-2012, 02:32 AM
Yeah, pay close attention to that. If you let it sit like that for too long, it will take those cards. :c(

CimminyCricket
11-15-2012, 11:17 PM
Also, as a heads up, I beat Dr. Kadowaki while after a draw and she had one of my cards in her hand when I won and it gave me the option of choosing it. I'm not good enough to do it, but it proposes the ability of "Duping" your TT cards and giving yourself more level 8, 9 and 10 cards.

Goldenboko
11-16-2012, 01:27 PM
Also, as a heads up, I beat Dr. Kadowaki while after a draw and she had one of my cards in her hand when I won and it gave me the option of choosing it. I'm not good enough to do it, but it proposes the ability of "Duping" your TT cards and giving yourself more level 8, 9 and 10 cards.

Figured that it would go both ways when you brought it up in the other thread - I've been looking through the source code of TT, I think the problem is that the game uses some array like "yourhand" and "opponentshand" or something to that degree. In theory it should be an easy fix, but Javascript isn't my area of expertise (yet). Of all the bugs this is the first one I plan on tackling, but it might take me a while.

Flying Mullet
11-16-2012, 03:41 PM
You need to have four arrays:

yourOriginalHand
opponentsOriginalHand
yourHand
opponentsHand

When starting the game and selecting cards, the choices should be stored in yourOriginalHand and opponentsOriginalHand. Then, when the actual game starts, you make a copy from yourOriginalHand and opponentsOriginalHand to yourHand and opponentsHand, respectively, and game play continues as normal with yourHand and opponentsHand being used. As cards are switched out through draws, it doesn't matter because your originals are untouched. Then, when someone wins, you display the cards for card selection from yourOriginalHand or opponentsOriginalHand.

Of course, this is all based on the overview that GB provided.

Goldenboko
11-16-2012, 04:20 PM
Yeah that's the solution I had, it was more of a "Where the smurf is this in both ends of the code (choosing cards, and victory choosing)". After that copying the originals to new arrays, and using those arrays in the ending card selection should be simple enough.

EDIT: Also I can't test any of this until I have a look install of our vB version. :greenie:

Flying Mullet
11-16-2012, 08:08 PM
Since all of the code is using variables named yourHand and opponentsHand, once you make a copy of each to yourOriginalHand and opponentsOriginalHand, the original arrays are left alone with the existing code running as usual against yourHand and opponentsHand. Then after the win but before the card exchange/take you can copy yourOriginalHand and opponentsOriginalHand over yourHand and opponentsHand and then the hands are correctly set up for the card exchange/take.

A couple of lines of code after card selection and a couple at game conclusion and hopefully it works. :)