5e-bits/5e-database

Split lycanthropes into each forms

ogregoire opened this issue · 6 comments

The more I think about it, the more I want to split the lycanthropes into several monsters were<something>-human, were<something>-<something> and were<something>-hybrid.

We could then refer to each other forms like this:

{
  id: werebear-bear,
  ... // all stats for the werebear in bear form
  forms: [
    {
      form: human,
      url: werebear-human // or ref or whatever
    },
    {
      form: hybrid,
      url: werebear-hybrid
    }
  ]
}
{
  id: werebear-human,
  ... // all stats for the werebear in human form
  forms: [
    {
      form: bear,
      url: werebear-bear
    },
    {
      form: hybrid,
      url: werebear-hybrid
    }
  ]
}
{
  id: werebear-hybrid,
  ... // all stats for the werebear in hybrid form
  forms: [
    {
      form: bear,
      url: werebear-bear
    },
    {
      form: human,
      url: werebear-human
    }
  ]
}

Unless you want to handle this, I might tackle this next. Since I think it unblocks some parts of the Armor Type stuff. I think the url might want to be swapped for the API Reference shape that we use everywhere else? But I think this makes sense.

Actually, do we need the form field? Could it instead be:

{
  id: werebear-hybrid,
  ... // all stats for the werebear in hybrid form
  forms: [
    {
      id: werebear-bear,
      name: "Werebear, Bear Form",
      url: /api/monsters/werebear-bear
    },
    {
      id: werebear-human,
      name: "Werebear, Human Form",
      url: /api/monsters/werebear-human
    }
  ]
}

Actually I like babal's little change. I think the purpose of the forms key main key was just to link to related documents and that variant has all the necessary data.

@drazev Who's change?

@bagelbits It's the original change with the inner document using id, name, and url instead of form

@bagelbits yup, your version is better, I like it more than mine. I'm very busy on other topics right now and while I like to keep an eye on this project, it's not my top priority at the moment, so be my guest to implement it.

PRs up!