-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
## 2.5.0.1 | ||
- Added a generic system support. The module should now work with any system whose actors have HP set up as either `token.actor.data.data.attributes.hp` or `token.actor.data.data.hp`. | ||
- Fixed an issue where the module would fail to work because of a refactoring issue. | ||
|
||
## 2.5.0.0 | ||
- New release under a new repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const fraction = function (token) { | ||
const hp = token.actor.data.data.attributes?.hp || token.actor.data.data.hp; | ||
return Math.min(hp.value / hp.max, 1) | ||
} | ||
|
||
export {fraction} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"_id":"FUnpsmyP2zPf79JL","name":"Mark Dead","permission":{"default":0,"Y2U0NDkzODdlOTk1":3},"type":"script","flags":{"combat-utility-belt":{"macroTrigger":""}},"scope":"global","command":"/**\r\n* This macro will mark the selected tokens as dead.\r\n* If all the selected tokens are dead, they will be marked\r\n as alive instead.\r\n*/\r\n\r\nlet hasAlive = false;\r\nfor (let e of canvas.tokens.controlled) {\r\n\tif (!e.getFlag(\"healthestimate\", \"dead\")) {\r\n\t\thasAlive = true;\r\n\t\tbreak\r\n\t}\r\n}\r\nfor (let e of canvas.tokens.controlled) {\r\n\te.setFlag(\"healthestimate\", \"dead\", hasAlive)\r\n}","author":"Y2U0NDkzODdlOTk1","img":"icons/svg/bones.svg","actorIds":[]} | ||
{"_id":"FUnpsmyP2zPf79JL","name":"Mark Dead","permission":{"default":0,"Y2U0NDkzODdlOTk1":3},"type":"script","flags":{"combat-utility-belt":{"macroTrigger":""}},"scope":"global","command":"/**\r\n* This macro will mark the selected tokens as dead.\r\n* If all the selected tokens are dead, they will be marked\r\n as alive instead.\r\n*/\r\n\r\nlet hasAlive = false;\r\nfor (let e of canvas.tokens.controlled) {\r\n\tif (!e.getFlag(\"healthEstimate\", \"dead\")) {\r\n\t\thasAlive = true;\r\n\t\tbreak\r\n\t}\r\n}\r\nfor (let e of canvas.tokens.controlled) {\r\n\te.setFlag(\"healthEstimate\", \"dead\", hasAlive)\r\n}","author":"Y2U0NDkzODdlOTk1","img":"icons/svg/bones.svg","actorIds":[]} |