├── public ├── js │ └── .gitkeep ├── css │ └── .gitkeep ├── favicon.ico ├── icon-120.png ├── icon-192.png ├── fonts │ ├── thronesdb.eot │ ├── thronesdb.ttf │ └── thronesdb.woff ├── images │ ├── no-card.png │ ├── factions │ │ ├── greyjoy.png │ │ ├── martell.png │ │ ├── stark.png │ │ ├── tyrell.png │ │ ├── baratheon.png │ │ ├── lannister.png │ │ ├── targaryen.png │ │ └── thenightswatch.png │ └── rulesreference │ │ ├── rr1.png │ │ ├── rr2.png │ │ ├── rr3.png │ │ ├── rr4.png │ │ ├── rr5.png │ │ ├── rr6.png │ │ ├── rr7.png │ │ ├── es │ │ ├── rr1.png │ │ ├── rr2.png │ │ ├── rr3.png │ │ ├── rr4.png │ │ ├── rr5.png │ │ ├── rr6.png │ │ ├── rr7.png │ │ └── rr4b.png │ │ ├── rr4b.png │ │ ├── timing-cheatsheet-jpg-thumbnail.jpg │ │ └── timing-cheatsheet-pdf-thumbnail.jpg ├── robots.txt └── index.php ├── var ├── cache │ └── .gitkeep └── sessions │ └── .gitkeep ├── migrations ├── .gitignore ├── Version20220806163946.php ├── Version20240214040710.php ├── Version20250803234943.php ├── Version20201213002601.php ├── Version20210217015924.php ├── Version20221109013044.php ├── Version20221110155006.php ├── Version20201206205310.php ├── Version20190329042504.php ├── Version20190508061240.php ├── Version20190922213719.php └── Version20201230234348.php ├── src ├── Entity │ ├── .gitignore │ ├── DeckslotInterface.php │ ├── DecklistslotInterface.php │ ├── SlotInterface.php │ ├── AuthCode.php │ ├── AccessToken.php │ ├── RefreshToken.php │ ├── Client.php │ ├── BannerAlertInterface.php │ ├── TypeInterface.php │ ├── TournamentInterface.php │ ├── DeckchangeInterface.php │ ├── ReviewcommentInterface.php │ ├── CommentInterface.php │ ├── CommonDeck.php │ ├── FactionInterface.php │ └── CycleInterface.php ├── Controller │ ├── .gitignore │ ├── SecurityController.php │ └── LocaleAwareTemplating.php ├── Repository │ ├── .gitignore │ ├── BannerAlertRepository.php │ ├── RestrictionRepository.php │ ├── TypeRepository.php │ ├── CycleRepository.php │ ├── FactionRepository.php │ ├── PackRepository.php │ └── DecklistRepository.php ├── .htaccess ├── .preload.php ├── DataFixtures │ ├── AppFixtures.php │ ├── LoadTypeData.php │ ├── LoadTournamentData.php │ └── LoadFactionData.php ├── Resources │ └── FOSOAuthServerBundle │ │ └── views │ │ ├── layout.html.twig │ │ └── Authorize │ │ └── authorize_content.html.twig ├── Listener │ └── CoreExceptionListener.php ├── DQL │ ├── PowerFunction.php │ └── ReplaceFunction.php ├── Services │ ├── DataimportFileLocator.php │ └── AgendaHelper.php └── Command │ ├── DeleteInactiveCommand.php │ ├── CheckMultipleCommand.php │ └── ListRestrictionsCommand.php ├── translations └── .gitignore ├── templates ├── Decklist │ ├── deck-content.html.twig │ ├── author-and-description.html.twig │ ├── table-graph-costs.html.twig │ ├── table-graph-strengths.html.twig │ ├── table-predecessor.html.twig │ ├── table-successor.html.twig │ ├── export-modal.html.twig │ ├── comments.html.twig │ ├── delete-modal.html.twig │ └── compare-modal.html.twig ├── Builder │ ├── tab-pane-charts.html.twig │ ├── tab-pane-draw.html.twig │ ├── download_list.html.twig │ ├── bulkclone.html.twig │ ├── deck-charts.html.twig │ ├── no-decks.html.twig │ ├── tab-pane-infos.html.twig │ ├── no-decks-text.en.html.twig │ ├── no-decks-text.de.html.twig │ ├── no-decks-text.es.html.twig │ ├── draw-simulator.html.twig │ ├── tab-pane-history.html.twig │ └── directimport.html.twig ├── Search │ ├── card-pack.html.twig │ ├── card-flavor.html.twig │ ├── card-errata-short.html.twig │ ├── card-errata-long.html.twig │ ├── paginationitem.html.twig │ ├── card-name.html.twig │ ├── card-illustrator.html.twig │ ├── card-text.html.twig │ ├── card-info.html.twig │ ├── card-name-with-link.html.twig │ ├── card.html.twig │ ├── card-faction.html.twig │ ├── card-work-in-progress.html.twig │ ├── setnavigation.html.twig │ ├── display-short.html.twig │ ├── searchbar.html.twig │ ├── display.html.twig │ ├── pagination.html.twig │ ├── display-scan.html.twig │ ├── card-props.html.twig │ ├── display-list.html.twig │ ├── display-spoiler.html.twig │ └── searchoptions.html.twig ├── banner-alerts.html.twig ├── Default │ ├── error.html.twig │ ├── google-analytics.html.twig │ ├── rulesreference.html.twig │ ├── tournamentregulations.html.twig │ ├── about.en.html.twig │ ├── pagination.html.twig │ ├── about.de.html.twig │ ├── about.es.html.twig │ ├── recent_reviews.html.twig │ ├── donators.en.html.twig │ ├── donators.es.html.twig │ └── donators.de.html.twig ├── bundles │ ├── TwigBundle │ │ └── Exception │ │ │ ├── error404.html.twig │ │ │ └── error500.html.twig │ └── FOSUserBundle │ │ ├── Registration │ │ ├── register_content.html.twig │ │ └── register.html.twig │ │ ├── layout.html.twig │ │ ├── Security │ │ ├── login.html.twig │ │ └── login_content.html.twig │ │ └── Resetting │ │ ├── request.html.twig │ │ └── request_content.html.twig ├── Restrictions │ ├── restricteddescription.html.twig │ ├── cardlist.html.twig │ ├── poddescription.html.twig │ ├── index.html.twig │ └── podlist.html.twig ├── User │ └── remind-no-token.html.twig ├── Emails │ ├── newcomment_author.html.twig │ ├── newcomment_commenter.html.twig │ ├── newreviewcomment_author.html.twig │ └── newcomment_mentionned.html.twig ├── alerts.html.twig ├── Modale │ ├── diff.html.twig │ ├── export.html.twig │ ├── card.html.twig │ ├── file.html.twig │ ├── delete_list.html.twig │ ├── delete.html.twig │ ├── tag_clear.html.twig │ ├── tag_add.html.twig │ └── tag_remove.html.twig ├── Export │ ├── sortedbycycle.txt.twig │ ├── octgn.xml.twig │ └── default.txt.twig ├── apiset.xml.twig └── footer.en.html.twig ├── config ├── packages │ ├── test │ │ ├── twig.yaml │ │ ├── swiftmailer.yaml │ │ ├── validator.yaml │ │ ├── framework.yaml │ │ └── monolog.yaml │ ├── prod │ │ ├── routing.yaml │ │ ├── deprecations.yaml │ │ ├── monolog.yaml │ │ └── doctrine.yaml │ ├── routing.yaml │ ├── sensio_framework_extra.yaml │ ├── fos_js_routing.yaml │ ├── ramsey_uuid_doctrine.yaml │ ├── swiftmailer.yaml │ ├── bazinga_js_translation.yaml │ ├── translation.yaml │ ├── dev │ │ ├── swiftmailer.yaml │ │ └── monolog.yaml │ ├── security_checker.yaml │ ├── validator.yaml │ ├── jms_i18n_routing.yaml │ ├── nelmio_api_doc.yaml │ ├── stof_doctrine_extensions.yaml │ ├── doctrine_migrations.yaml │ ├── fos_user.yaml │ ├── nelmio_cors.yaml │ ├── fos_oauth_server.yaml │ ├── cache.yaml │ ├── twig.yaml │ ├── doctrine.yaml │ └── framework.yaml ├── dataimport │ ├── tournament.csv │ ├── type.csv │ └── faction.csv ├── routes │ ├── dev │ │ ├── twig.yaml │ │ └── framework.yaml │ ├── fos_js_routing.yaml │ ├── js_translation.yaml │ ├── annotations.yaml │ ├── fos_oauth_server.yaml │ └── nelmio_api_doc.yaml ├── preload.php ├── routes.yaml ├── bootstrap.php └── bundles.php ├── assets ├── css │ ├── languages.png │ └── icons.css └── js │ ├── app.markdown.js │ ├── bootstrap-markdown.es.js │ ├── bootstrap-markdown.de.js │ ├── app.config.js │ ├── app.binomial.js │ └── app.hypergeometric.js ├── phpstan.neon.dist ├── eslint.config.js ├── .github └── dependabot.yml ├── Makefile ├── .env.test ├── tests ├── bootstrap.php └── Entity │ └── CardTest.php ├── bin ├── phpunit └── console ├── phpcs.xml.dist ├── .gitignore ├── package.json ├── LICENSE ├── phpunit.xml.dist ├── .travis.yml ├── .env.travis └── README.md /public/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/cache/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /migrations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Entity/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /translations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/sessions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Controller/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Repository/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/Decklist/deck-content.html.twig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config/packages/test/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | strict_variables: true 3 | -------------------------------------------------------------------------------- /config/packages/test/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | disable_delivery: true 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/icon-120.png -------------------------------------------------------------------------------- /public/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/icon-192.png -------------------------------------------------------------------------------- /templates/Builder/tab-pane-charts.html.twig: -------------------------------------------------------------------------------- 1 | {% include 'Builder/deck-charts.html.twig' %} 2 | -------------------------------------------------------------------------------- /templates/Builder/tab-pane-draw.html.twig: -------------------------------------------------------------------------------- 1 | {% include 'Builder/draw-simulator.html.twig' %} 2 | -------------------------------------------------------------------------------- /assets/css/languages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/assets/css/languages.png -------------------------------------------------------------------------------- /config/packages/prod/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | -------------------------------------------------------------------------------- /public/fonts/thronesdb.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/fonts/thronesdb.eot -------------------------------------------------------------------------------- /public/fonts/thronesdb.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/fonts/thronesdb.ttf -------------------------------------------------------------------------------- /public/images/no-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/no-card.png -------------------------------------------------------------------------------- /public/fonts/thronesdb.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/fonts/thronesdb.woff -------------------------------------------------------------------------------- /templates/Search/card-pack.html.twig: -------------------------------------------------------------------------------- 1 |
{{ card.pack_name }} #{{ card.position }}.
2 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: ~ 4 | utf8: true 5 | -------------------------------------------------------------------------------- /config/packages/sensio_framework_extra.yaml: -------------------------------------------------------------------------------- 1 | sensio_framework_extra: 2 | router: 3 | annotations: false 4 | -------------------------------------------------------------------------------- /config/packages/test/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | not_compromised_password: false 4 | -------------------------------------------------------------------------------- /public/images/factions/greyjoy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/greyjoy.png -------------------------------------------------------------------------------- /public/images/factions/martell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/martell.png -------------------------------------------------------------------------------- /public/images/factions/stark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/stark.png -------------------------------------------------------------------------------- /public/images/factions/tyrell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/tyrell.png -------------------------------------------------------------------------------- /config/dataimport/tournament.csv: -------------------------------------------------------------------------------- 1 | `id`,`description`,`active` 2 | 1,Relaxed,1 3 | 2,Formal,1 4 | 3,Premier,1 5 | 4,Other,1 6 | -------------------------------------------------------------------------------- /config/packages/fos_js_routing.yaml: -------------------------------------------------------------------------------- 1 | # FOSJsRoutingBundle Configuration 2 | fos_js_routing: 3 | routes_to_expose: [ '.*' ] -------------------------------------------------------------------------------- /public/images/factions/baratheon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/baratheon.png -------------------------------------------------------------------------------- /public/images/factions/lannister.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/lannister.png -------------------------------------------------------------------------------- /public/images/factions/targaryen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/targaryen.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr1.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr2.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr3.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr4.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr5.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr6.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr7.png -------------------------------------------------------------------------------- /templates/Search/card-flavor.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ card.flavor|raw|nl2br }} 3 |
4 | -------------------------------------------------------------------------------- /config/routes/dev/twig.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@TwigBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr1.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr2.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr3.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr4.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr5.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr6.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr7.png -------------------------------------------------------------------------------- /public/images/rulesreference/rr4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/rr4b.png -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/routes/fos_js_routing.yaml: -------------------------------------------------------------------------------- 1 | fos_js_routing: 2 | resource: "@FOSJsRoutingBundle/Resources/config/routing/routing-sf4.xml" 3 | -------------------------------------------------------------------------------- /public/images/factions/thenightswatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/factions/thenightswatch.png -------------------------------------------------------------------------------- /public/images/rulesreference/es/rr4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/es/rr4b.png -------------------------------------------------------------------------------- /templates/Search/card-errata-short.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ "card.info.errataed_short" | trans }} 3 |
-------------------------------------------------------------------------------- /config/packages/ramsey_uuid_doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | dbal: 3 | types: 4 | uuid: 'Ramsey\Uuid\Doctrine\UuidType' 5 | -------------------------------------------------------------------------------- /config/routes/dev/framework.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /config/routes/js_translation.yaml: -------------------------------------------------------------------------------- 1 | bazinga_js_translation: 2 | resource: "@BazingaJsTranslationBundle/Resources/config/routing/routing.yml" 3 | -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | symfony: 3 | container_xml_path: var/cache/dev/srcApp_KernelDevDebugContainer.xml 4 | level: 0 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | Disallow: /api/* 6 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); 2 | 3 | module.exports = [ 4 | eslintPluginPrettierRecommended, 5 | ]; 6 | -------------------------------------------------------------------------------- /public/images/rulesreference/timing-cheatsheet-jpg-thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/timing-cheatsheet-jpg-thumbnail.jpg -------------------------------------------------------------------------------- /public/images/rulesreference/timing-cheatsheet-pdf-thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThronesDB/thronesdb/HEAD/public/images/rulesreference/timing-cheatsheet-pdf-thumbnail.jpg -------------------------------------------------------------------------------- /config/packages/swiftmailer.yaml: -------------------------------------------------------------------------------- 1 | swiftmailer: 2 | # url: '%env(MAILER_URL)%' 3 | spool: { type: 'memory' } 4 | transport: sendmail 5 | command: "/usr/bin/msmtp -t" 6 | 7 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /config/routes/annotations.yaml: -------------------------------------------------------------------------------- 1 | controllers: 2 | resource: ../../src/Controller/ 3 | type: annotation 4 | 5 | kernel: 6 | resource: ../../src/Kernel.php 7 | type: annotation 8 | -------------------------------------------------------------------------------- /templates/Search/card-errata-long.html.twig: -------------------------------------------------------------------------------- 1 |

2 | {{ "card.info.errataed_long" | trans({"%url%": path("faq", {"_fragment": "Card_Errata"})}) | raw }} 3 |

-------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "11:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /config/dataimport/type.csv: -------------------------------------------------------------------------------- 1 | `id`,`code`,`name` 2 | 1,agenda,Agenda 3 | 2,attachment,Attachment 4 | 3,character,Character 5 | 4,event,Event 6 | 5,location,Location 7 | 6,plot,Plot 8 | 7,title,Title 9 | -------------------------------------------------------------------------------- /config/packages/bazinga_js_translation.yaml: -------------------------------------------------------------------------------- 1 | # JsTranslationBundle Configuration 2 | bazinga_js_translation: 3 | locale_fallback: '%kernel.default_locale%' 4 | active_locales: '%supported_locales%' -------------------------------------------------------------------------------- /config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: en 3 | translator: 4 | default_path: '%kernel.project_dir%/translations' 5 | fallbacks: 6 | - en 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | composer install 3 | php bin/console bazinga:js-translation:dump 4 | php bin/console assets:install --symlink web 5 | bin/console assetic:dump 6 | 7 | test: 8 | vendor/bin/phpunit -------------------------------------------------------------------------------- /src/Repository/BannerAlertRepository.php: -------------------------------------------------------------------------------- 1 | {{ alert.description | raw }} 3 | {% endfor %} 4 | -------------------------------------------------------------------------------- /templates/Search/paginationitem.html.twig: -------------------------------------------------------------------------------- 1 | {% if href %} 2 |
  • {{ s }}–{{ e }}
  • 3 | {% else %} 4 |
  • {{ s }}–{{ e }}
  • 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /templates/Search/card-name.html.twig: -------------------------------------------------------------------------------- 1 | {% if card.is_unique == true %} 2 | 3 | {% endif %} 4 | {{ card.name }} 5 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | # define your env variables for the test env here 2 | KERNEL_CLASS='App\Kernel' 3 | APP_SECRET='$ecretf0rt3st' 4 | SYMFONY_DEPRECATIONS_HELPER=999999 5 | PANTHER_APP_ENV=panther 6 | PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots 7 | -------------------------------------------------------------------------------- /config/packages/security_checker.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | 6 | SensioLabs\Security\SecurityChecker: null 7 | 8 | SensioLabs\Security\Command\SecurityCheckerCommand: null 9 | -------------------------------------------------------------------------------- /config/routes/fos_oauth_server.yaml: -------------------------------------------------------------------------------- 1 | fos_oauth_server_token: 2 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" 3 | 4 | fos_oauth_server_authorize: 5 | resource: "@FOSOAuthServerBundle/Resources/config/routing/authorize.xml" 6 | -------------------------------------------------------------------------------- /templates/Decklist/author-and-description.html.twig: -------------------------------------------------------------------------------- 1 | {% import "macros.html.twig" as macros %} 2 | 3 |

    4 | {{ macros.username(decklist.user) }} 5 |

    6 |
    {{ decklist.descriptionHtml|raw }}
    7 | -------------------------------------------------------------------------------- /templates/Search/card-illustrator.html.twig: -------------------------------------------------------------------------------- 1 | {% if card.illustrator is not empty %} 2 |
    3 | 4 | {{ card.illustrator }} 5 |
    6 | {% endif %} 7 | -------------------------------------------------------------------------------- /templates/Search/card-text.html.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ card.text|raw }} 3 | {% if card.designer is not empty %} 4 |

    {{ card.designer }}

    5 | {% endif %} 6 |
    7 | -------------------------------------------------------------------------------- /templates/Search/card-info.html.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ card.type_name }}. 3 | {% include 'Search/card-props.html.twig' %} 4 |

    {{ card.traits }}

    5 |
    6 | -------------------------------------------------------------------------------- /templates/Search/card-name-with-link.html.twig: -------------------------------------------------------------------------------- 1 | {% if card.is_unique == true %} {% endif %} 2 | {{ card.name }} 4 | -------------------------------------------------------------------------------- /src/Repository/RestrictionRepository.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /templates/bundles/TwigBundle/Exception/error404.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Error 404{% endblock %} 4 | 5 | {% block body %} 6 |
    7 | 8 |
    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | email_validation_mode: html5 4 | 5 | # Enables validator auto-mapping support. 6 | # For instance, basic validation constraints will be inferred from Doctrine's metadata. 7 | #auto_mapping: 8 | # App\Entity\: [] 9 | -------------------------------------------------------------------------------- /templates/Builder/download_list.html.twig: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /templates/Search/card.html.twig: -------------------------------------------------------------------------------- 1 |

    3 | 4 | {{ label }} 5 |

    6 | -------------------------------------------------------------------------------- /config/packages/jms_i18n_routing.yaml: -------------------------------------------------------------------------------- 1 | # JMSI18nRoutingBundle Configuration 2 | jms_i18n_routing: 3 | default_locale: '%kernel.default_locale%' 4 | locales: '%supported_locales%' 5 | strategy: custom 6 | hosts: 7 | en: "%website_url%" 8 | es: "es.%website_url%" 9 | # de: "de.%website_url%" 10 | redirect_to_host: true -------------------------------------------------------------------------------- /config/packages/nelmio_api_doc.yaml: -------------------------------------------------------------------------------- 1 | nelmio_api_doc: 2 | documentation: 3 | info: 4 | title: My App 5 | description: This is an awesome app! 6 | version: 1.0.0 7 | areas: # to filter documented areas 8 | path_patterns: 9 | - ^/api(?!/doc$) # Accepts routes under /api except /api/doc 10 | -------------------------------------------------------------------------------- /config/packages/prod/deprecations.yaml: -------------------------------------------------------------------------------- 1 | # As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists 2 | #monolog: 3 | # channels: [deprecation] 4 | # handlers: 5 | # deprecation: 6 | # type: stream 7 | # channels: [deprecation] 8 | # path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" 9 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 11 | } 12 | -------------------------------------------------------------------------------- /templates/Search/card-faction.html.twig: -------------------------------------------------------------------------------- 1 |
    2 | 3 | {{ card.faction_name }}. 4 | {% if card.faction_code != 'neutral' %}{% if card.is_loyal %} {{ 'card.info.loyal' | trans }}.{% else %} {{ 'card.info.nonloyal' | trans }}.{% endif %}{% endif %} 5 |
    6 | -------------------------------------------------------------------------------- /config/packages/stof_doctrine_extensions.yaml: -------------------------------------------------------------------------------- 1 | # Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html 2 | # See the official DoctrineExtensions documentation for more details: https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc 3 | stof_doctrine_extensions: 4 | default_locale: en_US 5 | orm: 6 | default: 7 | timestampable: true -------------------------------------------------------------------------------- /config/packages/test/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_http_codes: [404, 405] 8 | channels: ["!event"] 9 | nested: 10 | type: stream 11 | path: "%kernel.logs_dir%/%kernel.environment%.log" 12 | level: debug 13 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | migrations_paths: 3 | # namespace is arbitrary but should be different from App\Migrations 4 | # as migrations classes should NOT be autoloaded 5 | 'DoctrineMigrations': '%kernel.project_dir%/migrations' 6 | storage: 7 | table_storage: 8 | table_name: 'migration_versions' 9 | enable_profiler: false 10 | -------------------------------------------------------------------------------- /config/packages/fos_user.yaml: -------------------------------------------------------------------------------- 1 | # FOSUserBundle Configuration 2 | fos_user: 3 | db_driver: orm 4 | firewall_name: main 5 | user_class: App\Entity\User 6 | registration: 7 | confirmation: 8 | enabled: false 9 | from_email: 10 | address: "%email_sender_address%" 11 | sender_name: "%email_sender_name%" 12 | service: 13 | mailer: fos_user.mailer.twig_swift 14 | -------------------------------------------------------------------------------- /config/routes/nelmio_api_doc.yaml: -------------------------------------------------------------------------------- 1 | # Expose your documentation as JSON swagger compliant 2 | app.swagger: 3 | path: /api/doc.json 4 | methods: GET 5 | defaults: { _controller: nelmio_api_doc.controller.swagger } 6 | 7 | # Requires the Asset component and the Twig bundle 8 | app.swagger_ui: 9 | path: /api/doc 10 | methods: GET 11 | defaults: { _controller: nelmio_api_doc.controller.swagger_ui } 12 | -------------------------------------------------------------------------------- /src/Repository/TypeRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('t') 12 | ->select('t') 13 | ->orderBy('t.name', 'ASC'); 14 | 15 | return $qb->getQuery()->getResult(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /config/preload.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | {{ form_end(form) }} 9 | -------------------------------------------------------------------------------- /src/DataFixtures/AppFixtures.php: -------------------------------------------------------------------------------- 1 | persist($product); 14 | 15 | $manager->flush(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /templates/Restrictions/restricteddescription.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @file 3 | Partial template for rendering a description for restricted lists. 4 | #} 5 |

    A player may select one card from the restricted list for any given deck, 6 | and cannot then include any other restricted cards in the same deck. 7 | A player may run as many copies of his or her chosen restricted card in a deck as 8 | the regular game rules (or card text) allow.

    9 | -------------------------------------------------------------------------------- /templates/User/remind-no-token.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "AgfaWebBundle::security.html.twig" %} 2 | 3 | {% trans_default_domain 'FOSUserBundle' %} 4 | 5 | {% block form %} 6 |

    Your account is not awaiting confirmation.

    7 |

    If you forgot your password, click here, otherwise log in 8 | here.

    9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /templates/Search/card-work-in-progress.html.twig: -------------------------------------------------------------------------------- 1 | {% if card.work_in_progress %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /templates/Emails/newcomment_author.html.twig: -------------------------------------------------------------------------------- 1 |

    {{ username }} commented on your decklist {{ decklist_name }}

    3 |
    4 | {{ comment|raw }} 5 |
    6 |

    To unsubscribe from those notifications, change your account 7 | settings.

    8 | -------------------------------------------------------------------------------- /templates/Emails/newcomment_commenter.html.twig: -------------------------------------------------------------------------------- 1 |

    {{ username }} also commented on a decklist {{ decklist_name }}

    3 |
    4 | {{ comment|raw }} 5 |
    6 |

    To unsubscribe from those notifications, change your account 7 | settings.

    8 | -------------------------------------------------------------------------------- /templates/Emails/newreviewcomment_author.html.twig: -------------------------------------------------------------------------------- 1 |

    {{ username }} commented on your review for {{ card_name }}

    3 |
    4 | {{ comment|raw }} 5 |
    6 |

    To unsubscribe from those notifications, change your account 7 | settings.

    8 | -------------------------------------------------------------------------------- /templates/alerts.html.twig: -------------------------------------------------------------------------------- 1 | {% for flashMessage in app.flashes('notice') %} 2 | 3 | {% endfor %} 4 | {% for flashMessage in app.flashes('warning') %} 5 | 6 | {% endfor %} 7 | {% for flashMessage in app.flashes('error') %} 8 | 9 | {% endfor %} 10 | -------------------------------------------------------------------------------- /bin/phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | {{ username }} mentionned you in a comment on the decklist {{ decklist_name }}

    3 |
    4 | {{ comment|raw }} 5 |
    6 |

    To unsubscribe from those notifications, change your account 7 | settings.

    8 | -------------------------------------------------------------------------------- /config/packages/nelmio_cors.yaml: -------------------------------------------------------------------------------- 1 | nelmio_cors: 2 | defaults: 3 | origin_regex: true 4 | allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] 5 | allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] 6 | allow_headers: ['Content-Type', 'Authorization'] 7 | expose_headers: ['Link'] 8 | max_age: 3600 9 | paths: 10 | # '^/': null 11 | '^/api/public/': 12 | allow_origin: ['*'] 13 | allow_methods: ['GET'] 14 | max_age: 3600 -------------------------------------------------------------------------------- /templates/Decklist/table-graph-costs.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
    Repartition by Cost
    10 |
    11 | 12 |
    13 |
    17 | -------------------------------------------------------------------------------- /templates/Decklist/table-graph-strengths.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |
    Repartition by Strength
    10 |
    11 | 12 |
    13 |
    17 | -------------------------------------------------------------------------------- /templates/Restrictions/cardlist.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @file 3 | Partial template for rendering a list of cards. 4 | 5 | Available variables: 6 | - list: a list of cards 7 | #} 8 | {% for card in list %} 9 |
    10 | 11 | {{ card.name }} ({{ card.pack_code }}) 13 |
    14 | {% endfor %} 15 |
    16 | -------------------------------------------------------------------------------- /templates/bundles/TwigBundle/Exception/error500.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Error 500{% endblock %} 4 | 5 | {% block body %} 6 |
    7 | 12 |
    13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /src/Repository/CycleRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('y') 16 | ->select('y, p') 17 | ->leftJoin('y.packs', 'p') 18 | ->orderBy('y.position', 'ASC'); 19 | 20 | return $qb->getQuery()->getResult(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /config/packages/fos_oauth_server.yaml: -------------------------------------------------------------------------------- 1 | # Read the documentation: https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/blob/master/Resources/doc/index.md#step-5-configure-fosoauthserverbundle 2 | fos_oauth_server: 3 | db_driver: orm 4 | 5 | client_class: App\Entity\Client 6 | access_token_class: App\Entity\AccessToken 7 | refresh_token_class: App\Entity\RefreshToken 8 | auth_code_class: App\Entity\AuthCode 9 | service: 10 | user_provider: fos_user.user_provider.username 11 | options: 12 | supported_scopes: read_deck write_deck 13 | -------------------------------------------------------------------------------- /src/Entity/DeckslotInterface.php: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 14 |
    15 | 16 | -------------------------------------------------------------------------------- /templates/Default/google-analytics.html.twig: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /templates/Search/display-short.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'Search/display.html.twig' %} 2 | 3 | {% block main %} 4 | 5 | {% for key, value in cards %} 6 |

    {{ key }}

    7 |
    8 | {% for i in 0..value|length-1 %} 9 | {% set card = value[i] %} 10 | {{ card.name }}
    12 | {% endfor %} 13 |
    14 | {% endfor %} 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /config/packages/prod/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_http_codes: [404, 405] 8 | buffer_size: 50 # How many messages should be saved? Prevent memory leaks 9 | nested: 10 | type: stream 11 | path: php://stderr 12 | level: debug 13 | formatter: monolog.formatter.json 14 | console: 15 | type: console 16 | process_psr_3_messages: false 17 | channels: ["!event", "!doctrine"] 18 | -------------------------------------------------------------------------------- /src/Entity/SlotInterface.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% if app.request.hasPreviousSession %} 8 | {% for type, messages in app.session.flashbag.all() %} 9 | {% for message in messages %} 10 |
    11 | {{ message }} 12 |
    13 | {% endfor %} 14 | {% endfor %} 15 | {% endif %} 16 | 17 | {% block fos_user_content %} 18 | {% endblock fos_user_content %} 19 | 20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /src/Resources/FOSOAuthServerBundle/views/layout.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | {% block body %} 3 |
    4 | 5 | {% if app.request.hasPreviousSession %} 6 | {% for type, messages in app.session.flashbag.all() %} 7 | {% for message in messages %} 8 |
    9 | {{ message }} 10 |
    11 | {% endfor %} 12 | {% endfor %} 13 | {% endif %} 14 | 15 | {% block fos_oauth_server_content %} 16 | {% endblock fos_oauth_server_content %} 17 | 18 |
    19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /templates/bundles/FOSUserBundle/Security/login.html.twig: -------------------------------------------------------------------------------- 1 | {% trans_default_domain 'FOSUserBundle' %} 2 | {% extends "@FOSUser/layout.html.twig" %} 3 | 4 | {% block fos_user_content %} 5 |
    6 |
    7 |
    8 |
    9 | {{ 'layout.login'|trans }} 10 |
    11 |
    12 | {% include('@FOSUser/Security/login_content.html.twig') %} 13 |
    14 |
    15 |
    16 |
    17 | {% endblock fos_user_content %} 18 | -------------------------------------------------------------------------------- /templates/Decklist/table-predecessor.html.twig: -------------------------------------------------------------------------------- 1 | {% import "macros.html.twig" as macros %} 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | {% if decklist.precedent %} 12 | {{ macros.decklist_table_row(decklist.precedent) }} 13 | {% else %} 14 | 15 | 16 | 17 | {% endif %} 18 | 19 |
    {{ 'decklist.view.derived.title' | trans }}
    {{ 'decklist.view.derived.none' | trans }}
    20 | -------------------------------------------------------------------------------- /templates/bundles/FOSUserBundle/Registration/register.html.twig: -------------------------------------------------------------------------------- 1 | {% trans_default_domain 'FOSUserBundle' %} 2 | {% extends "@FOSUser/layout.html.twig" %} 3 | 4 | {% block fos_user_content %} 5 |
    6 |
    7 |
    8 |
    9 | {{ 'layout.register'|trans }} 10 |
    11 |
    12 | {% include "@FOSUser/Registration/register_content.html.twig" %} 13 |
    14 |
    15 |
    16 |
    17 | {% endblock fos_user_content %} 18 | -------------------------------------------------------------------------------- /templates/bundles/FOSUserBundle/Resetting/request.html.twig: -------------------------------------------------------------------------------- 1 | {% trans_default_domain 'FOSUserBundle' %} 2 | {% extends "@FOSUser/layout.html.twig" %} 3 | 4 | {% block fos_user_content %} 5 |
    6 |
    7 |
    8 |
    9 | {{ 'resetting.request.submit'|trans }} 10 |
    11 |
    12 | {% include "@FOSUser/Resetting/request_content.html.twig" %} 13 |
    14 |
    15 |
    16 |
    17 | {% endblock fos_user_content %} 18 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | bin/ 14 | config/ 15 | public/ 16 | src/ 17 | tests/ 18 | 19 | tests/bootstrap.php 20 | src/Kernel.php 21 | 22 | -------------------------------------------------------------------------------- /config/packages/dev/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: stream 5 | path: "%kernel.logs_dir%/%kernel.environment%.log" 6 | level: debug 7 | channels: ["!event"] 8 | # uncomment to get logging in your browser 9 | # you may have to allow bigger header sizes in your Web server configuration 10 | #firephp: 11 | # type: firephp 12 | # level: info 13 | #chromephp: 14 | # type: chromephp 15 | # level: info 16 | console: 17 | type: console 18 | process_psr_3_messages: false 19 | channels: ["!event", "!doctrine", "!console"] 20 | -------------------------------------------------------------------------------- /templates/Default/rulesreference.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | {% import "macros.html.twig" as macros %} 3 | 4 | {% block body %} 5 |
    6 | 7 | {% include 'alerts.html.twig' %} 8 |
    9 |
    10 |
      11 |
      12 | 13 |
      14 | 15 | {% include ['Default/rulesreference.'~app.request.locale~'.html.twig', 'Default/rulesreference.en.html.twig'] %} 16 | 17 |
      18 |
      19 |
      20 | {% endblock %} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Entity/AuthCode.php: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      4 |
      5 | 7 | 8 | 9 | 10 |
      11 |
      12 | {% include 'Search/searchoptions.html.twig' %} 13 |
      14 | 15 | -------------------------------------------------------------------------------- /src/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig: -------------------------------------------------------------------------------- 1 | {{ form_start(form, {'method': 'POST', 'action': path('fos_oauth_server_authorize'), 'label_attr': {'class': 'fos_oauth_server_authorize'} }) }} 2 | 3 | 4 | 5 | {{ form_row(form.client_id) }} 6 | {{ form_row(form.response_type) }} 7 | {{ form_row(form.redirect_uri) }} 8 | {{ form_row(form.state) }} 9 | {{ form_row(form.scope) }} 10 | {{ form_rest(form) }} 11 | 12 | -------------------------------------------------------------------------------- /src/Entity/AccessToken.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% include 'alerts.html.twig' %} 8 |
      9 |
      10 | 11 |
      12 | 13 |
      14 | 15 | {% include ['Default/tournamentregulations.'~app.request.locale~'.html.twig', 'Default/tournamentregulations.en.html.twig'] %} 16 | 17 |
      18 |
      19 | 20 | {% endblock %} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/Entity/RefreshToken.php: -------------------------------------------------------------------------------- 1 | name; 30 | } 31 | 32 | public function setName($name): void 33 | { 34 | $this->name = $name; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /templates/Restrictions/poddescription.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @file 3 | Partial template for rendering a description for pods. 4 | #} 5 |

      Some cards interactions are so powerful that the inclusion of these cards in a deck comes with 6 | additional restrictions. Those cards are grouped together in pods.

      7 |

      No more than one card from each pod may be included in a deck.

      8 |

      However, if a pod contains a card from the restricted list (indicated in bold text if applicable) 9 | and you choose that card as your restricted card, then the other cards from that pod cannot 10 | be included in your deck. If you choose a different restricted card, you may include any number of 11 | unrestricted cards from that pod in your deck.

      12 | -------------------------------------------------------------------------------- /templates/Builder/bulkclone.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @file 3 | Page template for rendering a user's private list of decks. 4 | 5 | Available variables: 6 | - pagetitle 7 | - pagedescription 8 | - decks 9 | - tags 10 | - nbmax 11 | - nbdecks 12 | - cannotcreate 13 | - tournaments 14 | - decklegality 15 | #} 16 | {% extends 'base.html.twig' %} 17 | {% form_theme form 'bootstrap_3_layout.html.twig' %} 18 | {% block body %} 19 |
      20 | {% include 'alerts.html.twig' %} 21 |

      Bulk Deck Cloning

      22 |
      23 |
      24 | {{ form(form) }} 25 |
      26 |
      27 |
      28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /migrations/Version20220806163946.php: -------------------------------------------------------------------------------- 1 | addSql('ALTER TABLE client ADD name VARCHAR(255) NOT NULL'); 23 | } 24 | 25 | public function down(Schema $schema): void 26 | { 27 | $this->addSql('ALTER TABLE client DROP name'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /templates/Decklist/table-successor.html.twig: -------------------------------------------------------------------------------- 1 | {% import "macros.html.twig" as macros %} 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | {% if decklist.successors|length %} 12 | {% for successor in decklist.successors %} 13 | {{ macros.decklist_table_row(successor) }} 14 | {% endfor %} 15 | {% else %} 16 | 17 | 18 | 19 | {% endif %} 20 | 21 |
      {{ 'decklist.view.inspire.title' | trans }}
      {{ 'decklist.view.inspire.none' | trans }}
      22 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Unique name of your app: used to compute stable namespaces for cache keys. 4 | #prefix_seed: your_vendor_name/app_name 5 | 6 | # The "app" cache stores to the filesystem by default. 7 | # The data in this cache should persist between deploys. 8 | # Other options include: 9 | 10 | # Redis 11 | #app: cache.adapter.redis 12 | #default_redis_provider: redis://localhost 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /templates/Builder/deck-charts.html.twig: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 |
      6 |
      7 |
      8 |
      9 |
      10 |
      11 |
      12 |
      13 |
      14 |
      15 |
      16 |
      17 |
      18 |
      19 |
      20 |
      21 |
      22 | -------------------------------------------------------------------------------- /templates/Search/display.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}{{ title }}{% endblock %} 4 | 5 | {% block body %} 6 |
      7 | 8 | {% include 'alerts.html.twig' %} 9 | {{ searchbar|raw }} 10 | 11 |
      12 | 13 | {{ pagination|raw }} 14 | 15 | {% if cards|length > 0 %} 16 | 17 | {% block main %}{% endblock %} 18 | 19 | {% else %} 20 | 21 |
      22 |

      Your query didn't match any card.

      23 |
      24 | 25 | {% endif %} 26 | 27 | {{ pagination|raw }} 28 | 29 |
      30 | 31 |
      32 | 33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /templates/Search/pagination.html.twig: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 | 16 |
      17 |
      18 |

      19 | {% transchoice count with {'%count%': count} %}pag.cardscount{% endtranschoice %} 20 |

      21 |
      22 |
      23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ###> symfony/framework-bundle ### 2 | /.env.local 3 | /.env.local.php 4 | /.env.*.local 5 | /config/secrets/prod/prod.decrypt.private.php 6 | /public/bundles/ 7 | /var/ 8 | /vendor/ 9 | ###< symfony/framework-bundle ### 10 | ###> squizlabs/php_codesniffer ### 11 | /.phpcs-cache 12 | /phpcs.xml 13 | ###< squizlabs/php_codesniffer ### 14 | 15 | ###> symfony/phpunit-bridge ### 16 | .phpunit 17 | .phpunit.result.cache 18 | /phpunit.xml 19 | ###< symfony/phpunit-bridge ### 20 | 21 | # ignore bazinga output files 22 | /assets/js/translations 23 | 24 | # ignore FOS JS routing output 25 | /public/js/fos_js_routes.js 26 | 27 | # ignore node modules 28 | /node_modules 29 | 30 | #ignore files in public/css 31 | /public/css 32 | /public/manifest.json 33 | /public/js 34 | 35 | #ignore output dir of HTMLPurifier 36 | /src/URI 37 | -------------------------------------------------------------------------------- /src/Repository/FactionRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('f')->orderBy('f.name', 'ASC'); 12 | return $qb->getQuery()->getResult(); 13 | } 14 | 15 | 16 | public function findPrimaries() 17 | { 18 | $qb = $this->createQueryBuilder('f')->andWhere('f.isPrimary = 1'); 19 | return $qb->getQuery()->getResult(); 20 | } 21 | 22 | public function findByCode($code) 23 | { 24 | $qb = $this->createQueryBuilder('f')->andWhere('f.code = ?1'); 25 | $qb->setParameter(1, $code); 26 | return $qb->getQuery()->getOneOrNullResult(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /templates/bundles/FOSUserBundle/Resetting/request_content.html.twig: -------------------------------------------------------------------------------- 1 | {% trans_default_domain 'FOSUserBundle' %} 2 | 3 |
      4 |
      5 | {% if invalid_username is defined %} 6 |

      {{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}

      7 | {% endif %} 8 |
      9 | 10 | 11 |
      12 |
      13 |
      14 | 15 |
      16 |
      17 | -------------------------------------------------------------------------------- /templates/Search/display-scan.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'Search/display.html.twig' %} 2 | 3 | {% block main %} 4 | 5 | 6 | {% for row in 0..(cards|length-1)//4 %} 7 |
      8 | {% for col in 0..3 %}{% set index = row*4+col %} 9 | {% if index in cards|keys %} 10 | {% set card = cards[index] %} 11 |
      12 | {{ card.name }} 14 |
      15 | {% endif %} 16 | {% endfor %} 17 |
      18 | {% endfor %} 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | default_path: '%kernel.project_dir%/templates' 3 | paths: 4 | "%kernel.project_dir%/src/Resources/FOSOAuthServerBundle/views" : FOSOAuthServerBundle 5 | debug: '%kernel.debug%' 6 | strict_variables: '%kernel.debug%' 7 | exception_controller: null 8 | globals: 9 | default_locale: '%kernel.default_locale%' 10 | supported_locales: '%supported_locales%' 11 | cards_data: '@App\Services\CardsData' 12 | deck_validation_helper: '@App\Services\DeckValidationHelper' 13 | google_analytics_tracking_code: '%google_analytics_tracking_code%' 14 | allow_search_engine_tracking: '%allow_search_engine_tracking%' 15 | design_team_discord_url: '%design_team_discord_url%' 16 | form_themes: 17 | - 'bootstrap_3_layout.html.twig' 18 | -------------------------------------------------------------------------------- /src/Repository/PackRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('p') 12 | ->select('p, y') 13 | ->join('p.cycle', 'y') 14 | ->orderBy('p.dateRelease', 'ASC') 15 | ->addOrderBy('p.position', 'ASC'); 16 | 17 | return $qb->getQuery()->getResult(); 18 | } 19 | 20 | public function findByCode($code) 21 | { 22 | $qb = $this->createQueryBuilder('p') 23 | ->select('p') 24 | ->andWhere('p.code = ?1'); 25 | 26 | $qb->setParameter(1, $code); 27 | 28 | return $qb->getQuery()->getOneOrNullResult(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/BannerAlertInterface.php: -------------------------------------------------------------------------------- 1 | handle($request); 26 | $response->send(); 27 | $kernel->terminate($request, $response); 28 | -------------------------------------------------------------------------------- /templates/Modale/diff.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /migrations/Version20240214040710.php: -------------------------------------------------------------------------------- 1 | addSql('ALTER TABLE card ADD errataed TINYINT(1) NOT NULL'); 24 | } 25 | 26 | public function down(Schema $schema): void 27 | { 28 | // this down() migration is auto-generated, please modify it to your needs 29 | $this->addSql('ALTER TABLE card DROP errataed'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | # This file is the entry point to configure your own HTTP routes. 2 | # Files in the routes/ subdirectory configure the routes for your dependencies. 3 | 4 | #index: 5 | # path: / 6 | # defaults: { _controller: 'App\Controller\DefaultController::index' } 7 | # these routes are available to anybody 8 | fos_user_security: 9 | resource: "@FOSUserBundle/Resources/config/routing/security.xml" 10 | 11 | fos_user_profile: 12 | resource: "@FOSUserBundle/Resources/config/routing/profile.xml" 13 | prefix: /profile 14 | 15 | fos_user_register: 16 | resource: "@FOSUserBundle/Resources/config/routing/registration.xml" 17 | prefix: /register 18 | 19 | fos_user_resetting: 20 | resource: "@FOSUserBundle/Resources/config/routing/resetting.xml" 21 | prefix: /resetting 22 | 23 | fos_user_change_password: 24 | resource: "@FOSUserBundle/Resources/config/routing/change_password.xml" 25 | prefix: /profile 26 | -------------------------------------------------------------------------------- /migrations/Version20250803234943.php: -------------------------------------------------------------------------------- 1 | addSql('CREATE TABLE banneralert (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, text LONGTEXT NOT NULL, level SMALLINT NOT NULL, active TINYINT(1) NOT NULL, date_creation DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); 23 | } 24 | 25 | public function down(Schema $schema): void 26 | { 27 | $this->addSql('DROP TABLE banneralert'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /templates/Default/about.en.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}About{% endblock %} 4 | 5 | {% block body %} 6 |
      7 | 8 | {% include 'alerts.html.twig' %} 9 |

      {{ block('title') }}

      10 | 11 |

      This website is dedicated to providing a fast, powerful and exhaustive deck builder and search engine 12 | for {{ game_name }} cards, along with card descriptions and card images.

      13 |

      This website is optimized for mobile browsing (WebKit).

      14 | 15 |

      Credits

      16 | 17 |

      I would like to thank especially:

      18 | 23 | 24 |
      25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /templates/Default/pagination.html.twig: -------------------------------------------------------------------------------- 1 |
      2 | 26 |
      27 | -------------------------------------------------------------------------------- /templates/Export/sortedbycycle.txt.twig: -------------------------------------------------------------------------------- 1 | {{ deck.name }} {{ deck.version }} 2 | 3 | {{ deck.faction.name }} 4 | {% for agenda in deck.agendas %} 5 | {{ agenda.card.name }}{% if agenda.card.isMultiple == true %} ({{ agenda.card.pack.name }}){% endif %} 6 | {% endfor %} 7 | 8 | {% set first_pack = deck.included_packs|first %} 9 | {% set last_pack = deck.included_packs|last %} 10 | Packs: {% if deck.included_packs|length > 1 %} 11 | From {{ first_pack.pack.name }}{% if first_pack.nb > 1 %} ({{ first_pack.nb }}){% endif %} to {{ last_pack.pack.name }}{% if last_pack.nb > 1 %} ({{ last_pack.nb }}){% endif %} 12 | {% else %} 13 | {{ first_pack.pack.name }}{% if first_pack.nb > 1 %} ({{ first_pack.nb }}){% endif %} 14 | {% endif %} 15 | 16 | {% set slotsByCycle = deck.slots_by_cycle_order %} 17 | {% for cycle, slots in slotsByCycle %} 18 | 19 | ---- {{ cycle }} ---- 20 | {% for slot in slots %} 21 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }} #{{ slot.card.position }}) 22 | {% endfor %} 23 | {% endfor %} 24 | -------------------------------------------------------------------------------- /src/DataFixtures/LoadTypeData.php: -------------------------------------------------------------------------------- 1 | setId($data[0]); 37 | $entity->setCode($data[1]); 38 | $entity->setName($data[2]); 39 | return $entity; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /templates/Builder/no-decks.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |
      6 |
      7 | 8 | {% include 'alerts.html.twig' %} 9 | {% include 'Builder/no-decks-text.'~ app.request.locale ~'.html.twig' %} 10 |
      11 |
      12 |
      13 | {{ 'decks.form.build' | trans }} 15 | {{ 'forms.import' | trans }} 17 | 19 |
      20 | 21 | {% include 'Modale/file.html.twig' %} 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /templates/Default/about.de.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Über diese Seite{% endblock %} 4 | 5 | {% block body %} 6 |
      7 | 8 | {% include 'alerts.html.twig' %} 9 |

      {{ block('title') }}

      10 | 11 |

      Diese Seite ist der Bereitstellung eines schnellen, mächtigen und vollständigen Deckbauers und einer 12 | Suchmaschine für {{ game_name }}-Karten gewidmet, inklusive Beschreibungen und Abbildungen der Karten.

      13 |

      Diese Seite ist optimiert für mobiles Browsen (WebKit).

      14 | 15 |

      Credits

      16 | 17 |

      Ich möchte besonders danken:

      18 | 23 | 24 |
      25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /config/packages/doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | dbal: 3 | url: '%env(resolve:DATABASE_URL)%' 4 | 5 | # IMPORTANT: You MUST configure your server version, 6 | # either here or in the DATABASE_URL env var (see .env file) 7 | #server_version: '5.7' 8 | 9 | # only needed for MySQL 10 | charset: utf8mb4 11 | default_table_options: 12 | charset: utf8mb4 13 | collate: utf8mb4_unicode_ci 14 | orm: 15 | auto_generate_proxy_classes: true 16 | naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware 17 | auto_mapping: true 18 | mappings: 19 | App: 20 | is_bundle: false 21 | type: annotation 22 | dir: '%kernel.project_dir%/src/Entity' 23 | prefix: 'App\Entity' 24 | alias: App 25 | dql: 26 | string_functions: 27 | replace: App\DQL\ReplaceFunction 28 | numeric_functions: 29 | power: App\DQL\PowerFunction 30 | -------------------------------------------------------------------------------- /assets/js/bootstrap-markdown.es.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spanish translation for bootstrap-markdown 3 | * by Leandro Poblet 4 | */ 5 | (function ($) { 6 | $.fn.markdown.messages.es = { 7 | 'Bold': "Negrita", 8 | 'Italic': "Itálica", 9 | 'Heading': "Título", 10 | 'URL/Link': "Inserte un link", 11 | 'Image': "Inserte una imagen", 12 | 'List': "Lista de items", 13 | "Unordered List": "Lista sin ordenar", 14 | "Ordered List": "Lista ordenada", 15 | "Quote": "Cita", 16 | 'Preview': "Previsualizar", 17 | 'strong text': "texto importante", 18 | 'emphasized text': "texto con énfasis", 19 | 'heading text': "texto titular", 20 | 'enter link description here': "descripción del link", 21 | 'Insert Hyperlink': "Inserte un hipervínculo", 22 | 'enter image description here': "descripción de la imagen", 23 | 'Insert Image Hyperlink': "Inserte una imagen con un hipervínculo", 24 | 'enter image title here': "Inserte una imagen con título", 25 | 'list text here': "lista con texto" 26 | }; 27 | }(jQuery)); 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thronesdb", 3 | "version": "1.0.0", 4 | "description": "A Deckbuilder for A Game of Thrones 2nd Edition LCG.", 5 | "main": "index.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/thronesdb/thronesdb.git" 15 | }, 16 | "author": "", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/thronesdb/thronesdb/issues" 20 | }, 21 | "homepage": "https://github.com/thronesdb/thronesdb#readme", 22 | "devDependencies": { 23 | "@eslint/js": "^9.27.0", 24 | "del": "^8.0.0", 25 | "eslint": "^9.27.0", 26 | "eslint-config-prettier": "^10.1.5", 27 | "eslint-plugin-import": "^2.31.0", 28 | "eslint-plugin-n": "^16.6.2", 29 | "eslint-plugin-prettier": "^5.4.0", 30 | "globals": "^16.2.0", 31 | "gulp": "^5.0.0", 32 | "gulp-concat": "^2.6.1", 33 | "gulp-rev": "^11.0.0", 34 | "prettier": "3.5.3" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /migrations/Version20201213002601.php: -------------------------------------------------------------------------------- 1 | abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 23 | 24 | $this->addSql('ALTER TABLE restriction ADD title VARCHAR(50) NOT NULL'); 25 | } 26 | 27 | public function down(Schema $schema): void 28 | { 29 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 30 | 31 | $this->addSql('ALTER TABLE restriction DROP title'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /templates/Decklist/export-modal.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | -------------------------------------------------------------------------------- /migrations/Version20210217015924.php: -------------------------------------------------------------------------------- 1 | abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 23 | 24 | $this->addSql('ALTER TABLE pack ADD work_in_progress TINYINT(1) DEFAULT \'0\' NOT NULL'); 25 | } 26 | 27 | public function down(Schema $schema): void 28 | { 29 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 30 | 31 | $this->addSql('ALTER TABLE pack DROP work_in_progress'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /templates/Modale/export.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | -------------------------------------------------------------------------------- /assets/js/bootstrap-markdown.de.js: -------------------------------------------------------------------------------- 1 | /** 2 | * German translation for bootstrap-markdown 3 | * Tobias Nitsche 4 | */ 5 | (function ($) { 6 | $.fn.markdown.messages.de = { 7 | 'Bold': "Fett", 8 | 'Italic': "Kursiv", 9 | 'Heading': "Überschrift", 10 | 'URL/Link': "Link hinzufügen", 11 | 'Image': "Bild hinzufügen", 12 | 'Unordered List': "Unnummerierte Liste", 13 | 'Ordered List': "Nummerierte Liste", 14 | 'Code': "Quelltext", 15 | 'code text here': "Quelltext hier einfügen", 16 | 'Quote': "Zitat", 17 | 'quote here': "Zitat hier einfügen", 18 | 'Preview': "Vorschau", 19 | 'Save': "Speichern", 20 | 'strong text': "Sehr betonter Text", 21 | 'emphasized text': "Betonter Text", 22 | 'heading text': "Überschrift Text", 23 | 'enter link description here': "Linkbeschreibung", 24 | 'Insert Hyperlink': "URL", 25 | 'enter image description here': "Bildbeschreibung", 26 | 'Insert Image Hyperlink': "Bild-URL", 27 | 'enter image title here': "Titel des Bildes", 28 | 'list text here': "Aufzählungs-Text" 29 | }; 30 | }(jQuery)); 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2018 Cédric Bertolini 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /templates/Default/about.es.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Sobre este sitio{% endblock %} 4 | 5 | {% block body %} 6 |
      7 | 8 | {% include 'alerts.html.twig' %} 9 |

      {{ block('title') }}

      10 | 11 |

      Este sitio web está dedicado a proporcionar un constructor de mazos y motor de búsqueda rápido, potente y 12 | exhaustivo para {{ game_name }} cartas, junto con descripciones de cartas e imágenes de cartas.

      13 |

      Este sitio web está optimizado para la navegación móvil (WebKit).

      14 | 15 |

      créditos

      16 | 17 |

      Me gustaría agradecer especialmente:

      18 |
        19 |
      • a SP por proporcionar el nombre de dominio
      • 20 |
      • a The Crazy Bear-Riders por las pruebas antes del lanzamiento, especialmente mplain and alexmonk
      • 21 |
      • a agotgame por la idea de los iconos de tipo codificados por 22 | colores 23 |
      • 24 |
      25 | 26 |
      27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /src/DataFixtures/LoadTournamentData.php: -------------------------------------------------------------------------------- 1 | setId($data[0]); 38 | $entity->setDescription($data[1]); 39 | $entity->setActive((bool) $data[2]); 40 | return $entity; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /migrations/Version20221109013044.php: -------------------------------------------------------------------------------- 1 | addSql('ALTER TABLE deck ADD parent_deck_id INT DEFAULT NULL'); 23 | $this->addSql('ALTER TABLE deck ADD CONSTRAINT FK_4FAC363763513C9A FOREIGN KEY (parent_deck_id) REFERENCES deck (id)'); 24 | $this->addSql('CREATE INDEX IDX_4FAC363763513C9A ON deck (parent_deck_id)'); 25 | } 26 | 27 | public function down(Schema $schema): void 28 | { 29 | $this->addSql('ALTER TABLE deck DROP FOREIGN KEY FK_4FAC363763513C9A'); 30 | $this->addSql('DROP INDEX IDX_4FAC363763513C9A ON deck'); 31 | $this->addSql('ALTER TABLE deck DROP parent_deck_id'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | # see https://symfony.com/doc/current/reference/configuration/framework.html 2 | framework: 3 | assets: 4 | json_manifest_path: "%kernel.project_dir%/public/manifest.json" 5 | default_locale: '%locale%' 6 | translator: { fallbacks: ['%locale%'] } 7 | secret: '%env(APP_SECRET)%' 8 | form: ~ 9 | csrf_protection: true 10 | validation: { enable_annotations: true } 11 | #serializer: { enable_annotations: true } 12 | http_method_override: true 13 | trusted_hosts: ~ 14 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 15 | # Remove or comment this section to explicitly disable session support. 16 | session: 17 | # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id 18 | handler_id: session.handler.native_file 19 | save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%' 20 | cookie_secure: auto 21 | cookie_samesite: lax 22 | #esi: true 23 | fragments: true 24 | php_errors: 25 | log: true 26 | templating: 27 | engines: ['twig'] 28 | -------------------------------------------------------------------------------- /src/Entity/TypeInterface.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | {% include 'alerts.html.twig' %} 15 | 16 |
      17 |
      18 | {% if restrictions|length %} 19 |
      20 |

      Active Restricted Lists

      21 |

      The following lists of card restrictions are supported in the deck builder.

      22 | {% for list in restrictions %} 23 | {% include 'Restrictions/restrictedlist.html.twig' with {'list': list} %} 24 | {% endfor %} 25 |
      26 | {% endif %} 27 |
      28 |
      29 | 30 | {% endblock %} 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /templates/Builder/tab-pane-infos.html.twig: -------------------------------------------------------------------------------- 1 | 2 |
      3 |
      4 |
      5 | 6 | 7 | {{ 'decks.edit.notes.tags.hint' | trans | raw }} 8 |
      9 |
      10 | 11 | 13 |
      14 |
      15 | Preview. Look here for a Markdown 16 | syntax reference. 17 | 18 |
      19 |
      20 |
      21 | 22 | -------------------------------------------------------------------------------- /config/bootstrap.php: -------------------------------------------------------------------------------- 1 | =1.2) 13 | if (is_array($env = @include dirname(__DIR__) . '/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) { 14 | (new Dotenv(false))->populate($env); 15 | } else { 16 | // load all the .env files 17 | (new Dotenv(false))->loadEnv(dirname(__DIR__) . '/.env'); 18 | } 19 | 20 | $_SERVER += $_ENV; 21 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; 22 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; 23 | $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; 24 | -------------------------------------------------------------------------------- /migrations/Version20221110155006.php: -------------------------------------------------------------------------------- 1 | addSql('ALTER TABLE deck DROP FOREIGN KEY FK_4FAC363763513C9A'); 23 | $this->addSql('ALTER TABLE deck ADD CONSTRAINT FK_4FAC363763513C9A FOREIGN KEY (parent_deck_id) REFERENCES deck (id) ON DELETE SET NULL'); 24 | } 25 | 26 | public function down(Schema $schema): void 27 | { 28 | $this->addSql('ALTER TABLE deck DROP FOREIGN KEY FK_4FAC363763513C9A'); 29 | $this->addSql('ALTER TABLE deck ADD CONSTRAINT FK_4FAC363763513C9A FOREIGN KEY (parent_deck_id) REFERENCES deck (id) ON UPDATE NO ACTION ON DELETE NO ACTION'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/DataFixtures/LoadFactionData.php: -------------------------------------------------------------------------------- 1 | setId($data[0]); 37 | $entity->setCode($data[1]); 38 | $entity->setName($data[2]); 39 | $entity->setIsPrimary((bool) $data[3]); 40 | $entity->setOctgnId($data[4]); 41 | return $entity; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Controller/SecurityController.php: -------------------------------------------------------------------------------- 1 | render( 23 | 'Security/login.html.twig', 24 | [ 25 | 'last_username' => $authenticationUtils->getLastUsername(), 26 | 'error' => $authenticationUtils->getLastAuthenticationError(), 27 | ] 28 | ); 29 | } 30 | 31 | /** 32 | * @Route("/oauth/v2/auth_login_check", name="oauth_server_auth_login_check") 33 | */ 34 | public function loginCheckAction() 35 | { 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Entity/TournamentInterface.php: -------------------------------------------------------------------------------- 1 | getException(); 19 | $request = $event->getRequest(); 20 | if (!$request->isXmlHttpRequest()) { 21 | return; 22 | } 23 | $statusCode = $exception->getCode(); 24 | if (!array_key_exists($statusCode, Response::$statusTexts)) { 25 | $statusCode = 500; 26 | } 27 | $content = [ 28 | 'success' => false, 29 | 'message' => $exception->getMessage() 30 | ]; 31 | $response = new JsonResponse($content, $statusCode, array('Content-Type' => 'application/json')); 32 | $event->setResponse($response); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/Builder/no-decks-text.en.html.twig: -------------------------------------------------------------------------------- 1 |

      What, no deck?

      2 | 3 |

      4 | Decks are awesome. You can Edit them until you're satisfied, 6 | then Publish them for others 7 | to discuss. 8 | And if you want to keep to yourself, you can still Download them or 10 | Export them. 11 |

      12 | 13 |

      14 | So what are you waiting for? To create your first deck, you can either Build one from scratch using 16 | the Deckbuilder, 17 | Import one from the web, 18 | or Upload a deck file in 19 | Octgn or simple text format. 20 |

      21 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | tests 22 | 23 | 24 | 25 | 26 | 27 | src 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /templates/Builder/no-decks-text.de.html.twig: -------------------------------------------------------------------------------- 1 |

      What, no deck?

      2 | 3 |

      4 | Du kannst Decks Bearbeiten 5 | bist du mit ihnen zufrieden bist, 6 | dann Veröffentlichen, um sie 7 | mit anderen zu diskutieren. 8 | Und wenn du sie für dich behalten möchtest, kannst du sie trotzdem Herunterladen oder 10 | Exportieren. 11 |

      12 | 13 |

      14 | Also worauf wartest du? Um dein erstes Deck zu erstellen kannst du entweder eins von Grund auf selber Bauen, eins aus dem Internet 16 | Importieren, oder eine Datei 17 | im OCTGN- oder Textformat 18 | oder Hochladen. 19 |

      20 | -------------------------------------------------------------------------------- /templates/Builder/no-decks-text.es.html.twig: -------------------------------------------------------------------------------- 1 |

      ¿Qué? ¿No hay mazos?

      2 | 3 |

      4 | Los mazos son fantásticos. Puedes Editarlos 5 | hasta que estés satisfecho, 6 | luego Publicarlos para poder 7 | verlos con otros usuarios. 8 | Y si quieres tenerlos para tí mismo, aún puedes Descargarlos o 10 | Exportarlos. 11 |

      12 | 13 |

      14 | ¿Así que a qué esperas? Para crear tu primer mazo, puedes tanto Construir uno desde cero usando el Constructor de mazos, 16 | Importar uno de internet, 17 | o Subir el fichero de un 18 | mazo en el formato de OCTGN o en texto plano. 19 |

      20 | -------------------------------------------------------------------------------- /src/Repository/DecklistRepository.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('d') 13 | ->select('d, f') 14 | ->join('d.faction', 'f') 15 | ->andWhere('d.signature = ?1'); 16 | 17 | $qb->setParameter(1, $decklist->getSignature()); 18 | $qb->orderBy('d.dateCreation', 'ASC'); 19 | $qb->setMaxResults(1); 20 | 21 | return $qb->getQuery()->getOneOrNullResult(); 22 | } 23 | 24 | //findBy([ 'parent' => $decklist->getParent() ], [ 'version' => 'DESC' ]); 25 | public function findVersions(DecklistInterface $decklist) 26 | { 27 | $qb = $this->createQueryBuilder('d') 28 | ->select('d, f, ds, c') 29 | ->join('d.faction', 'f') 30 | ->join('d.slots', 'ds') 31 | ->join('ds.card', 'c') 32 | ->andWhere('d.parent = ?1'); 33 | 34 | $qb->setParameter(1, $decklist->getParent()); 35 | $qb->orderBy('d.version', 'DESC'); 36 | 37 | return $qb->getQuery()->getResult(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/DQL/PowerFunction.php: -------------------------------------------------------------------------------- 1 | basePrimary->dispatch($sqlWalker), 34 | $this->exponentPrimary->dispatch($sqlWalker) 35 | ); 36 | } 37 | 38 | /** 39 | * @inheritdoc 40 | */ 41 | public function parse(Parser $parser) 42 | { 43 | $parser->match(Lexer::T_IDENTIFIER); 44 | $parser->match(Lexer::T_OPEN_PARENTHESIS); 45 | $this->basePrimary = $parser->StringExpression(); 46 | $parser->match(Lexer::T_COMMA); 47 | $this->exponentPrimary = $parser->ArithmeticPrimary(); 48 | $parser->match(Lexer::T_CLOSE_PARENTHESIS); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /migrations/Version20201206205310.php: -------------------------------------------------------------------------------- 1 | abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 23 | 24 | $this->addSql('CREATE TABLE restriction (code VARCHAR(20) NOT NULL, effective_on DATETIME NOT NULL, issuer VARCHAR(50) NOT NULL, card_set VARCHAR(20) NOT NULL, contents JSON NOT NULL, active TINYINT(1) NOT NULL, version VARCHAR(20) NOT NULL, PRIMARY KEY(code)) DEFAULT CHARACTER SET UTF8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB'); 25 | } 26 | 27 | public function down(Schema $schema): void 28 | { 29 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 30 | 31 | $this->addSql('DROP TABLE restriction'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /migrations/Version20190329042504.php: -------------------------------------------------------------------------------- 1 | abortIf( 29 | $this->connection->getDatabasePlatform()->getName() !== 'mysql', 30 | 'Migration can only be executed safely on \'mysql\'.' 31 | ); 32 | 33 | $this->addSql('ALTER TABLE tournament ADD active TINYINT(1) DEFAULT \'1\' NOT NULL'); 34 | } 35 | 36 | /** 37 | * @inheritDoc 38 | */ 39 | public function down(Schema $schema): void 40 | { 41 | $this->abortIf( 42 | $this->connection->getDatabasePlatform()->getName() !== 'mysql', 43 | 'Migration can only be executed safely on \'mysql\'.' 44 | ); 45 | 46 | $this->addSql('ALTER TABLE tournament DROP active'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /migrations/Version20190508061240.php: -------------------------------------------------------------------------------- 1 | abortIf( 26 | $this->connection->getDatabasePlatform()->getName() !== 'mysql', 27 | 'Migration can only be executed safely on \'mysql\'.' 28 | ); 29 | 30 | $this->addSql("UPDATE cycle SET code = 'variants', name = 'Variants' WHERE code = 'draft'"); 31 | } 32 | 33 | /** 34 | * @inheritdoc 35 | */ 36 | public function down(Schema $schema): void 37 | { 38 | $this->abortIf( 39 | $this->connection->getDatabasePlatform()->getName() !== 'mysql', 40 | 'Migration can only be executed safely on \'mysql\'.' 41 | ); 42 | 43 | $this->addSql("UPDATE cycle SET code = 'draft', name = 'Draft Sets' WHERE code = 'variants'"); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /templates/Restrictions/podlist.html.twig: -------------------------------------------------------------------------------- 1 | {# 2 | @file 3 | Partial template for rendering a list of pods. 4 | 5 | Available variables: 6 | - pods: a list of pods 7 | #} 8 | {% for pod in pods %} 9 |
      10 |
      Pod {{ pod.title }}
      11 |
      12 | {% if pod.restricted %} 13 | 18 | {% endif %} 19 | {% for card in pod.cards %} 20 | 25 | {% endfor %} 26 |
      27 |
      28 |
      29 | {% endfor %} 30 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(['--env', '-e'], null, true)) { 23 | putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); 24 | } 25 | 26 | if ($input->hasParameterOption('--no-debug', true)) { 27 | putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); 28 | } 29 | 30 | require dirname(__DIR__).'/config/bootstrap.php'; 31 | 32 | if ($_SERVER['APP_DEBUG']) { 33 | umask(0000); 34 | 35 | if (class_exists(Debug::class)) { 36 | Debug::enable(); 37 | } 38 | } 39 | 40 | $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); 41 | $application = new Application($kernel); 42 | $application->run($input); 43 | -------------------------------------------------------------------------------- /assets/js/app.config.js: -------------------------------------------------------------------------------- 1 | /* global app */ 2 | (function app_tip(config, $) 3 | { 4 | var _config; 5 | 6 | function load() 7 | { 8 | var config = {}; 9 | if (localStorage) { 10 | var stored = localStorage.getItem('app.config'); 11 | if (stored) { 12 | config = JSON.parse(stored); 13 | } 14 | } 15 | return _.extend({ 16 | 'show-unusable': false, 17 | 'show-only-deck': false, 18 | 'hide-banned-melee': false, 19 | 'hide-banned-joust': false, 20 | 'display-column': 1, 21 | 'core-set': 3, 22 | 'buttons-behavior': 'cumulative' 23 | }, config || {}); 24 | } 25 | 26 | function save(config) 27 | { 28 | if (localStorage) { 29 | localStorage.setItem('app.config', JSON.stringify(config)); 30 | } 31 | } 32 | 33 | function getConfig() 34 | { 35 | if (! _config) { 36 | _config = load(); 37 | } 38 | return _config; 39 | } 40 | 41 | config.set = function (name, value) { 42 | var config = getConfig(); 43 | config[name] = value; 44 | save(config); 45 | }; 46 | 47 | config.get = function ( name) { 48 | var config = getConfig(); 49 | return config[name]; 50 | } 51 | 52 | 53 | })(app.config = {}, jQuery); 54 | -------------------------------------------------------------------------------- /config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], 6 | Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], 7 | Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], 8 | Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true], 9 | Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], 10 | FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true], 11 | Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], 12 | FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true], 13 | Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], 14 | FOS\UserBundle\FOSUserBundle::class => ['all' => true], 15 | JMS\I18nRoutingBundle\JMSI18nRoutingBundle::class => ['all' => true], 16 | Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true], 17 | Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], 18 | Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], 19 | Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], 20 | Bazinga\Bundle\JsTranslationBundle\BazingaJsTranslationBundle::class => ['all' => true], 21 | ]; 22 | -------------------------------------------------------------------------------- /templates/Modale/card.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 28 | 29 | -------------------------------------------------------------------------------- /migrations/Version20190922213719.php: -------------------------------------------------------------------------------- 1 | addSql('ALTER TABLE deck ADD uuid CHAR(36) COMMENT \'(DC2Type:uuid)\''); 29 | $this->addSql('CREATE UNIQUE INDEX UNIQ_4FAC3637D17F50A6 ON deck (uuid)'); 30 | 31 | $sql = 'SELECT id FROM deck ORDER BY id'; 32 | $rows = $this->connection->executeQuery($sql)->fetchAll(); 33 | 34 | foreach ($rows as $row) { 35 | $uuid = Uuid::uuid4(); 36 | $this->addSql("UPDATE deck SET uuid = :uuid WHERE id = :id", ["uuid" => $uuid, "id" => $row["id"]]); 37 | } 38 | } 39 | 40 | /** 41 | * @inheritdoc 42 | */ 43 | public function down(Schema $schema): void 44 | { 45 | $this->addSql('DROP INDEX UNIQ_4FAC3637D17F50A6 ON deck'); 46 | $this->addSql('ALTER TABLE deck DROP uuid'); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /assets/js/app.binomial.js: -------------------------------------------------------------------------------- 1 | /** 2 | * binomial coefficient module, shamelessly ripped from https://github.com/pboyer/binomial.js 3 | */ 4 | (function app_binomial(binomial, $) 5 | { 6 | 7 | var memo = []; 8 | 9 | /** 10 | * @memberOf binomial 11 | */ 12 | binomial.get = function (n, k) 13 | { 14 | if(k === 0) { 15 | return 1; 16 | } 17 | if(n === 0 || k > n) { 18 | return 0; 19 | } 20 | if(k > n - k) { 21 | k = n - k; 22 | } 23 | if(memo_exists(n, k)) { 24 | return get_memo(n, k); 25 | } 26 | var r = 1, 27 | n_o = n; 28 | for(var d = 1; d <= k; d++) { 29 | if(memo_exists(n_o, d)) { 30 | n--; 31 | r = get_memo(n_o, d); 32 | continue; 33 | } 34 | r *= n--; 35 | r /= d; 36 | memoize(n_o, d, r); 37 | } 38 | return r; 39 | }; 40 | 41 | function memo_exists(n, k) 42 | { 43 | return (memo[n] != undefined && memo[n][k] != undefined); 44 | } 45 | 46 | function get_memo(n, k) 47 | { 48 | return memo[n][k]; 49 | } 50 | 51 | function memoize(n, k, val) 52 | { 53 | if(memo[n] === undefined) { 54 | memo[n] = []; 55 | } 56 | memo[n][k] = val; 57 | } 58 | 59 | })(app.binomial = {}, jQuery); 60 | -------------------------------------------------------------------------------- /src/Entity/DeckchangeInterface.php: -------------------------------------------------------------------------------- 1 | 4 | {% if card.type_code == 'character' or card.type_code == 'attachment' or card.type_code == 'event' or card.type_code == 'location' %} 5 | {{ 'card.info.cost' | trans }}: {{ macros.integer_or_x(card.cost) }}. 6 | {% endif %} 7 | {% if card.type_code == 'character' %} 8 | {{ 'card.info.str' | trans }}: {{ macros.integer_or_x(card.strength) }}. 9 | {% if card.is_military %}{% endif %} 11 | {% if card.is_intrigue %}{% endif %} 13 | {% if card.is_power %}{% endif %} 14 | {% endif %} 15 | {% if card.type_code == 'plot' %} 16 | {{ 'card.info.income' | trans }}: {{ macros.integer_or_x(card.income) }}. 17 | {{ 'card.info.initiative' | trans }}: {{ macros.integer_or_x(card.initiative) }}. 18 | {{ 'card.info.claim' | trans }}: {{ macros.integer_or_x(card.claim) }}. 19 | {{ 'card.info.reserve' | trans }}: {{ macros.integer_or_x(card.reserve) }}. 20 | {{ 'card.info.plotlimit' | trans }}: {{ macros.integer_or_x(card.deck_limit) }}. 21 | {% endif %} 22 | 23 | -------------------------------------------------------------------------------- /src/Entity/ReviewcommentInterface.php: -------------------------------------------------------------------------------- 1 | 2 |

      Card reviews more

      3 |
      4 | {% for review in reviews %} 5 |
      6 |

      7 | {{ review.nb_votes }} 9 | {{ review.card_name }} 11 |

      12 |
      13 | by 14 | {{ review.username }} 16 | {% if review.donation > 0 %}{% endif %} 18 | {{ review.reputation }} 19 |
      20 |

      21 | {{ review.rawtext|raw }} 22 |

      23 |
      24 | {% endfor %} 25 |
      26 | 27 | -------------------------------------------------------------------------------- /src/Entity/CommentInterface.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% include 'alerts.html.twig' %} 8 |
      9 | 10 |
      11 |

      The Gracious Donators

      12 |

      ThronesDB wouldn't be the same without them. Many, many thanks.

      13 |

      To become a Donator and help run the site, you can use Paypal 15 | (€) or Paypal 17 | ($).

      18 | 27 |
      28 | 29 |
      30 | 31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /src/Services/DataimportFileLocator.php: -------------------------------------------------------------------------------- 1 | fileLocator = new FileLocator(); 26 | $this->setDirectoryPath($path); 27 | } 28 | 29 | /** 30 | * Finds and return the absolute path to a given dataimport file. 31 | * 32 | * @param string $fileName name of the data file. 33 | * @return string the absolute path. 34 | */ 35 | public function getDataFilePath($fileName) 36 | { 37 | $path = $this->fileLocator->locate($this->getDirectoryPath() . DIRECTORY_SEPARATOR . basename($fileName)); 38 | return $path; 39 | } 40 | 41 | /** 42 | * @param string $dir The relative path to the data-files directory. 43 | */ 44 | public function setDirectoryPath($dir) 45 | { 46 | $this->dir = $dir; 47 | } 48 | 49 | /** 50 | * @return string The relative path to the data-files directory. 51 | */ 52 | public function getDirectoryPath() 53 | { 54 | return $this->dir; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /templates/Default/donators.es.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |
      6 | 7 | {% include 'alerts.html.twig' %} 8 |
      9 | 10 |
      11 |

      Los graciosos donadores

      12 |

      ThronesDB no sería lo mismo sin ellos. Muchas gracias..

      13 |

      Para convertirse en donador y ayudar a administrar el sitio, puede usar Paypal 15 | (€) o Paypal 17 | ($).

      18 | 27 |
      28 | 29 |
      30 |
      31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /templates/Decklist/comments.html.twig: -------------------------------------------------------------------------------- 1 | {% import "macros.html.twig" as macros %} 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | {% for comment in decklist.comments %} 13 | 14 | 29 | 30 | {% endfor %} 31 | 32 |
      7 | {% transchoice decklist.nbComments with {'%count%': decklist.nbComments} %}decklist.view.comments.count{% endtranschoice %} 8 |
      15 |
      16 | 18 |
      19 |
      20 |

      21 | 22 | 23 | 24 | {{ macros.username(comment.user) }} 25 |

      26 |
      {{ comment.text|raw }}
      27 |
      28 |
      33 | 34 | -------------------------------------------------------------------------------- /templates/Default/donators.de.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block body %} 4 | 5 |
      6 | 7 | {% include 'alerts.html.twig' %} 8 |
      9 | 10 |
      11 |

      Die großzügigen Spender/innen

      12 |

      ThronesDB wäre ohne sie nicht dieselbe Seite. Vielen, vielen Dank.

      13 |

      Um zu spenden und den Betrieb dieser Seite zu unterstützen kannst du Paypal 15 | (€) oder Paypal 17 | ($) verwenden.

      18 | 27 |
      28 | 29 |
      30 |
      31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /src/Entity/CommonDeck.php: -------------------------------------------------------------------------------- 1 | getSlots(); 19 | return [ 20 | 'name' => $this->getName(), 21 | 'version' => $this->getVersion(), 22 | 'agendas' => $slots->getAgendas(), 23 | 'faction' => $this->getFaction(), 24 | 'draw_deck_size' => $slots->getDrawDeck()->countCards(), 25 | 'plot_deck_size' => $slots->getPlotDeck()->countCards(), 26 | 'included_packs' => $slots->getIncludedPacks(), 27 | 'slots_by_type' => $slots->getSlotsByType() 28 | ]; 29 | } 30 | 31 | /** 32 | * @inheritdoc 33 | */ 34 | public function getCycleOrderExport() 35 | { 36 | $slots = $this->getSlots(); 37 | return [ 38 | 'name' => $this->getName(), 39 | 'version' => $this->getVersion(), 40 | 'agendas' => $slots->getAgendas(), 41 | 'faction' => $this->getFaction(), 42 | 'draw_deck_size' => $slots->getDrawDeck()->countCards(), 43 | 'plot_deck_size' => $slots->getPlotDeck()->countCards(), 44 | 'included_packs' => $slots->getIncludedPacks(), 45 | 'slots_by_cycle_order' => $slots->getSlotsByCycleOrder() 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Entity/FactionInterface.php: -------------------------------------------------------------------------------- 1 | stringPrimary->dispatch($sqlWalker) . ', ' . 38 | $this->stringSecondary->dispatch($sqlWalker) . ', ' . 39 | $this->stringThird->dispatch($sqlWalker) . 40 | ')'; 41 | } 42 | 43 | /** 44 | * @inheritdoc 45 | */ 46 | public function parse(Parser $parser) 47 | { 48 | $parser->match(Lexer::T_IDENTIFIER); 49 | $parser->match(Lexer::T_OPEN_PARENTHESIS); 50 | $this->stringPrimary = $parser->StringPrimary(); 51 | $parser->match(Lexer::T_COMMA); 52 | $this->stringSecondary = $parser->StringPrimary(); 53 | $parser->match(Lexer::T_COMMA); 54 | $this->stringThird = $parser->StringPrimary(); 55 | $parser->match(Lexer::T_CLOSE_PARENTHESIS); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /migrations/Version20201230234348.php: -------------------------------------------------------------------------------- 1 | abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 23 | $this->addSql('ALTER TABLE restriction ADD date_creation DATETIME '); 24 | $this->addSql('UPDATE restriction SET date_creation = CURRENT_TIMESTAMP()'); 25 | $this->addSql('ALTER TABLE restriction MODIFY date_creation DATETIME NOT NULL'); 26 | 27 | $this->addSql('ALTER TABLE restriction ADD date_update DATETIME '); 28 | $this->addSql('UPDATE restriction SET date_update = CURRENT_TIMESTAMP()'); 29 | $this->addSql('ALTER TABLE restriction MODIFY date_update DATETIME NOT NULL'); 30 | } 31 | 32 | public function down(Schema $schema): void 33 | { 34 | $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); 35 | $this->addSql('ALTER TABLE restriction DROP date_update'); 36 | $this->addSql('ALTER TABLE restriction DROP date_creation'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Entity/CardTest.php: -------------------------------------------------------------------------------- 1 | setText($text); 44 | $this->assertEquals($card->hasShadowKeyword($shadowKeyword), $hasKeyword); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /templates/apiset.xml.twig: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {% autoescape false %} 10 | {% for card in cards %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {% endfor %} 28 | {% endautoescape %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /templates/Search/display-list.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'Search/display.html.twig' %} 2 | 3 | {% block main %} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {% for i in 0..cards|length-1 %} 18 | 19 | {% set card = cards[i] %} 20 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% endfor %} 33 |
      {{ 'card.info.name' | trans }}{{ 'card.info.faction' | trans }}{{ 'card.info.cost' | trans }}{{ 'card.info.type' | trans }}{{ 'card.info.str' | trans }}{{ 'card.info.traits' | trans }}{{ 'card.info.set' | trans }}
      21 | 22 | {{ card.name }} 24 | {{ card.faction_name }}{{ card.cost }}{{ card.type_name }}{{ card.strength }}{{ card.traits }}{{ card.pack_name }} {{ card.position }}
      34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /src/Command/DeleteInactiveCommand.php: -------------------------------------------------------------------------------- 1 | entityManager = $entityManager; 25 | } 26 | 27 | protected function configure() 28 | { 29 | $this 30 | ->setName('app:delete-inactive-users') 31 | ->setDescription('Delete inactive users that were created 48 hours or longer ago.') 32 | ; 33 | } 34 | 35 | protected function execute(InputInterface $input, OutputInterface $output): int 36 | { 37 | $limit = new DateTime(); 38 | $limit->sub(new DateInterval('PT48H')); 39 | $count = 0; 40 | 41 | $users = $this->entityManager->getRepository(User::class)->findBy(array('enabled' => false)); 42 | foreach ($users as $user) { 43 | /* @var UserInterface $user */ 44 | if ($user->getDateCreation() < $limit) { 45 | $count++; 46 | $this->entityManager->remove($user); 47 | } 48 | } 49 | $this->entityManager->flush(); 50 | $output->writeln(date('c') . " Delete $count inactive users."); 51 | return 0; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /templates/Search/display-spoiler.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'Search/display.html.twig' %} 2 | 3 | {% block main %} 4 | 5 | {% for row in 0..(cards|length-1)//3 %} 6 |
      7 | {% for col in 0..2 %} 8 | {% if row*3+col < cards|length %} 9 | {% set card = cards[row*3+col] %} 10 |
      11 |

      12 | {% include 'Search/card-name-with-link.html.twig' %} 13 |

      14 |
      15 |
      16 | 17 |
      18 | {% include 'Search/card-work-in-progress.html.twig' %} 19 | {% include 'Search/card-faction.html.twig' %} 20 | {% include 'Search/card-info.html.twig' %} 21 | {% include 'Search/card-text.html.twig' %} 22 | {% if card.errataed %} 23 | {% include 'Search/card-errata-short.html.twig' %} 24 | {% endif %} 25 | {% include 'Search/card-flavor.html.twig' %} 26 | {% include 'Search/card-illustrator.html.twig' %} 27 | {% include 'Search/card-pack.html.twig' %} 28 |
      29 |
      30 | {% endif %} 31 | {% endfor %} 32 |
      33 | {% endfor %} 34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /templates/Builder/draw-simulator.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 31 | 32 | 33 | 34 | 35 | 36 |
      {{ 'decks.simulator.title' | trans }}
      11 |
      12 | 14 | {% for i in [1,2,7] %} 15 | 16 | {% endfor %} 17 | 18 | 20 |
      21 |
      22 | {{ 'decks.simulator.odds' | trans }}: 23 | 0% – 24 | 0% – 25 | 0% 26 | {{ 'decks.simulator.more' | trans }} 28 | 29 |
      30 |
      37 | -------------------------------------------------------------------------------- /templates/Export/octgn.xml.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 | {{ deck.faction.name }} 5 |
      6 |
      7 | {% for agenda in deck.agendas %} 8 | {{ agenda.card.name }} 9 | {% endfor %} 10 |
      11 |
      12 | {% for slot in deck.slots_by_type.plot %} 13 | {{ slot.card.name }} 14 | {% endfor %} 15 |
      16 |
      17 | {% for slot in deck.slots_by_type.character %} 18 | {{ slot.card.name }} 19 | {% endfor %} 20 |
      21 |
      22 | {% for slot in deck.slots_by_type.location %} 23 | {{ slot.card.name }} 24 | {% endfor %} 25 |
      26 |
      27 | {% for slot in deck.slots_by_type.attachment %} 28 | {{ slot.card.name }} 29 | {% endfor %} 30 |
      31 |
      32 | {% for slot in deck.slots_by_type.event %} 33 | {{ slot.card.name }} 34 | {% endfor %} 35 |
      36 | 37 |
      38 | -------------------------------------------------------------------------------- /src/Controller/LocaleAwareTemplating.php: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | -------------------------------------------------------------------------------- /templates/Modale/file.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | -------------------------------------------------------------------------------- /templates/bundles/FOSUserBundle/Security/login_content.html.twig: -------------------------------------------------------------------------------- 1 | {% trans_default_domain 'FOSUserBundle' %} 2 | 3 | {% if error %} 4 |
      {{ error.messageKey|trans(error.messageData, 'security') }}
      5 | {% endif %} 6 | 7 |
      8 | 9 | 10 |
      11 | 12 | 14 |
      15 | 16 |
      17 | 18 | 19 |
      20 | 21 |
      22 | 26 |
      27 | 28 | {% if error and error.messageKey == 'Account is disabled.' %} 29 |

      30 | Never got the registration email? 31 | Click here. 32 |

      33 | {% endif %} 34 | 35 | 37 | {{ 'registration.submit'|trans }} 38 | {{ 'resetting.request.submit'|trans }} 39 |
      40 | -------------------------------------------------------------------------------- /templates/Decklist/compare-modal.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 31 | 32 | -------------------------------------------------------------------------------- /templates/Builder/tab-pane-history.html.twig: -------------------------------------------------------------------------------- 1 | {% import "macros.html.twig" as macros %} 2 | 3 | 4 |
      5 |
      6 |
      7 |
      9 | {{ 'decks.history.timeremaining' | trans }} 10 |
      11 |
      12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
      {{ 'decks.history.columns.date' | trans }}{{ 'decks.history.columns.version' | trans }}{{ 'decks.history.columns.changes' | trans }}{{ 'decks.history.columns.action' | trans }}
      24 |
      25 |
      26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | {% if deck.children|length %} 38 | {% for decklist in deck.children %} 39 | {{ macros.decklist_table_row(decklist) }} 40 | {% endfor %} 41 | {% else %} 42 | 43 | 44 | 45 | {% endif %} 46 | 47 |
      {{ 'decks.published.title' | trans }}
      {{ 'decks.published.none' | trans }}.
      48 | 49 | -------------------------------------------------------------------------------- /assets/css/icons.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'thronesdb'; 3 | src:url('../fonts/thronesdb.eot?irjt2b'); 4 | src:url('../fonts/thronesdb.eot?#iefixirjt2b') format('embedded-opentype'), 5 | url('../fonts/thronesdb.ttf?irjt2b') format('truetype'), 6 | url('../fonts/thronesdb.woff?irjt2b') format('woff'), 7 | url('../fonts/thronesdb.svg?irjt2b#thronesdb') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="icon-"], [class*=" icon-"] { 13 | font-family: 'thronesdb'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | 21 | /* Better Font Rendering =========== */ 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | } 25 | 26 | .icon-baratheon:before { 27 | content: "\e600"; 28 | } 29 | .icon-greyjoy:before { 30 | content: "\e601"; 31 | } 32 | .icon-intrigue:before { 33 | content: "\e602"; 34 | } 35 | .icon-lannister:before { 36 | content: "\e603"; 37 | } 38 | .icon-martell:before { 39 | content: "\e604"; 40 | } 41 | .icon-military:before { 42 | content: "\e605"; 43 | } 44 | .icon-thenightswatch:before { 45 | content: "\e606"; 46 | } 47 | .icon-power:before { 48 | content: "\e607"; 49 | } 50 | .icon-stark:before { 51 | content: "\e608"; 52 | } 53 | .icon-targaryen:before { 54 | content: "\e609"; 55 | } 56 | .icon-tyrell:before { 57 | content: "\e60a"; 58 | } 59 | .icon-unique:before { 60 | content: "\e60b"; 61 | } 62 | .icon-plot:before { 63 | content: "\e60c"; 64 | } 65 | .icon-location:before { 66 | content: "\e60e"; 67 | } 68 | .icon-character:before { 69 | content: "\e60f"; 70 | } 71 | .icon-event:before { 72 | content: "\e610"; 73 | } 74 | .icon-agenda:before { 75 | content: "\e611"; 76 | } 77 | .icon-attachment:before { 78 | content: "\e60d"; 79 | } 80 | .icon-neutral:before { 81 | content: "\e612"; 82 | } 83 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | services: mysql 3 | sudo: false 4 | 5 | cache: 6 | directories: 7 | - $HOME/.composer/cache 8 | - ./vendor/bin/.phpunit 9 | 10 | env: 11 | global: 12 | - SYMFONY_PHPUNIT_DIR=./vendor/bin/.phpunit 13 | - SYMFONY_DEPRECATIONS_HELPER=29 14 | 15 | matrix: 16 | fast_finish: true 17 | include: 18 | - php: 7.4 19 | 20 | before_install: 21 | - composer self-update 22 | - mysql -e "create database IF NOT EXISTS ilios;" -uroot 23 | - echo $TRAVIS_PHP_VERSION 24 | - echo "extension=apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini 25 | - echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini 26 | - cp ${TRAVIS_BUILD_DIR}/.env.travis ${TRAVIS_BUILD_DIR}/.env.test.local 27 | install: 28 | - composer install --no-interaction --prefer-dist -d ${TRAVIS_BUILD_DIR} 29 | 30 | before_script: 31 | - bin/console doctrine:database:create --env=test 32 | - bin/console doctrine:migrations:migrate --env=test --no-interaction 33 | - bin/console doctrine:fixtures:load --env=test --no-interaction 34 | - bin/console cache:clear --env=test --no-interaction 35 | - bin/console cache:clear --env=dev --no-interaction 36 | 37 | script: 38 | # this checks that the source code follows the Symfony Code Syntax rules 39 | - ./vendor/bin/phpcs --ignore=src/migrations src tests 40 | # this checks that the YAML config files contain no syntax errors 41 | - ./bin/console lint:yaml config 42 | # this checks that the Twig template files contain no syntax errors 43 | - ./bin/console lint:twig src 44 | # this checks that Doctrine's mapping configurations are valid 45 | - ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction 46 | # run unit tests 47 | - ./bin/phpunit --exclude-group=api tests 48 | # this runs the static code analyzer 49 | - ./vendor/bin/phpstan analyse --no-progress src 50 | -------------------------------------------------------------------------------- /templates/footer.en.html.twig: -------------------------------------------------------------------------------- 1 |
      2 |
      3 | 12 |
      13 |
      14 |

      15 | Designed and built by Alsciende. 16 |

      17 | 18 |

      19 | Maintained by stopfstedt 20 | Contact: 21 | 22 |

      23 | 24 |

      25 | Cards data maintained with great dedication by the TheIronThrone.net team. 27 |

      28 | 29 |

      30 | Please post bug reports and feature requests on GitHub. 31 |

      32 | 33 |

      34 | You may contribute by giving money on Paypal. 35 |

      36 |
      37 |
      38 |

      39 | The information presented on this site about A Game of Thrones: The Card Game Second Edition, both literal 40 | and graphical, is copyrighted by Fantasy Flight Games. 41 | This website is not produced, endorsed, supported, or affiliated with Fantasy Flight Games. 42 |

      43 | 44 |
      45 |
      46 | -------------------------------------------------------------------------------- /templates/Export/default.txt.twig: -------------------------------------------------------------------------------- 1 | {{ deck.name }} 2 | Version: {{ deck.version }} 3 | 4 | {{ deck.faction.name }} 5 | {% for agenda in deck.agendas %} 6 | {{ agenda.card.name }}{% if agenda.card.isMultiple == true %} ({{ agenda.card.pack.name }}){% endif %} 7 | 8 | {% endfor %} 9 | 10 | {% set first_pack = deck.included_packs|first %} 11 | {% set last_pack = deck.included_packs|last %} 12 | Packs: {% if deck.included_packs|length > 1 %} 13 | From {{ first_pack.pack.name }}{% if first_pack.nb > 1 %} ({{ first_pack.nb }}){% endif %} to {{ last_pack.pack.name }}{% if last_pack.nb > 1 %} ({{ last_pack.nb }}){% endif %} 14 | {% else %} 15 | {{ first_pack.pack.name }}{% if first_pack.nb > 1 %} ({{ first_pack.nb }}){% endif %} 16 | {% endif %} 17 | 18 | 19 | {% set plots = deck.slots_by_type.plot %} 20 | Plot{% if plots|length > 1 %}s{% endif %} 21 | 22 | {% for slot in plots %} 23 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }}) 24 | {% endfor %} 25 | 26 | {% set characters = deck.slots_by_type.character %} 27 | Character{% if characters|length > 1 %}s{% endif %} 28 | 29 | {% for slot in characters %} 30 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }}) 31 | {% endfor %} 32 | 33 | {% set locations = deck.slots_by_type.location %} 34 | Location{% if locations|length > 1 %}s{% endif %} 35 | 36 | {% for slot in locations %} 37 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }}) 38 | {% endfor %} 39 | 40 | {% set attachments = deck.slots_by_type.attachment %} 41 | Attachment{% if attachments|length > 1 %}s{% endif %} 42 | 43 | {% for slot in attachments %} 44 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }}) 45 | {% endfor %} 46 | 47 | {% set events = deck.slots_by_type.event %} 48 | Event{% if events|length > 1 %}s{% endif %} 49 | 50 | {% for slot in events %} 51 | {{ slot.quantity }}x {{ slot.card.name }} ({{ slot.card.pack.name }}) 52 | {% endfor %} 53 | -------------------------------------------------------------------------------- /templates/Modale/delete_list.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | -------------------------------------------------------------------------------- /.env.travis: -------------------------------------------------------------------------------- 1 | # .env file for Travis/CI 2 | 3 | ###> symfony/framework-bundle ### 4 | APP_ENV=test 5 | APP_SECRET=ThisTokenIsNotSoSecretChangeIt 6 | SYMFONY_DEPRECATIONS_HELPER=999999 7 | 8 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 9 | #TRUSTED_HOSTS='^(localhost|example\.com)$' 10 | ###< symfony/framework-bundle ### 11 | 12 | ###> symfony/swiftmailer-bundle ### 13 | # For Gmail as a transport, use: "gmail://username:password@localhost" 14 | # For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" 15 | # Delivery is disabled by default via "null://localhost" 16 | MAILER_URL=null://localhost 17 | ###< symfony/swiftmailer-bundle ### 18 | 19 | ###> doctrine/doctrine-bundle ### 20 | # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url 21 | # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" 22 | # For a PostgreSQL database, use: "postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8" 23 | # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml 24 | DATABASE_URL=mysql://travis:@127.0.0.1:3306/thronesdb?serverVersion=5.7 25 | ###< doctrine/doctrine-bundle ### 26 | 27 | ###> nelmio/cors-bundle ### 28 | CORS_ALLOW_ORIGIN=^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$ 29 | ###< nelmio/cors-bundle ### 30 | 31 | ###> ThronesDB ### 32 | # Caching 33 | APP_CACHE_EXPIRATION=600 34 | 35 | # Email sender 36 | APP_EMAIL_SENDER_ADDRESS='no-reply@thronesdb.com' 37 | APP_EMAIL_SENDER_NAME='Admin' 38 | 39 | # Branding 40 | APP_WEBSITE_NAME=ThronesDB 41 | APP_WEBSITE_URL='thronesdb.com' 42 | APP_GAME_NAME='A Game of Thrones' 43 | APP_PUBLISHER_NAME='Fantasy Flight Games' 44 | 45 | # Analytics & AdSense 46 | APP_GOOGLE_ANALYTICS_TRACKING_CODE=UA-00000000-1 47 | 48 | # Allow search engines to index this site 49 | APP_ALLOW_SEARCH_ENGINE_TRACKING=false 50 | ###< ThronesDB ### 51 | -------------------------------------------------------------------------------- /templates/Modale/delete.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | -------------------------------------------------------------------------------- /templates/Modale/tag_clear.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 33 | 34 | -------------------------------------------------------------------------------- /templates/Search/searchoptions.html.twig: -------------------------------------------------------------------------------- 1 |
      2 | 16 |
      17 |
      18 | 30 |
      31 | -------------------------------------------------------------------------------- /src/Entity/CycleInterface.php: -------------------------------------------------------------------------------- 1 | `) 32 | - make sure your account is enabled (or run `php bin/console fos:user:activate `) 33 | - run `php bin/console fos:user:promote --super ` 34 | -------------------------------------------------------------------------------- /templates/Modale/tag_add.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 33 | 34 | -------------------------------------------------------------------------------- /templates/Modale/tag_remove.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 33 | 34 | -------------------------------------------------------------------------------- /src/Command/CheckMultipleCommand.php: -------------------------------------------------------------------------------- 1 | entityManager = $entityManager; 23 | } 24 | 25 | protected function configure() 26 | { 27 | $this 28 | ->setName('app:check:multiple') 29 | ->setDescription('Check card is_multiple field'); 30 | } 31 | 32 | protected function execute(InputInterface $input, OutputInterface $output): int 33 | { 34 | $cards = $this->entityManager->getRepository(Card::class)->findAll(); 35 | 36 | $count = []; 37 | /* @var CardInterface $card */ 38 | foreach ($cards as $card) { 39 | $count[$card->getName()] = ($count[$card->getName()] ?? 0) + 1; 40 | } 41 | 42 | foreach ($cards as $card) { 43 | if ($count[$card->getName()] === 1 && $card->getIsMultiple() === true) { 44 | $output->writeln( 45 | sprintf( 46 | 'Card %s %s must not be multiple.', 47 | $card->getCode(), 48 | $card->getName() 49 | ) 50 | ); 51 | } 52 | if ($count[$card->getName()] > 1 && $card->getIsMultiple() === false) { 53 | $output->writeln( 54 | sprintf( 55 | 'Card %s %s must be multiple.', 56 | $card->getCode(), 57 | $card->getName() 58 | ) 59 | ); 60 | } 61 | } 62 | return 0; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/Services/AgendaHelper.php: -------------------------------------------------------------------------------- 1 | doctrine = $doctrine; 17 | } 18 | 19 | /** 20 | * Get the minor faction code 21 | * @param CardInterface $agenda 22 | * @return string 23 | */ 24 | public function getMinorFactionCode(CardInterface $agenda) 25 | { 26 | if (empty($agenda)) { 27 | return null; 28 | } 29 | 30 | // special case for the Core Set Banners 31 | $banners_core_set = [ 32 | '01198' => 'baratheon', 33 | '01199' => 'greyjoy', 34 | '01200' => 'lannister', 35 | '01201' => 'martell', 36 | '01202' => 'thenightswatch', 37 | '01203' => 'stark', 38 | '01204' => 'targaryen', 39 | '01205' => 'tyrell' 40 | ]; 41 | if (isset($banners_core_set[$agenda->getCode()])) { 42 | return $banners_core_set[$agenda->getCode()]; 43 | } 44 | return null; 45 | } 46 | 47 | /** 48 | * Get the minor faction 49 | * @param CardInterface $agenda 50 | * @return FactionInterface 51 | */ 52 | public function getMinorFaction(CardInterface $agenda) 53 | { 54 | $code = $this->getMinorFactionCode($agenda); 55 | if ($code) { 56 | return $this->doctrine->getRepository(Faction::class)->findOneBy([ 'code' => $code ]); 57 | } 58 | return null; 59 | } 60 | 61 | /** 62 | * @param CardInterface $agenda 63 | * @return string 64 | * @todo added here for convenience, this should probably be part of a generic string helper class. [ST 2021/12/11] 65 | */ 66 | public function agendaToTag(CardInterface $agenda): string 67 | { 68 | $name = $agenda->getName(); 69 | return preg_replace('/[^a-zA-Z]/', '', strtolower($name)); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /assets/js/app.hypergeometric.js: -------------------------------------------------------------------------------- 1 | /** 2 | * hypergeometric distribution module, homemade 3 | */ 4 | (function app_hypergeometric(hypergeometric, $) 5 | { 6 | 7 | var memo = []; 8 | 9 | /** 10 | * @memberOf hypergeometric 11 | */ 12 | hypergeometric.get = function (k, N, K, n) 13 | { 14 | if(!k || !N || !K || !n) 15 | return 0; 16 | if(memo_exists(k, N, K, n)) { 17 | return get_memo(k, N, K, n); 18 | } 19 | if(memo_exists(n - k, N, N - K, n)) { 20 | return get_memo(n - k, N, N - K, n); 21 | } 22 | if(memo_exists(K - k, N, K, N - n)) { 23 | return get_memo(K - k, N, K, N - n); 24 | } 25 | if(memo_exists(k, N, n, K)) { 26 | return get_memo(k, N, n, K); 27 | } 28 | var d = app.binomial.get(N, n); 29 | if(d === 0) 30 | return 0; 31 | var r = app.binomial.get(K, k) * app.binomial.get(N - K, n - k) / d; 32 | memoize(k, N, K, n, r); 33 | return r; 34 | } 35 | 36 | /** 37 | * @memberOf hypergeometric 38 | */ 39 | hypergeometric.get_cumul = function (k, N, K, n) 40 | { 41 | var r = 0; 42 | for(; k <= n; k++) { 43 | r += hypergeometric.get(k, N, K, n); 44 | } 45 | return r; 46 | } 47 | 48 | /** 49 | * @memberOf hypergeometric 50 | */ 51 | function memo_exists(k, N, K, n) 52 | { 53 | return (memo[k] != undefined && memo[k][N] != undefined && memo[k][N][K] != undefined && memo[k][N][K][n] != undefined); 54 | } 55 | 56 | /** 57 | * @memberOf hypergeometric 58 | */ 59 | function get_memo(k, N, K, n) 60 | { 61 | return memo[k][N][K][n]; 62 | } 63 | 64 | /** 65 | * @memberOf hypergeometric 66 | */ 67 | function memoize(k, N, K, n, val) 68 | { 69 | if(memo[k] === undefined) { 70 | memo[k] = []; 71 | } 72 | if(memo[k][N] === undefined) { 73 | memo[k][N] = []; 74 | } 75 | if(memo[k][N][K] === undefined) { 76 | memo[k][N][K] = []; 77 | } 78 | memo[k][N][K][n] = val; 79 | } 80 | 81 | })(app.hypergeometric = {}, jQuery); 82 | -------------------------------------------------------------------------------- /templates/Builder/directimport.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block javascripts %} 4 | {{ parent() }} 5 | 6 | 12 | {% endblock %} 13 | 14 | {% block body %} 15 | 16 |
      17 | 18 | {% include 'alerts.html.twig' %} 19 |
      20 | 21 |
      22 |
      23 |
      24 | 25 | 26 |
      27 | 28 |
      29 |
      30 | 31 |
      32 |
      33 |
      34 | 35 | 36 |
      37 |
      38 |
        39 |
      40 |
      41 |
      42 |
      43 |
      44 | 45 | 46 | 47 |
      48 |
      49 | 50 |
      51 | 52 |
      53 | 54 | {% endblock %} 55 | -------------------------------------------------------------------------------- /src/Command/ListRestrictionsCommand.php: -------------------------------------------------------------------------------- 1 | entityManager = $entityManager; 27 | } 28 | 29 | protected function configure() 30 | { 31 | $this 32 | ->setName('app:restrictions:list') 33 | ->setDescription( 34 | 'List available restrictions.' 35 | ); 36 | } 37 | /** 38 | * @inheritdoc 39 | */ 40 | protected function execute(InputInterface $input, OutputInterface $output): int 41 | { 42 | $repo = $this->entityManager->getRepository(Restriction::class); 43 | 44 | $restrictions = $repo->findBy([], ['active' => 'desc', 'effectiveOn' => 'desc']); 45 | 46 | if (empty($restrictions)) { 47 | $output->writeln('No restrictions found.'); 48 | } else { 49 | $table = new Table($output); 50 | $table 51 | ->setHeaders(['Code', 'Title', 'Issuer', 'Version', 'Active', 'Date effective']); 52 | 53 | foreach ($restrictions as $restriction) { 54 | $table->addRow([ 55 | $restriction->getCode(), 56 | $restriction->getTitle(), 57 | $restriction->getIssuer(), 58 | $restriction->getVersion(), 59 | $restriction->isActive() ? 'yes' : 'no', 60 | $restriction->getEffectiveOn()->format('Y-m-d') 61 | ]); 62 | } 63 | $table->render(); 64 | } 65 | 66 | return 0; 67 | } 68 | } 69 | --------------------------------------------------------------------------------