0.4.4 • Published 6 years ago

mhwdmg v0.4.4

Weekly downloads
3
License
MIT
Repository
-
Last release
6 years ago

npm versionBuild Status

MHW DMG

TypeScript and JavaScript library for damage calcuration at MonsterHunterWorld: Iceborne.

Install

# use yarn
$ yarn add mhwdmg
# use npm
$ npm install --save mhwdmg

Examples

JavaScript

const { damage, damageDetail } = require('mhwdmg')

// basic
const weapon = {
  attack: 200,
  affinity: 0,
  element: 200,
  sharpness: 'purple'
}

const motion = {
  value: 20
}

const target = {
  physicalEffectiveness: 40,
  elementalEffectiveness: 20,
  anger: false,
  wounded: false
}

const condition = {
  weapon,
  motion,
  target
}

console.log(damage(condition)) // return 27


// with skills
const skill = {
  // attackBoost Lv.7
  attackBoost: 7,
  // criticalEye Lv.3
  criticalEye: 3
}

condition.skill = skill

console.log(damage(condition)) // return 31.2


// with buff
const buff = {
  demonDrug: true,
  canteen: 'L'
}

condition.buff = buff

console.log(damage(condition)) // return 32.4


// damageDetail returns detail of calcuration result
console.log(damageDetail(condition))
/*
{
  base: { elemental: 5, physical: 26 },
  critical: { elemental: 5, physical: 33 },
  expected: { elemental: 5, physical: 27.4 }
}
*/
0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago