SweetheartSquad / AGBIC2021-short-rest

A party-based roguelike deckbuilder

Home Page:https://sweetheartsquad.itch.io/short-rest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Short Rest

frog cat apple onion

Scripts

npm i # setup
npm start # dev server
npm run build # make build
npm run optimize-images # optimize image assets (slow)

Release

  1. Bump the package version (npm version patch/minor/major)
  2. Push changes
  3. Go to release action
  4. Select "Run workflow", and confirm on main branch

The workflow will automatically create a build and upload it to itch.io.

Game files

These are all loaded dynamically at runtime, so you can take a single build and edit them + reload instead of using the dev server.

cards, obstacles, and levels are named .txt for annoying build reasons but are actually JS and indirectly evald by the game.

Mechanics

Advance order of operations

  • if there are no obstacles:
    1. moves to next area
    2. if there is an obstacle, and the obstacle has a start, trigger the start
  • if there is an obstacle:
    1. if the obstacle has health, deal damage to obstacle
      • if the obstacle died:
        1. queue death animation
        2. if the obstacle has an end, trigger the end
    2. if the obstacle has an interact, trigger the interact
    3. if the obstacle has damage, deal damage to front

Note that because of how interact, end, and the action queue work, if an obstacle dies during Advance the order will be:

damage > interact > death animation > end

To avoid triggering interact during the turn an obstacle dies, add if (!this.health) return; to the top of the function.

Other

  • All interaction is player-driven: enemies don't attack, they just react to the player's Advance.
  • end will also be triggered when an obstacle is killed through cards or as a result of another interact.
  • Armour: each point of armour blocks a single hit (regardless of damage)
  • Obstacles without starting health will never die as a result of damage: they need to be killed via killObstacle in their interact

About

A party-based roguelike deckbuilder

https://sweetheartsquad.itch.io/short-rest


Languages

Language:TypeScript 86.0%Language:JavaScript 5.2%Language:Lua 3.8%Language:GLSL 3.3%Language:CSS 1.3%Language:HTML 0.4%Language:Shell 0.1%