Added : Change stance on DicePicker on initiative roll.
Some minors fixes
This commit is contained in:
@@ -6,9 +6,12 @@
|
|||||||
- Added global modifiers for Characters, Adversary and Minons in the combat tracker : Confrontation types, Prepared
|
- Added global modifiers for Characters, Adversary and Minons in the combat tracker : Confrontation types, Prepared
|
||||||
- Added sheet modifiers for Characters and Adversary: Prepared
|
- Added sheet modifiers for Characters and Adversary: Prepared
|
||||||
- Initiative buttons in character sheet now display the DicePicker and do the initiative roll
|
- Initiative buttons in character sheet now display the DicePicker and do the initiative roll
|
||||||
|
- Change the actor stance on initiative roll in DicePicker
|
||||||
|
- Note : Due to the lack of the Roll & Keep system, the score is computed with the full success score.
|
||||||
- Spanish real translation by Alejabar (thanks !)
|
- Spanish real translation by Alejabar (thanks !)
|
||||||
- Added a GM Dialog Tool for setting global difficulty (TN) value / hidden (with DicePicker live refresh)
|
- Added a GM Dialog Tool for setting global difficulty (TN) value / hidden (with DicePicker live refresh)
|
||||||
- Compendium now display Ring and Rank if any in list view
|
- Compendium now display Ring and Rank if any in list view
|
||||||
|
- DicePicker : Fixed the initial display of "use a void point"
|
||||||
|
|
||||||
## 1.0.0 - First public release
|
## 1.0.0 - First public release
|
||||||
- Removed the 0ds if no skill point
|
- Removed the 0ds if no skill point
|
||||||
|
|||||||
@@ -43,17 +43,19 @@ export class CombatL5r5e extends Combat {
|
|||||||
const updatedCombatants = [];
|
const updatedCombatants = [];
|
||||||
ids.forEach((combatantId) => {
|
ids.forEach((combatantId) => {
|
||||||
const combatant = game.combat.combatants.find((c) => c._id === combatantId);
|
const combatant = game.combat.combatants.find((c) => c._id === combatantId);
|
||||||
if (!combatant || !combatant.actor) {
|
|
||||||
|
// Skip if combatant already have a initiative value
|
||||||
|
if (!messageOptions.rerollInitiative && (!combatant || !combatant.actor)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shortcut to data
|
// Shortcut to data
|
||||||
const data = combatant.actor.data.data;
|
const data = combatant.actor.data.data;
|
||||||
|
|
||||||
// A character’s initiative value is based on their state of preparedness when the conflict began.
|
// A character’s initiative value is based on their state of preparedness when the conflict began.
|
||||||
// If the character was ready for the conflict, their base initiative value is their focus attribute.
|
// If the character was ready for the conflict, their base initiative value is their focus attribute.
|
||||||
// If the character was unprepared (such as when surprised), their base initiative value is their vigilance attribute.
|
// If the character was unprepared (such as when surprised), their base initiative value is their vigilance attribute.
|
||||||
let initiative = 0;
|
let initiative;
|
||||||
|
|
||||||
if (combatant.actor.data.type === "npc" && combatant.actor.data.data.type === "minion") {
|
if (combatant.actor.data.type === "npc" && combatant.actor.data.data.type === "minion") {
|
||||||
// Minion NPCs can generate initiative value without a check, using their focus or vigilance attribute
|
// Minion NPCs can generate initiative value without a check, using their focus or vigilance attribute
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
difficulty: {
|
difficulty: {
|
||||||
value: 2,
|
value: 2,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
add_void_point: true,
|
add_void_point: false,
|
||||||
},
|
},
|
||||||
useVoidPoint: false,
|
useVoidPoint: false,
|
||||||
isInitiativeRoll: false,
|
isInitiativeRoll: false,
|
||||||
@@ -244,6 +244,8 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
set difficultyHidden(isHidden) {
|
set difficultyHidden(isHidden) {
|
||||||
this.object.difficulty.hidden = !!isHidden;
|
this.object.difficulty.hidden = !!isHidden;
|
||||||
|
this.object.difficulty.add_void_point = this.object.difficulty.hidden;
|
||||||
|
this._updateVoidPointUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -377,8 +379,10 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
if (this._actor) {
|
if (this._actor) {
|
||||||
const actorData = duplicate(this._actor.data.data);
|
const actorData = duplicate(this._actor.data.data);
|
||||||
|
|
||||||
// TODO update actor stance ? good idea or not, choice-able ?
|
// Update the actor stance on initiative only
|
||||||
// actorData.stance = approach;
|
if (this.object.isInitiativeRoll) {
|
||||||
|
actorData.stance = this.object.ring.id;
|
||||||
|
}
|
||||||
|
|
||||||
// If hidden add 1 void pt
|
// If hidden add 1 void pt
|
||||||
if (this.object.difficulty.add_void_point) {
|
if (this.object.difficulty.add_void_point) {
|
||||||
|
|||||||
Reference in New Issue
Block a user