Skip to content

Commit

Permalink
Updated for Foundry v10
Browse files Browse the repository at this point in the history
  • Loading branch information
illandril committed Aug 7, 2022
1 parent 69772ec commit fd6e231
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If no Item lookup details are specified, Available, Consumed, and Max are lookup

If Item lookup details are specified, Available, Consumed, and Max are lookup attributes of the item.

Available, Consumed, and Max can either be property keys (ex. `data.resources.legact.value`) or fixed numbers.
Available, Consumed, and Max can either be property keys (ex. `system.resources.legact.value`) or fixed numbers.

*Notice:* Whitespace and spelling are important. Make sure these comments are the very first thing in the macro, everything is spelled correctly, and that you don't have any extra spaces anywhere.

Expand Down Expand Up @@ -119,8 +119,8 @@ If you find yourself adding these comments to macros that you think could be nat
// Max=data.power.max
let speaker = ChatMessage.getSpeaker();
let actor = speaker.token && game.actors.tokens[speaker.token];
if(actor && actor.data.data.power.value > 0) {
actor.update({"data.power.value": actor.data.data.power.value-1});
if(actor && actor.system.power.value > 0) {
actor.update({"system.power.value": actor.system.power.value-1});
ChatMessage.create({user: game.user._id, speaker: ChatMessage.getSpeaker(), content: 'I cast magic missile!'});
}
```
Expand Down

0 comments on commit fd6e231

Please sign in to comment.