Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update core compatibility #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.5.0 (2020-07-06)

- Updated base functionality to be compatible with Foundry Core 0.8.8.

## 1.3.1 (2020-05-22)

- add Korean language support (thanks @KLO#1490)
Expand Down
8 changes: 4 additions & 4 deletions group-initiative.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function rollGroupInitiative(creatures) {
const groups = creatures.reduce(
(g, combatant) => ({
...g,
[combatant.actor.id]: (g[combatant.actor.id] || []).concat(combatant._id),
[combatant.actor.id]: (g[combatant.actor.id] || []).concat(combatant.data._id),
}),
{}
);
Expand All @@ -91,14 +91,14 @@ async function rollGroupInitiative(creatures) {
await this.rollInitiative(ids, {messageOptions});

// Prepare the others in the group.
const updates = creatures.reduce((updates, {_id, initiative, actor}) => {
const group = groups[actor._id];
const updates = creatures.reduce((updates, {id, initiative, actor}) => {
const group = groups[actor.data._id];
if (group.length <= 1 || initiative) return updates;

// Get initiative from leader of group.
initiative = this.getCombatant(group[0]).initiative;

updates.push({_id, initiative});
updates.push({_id: id, initiative});
return updates;
}, []);

Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"title": "Group Initiative",
"description": "Roll group initiative from the Combat tracker.",
"author": "thorni",
"version": "1.4.0",
"version": "1.5.0",
"minimumCoreVersion": "0.7.3",
"compatibleCoreVersion": "0.7.3",
"scripts": [],
"esmodules": ["group-initiative.js"],
"url": "https://github.com/tonifisler/foundry-group-initiative",
"manifest": "https://raw.githubusercontent.com/tonifisler/foundry-group-initiative/master/module.json",
"download": "https://github.com/tonifisler/foundry-group-initiative/archive/1.4.0.zip",
"download": "https://github.com/tonifisler/foundry-group-initiative/archive/1.5.0.zip",
"changelog": "https://github.com/tonifisler/foundry-group-initiative/blob/master/CHANGELOG.md",
"readme": "https://github.com/tonifisler/foundry-group-initiative/blob/master/README.md",
"languages": [
Expand Down