Skip to content

Commit

Permalink
Fix rolling army initiative
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez committed Mar 20, 2024
1 parent d60566c commit c8528f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/module/actor/army/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ArmyPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | nu
modifiers: R.compact([
new ModifierPF2e({
slug: "base",
label: "PF2E.Kingmaker.Army.Base",
label: "PF2E.ModifierTitle",
modifier: expectedAC - 10,
}),
acAdjustment &&
Expand All @@ -140,7 +140,7 @@ class ArmyPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | nu
label: "PF2E.Kingmaker.Army.Scouting",
domains: ["scouting"],
modifiers: R.compact([
new ModifierPF2e({ slug: "base", label: "PF2E.Kingmaker.Army.Base", modifier: baseScouting }),
new ModifierPF2e({ slug: "base", label: "PF2E.ModifierTitle", modifier: baseScouting }),
scoutAdjustment
? new ModifierPF2e({
slug: "adjustment",
Expand All @@ -164,7 +164,7 @@ class ArmyPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | nu
label: `PF2E.Kingmaker.Army.Save.${saveType}`,
domains: ["saving-throw", saveType],
modifiers: R.compact([
new ModifierPF2e({ slug: "base", label: "PF2E.Kingmaker.Army.Base", modifier: baseValue }),
new ModifierPF2e({ slug: "base", label: "PF2E.ModifierTitle", modifier: baseValue }),
adjustment
? new ModifierPF2e({
slug: "adjustment",
Expand Down Expand Up @@ -256,7 +256,7 @@ class ArmyPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | nu
modifiers: R.compact([
new ModifierPF2e({
slug: "base",
label: "PF2E.Kingmaker.Army.Base",
label: "PF2E.ModifierTitle",
modifier: ARMY_STATS.attack[this.level],
}),
data.potency && new ModifierPF2e({ slug: "potency", label: "Potency", modifier: data.potency }),
Expand Down
3 changes: 2 additions & 1 deletion src/module/system/statistic/statistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,10 @@ class StatisticCheck<TParent extends Statistic = Statistic> {
!!(args.dc?.slug || "statistic" in (args.dc ?? {})) &&
(!item || item.isOfType("action", "campaignFeature", "feat", "weapon"))));

// Only armies can target armies
const isValidRoller = targetToken?.actor?.isOfType("army")
? self.isOfType("army")
: self.isOfType("creature", "hazard", "party");
: self.isOfType("army", "creature", "hazard", "party");
if (!isValidRoller) return null;

// This is required to determine the AC for attack dialogs
Expand Down
1 change: 0 additions & 1 deletion static/lang/kingmaker-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"Ammunition": "Ammunition",
"Armor": "Armor",
"Base": "Base",
"BasicWarActions": "Basic War Actions",
"Condition": {
"concealed": {
Expand Down

0 comments on commit c8528f8

Please sign in to comment.