Skip to content

Commit

Permalink
Have conditional rules applied after checking if player is alive
Browse files Browse the repository at this point in the history
So we do not get "arcane boots" warning immediately after respawn
  • Loading branch information
cannawen committed Nov 26, 2023
1 parent b5fd0bc commit 8aceb32
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/assistants/arcaneBoots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default [
then: () => new Fact(topics.configurableEffect, "arcane boots"),
}),
]
.map(alive)
.map((rule) =>
conditionalEveryIntervalSeconds(REMINDER_INTERVAL_SECONDS, rule)
)
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(alive);
.map((rule) => configurable(configInfo.ruleIndentifier, rule));
4 changes: 2 additions & 2 deletions src/assistants/arcaneRing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export default [
then: () => new Fact(topics.configurableEffect, "arcane ring"),
}),
]
.map(alive)
.map((rule) =>
conditionalEveryIntervalSeconds(REMINDER_INTERVAL_SECONDS, rule)
)
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(alive);
.map((rule) => configurable(configInfo.ruleIndentifier, rule));
4 changes: 2 additions & 2 deletions src/assistants/lotus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export default [
}),
]
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(inRegularGame)
.map((rule) =>
everyIntervalSeconds(
LOTUS_START_WARNING_TIME,
LOTUS_STOP_WARNING_TIME,
LOTUS_SPAWN_INTERVAL,
rule
)
)
.map(inRegularGame);
);
4 changes: 2 additions & 2 deletions src/assistants/midas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ export default [
})
),
]
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(alive)
.map(inGame)
.map(alive);
.map((rule) => configurable(configInfo.ruleIndentifier, rule));
6 changes: 3 additions & 3 deletions src/assistants/neutralItemDigReminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export default ["item_trusty_shovel", "item_pirate_hat"]
then: () => new Fact(topics.configurableEffect, "dig"),
})
)
.map(alive)
.map(inGame)
.map((rule) =>
conditionalEveryIntervalSeconds(TIME_BETWEEN_REMINDERS, rule)
)
.map(inGame)
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(alive);
.map((rule) => configurable(configInfo.ruleIndentifier, rule));
8 changes: 4 additions & 4 deletions src/assistants/neutralItemReminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export default [
},
}),
]
.map(alive)
.map((rule) =>
conditionalEveryIntervalSeconds(TIME_BETWEEN_REMINDERS, rule)
betweenSeconds(NEUTRAL_ITEM_REMINDER_START_TIME, undefined, rule)
)
.map((rule) =>
betweenSeconds(NEUTRAL_ITEM_REMINDER_START_TIME, undefined, rule)
conditionalEveryIntervalSeconds(TIME_BETWEEN_REMINDERS, rule)
)
.map((rule) => configurable(configInfo.ruleIndentifier, rule))
.map(alive);
.map((rule) => configurable(configInfo.ruleIndentifier, rule));

0 comments on commit 8aceb32

Please sign in to comment.