Skip to content

Commit

Permalink
Merge pull request #1620 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
7.3
  • Loading branch information
snap01 authored Oct 28, 2024
2 parents fb3d228 + 2e421e8 commit d7603e6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Happy gaming !

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

## Version 7.2
## Version 7.3

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

Expand Down
15 changes: 13 additions & 2 deletions module/chat/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,20 @@ export class CoC7Damage {
for (const r of rolls) {
const roll = {}
chatHelper.getObjectFromElement(roll, r)
damage.rolls.push(roll)
const group = roll.group
const dice = {
faces: roll.faces,
result: roll.result
}
delete roll.group
delete roll.faces
delete roll.result
if (typeof damage.rolls[group] === 'undefined') {
roll.dice = []
damage.rolls.push(roll)
}
damage.rolls[group].dice.push(dice)
}

if (!object) return damage
}
}
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "CoC7",
"title": "Call of Cthulhu 7th Edition",
"description": "An implementation of the Call of Cthulhu 7th Edition game system for Foundry Virtual Tabletop.",
"version": "7.2",
"version": "7.3",
"authors": [
{
"name": "Miskatonic Investigative Society"
Expand Down Expand Up @@ -207,7 +207,7 @@
"secondaryTokenAttribute": "attribs.san",
"url": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT",
"manifest": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/latest/download/system.json",
"download": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/download/7.2/system.zip",
"download": "https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/releases/download/7.3/system.zip",
"media": [
{
"type": "setup",
Expand Down
4 changes: 2 additions & 2 deletions templates/chat/combat/range-initiator.html
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ <h4 class="malfunction">{{roll.malfunctionTxt}}</h4>
<span class="part-total flex0">{{d.total}}</span>
</span>
<ol class="dice-rolls">
{{#each d.rolls as |roll|}}
{{#each d.rolls as |roll group|}}
{{#each roll.dice as |die|}}
<li class="roll die d{{die.faces}}" data-formula="{{roll.formula}}" data-total="{{roll.total}}" data-die="{{roll.die}}" data-critical="{{roll.critical}}">{{die.result}}</li>
<li class="roll die d{{die.faces}}" data-group="{{group}}" data-formula="{{roll.formula}}" data-total="{{roll.total}}" data-die="{{roll.die}}" data-critical="{{roll.critical}}" data-faces="{{die.faces}}" data-result="{{die.result}}">{{die.result}}</li>
{{/each}}
{{/each}}
</ol>
Expand Down

0 comments on commit d7603e6

Please sign in to comment.