2.2.0 release #38
11
CHANGELOG.md
11
CHANGELOG.md
@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Power Effect for Havoc
|
||||
- Power Effect Macro for Havoc
|
||||
- Power Effect Action for Havoc
|
||||
- New Macro: Request Roll
|
||||
- NEW DEPENDENCY: socketlib
|
||||
- Documentation:
|
||||
- API Documentation
|
||||
- Request Roll macro documentation
|
||||
|
||||
## 2.1.0
|
||||
|
||||
### Changed
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
const requestRollFromTokens = game.modules.get('swade-mb-helpers').api.requestRollFromTokens
|
||||
|
||||
async function main () {
|
||||
let tokens = Array.from(game.user.targets)
|
||||
if (tokens.length < 1) {
|
||||
@ -29,7 +31,7 @@ async function main () {
|
||||
}
|
||||
for (const attribute of ['Agility', 'Smarts', 'Spirit', 'Strength', 'Vigor']) {
|
||||
menuData.inputs[1].options.push(
|
||||
{ html: `Attribute | ${attribute}`, value: `a|${attribute.toLowerCase()}` }
|
||||
{ html: `Attribute | ${attribute}`, value: `a|${attribute}` }
|
||||
)
|
||||
}
|
||||
const skillSet = new Set()
|
||||
@ -42,12 +44,27 @@ async function main () {
|
||||
}
|
||||
for (const skill of Array.from(skillSet).sort()) {
|
||||
menuData.inputs[1].options.push(
|
||||
{ html: `Skill | ${skill}`, value: `s|${skill.toLowerCase()}` })
|
||||
{ html: `Skill | ${skill}`, value: `s|${skill}` })
|
||||
}
|
||||
menuData.inputs[1].options.push(
|
||||
{ html: 'Skill | Untrained', value: 's|NOSKILL' })
|
||||
const result = await warpgate.menu(menuData, menuConfig)
|
||||
|
||||
if (result.buttons !== 'ok') {
|
||||
return
|
||||
}
|
||||
console.log(result)
|
||||
const rollMod = result.inputs[2]
|
||||
const rollModDesc = result.inputs[3]
|
||||
const rollParts = result.inputs[1].split('|')
|
||||
const rollType = (rollParts[0] === 'a' ? 'attribute' : 'skill')
|
||||
const rollDesc = rollParts[1]
|
||||
const options = {}
|
||||
if (rollMod !== 0) {
|
||||
options.mods = [{ label: rollModDesc, value: rollMod }]
|
||||
}
|
||||
|
||||
requestRollFromTokens(tokens, rollType, rollDesc, options)
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user