Giter Site home page Giter Site logo

grislyeye / vellum-monster Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 4.0 2.44 MB

Web component for displaying 5th Edition monster stat blocks

License: Apache License 2.0

HTML 0.18% JavaScript 99.27% CSS 0.54%
webcomponents rpg html css dnd dnd5e javascript lit-element lit-html vellum-monster

vellum-monster's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar rg-wood avatar snyk-bot avatar

Stargazers

 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  avatar

vellum-monster's Issues

Automatically apply ability score bonuses to armor

Automatically apply ability score bonuses to armor.

For example, let's say we have the following:

              <vellum-monster
                id="monster"
                name="Monster"
                named="true"
                size="Small"
                type="fey"
                alignment="chaotic neutral"
                baseAc="10"
                armor="natural armor"
                hit-die="2d6 - 2"
                speeds='["30 ft.","swim 30ft."]'

                str="10"
                dex="14"
                con="8"
                int="13"
                wis="10"
                cha="15"

This would display as as an effective/actual AC of 10 (baseAc + Dex Modifier of +2).

This would need to be supported with a default ac attribute which allows users to ignore calculations and force the monster's AC.

Automatically calculate challenge rating

Based on the monster's stats we should automatically calculate a monster's challenge rating (cr) if this value is not provided.

This may need additional work so as to add new attributes to accuractely determine CR (i.e. whether the monster can fly, etc.).

Add semantic data

Add semantic data to stat-block element so that it can be parsed by other software (i.e. to calculate CRs, etc.)

Copy HTML tags in <vellum-stat> bodies

HTML tags are stripped from the bodies of <vellum-stat>. We should copy HTML tags so that stats are displayed with, for example, italicised emphasis.

Allow limited usage on attacks

Currently limited usages are supported for actions only, and not attacks. For example:

<dl itemscope itemprop="actions">
  <dt>Name</dt><dd itemprop="name">Warping Blow</dd>
  <dt>Limited Usage</dt><dd itemprop="limitedUsage">Recharge 5-6</dd>
  <dt>Reach</dt><dd itemprop="reach">5ft.</dd>
  <dt>Attack Type</dt><dd itemprop="type">melee-attack</dd>
  <dt>Target</dt><dd itemprop="target">one target</dd>
  <dt>Damage</dt><dd itemprop="damage">3 (0 + 3)</dd>
  <dt>Damage Type</dt><dd itemprop="damageType">bludgeoning</dd>
</dl>

Displays as:

screen shot 2018-03-25 at 14 25 05

Support different types of multiattack

At the moment the multiattack action only supports multiples of a single attack. We would like to support different types in one action.

Something like this:

"multiAttacks": [
  {
    "id": "knife",
    "number": "2"
   },
  {
    "id": "bite",
   }
]

An in-range update of lit-element is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The dependency lit-element was updated from 2.2.1 to 2.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lit-element is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 144 commits.

  • 0eda741 Prepare 2.3.0 release (#933)
  • 5a421e1 Fix formatting of new decorator for consistency (#934)
  • 61d9583 Merge pull request #925 from ianwith/fix-docs
  • b8b9f74 Prepare 2.3.0-pre.1 release
  • 38a8b85 Removes index signature from PropertyDeclaration (#929)
  • 6a4c94f Fix static property for closure (#926)
  • 9060da0 Correct docs: styles - CSS inheritance
  • e0dcd75 Add extra type information to help closure with type of static property. (#923)
  • 8055b93 Merge pull request #914 from Polymer/customize-properties
  • 90c85a5 Address review feedback.
  • 8f5815f Update comment.
  • ec9048b Fix spacing.
  • def6df1 Fix spacing.
  • 297b8b2 Address review feedback.
  • 734adc5 Adds API doc for createPropertyDescriptor

There are 144 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Automatically calculate attack and damage bonuses

Automatically calculate attack and damage bonuses from ability score modifiers.

For example, if a Strength +3 monster has an attack defined without attack bonus or damage as follows:

                  {
                    "name": "Dagger",
                    "type": "melee-or-ranged-attack",
                    "reach": "5ft.",
                    "range": "20/60 ft.",
                    "target": "one target",
                    "damageDie": "2d4",
                    "damageType": "slashing"
                  }

We end up with actual attack bonus of +5 and a damage of 2d4+4.

Automatically calculate XP based on CR

Based on the monster's challenge rating (cr) attribute we should automatically calculate a monster's experience points (xp) if this value is not provided.

vellum-monster uses calculated CR even when CR is passed

Given the following HTML:

<vellum-monster
  hp="200"
  ac="18"
  cr="2"
  xp="450"
></vellum-monster>

Expected behavior:
It will display the following text in the stat block:

Armor Class 18
Hit Points 200
Challenge 2 (450 XP)

Actual behavior:
It will display the following text in the stat block:

Armor Class 18
Hit Points 200
Challenge 4 (450 XP)

Thank you a lot for all of the time and work you put into this project!

An in-range update of eslint-config-standard is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The devDependency eslint-config-standard was updated from 14.1.0 to 14.1.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 7 commits.

  • 3f4a3fe 14.1.1
  • 2a14319 Merge pull request #164 from standard/remove-no-return-await
  • 243d38f Remove no-return-await rule
  • eb187de chore: .npmrc with package-lock=false (#155)
  • dcf95fe chore: .npmrc with package-lock=false
  • e5e81a8 Merge pull request #153 from standard/greenkeeper/eslint-plugin-node-10.0.0
  • 83ba3be chore(package): update eslint-plugin-node to version 10.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Suggestion: Omit fields given an empty array

Hello, thank you again for all of your hard work on this project.

I have a suggestion:

In textual data representations, empty arrays are often used to represent empty to-many relationships. (one such example)
A monster's immunities or reactions would be two cases of a to-many relationship. They can have anywhere between 0 and many immunities and/or reactions.
In vellum-monster, if an empty array is passed to a field expecting an array, such as immunities or reactions, it will still show the Immunities or Reactions text, even though they have no content.

My suggestion would be to hide these fields in the end result if the content passed to them is empty.

Given the following HTML:

<vellum-monster>
  hp="200"
  ac="18"
  immunities='[]'
  reactions='[]'
</vellum-monster>

Current outcome:

Hit Points 200
Armor Class 18
Damage Immunities

Reactions

Suggested outcome:

Hit Points 200
Armor Class 18

Thank you again for your work! Let me know what you think!

Create more generic `<vellum-stat-block>`

Separate the <vellum-stat-block> into <vellum-stat-block> and <vellum-monster>:

  • <vellum-stat-block> generic stat-block style container for any "thing", like locations, NPCS etc.
  • <vellum-monster> for standard monster stat blocks, as per the "old" <vellum-stat-block>

Incorrect defensive CR calculation

Effective AC CR is being calculated incorrectly. Given a monster with 9 HP and AC 16 we get:

Value Effective CR
HP 9 β…›
AC 16 +1

But the effective defensive CR for the AC should be +5.

Add screenshots / demo to readme

Arguably the most important thing about this is what it looks like.

If you want others to use / contribute, I recommend adding a demo / image / gif in the readme.

Allow limited usage on attacks

Currently limited usages are supported for actions only, and not attacks. For example:

<dl itemscope itemprop="actions">
  <dt>Name</dt><dd itemprop="name">Warping Blow</dd>
  <dt>Limited Usage</dt><dd itemprop="limitedUsage">Recharge 5-6</dd>
  <dt>Reach</dt><dd itemprop="reach">5ft.</dd>
  <dt>Attack Type</dt><dd itemprop="type">melee-attack</dd>
  <dt>Target</dt><dd itemprop="target">one target</dd>
  <dt>Damage</dt><dd itemprop="damage">3 (0 + 3)</dd>
  <dt>Damage Type</dt><dd itemprop="damageType">bludgeoning</dd>
</dl>

Displays as:

screen shot 2018-03-25 at 14 25 05

Automatically calculate hit die based on size and Constitution

We can automatically calculate hit die based on size and Constitution. For this we will need a new attribute, something like numberOfHitDie and we can calculate the rest by determing dice from size (Small is d6, etc.) and modifier from Constitution score (numberOfHitDie * Cons modifier).

Remove dependency on deprecated Polymer tooling

Polymer has been deprecated, and our depedency on the unsupported polymer CLI is causing issues:

#37

We should find another way to run the component tests in a browers outside of the polymer test CLI.

Support for spell attacks

Some attacks are spell attacks (ranged and melee). We should support these using the new attack types ranged-spell-attack, melee-spell-attack and melee-or-ranged-spell-attack.

Support damage for non-attack actions

Add support for damage and attack bonuses for non-attack actions, and spell-like actions.

For example, the action:

{
    "name": "Shadow Rift (1/day)",
    "id": "shadow-rift",
    "description": "The Gloaming Queen can open a rift to the abyss in a 20-foot sphere centred on a point she can see within 120 feet. Any creature within the rift takes 10d8 necrotic damage, or half damage with a successful DC 14 Constitution saving throw."
  }

There should be a method to define the damage and saving throw for this action so that CR can be correctly calculated.

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.