Gloomhaven-Modifier
This is a Javascript package for the Attack-Modifier of the boardgame Gloomhaven.
For this purpose each modifier card and each modifier deck is explicitely implemented.
This package includes a corresponding .png file for every single card.
Features
The features folder contains the source code and pictures.
- Create every modifier card
- Create every character deck
- Add or remove cards from the deck
- Shuffle the deck
- Draw a card from a deck with a given value
- Draw with advantage/disadvantage
- Look at the top X cards
- Look at the top X cards and put them back in any order
Tests
The __ tests __ folder contains the tests for the implemented features. Every implemented feature was tested seperately as well as within joined cases.
- All implemented cards
- All implemented decks and methods
Examples
// Create a cardconst plusTwo = // Apply card modifier to a valueplusTwo == 5 // Create a deckvar deck = // Add a card to the deck (i.e. +2 card)deck // Draw a card with a value (i.e. 4)deck // Modifier after drawingdeckmodifier == 4 // Value after drawingdeckvalue == 6 // Special after drawingdeckspecial =