-
Notifications
You must be signed in to change notification settings - Fork 22
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 combat system to handle start turn, end turn; improve effect management #215
Conversation
19e9243
to
e9adc78
Compare
module/helpers/flags.mjs
Outdated
@@ -4,7 +4,9 @@ | |||
* @example actor.getFlag(Flags.Scope, Flags.CurrentTurn) | |||
*/ | |||
export const Flags = Object.freeze({ | |||
CombatantsTurnStarted: 'combatantsTurnStarted', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might as well align case with other flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye, will do.
module/ui/combat-hud.mjs
Outdated
async _doTakeTurn(event) { | ||
await ui.combat.handleTakeTurn(event); | ||
// TODO: Why was this? | ||
// if (!game.user.isGM) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Highlighting for explicit review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Will remove the comment now that it's been sorted out and the missing functionality (players can start/end turns) implemented.
module/ui/combat-hud.mjs
Outdated
@@ -397,7 +408,8 @@ export class CombatHUD extends Application { | |||
Hooks.on('preUpdateScene', this._preUpdateScene.bind(this)); | |||
|
|||
if (!game.user.isGM) return; | |||
game.settings.set(SYSTEM, SETTINGS.optionCombatHudActorOrdering, this._backupOrdering ?? []); | |||
// TODO: Enable back? | |||
//game.settings.set(SYSTEM, SETTINGS.optionCombatHudActorOrdering, this._backupOrdering ?? []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Highlighting for explicit review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back without issue that I saw.
module/ui/combat.mjs
Outdated
@@ -52,7 +92,8 @@ export class FUCombat extends Combat { | |||
*/ | |||
constructor(data, context) { | |||
super(data, context); | |||
|
|||
//this._combatant = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack. Yes it was.
e9adc78
to
4e0118e
Compare
- Add a distinct event for starting combatant turn - Add hooks for all combat events - Move in effects with the other pipelines - Clean up the img warnings from status effects and effects in HBS templates # Conflicts: # styles/css/projectfu.css
4e0118e
to
6c67925
Compare
Combat System, Tracker
Refactors the combat system and tracker to handle two discrete steps between starting a turn and ending it.
Adds hooks for the common events during a combat encounter run by the system:
Effects Pipeline
Moves the effects class on with the other pipelines.. as it acts like one. It now hooks by default into the combat system in order to manage active effects. When these events are emitted chat messages can be displayed to update users and provide easy buttons to remove effects that have expired.
Fixes