|
|
|
@@ -44,7 +44,8 @@ export type Vigors = {[key in Vigor]: number} |
|
|
|
export enum Stat { |
|
|
|
Toughness = "Toughness", |
|
|
|
Power = "Power", |
|
|
|
Speed = "Speed", |
|
|
|
Reflexes = "Reflexes", |
|
|
|
Agility = "Agility", |
|
|
|
Willpower = "Willpower", |
|
|
|
Charm = "Charm" |
|
|
|
} |
|
|
|
@@ -54,15 +55,17 @@ export type Stats = {[key in Stat]: number} |
|
|
|
export const StatIcons: {[key in Stat]: string} = { |
|
|
|
Toughness: 'fas fa-heartbeat', |
|
|
|
Power: 'fas fa-fist-raised', |
|
|
|
Speed: 'fas fa-feather', |
|
|
|
Reflexes: 'fas fa-stopwatch', |
|
|
|
Agility: 'fas fa-feather', |
|
|
|
Willpower: 'fas fa-book', |
|
|
|
Charm: 'fas fa-comments' |
|
|
|
} |
|
|
|
|
|
|
|
export const StatDescs: {[key in Stat]: string} = { |
|
|
|
Toughness: 'Your physical resistance', |
|
|
|
Power: 'Your physical power', |
|
|
|
Speed: 'How quickly you can act', |
|
|
|
Toughness: 'Your brute resistance', |
|
|
|
Power: 'Your brute power', |
|
|
|
Reflexes: 'Your ability to dodge', |
|
|
|
Agility: 'Your ability to move quickly', |
|
|
|
Willpower: 'Your mental resistance', |
|
|
|
Charm: 'Your mental power' |
|
|
|
} |
|
|
|
@@ -599,7 +602,7 @@ export class Encounter { |
|
|
|
this.combatants.forEach(combatant => { |
|
|
|
// this should never be undefined |
|
|
|
const currentProgress = this.initiatives.get(combatant) ?? 0 |
|
|
|
const remaining = (this.turnTime - currentProgress) / Math.sqrt(Math.max(combatant.stats.Speed, 1)) |
|
|
|
const remaining = (this.turnTime - currentProgress) / Math.sqrt(Math.max(combatant.stats.Agility, 1)) |
|
|
|
times.set(combatant, remaining) |
|
|
|
}) |
|
|
|
|
|
|
|
@@ -609,12 +612,12 @@ export class Encounter { |
|
|
|
|
|
|
|
return closestTime <= nextTime ? closest : next |
|
|
|
}, this.combatants[0]) |
|
|
|
const closestRemaining = (this.turnTime - (this.initiatives.get(this.currentMove) ?? 0)) / Math.sqrt(Math.max(this.currentMove.stats.Speed, 1)) |
|
|
|
const closestRemaining = (this.turnTime - (this.initiatives.get(this.currentMove) ?? 0)) / Math.sqrt(Math.max(this.currentMove.stats.Agility, 1)) |
|
|
|
|
|
|
|
this.combatants.forEach(combatant => { |
|
|
|
// still not undefined... |
|
|
|
const currentProgress = this.initiatives.get(combatant) ?? 0 |
|
|
|
this.initiatives.set(combatant, currentProgress + closestRemaining * Math.sqrt(Math.max(combatant.stats.Speed, 1))) |
|
|
|
this.initiatives.set(combatant, currentProgress + closestRemaining * Math.sqrt(Math.max(combatant.stats.Agility, 1))) |
|
|
|
}) |
|
|
|
|
|
|
|
// TODO: still let the creature use drained-vigor moves |
|
|
|
|