Coder Social home page Coder Social logo

Comments (8)

bagelbits avatar bagelbits commented on June 23, 2024 1

In most (if not all) cases, Multiattack is just using the already defined attacks on a monster. So you probably only need the name and count.

from 5e-database.

ogregoire avatar ogregoire commented on June 23, 2024

We already have a "choice" or "option" structure for similar cases, such as Half-Elf's stat option. You might want to take inspiration from those.

from 5e-database.

jbhaywood avatar jbhaywood commented on June 23, 2024

How would you handle the -or- case for the Bandit Captain above, where the same attack can be used two different ways?

"The captain makes three melee attacks: two with its scimitar and one with its dagger. Or the captain makes two ranged attacks with its daggers."

from 5e-database.

bagelbits avatar bagelbits commented on June 23, 2024

Maybe something like this:

"attacks": [
  {
    "choose": 1,
    "type": "attacks",
    "from": [
      [
        {
          "name": "Scimitar",
          "count": 2
        },
        {
          "name": "Dagger",
          "count": 1,
          "type": "melee"
        }
      ],
      [
        {
          "name": "Dagger",
          "count": 2,
          "type": "ranged"
        }
      ]
    ]
  }
]

I have a feeling type would be more than just melee or ranged though.

from 5e-database.

jbhaywood avatar jbhaywood commented on June 23, 2024

Sounds good. I'm going to see how far I can get with this structure. The multiattack descriptions are pretty well formatted, but some of them have a lot going on.

from 5e-database.

bagelbits avatar bagelbits commented on June 23, 2024

They really do. A lot of the attacks do, you should have seen some of the wild stuff I came across while trying to pull out damage and damage type from all monster attacks.

from 5e-database.

bagelbits avatar bagelbits commented on June 23, 2024

So, V1 for this is done. However, I guess next steps would be to handle the notes: field and convert it into something else.

from 5e-database.

bagelbits avatar bagelbits commented on June 23, 2024

I'm going to close this out for now as it's technically done. Feel free to open a separate issue for parsing the notes field.

from 5e-database.

Related Issues (20)

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.