baa-studios / castform Goto Github PK
View Code? Open in Web Editor NEWA Pokemon TCG Deck Registration Sheet generator in Flutter
License: GNU General Public License v3.0
A Pokemon TCG Deck Registration Sheet generator in Flutter
License: GNU General Public License v3.0
CastFORM is currently built with Flutter 3.7 (Dart 2), using the experimental Material Design 3 option.
This issue is meant to add a update reminder to our backlog, to upgrade to Flutter 3.13+ (Dart 3).
Okay, I think this is last attempt at fuzzing the decklist parser for bugs tonight:
I imagine like-basic energy cards, whether secret rares, or not, should be combined. Below is an example export from PTCGL that has two scenarios of basic energy that should be combined:
Decklist:
Pokémon: 10
1 Regieleki VMAX SIT 58
2 Regieleki V SIT 57
1 Zeraora SIT 56
3 Pachirisu SVI 68
1 Ting-Lu ex PAL 263
1 Pikachu PR-SV 27
1 Cyclizar ex PR-SV 18
1 Bombirdier SVI 219
1 Pelipper PAL 159
1 Pelipper PR-SV 22
Trainer: 17
2 Ultra Ball SVI 196
1 Boss's Orders PAL 265
1 Boss's Orders PAL 248
4 Professor's Research SVI 190
2 Escape Rope BST 125
1 Energy Recycler BST 124
4 Nest Ball SVI 181
3 Leafy Camo Poncho SIT 160
4 Electric Generator SVI 170
3 Beach Court SVI 167
2 Cynthia's Ambition BRS 138
1 Iono PAL 185 PH
1 Iono PAL 269
1 Iono PAL 254
1 Giacomo PAL 182
1 Giacomo PAL 267
1 Giacomo PAL 252
Energy: 4
11 Basic {L} Energy SVE 4
1 Basic {G} Energy FST 283
1 Basic {G} Energy PAL 278
1 Basic {L} Energy SVI 257
Total Cards: 60
CastFORM uses the A4 form image when generating PDFs, even if Letter is selected, resulting in misaligned text.
Sample_A4.pdf
Sample_Letter.pdf
It seems that users can inadvertently remove the .pdf
file extension when renaming the file in the Save As
dialog window.
We should get implement sanity checks and re-append the file extension if the user removes them manually
Given a deck list like above, the parseTrainerCards is producing Multiple Trainer objects for the same card.
Output from current parseTrainerCards
algo:
Trainer(name="Judge", quantity="3")
Trainer(name="Judge", quantity="1")
Trainer(name="Cheren's Care", quantity="1")
Trainer(name="Cheren's Care", quantity="1")
Instead it should produce one Trainer object for the same card, and combines their quantities.
Example Output:
Trainer(name="Judge", quantity="4")
Trainer(name="Cheren's Care", quantity="2")
See commit: 23d9766 for details on the unit tests added.
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.
This is from Issue #10 and I'm placing it in another issue post.
Just a todo reminder to add metadata
After running the installer from https://github.com/BAA-Studios/CastFORM/releases/tag/v2.0.1-alpha.1 provides some files, but running the program outputs the following error:
Operating System: Windows 10
I'm not always this lazy in life, but I recommend having a triple toggle on the left pane that checks whichever age division checkbox the user chooses.
If you prefer a challenge and dealing with edge cases, you could look to just calculate it based on the DoB and the current date. (The edge case is where someone will have a birthday that changes their age division between the time they print the form and the tournament date. I think that would be few and far between. so to get around that, you could have a toggle to disable automatically checking the age division boxes.)
Hi,
I'm unsure what one does on the official form when you have more trainers than rows on the form, but it doesn't look like this code gracefully handles this issue. Please see attached screenshot. Also, below is the exported decklist from LIVE, so you can try to recreate the issue:
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
1 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 Iono PAL 185 PH
1 Power Tablet FST 281
1 Judge FST 235
1 Avery CRE 187
1 Collapsed Stadium LOR 215
2 Boss's Orders BRS 132
Energy: 2
4 Fusion Strike Energy FST 244
3 Double Turbo Energy BRS 151
Total Cards: 60
Hi,
So the code handles regular and secret Power Tablet just fine, but there is something specific to Iono (and perhaps others?), where one exports a decklist from LIVE that includes a regular and FA version of Iono and they are not combined into a single row.
Decklist provided below for you to recreate issue: (Note, there is also regular and secret Power Tablet in this list and they are combined just fine.)
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
1 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 Iono PAL 185 PH
1 Power Tablet FST 281
1 Judge FST 235
1 Avery CRE 187
1 Collapsed Stadium LOR 215
2 Boss's Orders BRS 132
Energy: 2
4 Fusion Strike Energy FST 244
3 Double Turbo Energy BRS 151
Total Cards: 60
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
I updated the template without updating set abbreviation list. This is a todo for myself.
Copying deck strings from https://limitlesstcg.com/ will result in a deck string with no headers:
4 Ralts ASR 60
4 Kirlia SIT 68
2 Gardevoir ex SVI 86
1 Gardevoir CRE 61
1 Mewtwo V-UNION PR-SW 159
1 Mewtwo V-UNION PR-SW 162
1 Mewtwo V-UNION PR-SW 160
1 Mewtwo V-UNION PR-SW 161
1 Zacian V CEL 16
1 Manaphy BRS 41
1 Mew CEL 11
1 Radiant Greninja ASR 46
1 Klefki SVI 96
3 Professor's Research SVI 189
1 Judge SVI 176
1 Miriam SVI 179
1 Peonia CRE 149
1 Klara CRE 145
1 Serena SIT 164
1 Roxanne ASR 150
1 Boss's Orders BRS 132
4 Level Ball BST 129
4 Battle VIP Pass FST 225
3 Ultra Ball SVI 196
3 Fog Crystal CRE 140
1 Rescue Carrier CRZ 142
1 Pal Pad SVI 182
1 Sky Seal Stone CRZ 143
2 Temple of Sinnoh ASR 155
11 Psychic Energy 5
parsing a deck from this string does not work, because the removeHeader
method will delete a valid pokemon card.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.