Manage fight up to reaction
This commit is contained in:
parent
fb0eb9dcc8
commit
e5fd4dc01f
@ -61,7 +61,7 @@ export class SoSCardDeck {
|
||||
let newdeck = duplicate(this.data.deck).concat( duplicate (this.data.discard));
|
||||
this.data.discard = []; // Reinit discard pile
|
||||
this.data.deck = [];
|
||||
let decklen = newdeck.len;
|
||||
let decklen = newdeck.length;
|
||||
let cardState = [];
|
||||
for (let i = 0; i <decklen; i++) {
|
||||
cardState[i] = false;
|
||||
|
@ -6,7 +6,7 @@ import { SoSDialogCombatActions } from "./sos-dialog-combat-actions.js";
|
||||
const severity2malus = { "none": 0, "light": -1, "moderate": -2, "severe": -3, "critical": -4};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class SoSUtility {
|
||||
export class SoSUtility extends Entity {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async preloadHandlebarsTemplates() {
|
||||
@ -220,7 +220,7 @@ export class SoSUtility {
|
||||
static async applyDamage( flipData ) {
|
||||
if (!this.registry) this.registry = {};
|
||||
|
||||
if ( flipData.isReaction) {
|
||||
if ( flipData.isReaction) { // Check again resut in case of reaction !
|
||||
flipData.magnitude = flipData.finalScore - flipData.tn; // Update magnitude
|
||||
if ( flipData.magnitude < 0 ) {
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-reaction-result.html', flipData );
|
||||
|
Loading…
Reference in New Issue
Block a user