GithubHelp home page GithubHelp logo

blakevanlan / kingdomcreator Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 28.0 681.85 MB

Deck randomizer for Dominion

License: MIT License

CoffeeScript 2.85% JavaScript 7.15% TypeScript 53.77% Vue 31.67% Stylus 3.75% Pug 0.80% Dockerfile 0.01%

kingdomcreator's People

Contributors

asr1 avatar blakevanlan avatar chief8192 avatar davidtorosyan avatar gillesgros avatar markbrockettrobson avatar rubikscuber avatar youbi42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kingdomcreator's Issues

Add more settings for recommended set up

It would be great if you could consider adding some features from: http://inprogressgaming.com/dominion-card-picker/

Namely:

  • Require card that provide +2 or more cards
  • And recommended mode:
    0-1 cards of cost 1
    1-2 of cost 2
    1-3 of cost 3
    2-3 of cost 4
    2-4 of cost 5
    0-2 of cost 6
    0-1 of cost 7
    0-2 attack cards
    0-3 non-action
    0-2 events

This can be considered a go-to setting that should satisfy the most.

I love customizability of inprogress, but your version is well, much more pleasant to use and look at. Especially as it works nicely on mobile!

Possibility to have your own recommended kingdoms local file

It might be interesting to allow the user to display his personal recommended kingdoms that are stored in a local file. File should be formatted as current recommended kingdoms

I am trying to build that, but my knowledge in vue, yaml make it difficult.

If you want to see where I am at, take a look at: https://71yeti.fr

The feature that I build so far are:

internal (not visible to users)

  • put card image by set (looks cleaner in folders)

  • avoid defining cost for cards that have no cost (landmarks)

  • add possibility to display French card image (easier to fetch card in boxes)

  • show all cards from a Dominion Set

  • add promo cards that were missing (summon, sauna/avanto, church, captain, dismantle)

in rules

  • remove the set label (The box image shows it)

in recommended kingdoms

  • show name of recommended kingdoms
  • ability to filter by set.
  • ability to navigate to recommended kingdoms set
  • Possibility to show the recommended kingdoms of all sets (for searching thru filter)

The feature I am working on is the "Personal Sets" entry in recommended kingdoms page.
So far, I am able to read the local file content but not yet to transform it as a dominionKingdoms object.
Can you give me an hint on how to parse the file as you have done it for all recommended kingdoms.
Once done, It should be easy to display as for the other sets.

Thanks for your feedback.

Gilles

Add card translations

Since I have a Dutch version of Dominion it's a bit of a nuisance to select the deck from the box (having to guess the correct translation or look for artwork). So it would be very nice if there was an option to include the card translations in some of the other languages the game is published in.

I've included a csv with all the translations for Dutch and German (the only two complete ones I could find) that I got from the dominionstrategy wiki (here). There are some promo cards that never got a Dutch release so I left them Null. There are also some German cards that have different names in different releases (Soothsayer and Walled Village) so I picked the translation from most recent release.

dominion_translations_csv.txt (it's in the shape English, Dutch, German)

Caravan Cost Bug

Hi, I reviewed your yaml files for correct card costs in the Base set, Intrigue set, Seaside set and Prosperity set. I only found one more bug, which is Caravan in Seaside. It should have a cost of 4, but in your code it is 5.

Add Allies

New set is out. Maybe could be addressed together with Seaside 2ed, which should be made public within 2 weeks

To add the possibility to track which Game i have played

Hello,
A nice new feature to consider.
On a browser, it would be nice to be able to store an so track which recommended set of kingdom I have played.

My suggestion to make it simple, when you change browser (cookies reset) you lost the tracking.

What do you think.

If you feel that might be good I will try it during my covid confinement.

Gilles

How to build?

Hello,
I’m trying to integrate the french translation. I have cloned the repo, checkout a branch and created the src/i18n/ required files, but I don’t know how to integrate that.
What is the process?
I’m running a local instance of KingdomCreator to test my changes.

Regards

--
Youbi

Landmarks aren't generated if the query parameters have supply cards

This is kind of an obscure (bug?), but that's what you get when you're working on edge cases.

Repro steps

Setup

Uncheck all options except for Empires.

Happy path

Visit https://dominionrandomizer.com/ and notice two landmarks get generated.

Bug

Visit https://dominionrandomizer.com/?supply=archive and notice that while the rest of the supply is filled out, the landmarks stay empty.

Is this a bug?

It's hard to think of how this would impact the user experience, but it seems unexpected to me, so I thought I'd raise it in case this wasn't intended.

Add random expansion selection

I have multiple expansions, and dont want to look for cards in many different boxes, only 1 or 2. In my opinion some way to randomly select expansions would be a nice feature.

Various special card setup rules

Some cards have second-order effects on the board set up, such as picking a Bane for Young Witch. Picking a Bane for Young Witch is already implemented. Some other similar situations, which I have attempted to order in terms of "fit", are:

  • Obelisk chooses an action supply pile http://wiki.dominionstrategy.com/index.php/Obelisk
    • A great fit for this project, especially since it's very similar to selecting a Bane for Young Witch. A card cover similar to Bane would work well.
    • Can one action supply pile be both Bane and Obelisk?
  • Way Of The Mouse chooses an unused action http://wiki.dominionstrategy.com/index.php/Way_of_the_Mouse
    • Another great fit for this project, also very similar to selecting Bane.
    • The main sticking point might be how to display the result such that it's clearly not in the Supply (unlike Young Witch/Bane and Obelisk).
  • Platinum and Colony have a chance of being used according to the proportion of cards from Prosperity in the kingdom http://wiki.dominionstrategy.com/index.php/Platinum
    • Another good fit for the project, since the suggested procedure involves using the randomizer deck.
    • How should this be displayed?
  • Druid chooses three random Boons http://wiki.dominionstrategy.com/index.php/Druid
    • Implementing this is of questionable usefulness, since picking random Boons is very simple to do irl: draw the top 3 cards of the Boon deck (which has already been shuffled during set up)

Missing Promo Cards

Some cards are missing and/or never get selected, at least from Promo:

  • Dismantle
  • Captain,
  • Church
  • Summon (event)
  • Sauna+Avanto (split pile) [there are "promos_sauna" and "empires_saunaavanto" images though]

Card properties fix to apply

Hello,

Here are some fixes to apply in sets folder

Intrigue & Intrigue2
Swindler : isAttack should be true

Seaside
Lighthouse : isReaction shoule be false

Hinterlands
Haggler : cost should be 5 not 4
Cache : cost should be 5 not 4

Darkage
Count : isTreasure should be false

Adventures
Coin of the realm : isTreasure should be true

Empires
Legionary : cost should be 5 not 8

Nocturne
Monastery : isDuration should be false
Ghost Town : isDuration should be true
Den of Sin : isDuration should be true
Vampire : isAction should be false
Blessed Village : isFate should be true
Skulk : isFate should be true

Add filter in "recommended kingdoms"

As there is a lot of "recommended kingdoms", it would be great to have a another sidebar menu (with checkbox) to display the "recommended kingdoms" that match at least the selection

For example I want to see all the "recommended kingdoms" that use Seaside cards. Or the RK that use Seaside and Prosperity.

This came to me while trying to make kingdoms/Base-set-2.yaml and intrigue-2.yaml.

Feature: change card count

A option to change the count of the cards, which will be selected.

At the most games, I have played, multiple players had often bought large number of all the same cards. Because of this 2 pile of cards was extremely fast empty. At the same time only a small number of other card was bought. A large number of cards would give the player a large selection, so they would not buy all the same cards.

FeatureRequest API

Hello,

it would be nice to use API calls to retrieve generated games. This would allow easy access by the microcontroller that controlls the leds of my dominion organizer. What do you think?

Feature request: Fullscreen button

As a Dominion fan with lots of newbie friends, it would be nice to have a fullscreen mode which just displays the "main" div at 100% width and 100% height while hiding the sidebar, improving the readability of each card. Maybe when in full screen mode there would be another button to return to normal.

I like to display this website on my TV while playing so other players can look at the TV screen to see what the cards do without having to fidget with all the cards on the board.

Request cost deselect all button

In the specify options for costs can you add a deselect all costs and select all cost button?

I am commonly deselect all but one, roll then later selecting all again. It is tedious to click off and on 6 or 7 boxes each time.

Add set label on recommended kingdom page

When browsing thru recommended set, it would be nice to have, as on the randomizer page the label indicating to which set the card is belonging.

I do not know yet enough reactJs to fullfill this.

Thanks in considering this request.

Bane card present without Young Witch in the kingdom

I selected Empires, Renaissance, and Menagerie and told it to Randomize. It chose:

Crown, Enchantress, Farmer's Market, Wild Hunt, Hostelry, Scrap, Stockpile, Hideout, Patron, and Villain, with Menagerie as the Bane card

It also selected Delve, Arena, and Market Towns for Event, Landmark, and Ally. These are fine.

Oddly, it also selected three Boons, and said I should play with Platinum/Colony and Shelters. These are odd because I didn't tell it to use Nocturne, Prosperity, or Dark Ages.
I'll add some screenshots showing all the cards.

image
image

Query parameters aren't cleaned up

I've noticed that while the query parameters in the URL update to match the randomized cards, they don't clean up previous entries.

For example, start with this URL:
https://dominionrandomizer.com/?supply=castles,chariotrace,expand,haven,merchantship,moneylender,patricianemporium,pawn,shantytown,treasuremap&landmarks=basilica&colonies=1&events=conquest

Then uncheck prosperity and hit randomize. The colonies card will disappear, but the colonies=1 term will remain the query parameter.

The same is true for events and landmarks (and other similar cards). If the new set of cards don't include any from that type, the old cards will still appear in the URL.

As an extreme example, after hitting randomize a few times I end up with this:
https://dominionrandomizer.com/?supply=bazaar,cutpurse,encampmentplunder,festival,flagbearer,loan,moat,priest,spices,tactician&landmarks=basilica,baths&colonies=1&events=ritual&projects=piazza

This has 2 landmarks, 1 ritual, and 1 project.

The impact of this bug is that sharing the URL of a randomized page might not produce the same results on the receiving side.

Feature request: Sort cards by their translated name

Basically, as the title states - I would enjoy if the supply cards would be sortable by the translated name of the card.
As I did not really find the correct parts in the code I request your help. Maybe this feature is not possible atm. and would require adding an additional field 'translated_name' to the card class?
Please let me know what you think.

Sea hag bug

The sea hag shows as 2 gold instead of 4 when the result of 10 cards is shown. Please also verify if this is just an ordering issue or if the algorithm really thinks it picked a 2 gold costing card.
Screenshot_20200226-181751

Add option to rank sets?

Would it be possible to incorporate a voting/ranking option into the the randomizer?

For example, after a set is selected and the users play a game, they could tank the set based on how fun it was, on a scale from 1-10.

Then, as sufficient data is collected, you could start to report average rankings associated with each deck permutation, and perhaps even add an option to use the rankings to bias the choices (e.g. excluding permutations with very low average rankings, or just weight things s.t. higher ranking decks are more likely to be chosen).

Thanks for taking the time to put this together! Hope you are staying safe and sane during quarantine :)

Copy cards list to clipboard

This would allow to paste the cards list to dominion.games, so you can play several games with the same kingdom.
Thanks for this great webpage!

Copy to Clipboard

It would be really nice if, when you used the "Copy to Clipboard" feature, that "Events , Landmarks , Projects & Ways" were also copied.

I tested whether this would work on dominion.games, and the "Events , Landmarks , Projects & Ways" work just like regular cards, in the comma-delimited list.

Display issue with enlarge after replacing a kingdom

Hello,

On a mobile display (small screen to have the enlarge button active).
1 - request to replace a kingdom (make sure the card move around)
2 - enlarge the view.
the cards are not aligned.
changing the sort option fix the problem

Add Sort By Cost

Could you possibly add a sort feature that sorts by kingdom card cost in ascending order? Our group always sorts this way to aid in purchasing decisions.

I am assuming the sort would look like:

  • Sort by Cost on, Sort Alpha Off = cards sorted in ascending cost order, then default sort (is it expansion?) within the same cost
  • Sort By Cost on, Sort Alpha On = cards sorted in ascending cost order, then sorted alpha within the same cost

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.