npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tboi-four-souls.js

v1.0.1

Published

This library was created to provide a single package with all information regarding the Binding of Isaac: Four Souls card game. This is NOT the game itself, this is just all the cards pertaining to the game in a library that allows you to create each deck

Downloads

28

Readme

Tboi Four Souls.js

This library was created to provide a single package with all information regarding the Binding of Isaac: Four Souls card game. This is NOT the game itself, this is just all the cards pertaining to the game in a library that allows you to create each deck and be able to use them for your projects.

It contains:

  • Classes for all types of cards and decks including:
    • Player Cards and Deck
    • Starting Item Cards and Deck
    • Monster Cards and Deck
    • Treasure Cards and Deck
    • Soul Cards and Deck
    • Loot Cards and Deck
    • Room Cards and Deck
  • All classes share similar functions you expecct for decks like drawing from the top, shuffle, and being able to find or take out specific cards based on characteristics.
    • Some decks have more functions simply due to more information on those types of cards compared to the rest. Mainly the Monster deck but the others have some extra as well.
  • Information on every card pertaining to every deck in the game, not including custom cards not listed.

All information derived from the data at foursouls.com, as of 8/1/2024.

Card Details:

Base Card Variables:

  • Origin Set (enum of string):
    • Card set that the specific card originated from. Ex. GOLD_BOX_V2, REQUIEM, SUMMER_OF_ISAAC, etc.
  • Name (string):
    • Name/Title of the card.
  • Card Type (enum of string):
    • The type of card it is supposed to be. Ex. CHARACTER, MONSTER, LOOT, etc.
  • Effect Description (String):
    • Effects that the card has. Anything that is within the section detailing the effects would go here. Multiple effects may be separated by a '|' character.
  • isTappable (boolean):
    • Tells you is the card has some Tap effect within it.
  • isPayable (boolean):
    • Tells you if the card has a Pay effect within it.

Specific Card Variables:

  • Character Card:

    • eternal (string):
      • Name of the eternal item that belongs to the card.
    • health (int):
      • Amount of health of the character.
    • attack (int):
      • Amount of attack of the character.
  • Monster Card:

    • health (int):
      • Amount of health of the character. All non-monster (event, curse, etc.) cards have -1 as the value for health.
    • diceRoll (int):
      • minimum amount of dice roll to hit the monster. All non-monster (event, curse, etc.) cards have -1 as the value for the dice roll.
    • attack (int):
      • Amount of attack the monster deals to the player. All non-monster (event, curse, etc.) cards have -1 as the value for the attack.
    • reward (enum of strings):
      • String based off an enum that tells you the reward for killing this monster. All non-monster (event, curse, etc.) cards have a reward of NONE.
    • numOfSouls (int):
      • Number of souls the monster card has. All cards with no souls have a value of 0.
    • isEvent (boolean):
      • Determines whether the monster card is an event.
    • isCurse (boolean):
      • Determines whether the monster card is a curse.
  • Treasure Card:

    • isGuppy (boolean):
      • tells whether the card is a Guppy card or not.
  • Loot Card:

    • isTrinket (boolean):
      • tells whether the card is a trinket or not.

Deck Specific Details:

  • General Functions:
    • instantiate():
      • An abstract function that is implemented in all non-Base deck classes to create the specific deck.deck
    • shuffle():
      • Shuffle function that will perform a shuffle by swapping function into between 4-7 riffle shuffles to ensure shuffled deck.
    • gettRandomCard():
      • Returns a rendom card from the specific deck while taking it out of the deck.
    • findCardByName(targetCardName: string):
      • Searches the deck for a specific card but DOES NOT take it out of the deck.
    • getAllCardsByOriginSet(originSet: string):
      • Returns an array of all cards with the given origin set in the deck but DOES NOT take the cards out of the deck.
    • getAllTappableCards():
      • Returns an array of all cards that have some tappable effect(s) in the deck but DOES NOT take the cards out of the deck.
    • getAllPayableCards():
      • Returns an array of all cards that have some payable effect(s) in the deck but DOES NOT take the cards out of the deck.
    • excludeCardsByOriginSet(excludeOriginSet: string):
      • Filters out the cards in the deck to exclude the origin set provided.
    • peekCardsFromTop(peekAmount: number):
      • Returns the top X cards from the top of the deck (index 0) but DOES NOT remove them from the deck.
    • drawCardsFromTop(drawAmount: number):
      • Returns the top X cards from the top of the deck (index 0) but DOES remove them from the deck.
    • addCardsToTopOfDeck(cardsToAdd: T[]):
      • Adds all the cards passed as parameters into the array to the TOP of the deck.
    • addCardsToBottomOfDeck(cardsToAdd: T[]):
      • Adds all the cards passed as parameters into the array to the BOTTOM of the deck.

Specific Deck Functions:

  • Character Deck:
    • findStartingItemForCharacter(charCard: PlayerCard, startingItemDeck: StartingItemDeck):
      • Searches the startingItemDeck that is provided as a parameter and either returns a StartingItemCard if one is found, null, if the card is 'Eden' or undefined if no card was found.
  • Monster Deck:
    • getAllCardsWithSouls():
      • Filters out all cards with no souls and returns an array of MonsterCards with at least 1 soul.
  • Treasure Deck:
    • getAllGuppyItemCards():
      • Filters out all cards that are not Guppy cards and returns them in an array.

This library was generated with Angular CLI version 17.3.0.


General Angular Library Details Below

Build

Run ng build tboi-four-souls.js to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build tboi-four-souls.js, go to the dist folder cd dist/tboi-four-souls.js and run npm publish.

Running unit tests

Run ng test tboi-four-souls.js to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.