Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form can print a row with qty, but blank trainer name #10

Closed
generalraikou opened this issue Jul 22, 2023 · 4 comments
Closed

Form can print a row with qty, but blank trainer name #10

generalraikou opened this issue Jul 22, 2023 · 4 comments

Comments

@generalraikou
Copy link

As requested, putting this into its own issue...

So it looks like the code at least checks for 60 cards, otherwise it'll print nothing on the form...but look at this one. if I remove one of the Iono rows, and then rewrite the last trainer card as just "Collapsed Stadium" and make sure my deck adds up to 60, it still overprints the rows, but the last row is blank.

Decklist:
Pokémon: 10
1 Eiscue BRS 44
1 Meloetta FST 124
1 Mew VMAX LOR-TG 30
2 Genesect V FST 185
1 Genesect V FST 255
2 Mew VMAX FST 114
1 Mew V FST 250
3 Mew V FST 113
1 Drapion V LOR 182
1 Genesect V FST 254

Trainer: 23
2 Iono PAL 254
1 Switch CRZ 144
1 Escape Rope BST 125
1 Forest Seal Stone SIT 156
1 Choice Belt ASR 211
2 Feather Ball ASR 141
1 Pal Pad SVI 182
2 Lost Vacuum LOR 162
1 Lost City LOR 161
3 Cram-o-matic FST 229
4 Battle VIP Pass FST 225
2 Nest Ball SVI 255
2 Path to the Peak CRE 148
3 Ultra Ball BRS 150
1 Cyllene ASR 201
3 Power Tablet FST 236
3 Elesa's Sparkle FST 233
1 Power Tablet FST 281
1 Judge FST 235
1 Avery CRE 187
3 Collapsed Stadium

Energy: 2
4 Fusion Strike Energy FST 244
3 Double Turbo Energy BRS 151

Total Cards: 60

Screenshot:
blank row on form

@generalraikou
Copy link
Author

I don't want to raise another issue or reopen a closed issue to ask a question, but I noticed in a previously closed issue that you said that filling out the Coll # won't be done. However the form says it requires it. 5.3.2 in the tournament rules say that the list must be complete...one could interpret that as having the collection #, as instructed on the form.

https://assets.pokemon.com//assets/cms2/pdf/play-pokemon/rules/play-pokemon-tournament-rules-handbook-07132023-en.pdf

If PTCGL or other decklist tools provide the Collection #, is it really a lot of effort to parse that and place it on the form as well? I only see one set name that extends past the column boundary, (LOR-TG), that may make formatting a little difficult, but having a complete form may be worth pursuing.

@generalraikou
Copy link
Author

Btw, my guess is there is code reuse and this extends to pokemon and energy....example decklist to prove it happens with energy.

Pokémon (21)
4 Lugia V SIT 138
3 Lugia VSTAR SIT 139
4 Archeops SIT 147
2 Lumineon V BRS 40
2 Tyranitar V BST 97
1 Single Strike Urshifu V BST 85
1 Single Strike Urshifu VMAX BST 86
1 Yveltal FST 175
1 Stonjourner BST 84
1 Squawkabilly ex PAL 169
1 Radiant Tsareena SIT 16
1 Pikachu PAL 62

Trainer (25)
3 Professor's Research SVI 189
3 Boss's Orders PAL 172
2 Iono PAL 185
1 Professor Burnet PR-SW 167
4 Ultra Ball SVI 196
4 Capturing Aroma SIT 153
2 Nest Ball SVI 181
2 Urn of Vitality BST 139
2 Mesagoza SVI 178
2 Collapsed Stadium BRS 137

Energy (14)
4 Single Strike Energy BST 141
3 Double Turbo Energy BRS 151
3 Gift Energy LOR 171
1 V Guard Energy SIT 169
1 Jet Energy PAL 190
1 Reversal

@Bratah123
Copy link
Member

Yeah so this is intended behavior because we don't intend the user to manually type out their decklists, but instead copy paste it from Limitless, PTCGL, or PTCGO which will never have this case (that i know of)?

@KOOKIIEStudios
Copy link
Contributor

Blank Last Row

The reason this happens is because the parser strips out the 2 trailing words when determining the name of the card. This can be resolved by changing the algorithm to take into account manual input for deck-strings that don't come with set abbreviations and collection numbers at the end of each line.

However, that would technically be out of scope for the project, given that CastFORM is intended to support deck-strings from existing sites. At first glance, one might think that we could introduce a type check when parsing, to check if the final term is numeric and throw a validation error. However, given that the holo cards can present with a trialing PH, this quickly falls apart.
We could plausibly put such a validation step on the backburner as a potential future feature, but we probably won't be implementing this any time soon, given the project scope.

Provision of Collection Numbers:

Unrelated issues should be split up - Brandon has split it up in #13.
We actually have a question tag for issues - it's normal to have questions be asked in issues, don't worry.

As can be inferred from the above, the collection number is excluded when parsing. Resolving this issue would warrant modifying the parser algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants