# @sbemu/libtheorybane

> Library for Theorybane character calculator

Latest version **0.1.2** (published 2020-03-06) · GNU Affero General Public License v3.0 license · 0 weekly downloads

## Install

```sh
npm install @sbemu/libtheorybane
pnpm add @sbemu/libtheorybane
yarn add @sbemu/libtheorybane
bun add @sbemu/libtheorybane
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-03-06 |
| First published | 2020-03-03 |
| Weekly downloads | 0 |
| License | GNU Affero General Public License v3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 87 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | SBEmu |
| Maintainers | homicydal |

## Links

- npm: https://www.npmjs.com/package/@sbemu/libtheorybane
- Repository: https://github.com/SBEmu/LibTheorybane
- Issues: https://github.com/SBEmu/LibTheorybane/issues
- npm.io page: https://npm.io/package/@sbemu/libtheorybane

## Recent versions

- 0.1.2 (latest) — 2020-03-06
- 0.1.1 — 2020-03-03

## README

# LibTheorybane

This project is currently a placeholder for a library for the [Theorybane](https://github.com/SBEmu/Theorybane) character calculator.

## Character Calculator

The goal of this project is to have a robust and high-fidelity character calculator that will be able to be driven both
programmatically as well as by a web-based UI. Some of the ideas around this are inspired by the [Path of Exile](https://www.pathofexile.com/)
game's unofficial calculator [Path of Building](https://github.com/Openarl/PathOfBuilding).

Ideally the character calculator will be able to display useful metrics for a build that is buffed, equipped, and trained:
 * Defense
 * Spell/attack DPS including procs and/or mask casting
 * Passive defense and mitigations
 * Health and healing
 
Initially the goal would be to show what the character's stats would be after creation, and then progress to trained/equipped/buffed/etc.

## Programmatic access/matrices

After being able to create a character and get useful stats, an interesting use case would be to compare/diff two builds. You could
create two characters programmatically, and then have a list of "what-if" between the two, e.g. comparing a baseline of a rogue huntress to a
huntress (the stats are made up):
```
+ 225 HP
+ Parry
- Sneak
- Stalk
- Dodge
```

You could extend this further by having the ability to build a character with a list of "intents", and then substituting steps with a matrix:
* Select the `[Aelfborn, Aracoix, Centaur, Elf, Half Giant, Human, Irekei]` race
* Select the `fighter` class
* Maximize starting `constitution`
* Maximize starting `dexterity`
* Promote to `Huntress`
* Raise `level` to 75
* Raise `intelligence` to 60
* Maximize `constitution`
* Maximize `dexterity`
* Train <skills>

And then you could compare the resulting stat spread and benefits of each race relative to the other fairly easily.

## Building and running tests

Install [Node](https://nodejs.org/en/) 12.x, clone this repo, and in the repo directory:
```shell script
npm install
npm run build
npm run test
```

## Done and todo:
* [x] Basic stats
* [x] Basic rune implementation
* [x] Ability points calculation
* [x] Training point calculation
* [ ] Skills and training
* [ ] Powers
* [ ] Equipment (prerequisites and bonuses)
* [ ] Effects
* [ ] Character attributes
  * [ ] HP/Mana/Stamina
  * [ ] Resistances
  * [ ] Weapon damage (styled, plain)
  * [ ] Spell damage by spell

## Contributing

Contributions are welcome. Prior to contributing large changes, please have a quick discussion with us by opening an issue to confirm
that the change would be desirable.

If you add new functionality, please add tests. Contributions are required to have the CI and all tests pass in the pull request prior to merge.

Incoming changes have TSlint and Prettier run against them as well: if there are changes that are not checked in after Prettier/TSlint run then the pipeline will fail. Run `npm run all` locally, fix any failures, and check in any changes prior to pushing.

---
_Source: https://npm.io/package/@sbemu/libtheorybane · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
