Pack Opening Simulator
The plan is to add a "fun" booster pack opening simulator for Yu-Gi-Oh!
There is already a rather good one over at http://yugiohpacksimulator.com/ but I'd like to make one more akin to the Hearthstone card pack simulators.
When you open a pack, each card is scored and then each scored is added together to receive your "Pack Score". The eventual plan is to then be allowed submit this score to an online leaderboard to compare. This adds the "fun" factor to opening the pack.
Card score is calculated as follows: Score = (Card Database Views * Card Rarity Weighting)/2 Rarity Weightings:
Common = 1
Short Print = 1.5
Rare = 2
Super Rare = 2.5
Ultra Rare = 3
Secret Rare = 4
All Others: 3.5
Current Alpha version screenshots:
Start Screen after choosing a booster set:

Once the flip button is pressed:

Leaderboard is now live for the Alpha version of this: https://db.ygoprodeck.com/pack-leaderboard/
Changes since yesterday: -Fixed Leaderboard. I had it sorting wrongly and limited to displaying 50. When I woke up there was over 300! All data was still captured and will now display correctly. -Added Odds for the Last Card (the potential high rarity card). Y'all were pulling way too many rare cards way too easily! I've now added odds! Now it should be much harder to pull higher rarity cards.
Odds breakdown:
$cardodds = rand(0,99);
if ($cardodds <5){
//Secret Rare
}else if ($cardodds >=5 && $cardodds <= 15){
//Ultra Rare
}else if ($cardodds >15 && $cardodds <= 25){
//Super Rare
}else if ($cardodds >25 && $cardodds <= 35){
//Other Rarity
}else if ($cardodds >35){
//Common Rarity
}
You can now flip each card individually if you wish so.
Next on the TODO list:
- Enhance retry so it simply opens another pack.
- Spruce up css.
Added an animated card score counter when all cards are revealed.
- Fixed an issue where 8 cards may sometimes show instead of 9.
- Fixed an issue where the reveal card function wasn't disabled when all cards were revealed.
- Added notice to start screen about card art and set codes.
- Modified pack score counter css.
- Fixed an issue with Secret Rare colors on pack leaderboard.
TODO:
- Better Retry Button
- Increment score counter on each individual card flip.
-
Fixed an issue where you could accidentally double click to reveal the same card.
-
Score Counter now increments on each card flip.
-
Retry button is now fully ajax compatible and works much better. Giving you a new instance of the same pack you have chosen.
- Cleaned up a lot of the back-end code to make it much easier to quickly add card sets.
- Added 6 new card sets.
- Add a "Choose Set" button to easily allow you to pick a set again.
Features:
- Added multiple new sets including new ones.
- New sets use different formula for pulling cards as per: https://yugioh.fandom.com/wiki/Booster_Pack
- Old sets: 7 commons, 1 Rare and either 1 Common or Rarity higher than Rare.
- New sets: 7 commons, 1 Rare and at least a Super Rare.
- Added date stamp to the leaderboard.
- Slightly increase name length for leaderboard.
Bugs:
- Fixed a bug where you can hit the Retry button before score is fully calculated.
- Fixed a bug where you can hit the Flip button before the cards have fully loaded in.
- Fixed a bug where the score was re-calculated for that card if you clicked it again after it was flipped.
TODO:
- Limit leaderboard entry input to 20 characters.
- Short Print should appear in replacement of a common card, need to code in that functionality.
Features:
- Updated code to accommodate Speed Duel booster packs.
- Added 3 Speed Duel booster packs.
- Added "All Time Leaderboard" and changed the original leaderboard to a "Weekly Leaderboard".
- Weekly Leaderboard will be automatically archived once a week into the All Time leaderboard.
- Re-organized the list of boosters. This will receive another re-organization towards the end of completion.
Bugs:
- Fixed a bug where the card opening area height was too large when opening a Speed Duel booster pack.
- Added multitudes of new packs.
- Rearranged buttons on pack opening screen.
- Added Lazy Loading when choosing a card set. This should massively reduce page size/load, especially on mobile devices.
- Added link to the Leaderboards.
TODO:
- Finish off sets.
- Show card prices.
- TCG player purchase links.
- Added back-end support for Battle Packs.
- Added 3 Battle Pack boosters.
- Added the remaining core TCG sets.
- Fixed an issue with the Leaderboard Cron Job where it wasn't moving the weekly table into the archived table.
- Added some code that auto-scrolls the users up to the cards when it begins. This is especially useful on mobile devices so you don't have to manually scroll back up to start flipping cards.
- A bunch of Packs Added.
- Added Pack Number selector for Sealed Draft Mode.
Currently seems to be a bug with the "Tournament Pack" packs where you can occasionally get 2 cards instead of 3.
Start work on adding Mega Packs to pack sim.
Mega Packs:
2014-2019:
- 16 cards per pack
- 1 Prismatic Secret Rare
- 1 Ultra Rare
- 1 Super Rare
- 1 Rare
- 12 Commons
- Mega Packs 2014 - 2019 are now added.
- Duel Overload added.
- Fixed an issue where adding a mega pack to the leader board didn't add every card you opened.
- Fixed an issue where you couldn't manually reveal all mega pack cards.
- Added Secret Slayers
- Show greyed-out (unusable) version of future packs.
[suggestion] there are alot of other packs that have released over the years, including but not limited to the kaiba mega pack, the gold series, and dark beginnings/dark revelation series, and the star packs.
- Star Packs added.
Looked into adding Dark Beginnings 1/2 but they are difficult to implement. According to the wiki:
Dark Beginning (and all other Reprint Packs) always contain 6 Monster Cards, 3 Trap Cards, 3 Spell Cards, 1 Tip Card and 1 or even 2 rares.
This will be difficult to implement at the moment. Will look into adding other packs first.
- Ra Yellow Mega Pack added.
- Legendary Collection 2: The Duel Academy Years Mega Pack added.
- Updated mobile CSS and revised mobile layout for pack select screen and card reveal screen.
- Offset CSS and JS to separate files for optimizaiton.
- Legendary Collection Kaiba Mega Pack added.
- Slightly optimized all card set images.
Next on the agenda.
TODO: Dark Beginning 1 + Dark Beginning 2 followed by Dark Revelations 1,2,3 and 4.