~lown/homepage

48ef20772975e138de267ad2bc7ee12900d73dab — Raphael Kabo 1 year, 3 months ago 1a95485
Add standard deviation to damagetodice
3 files changed, 27 insertions(+), 18 deletions(-)

M package.json
M pnpm-lock.yaml
M src/components/DamageToDice.tsx
M package.json => package.json +1 -1
@@ 16,7 16,7 @@
    "@astrojs/rss": "^2.1.0",
    "astro": "^2.0.6",
    "astro-compress": "^1.1.29",
    "damage-to-dice": "^1.0.4",
    "damage-to-dice": "^1.0.5",
    "preact": "^10.11.3",
    "sanitize-html": "^2.9.0"
  }

M pnpm-lock.yaml => pnpm-lock.yaml +19 -17
@@ 6,7 6,7 @@ specifiers:
  '@astrojs/rss': ^2.1.0
  astro: ^2.0.6
  astro-compress: ^1.1.29
  damage-to-dice: ^1.0.4
  damage-to-dice: ^1.0.5
  preact: ^10.11.3
  sanitize-html: ^2.9.0



@@ 16,7 16,7 @@ dependencies:
  '@astrojs/rss': 2.1.0
  astro: 2.0.6
  astro-compress: 1.1.29
  damage-to-dice: 1.0.4
  damage-to-dice: 1.0.5
  preact: 10.11.3
  sanitize-html: 2.9.0



@@ 146,7 146,7 @@ packages:
      dset: 3.1.2
      is-docker: 3.0.0
      is-wsl: 2.2.0
      undici: 5.16.0
      undici: 5.17.1
      which-pm-runs: 1.1.0
    transitivePeerDependencies:
      - supports-color


@@ 155,7 155,7 @@ packages:
  /@astrojs/webapi/2.0.0:
    resolution: {integrity: sha512-gziwy+XvY+/B9mq/eurgJMZ4iFnkcqg1wb0tA8BsVfiUPwl7yQKAFrBxrs2rWfKMXyWlVaTFc8rAYcB5VXQEuw==}
    dependencies:
      undici: 5.16.0
      undici: 5.17.1
    dev: false

  /@babel/code-frame/7.18.6:


@@ 1109,7 1109,7 @@ packages:
    hasBin: true
    dependencies:
      caniuse-lite: 1.0.30001450
      electron-to-chromium: 1.4.285
      electron-to-chromium: 1.4.286
      node-releases: 2.0.9
      update-browserslist-db: 1.0.10_browserslist@4.21.5
    dev: false


@@ 1349,8 1349,8 @@ packages:
      css-tree: 2.2.1
    dev: false

  /damage-to-dice/1.0.4:
    resolution: {integrity: sha512-xluMilnZAnEu48P1GJKGyTDOphtn8qayXQyoIhLCfFAom6kBePsvyZTZkW3CEJdGHy9OBKjRnP5cBE9aGY3g6g==}
  /damage-to-dice/1.0.5:
    resolution: {integrity: sha512-19Qp1nK0WuI60vH9QiMP7XmR+M3kX7AP7EanTeVsGpxz29hpxJCxelz7h+t3csyqSGnOt1W2tqcd7vraj7t2wA==}
    hasBin: true
    dev: false



@@ 1471,8 1471,8 @@ packages:
    resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
    dev: false

  /electron-to-chromium/1.4.285:
    resolution: {integrity: sha512-47o4PPgxfU1KMNejz+Dgaodf7YTcg48uOfV1oM6cs3adrl2+7R+dHkt3Jpxqo0LRCbGJEzTKMUt0RdvByb/leg==}
  /electron-to-chromium/1.4.286:
    resolution: {integrity: sha512-Vp3CVhmYpgf4iXNKAucoQUDcCrBQX3XLBtwgFqP9BUXuucgvAV9zWp1kYU7LL9j4++s9O+12cb3wMtN4SJy6UQ==}
    dev: false

  /emmet/2.3.6:


@@ 2328,8 2328,8 @@ packages:
      mdast-util-to-markdown: 1.5.0
    dev: false

  /mdast-util-gfm/2.0.1:
    resolution: {integrity: sha512-42yHBbfWIFisaAfV1eixlabbsa6q7vHeSPY+cg+BBjX51M8xhgMacqH9g6TftB/9+YkcI0ooV4ncfrJslzm/RQ==}
  /mdast-util-gfm/2.0.2:
    resolution: {integrity: sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg==}
    dependencies:
      mdast-util-from-markdown: 1.3.0
      mdast-util-gfm-autolink-literal: 1.0.3


@@ 2372,12 2372,14 @@ packages:
      - supports-color
    dev: false

  /mdast-util-mdx/2.0.0:
    resolution: {integrity: sha512-M09lW0CcBT1VrJUaF/PYxemxxHa7SLDHdSn94Q9FhxjCQfuW7nMAWKWimTmA3OyDMSTH981NN1csW1X+HPSluw==}
  /mdast-util-mdx/2.0.1:
    resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==}
    dependencies:
      mdast-util-from-markdown: 1.3.0
      mdast-util-mdx-expression: 1.3.2
      mdast-util-mdx-jsx: 2.1.1
      mdast-util-mdxjs-esm: 1.3.1
      mdast-util-to-markdown: 1.5.0
    transitivePeerDependencies:
      - supports-color
    dev: false


@@ 3255,7 3257,7 @@ packages:
    resolution: {integrity: sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig==}
    dependencies:
      '@types/mdast': 3.0.10
      mdast-util-gfm: 2.0.1
      mdast-util-gfm: 2.0.2
      micromark-extension-gfm: 2.0.1
      unified: 10.1.2
    transitivePeerDependencies:


@@ 3265,7 3267,7 @@ packages:
  /remark-mdx/2.2.1:
    resolution: {integrity: sha512-R9wcN+/THRXTKyRBp6Npo/mcbGA2iT3N4G8qUqLA5pOEg7kBidHv8K2hHidCMYZ6DXmwK18umu0K4cicgA2PPQ==}
    dependencies:
      mdast-util-mdx: 2.0.0
      mdast-util-mdx: 2.0.1
      micromark-extension-mdxjs: 1.0.0
    transitivePeerDependencies:
      - supports-color


@@ 3759,8 3761,8 @@ packages:
    hasBin: true
    dev: false

  /undici/5.16.0:
    resolution: {integrity: sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ==}
  /undici/5.17.1:
    resolution: {integrity: sha512-qMwK+1tmJ6DsMlsl/AYsZXnkIraXmQzzBuPSiQXP6q0WvNO+dwfiBAhjZWmxxW4N0PS31fzB6ulDOUS6cv8oKw==}
    engines: {node: '>=12.18'}
    dependencies:
      busboy: 1.6.0

M src/components/DamageToDice.tsx => src/components/DamageToDice.tsx +7 -0
@@ 19,6 19,11 @@ type BestFitResult = {
  die: Die;
  percentage: number;
  damage: number;
  standardDeviation: {
    minimum: number;
    maximum: number;
    standardDeviation: number;
  };
};

export default function DamageToDice() {


@@ 46,6 51,8 @@ export default function DamageToDice() {
          roll.percentage
        )}% of target damage); min: ${roll.numberOfDice * 1 + modifier}, max: ${
          roll.numberOfDice * roll.die.sides + modifier
        }; most rolls within ${roll.standardDeviation.minimum}-${
          roll.standardDeviation.maximum
        }`}
      </div>
    ));