Skip to content

Commit

Permalink
Merge pull request #2 from UranusBytes/dev-0.0.2
Browse files Browse the repository at this point in the history
Dev 0.0.3
  • Loading branch information
UranusBytes authored Jun 29, 2022
2 parents fb77462 + 2552b6a commit 6d29693
Show file tree
Hide file tree
Showing 12 changed files with 559 additions and 171 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

## v0.0.2-ALPHA.0
Jun 16, 2022
* Initial release of Fudge for DND 5e
* Initial release of Fudge for DND 5e

## v0.0.3-ALPHA.0
Jun 25, 2022
* Major refactor of system code to support flexibility
* Adjust dialog to support new UI/UX
* TOTALLY BROKEN fudging of rolls
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ The way Fudge works is that the next die roll of that type for that Actor will b

![die-hard-fudge-4](docs/die-hard-fudge-4.jpg)

### Known Issues
* TBD

## Future Planned Functionality
### Karmic dice
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Die Hard",
"description": "Adjustments for DND5e die rolls like fudging...",
"author": "Jeremy (UranusBytes)",
"version": "0.0.2",
"version": "0.0.3",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"esmodules": [
Expand Down
5 changes: 5 additions & 0 deletions scripts/Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ game





Fudges are maintained as:
- For PC actors, as flags within the actor
- For GM, as Setting - scope world
3 changes: 2 additions & 1 deletion scripts/classes/DieHardConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default class DieHardConfig {
system: null,
fudgeConfig: {
maxFudgeAttemptsPerRoll: 150
}
},
gmFudges: []
};

if (game.system.id == 'dnd5e') {
Expand Down
15 changes: 4 additions & 11 deletions scripts/classes/DieHardDnd5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,6 @@ export class DieHardDnd5e extends DieHardSystem{
dieHardLog(false, 'Dnd 5e System Hook - Ready');
}

getFudgeActors() {
dieHardLog(false, 'DieHardDnd5e - getFudgeActors');
let whoActors = []
for (let actorId of game.actors.keys()) {
let curActor = game.actors.get(actorId);
if(curActor.data.type === 'character') {
whoActors.push({id: actorId, name: curActor.name})
}
}
return whoActors;
}

getFudgeWhatOptions() {
return this.fudgeWhatOptions;
Expand Down Expand Up @@ -188,6 +177,8 @@ export class DieHardDnd5e extends DieHardSystem{
// Delete the fudge from the actor
let deletedFudge = actorFudges.splice(fudgeIndex,1)
game.actors.get(actorId).setFlag('foundry-die-hard', 'activeFudges', actorFudges);
// Check if still have active fudges;
this.refreshActiveFudgesIcon();
}
}

Expand Down Expand Up @@ -220,5 +211,7 @@ export class DieHardDnd5e extends DieHardSystem{
game.settings.get('foundry-die-hard', 'dieHardSettings').system.wrappedRoll(options, this.actor.id, 'entityRollAttack')
wrapped(options);
}


}

Loading

0 comments on commit 6d29693

Please sign in to comment.