diff --git a/Contributor_s_Guide.html b/Contributor_s_Guide.html index 54c9cd4..be6df58 100644 --- a/Contributor_s_Guide.html +++ b/Contributor_s_Guide.html @@ -20,7 +20,7 @@ Qi: An Embeddable Flow-Oriented Language. Local customizations can be found in frosthaven-manager/qi/list2hash, frosthaven-manager/qi/utils, and -frosthaven-manager/curlique.

Frosthaven Manager uses +frosthaven-manager/curlique.

Frosthaven Manager uses gui-easy: Declarative GUIs to build declarative GUIs. Local customizations to the observable operators can be found in frosthaven-manager/observable-operator.

Most of the game-related definitions are in diff --git a/Developer_Reference.html b/Developer_Reference.html index 83691ce..9a97503 100644 --- a/Developer_Reference.html +++ b/Developer_Reference.html @@ -1,5 +1,5 @@ -7 Developer Reference

On this page:
7.1 aoe
7.2 aoe-images
hex-size
r
S
X
O
M
border-size
spec-sym?
spec?
spec->shape
syntaxes-can-be-spec?
syntaxes->spec
string->spec
7.3 Constant Formatting and Parsing
define-constant-format/  parse
define-constant-format
define-constant-parse
7.4 contracts
unique-with/  c
7.5 defns
7.5.1 Level Info
level-info
number-of-levels
max-level
level/  c
max-players
num-players/  c
get-level-info
inspiration-reward
7.5.2 Loot Deck
material-kind?
lumber
metal
hide
material-kinds
herb-kind?
arrowvine
axenut
corpsecap
flamefruit
rockroot
snowthistle
herb-kinds
random-item?
random-item
money
material
material-amount*
herb
special-loot
loot-card?
loot-type/  c
card->type
format-loot-card
max-money-cards
max-material-cards
max-herb-cards
max-random-item-cards
money-deck
material-decks
herb-decks
standard-loot-deck
apply-sticker
7.5.3 Monster Cards
monster-stats
monster-info
monster-ability
monster-number/  c
monster
monster-group
monster-stats-max-hp*
monster-stats-attack*
monster-stats-bonuses-string
monster-stats-effects-string
monster-stats-immunities-string
monster-ability-name->text
monster-ability-initiative->text
monster-ability-ability->rich-text
make-monster
make-monster-group
get-monster-stats
monster-at-max-health?
monster-dead?
monster-update-condition
monster-expire-conditions
monster-update-hp
monster-group-update-num
monster-group-remove
monster-group-add
monster-group-first-monster
monster-group-update-level
monster->hp-text
swap-monster-group-elites
swap-monster-elite
monster-group-change-max-HP
7.5.4 Players
player
make-player
player-update-name
player-act-on-hp
player-act-on-max-hp
player-act-on-xp
player-add-condition
player-remove-condition
player-condition-handler
player-afflicted-by?
player-expire-conditions
player-dead?
player-at-max-health?
player-set-initiative
player-clear-initiative
player-add-loot
player->hp-text
player-conditions*
summon
summon-update-name
summon-act-on-hp
summon-act-on-max-hp
summon-add-condition
summon-remove-condition
summon-condition-handler
summon-afflicted-by?
summon-dead?
summon-at-max-health?
summon->hp-text
summon-conditions*
player-summon
update-player-summon
player-kill-summon
7.5.5 Scenario
element?
fire
ice
air
earth
light
dark
monster-modifier?
zero
minus1
plus1
minus2
plus2
null
crit
curse
bless
condition?
regenerate
ward
invisible
strengthen
wound
brittle
bane
poison
immobilize
disarm
impair
stun
muddle
discriminator:  condition
selector:  condition
initiative?
conditions
expirable-conditions
conditions->string
monster-modifier-deck
monster-curse-deck
bless-deck
shuffle-modifier-deck?
better-modifier
worse-modifier
absent-from-modifier-deck
7.6 elements
size
element-pics
elements
7.7 enum-helpers
define-serializable-enum-type
7.8 icons
target
range
push
pull
move
jump
teleport
attack
7.9 manager
7.9.1 manager/  state
creature
monster-group*
creature-is-mg*?
state
make-state
state-@env
state-@info-db
state-@ability-db
serialize-state
deserialize-state
copy-state
undo?
make-undo
undo!
undoable?
make-player-creature
setup-players
update-players
update-monster-groups
kill-monster
update-all-players
update-all-monster-groups
update-player-name
update-player-max-hp
creature-initiative
single-monster-event/  c
add-monster-event/  c
remove-monster-event/  c
add-or-remove-monster-group
draw-new-card-mid-round-if-needed
initiative-public?
add-prompt
remove-prompt
7.9.2 manager/  ability-decks
ability-decks
ability-decks-draw-next
ability-decks-discard-and-maybe-shuffle
update-ability-decks
move-top-draw-to-bottom
7.9.3 manager/  modifier-decks
reshuffle-modifier-deck
discard
draw-modifier
draw-modifier*
do-curse-monster
do-bless-monster
do-bless-player
do-unbless-player
add-monster-modifier
remove-monster-modifier
7.9.4 manager/  db
init-dbs
init-dbs-and-foes
7.9.5 manager/  elements
element-state/  c
make-states
infuse-all
consume-all
wane-element
transition-element-state
7.9.6 manager/  loot
update-loot-deck-and-num-loot-cards
build-loot-deck
build-loot-deck!
give-player-loot
place-loot-on-bottom
player->rewards
7.9.7 manager/  round-prompts
prompt
should-do-prompt?
prompt/  c
time/  c
beginning-of
end-of
prompt->string
7.9.8 manager/  transition
transition/  c
next-round
draw-abilities
7.9.9 manager/  save
do-save-game
do-load-game
load-game
7.10 gui
7.10.1 gui/  common-menu
about-menu-item
issue-menu-item
feature-menu-item
contribute-menu-item
send-feedback-menu-item
how-to-play-menu-item
launch-server-menu-item
gc-menu-item
do-about
7.10.2 gui/  counter
counter
7.10.3 gui/  elements
elements-cycler
7.10.4 gui/  font
copy-font
big-control-font
7.10.5 gui/  formula-editor
formula-editor
formula-menu-item
7.10.6 gui/  helpers
translate-to-top-coords
escape-text
define-error-text
7.10.7 gui/  level-info
level-stats
level-table
inspiration-table
7.10.8 gui/  level-picker
level-picker
7.10.9 gui/  loot
loot-picker
loot-button
loot-preview
7.10.10 gui/  manager
manager
7.10.11 gui/  markdown
markdown-text
7.10.12 gui/  mixins
make-closing-proc-mixin
make-on-close-mixin
define-close!
hide-caret/  selection
7.10.13 gui/  monster-modifier
modify-monster-deck-menu-item
favors-dialog
card-swapper
7.10.14 gui/  monsters
single-monster-picker
simple-monster-group-view
monster-group-view
db-view
add-monster-group
7.10.15 gui/  number-players
number-players-picker
7.10.16 gui/  player-info
player-view
7.10.17 gui/  render
current-renderer
render/  eventspace
with-closing-custodian/  eventspace
closing-custodian
closing-eventspace
close-custodian-mixin
7.10.18 gui/  rewards
player-rewards-view
7.10.19 gui/  rich-text-display
rich-text-display
7.10.19.1 Rich Text Model
newline
pict/  alt-text
newline?
scale-icon
7.10.20 gui/  round-number
round-number-modifier
7.10.21 gui/  round-prompts
prompts-input-view
manage-prompt-menu-item
do-round-prompt
7.10.22 gui/  server
launch-server
7.10.23 gui/  stacked-tables
stacked-tables
column
7.10.24 gui/  static-table
static-table
7.10.25 gui/  table
make-preview-rows
7.11 files
get-file/  filter
put-file/  filter
7.12 bestiary
7.13 monster-db
info-db/  c
ability-db/  c
datums->dbs
get-dbs
default-monster-db
7.14 parsers
7.14.1 parsers/  foes
parse-foes
foes/  pc
foe/  pc
spec/  pc
numbering/  pc
monster-type/  pc
foes/  p
foe/  p
7.14.2 parsers/  formula
env/  c
expr/  pc
expr/  p
parse-expr
7.14.3 parsers/  monster
parse-bestiary
bestiary/  c
monster/  p
ability-deck/  p
import-monsters/  p
bestiary/  p
bestiary-dupes
7.15 observable-operator
<@
@>
λ<@
@!
7.16 pp
7.16.1 pp/  bestiary
pretty-bestiary
7.17 qi/  list2hash
list~>hash
list->hash
7.18 qi/  utils
list-remove
7.19 rich-text-helpers
only-on-text
match-loop
7.20 server
launch-server
7.21 syntax
7.21.1 syntax/  module-reader
#%module-begin
7.21.2 syntax/  monsters
make-dbs
imports->dbs
check-monsters-have-abilities
check-monsters-have-abilities-message
check-foes-have-monsters
check-foes-have-monsters-message
8.15

7 Developer Reference🔗

None of these APIs should be considered stable enough for use in projects other +7 Developer Reference

On this page:
7.1 aoe
7.2 aoe-images
hex-size
r
S
X
O
M
border-size
spec-sym?
spec?
spec->shape
syntaxes-can-be-spec?
syntaxes->spec
string->spec
7.3 Constant Formatting and Parsing
define-constant-format/  parse
define-constant-format
define-constant-parse
7.4 contracts
unique-with/  c
7.5 curlique
~>
~>>
switch
7.6 defns
7.6.1 Level Info
level-info
number-of-levels
max-level
level/  c
max-players
num-players/  c
get-level-info
inspiration-reward
7.6.2 Loot Deck
material-kind?
lumber
metal
hide
material-kinds
herb-kind?
arrowvine
axenut
corpsecap
flamefruit
rockroot
snowthistle
herb-kinds
random-item?
random-item
money
material
material-amount*
herb
special-loot
loot-card?
loot-type/  c
card->type
format-loot-card
max-money-cards
max-material-cards
max-herb-cards
max-random-item-cards
money-deck
material-decks
herb-decks
standard-loot-deck
apply-sticker
7.6.3 Monster Cards
monster-stats
monster-info
monster-ability
monster-number/  c
monster
monster-group
monster-stats-max-hp*
monster-stats-attack*
monster-stats-bonuses-string
monster-stats-effects-string
monster-stats-immunities-string
monster-ability-name->text
monster-ability-initiative->text
monster-ability-ability->rich-text
make-monster
make-monster-group
get-monster-stats
monster-at-max-health?
monster-dead?
monster-update-condition
monster-expire-conditions
monster-update-hp
monster-group-update-num
monster-group-remove
monster-group-add
monster-group-first-monster
monster-group-update-level
monster->hp-text
swap-monster-group-elites
swap-monster-elite
monster-group-change-max-HP
7.6.4 Players
player
make-player
player-update-name
player-act-on-hp
player-act-on-max-hp
player-act-on-xp
player-add-condition
player-remove-condition
player-condition-handler
player-afflicted-by?
player-expire-conditions
player-dead?
player-at-max-health?
player-set-initiative
player-clear-initiative
player-add-loot
player->hp-text
player-conditions*
summon
summon-update-name
summon-act-on-hp
summon-act-on-max-hp
summon-add-condition
summon-remove-condition
summon-condition-handler
summon-afflicted-by?
summon-dead?
summon-at-max-health?
summon->hp-text
summon-conditions*
player-summon
update-player-summon
player-kill-summon
7.6.5 Scenario
element?
fire
ice
air
earth
light
dark
monster-modifier?
zero
minus1
plus1
minus2
plus2
null
crit
curse
bless
condition?
regenerate
ward
invisible
strengthen
wound
brittle
bane
poison
immobilize
disarm
impair
stun
muddle
discriminator:  condition
selector:  condition
initiative?
conditions
expirable-conditions
conditions->string
monster-modifier-deck
monster-curse-deck
bless-deck
shuffle-modifier-deck?
better-modifier
worse-modifier
absent-from-modifier-deck
7.7 elements
size
element-pics
elements
7.8 enum-helpers
define-serializable-enum-type
7.9 icons
target
range
push
pull
move
jump
teleport
attack
7.10 manager
7.10.1 manager/  state
creature
monster-group*
creature-is-mg*?
state
make-state
state-@env
state-@info-db
state-@ability-db
serialize-state
deserialize-state
copy-state
undo?
make-undo
undo!
undoable?
make-player-creature
setup-players
update-players
update-monster-groups
kill-monster
update-all-players
update-all-monster-groups
update-player-name
update-player-max-hp
creature-initiative
single-monster-event/  c
add-monster-event/  c
remove-monster-event/  c
add-or-remove-monster-group
draw-new-card-mid-round-if-needed
initiative-public?
add-prompt
remove-prompt
7.10.2 manager/  ability-decks
ability-decks
ability-decks-draw-next
ability-decks-discard-and-maybe-shuffle
update-ability-decks
move-top-draw-to-bottom
7.10.3 manager/  modifier-decks
reshuffle-modifier-deck
discard
draw-modifier
draw-modifier*
do-curse-monster
do-bless-monster
do-bless-player
do-unbless-player
add-monster-modifier
remove-monster-modifier
7.10.4 manager/  db
init-dbs
init-dbs-and-foes
7.10.5 manager/  elements
element-state/  c
make-states
infuse-all
consume-all
wane-element
transition-element-state
7.10.6 manager/  loot
update-loot-deck-and-num-loot-cards
build-loot-deck
build-loot-deck!
give-player-loot
place-loot-on-bottom
player->rewards
7.10.7 manager/  round-prompts
prompt
should-do-prompt?
prompt/  c
time/  c
beginning-of
end-of
prompt->string
7.10.8 manager/  transition
transition/  c
next-round
draw-abilities
7.10.9 manager/  save
do-save-game
do-load-game
load-game
7.11 gui
7.11.1 gui/  common-menu
about-menu-item
issue-menu-item
feature-menu-item
contribute-menu-item
send-feedback-menu-item
how-to-play-menu-item
launch-server-menu-item
gc-menu-item
do-about
7.11.2 gui/  counter
counter
7.11.3 gui/  elements
elements-cycler
7.11.4 gui/  font
copy-font
big-control-font
7.11.5 gui/  formula-editor
formula-editor
formula-menu-item
7.11.6 gui/  helpers
translate-to-top-coords
escape-text
define-error-text
7.11.7 gui/  level-info
level-stats
level-table
inspiration-table
7.11.8 gui/  level-picker
level-picker
7.11.9 gui/  loot
loot-picker
loot-button
loot-preview
7.11.10 gui/  manager
manager
7.11.11 gui/  markdown
markdown-text
7.11.12 gui/  mixins
make-closing-proc-mixin
make-on-close-mixin
define-close!
hide-caret/  selection
7.11.13 gui/  monster-modifier
modify-monster-deck-menu-item
favors-dialog
card-swapper
7.11.14 gui/  monsters
single-monster-picker
simple-monster-group-view
monster-group-view
db-view
add-monster-group
7.11.15 gui/  number-players
number-players-picker
7.11.16 gui/  player-info
player-view
7.11.17 gui/  render
current-renderer
render/  eventspace
with-closing-custodian/  eventspace
closing-custodian
closing-eventspace
close-custodian-mixin
7.11.18 gui/  rewards
player-rewards-view
7.11.19 gui/  rich-text-display
rich-text-display
7.11.19.1 Rich Text Model
newline
pict/  alt-text
newline?
scale-icon
7.11.20 gui/  round-number
round-number-modifier
7.11.21 gui/  round-prompts
prompts-input-view
manage-prompt-menu-item
do-round-prompt
7.11.22 gui/  server
launch-server
7.11.23 gui/  stacked-tables
stacked-tables
column
7.11.24 gui/  static-table
static-table
7.11.25 gui/  table
make-preview-rows
7.12 files
get-file/  filter
put-file/  filter
7.13 bestiary
7.14 monster-db
info-db/  c
ability-db/  c
datums->dbs
get-dbs
default-monster-db
7.15 parsers
7.15.1 parsers/  foes
parse-foes
foes/  pc
foe/  pc
spec/  pc
numbering/  pc
monster-type/  pc
foes/  p
foe/  p
7.15.2 parsers/  formula
env/  c
expr/  pc
expr/  p
parse-expr
7.15.3 parsers/  monster
parse-bestiary
bestiary/  c
monster/  p
ability-deck/  p
import-monsters/  p
bestiary/  p
bestiary-dupes
7.16 observable-operator
<@
@>
λ<@
@!
7.17 pp
7.17.1 pp/  bestiary
pretty-bestiary
7.18 qi/  list2hash
list~>hash
list->hash
7.19 qi/  utils
list-remove
7.20 rich-text-helpers
only-on-text
match-loop
7.21 server
launch-server
7.22 syntax
7.22.1 syntax/  module-reader
#%module-begin
7.22.2 syntax/  monsters
make-dbs
imports->dbs
check-monsters-have-abilities
check-monsters-have-abilities-message
check-foes-have-monsters
check-foes-have-monsters-message
8.15

7 Developer Reference🔗

None of these APIs should be considered stable enough for use in projects other than Frosthaven Manager. They should be considered stable enough for use in Frosthaven Manager. Changes to an internally-used API should be made with care and compelling reason.

7.1 aoe🔗

This module implements the Area-of-Effect (AoE) language. See @@ -19,22 +19,26 @@ from constant to string and vice-versa is static.

syntax

(define-constant-format/parse
  formatter-id parser-id
  ([constant-id string] ...))

syntax

(define-constant-format formatter-id ([constant-id string] ...))

Binds formatter-id to a function accepting constants constant-id and producing the corresponding strings.

syntax

(define-constant-parse parser-id ([constant-id string] ...))

Binds parser-id to a function accepting strings and producing the corresponding constant-ids.

7.4 contracts🔗

 (require frosthaven-manager/contracts)
  package: frosthaven-manager

procedure

(unique-with/c key c)  contract?

  key : (-> any/c any/c)
  c : flat-contract?
The contract (unique-with/c key c) requires of a value v that -the result of (map key v) is a (listof c) with no duplicates.

7.5 defns🔗

 (require frosthaven-manager/defns)
  package: frosthaven-manager

This module reprovides everything from +the result of (map key v) is a (listof c) with no duplicates.

7.5 curlique🔗

 (require frosthaven-manager/curlique)
  package: frosthaven-manager

This module provides a shorthand notation for Qi flows. It overrides Racket’s +#%app: forms written in curly braces like {(all positive?)} +are implictly wrapped in flow from Qi.

In addition, it provides the following overrides:

syntax

~>

syntax

~>>

syntax

switch

Like equivalent forms from Qi, qi:~>, qi:~>>, +qi:switch, but if written with curly braces, they are implicitly +wrapped in flow instead of acting on specified values.

Examples:
; A very small identity
> (map {} (range 10))

'(0 1 2 3 4 5 6 7 8 9)

> (define all-good? {(all positive?)})
> (all-good? 1 2 3 4)

#t

> (all-good? 1 -2 3 4)

#f

> (~> (1 2 3) (-< + count) /)

2

> (define average {~> (-< + count) /})
> (average 1 2 3)

2

7.6 defns🔗

 (require frosthaven-manager/defns)
  package: frosthaven-manager

This module reprovides everything from frosthaven-manager/defns/level, frosthaven-manager/defns/loot, frosthaven-manager/defns/monsters, frosthaven-manager/defns/players, and -frosthaven-manager/defns/scenario.

7.5.1 Level Info🔗

 (require frosthaven-manager/defns/level)
  package: frosthaven-manager

struct

(struct level-info (monster-level
    gold
    trap-damage
    hazardous-terrain
    exp)
    #:transparent)
  monster-level : natural-number/c
  gold : natural-number/c
  trap-damage : natural-number/c
  hazardous-terrain : natural-number/c
  exp : natural-number/c
An instance of level-info exposes characteristics of the level, such as +frosthaven-manager/defns/scenario.

7.6.1 Level Info🔗

 (require frosthaven-manager/defns/level)
  package: frosthaven-manager

struct

(struct level-info (monster-level
    gold
    trap-damage
    hazardous-terrain
    exp)
    #:transparent)
  monster-level : natural-number/c
  gold : natural-number/c
  trap-damage : natural-number/c
  hazardous-terrain : natural-number/c
  exp : natural-number/c
An instance of level-info exposes characteristics of the level, such as the monster level, value of gold, damage caused by traps and hazardous terrain, and end-of-scenario experience.

A constant representing the number of possible levels, as opposed to what the levels are.

A constant representing the maximum level. The minimum level is 0.

A contract recognizing valid level numbers, used for both the scenario level and monster levels.

A constant representing the maximum number of players.

A contract recognizing a valid number of players.

procedure

(get-level-info level)  level-info?

  level : level/c
Returns the level-info for the given level number.

procedure

(inspiration-reward num-players)  natural-number/c

  num-players : num-players/c
Returns the amount of inspiration rewarded for completing a scenario based on -how many players participated in the scenario.

7.5.2 Loot Deck🔗

 (require frosthaven-manager/defns/loot)
  package: frosthaven-manager

Represents materials for loot cards.

Serializable.

Represents herbs for loot cards.

Serializable.

Represents the random-item loot card.

Serializable.

struct

(struct money (amount)
    #:transparent)
  amount : natural-number/c
Represents a loot card worth 1 to 3 gold, but may have +1 stickers.

Serializable.

struct

(struct material (name amount)
    #:transparent)
  name : material-kind?
  amount : (apply list/c (make-list (sub1 max-players) natural-number/c))
Represents a loot card for a material; the amount varies by number of players. +how many players participated in the scenario.

7.6.2 Loot Deck🔗

 (require frosthaven-manager/defns/loot)
  package: frosthaven-manager

Represents materials for loot cards.

Serializable.

Represents herbs for loot cards.

Serializable.

Represents the random-item loot card.

Serializable.

struct

(struct money (amount)
    #:transparent)
  amount : natural-number/c
Represents a loot card worth 1 to 3 gold, but may have +1 stickers.

Serializable.

struct

(struct material (name amount)
    #:transparent)
  name : material-kind?
  amount : (apply list/c (make-list (sub1 max-players) natural-number/c))
Represents a loot card for a material; the amount varies by number of players. May have +1 stickers.

Serializable.

procedure

(material-amount* m n)  natural-number/c

  m : material?
  n : num-players/c
Calculates the amount a material loot card m is worth for the number of players n.

struct

(struct herb (name amount)
    #:transparent)
  name : herb-kind?
  amount : natural-number/c
Represents a loot card worth 1 name herb, but may have +1 stickers.

Serializable.

struct

(struct special-loot (name)
    #:transparent)
  name : string?
Represents a specially named loot card. This can be used for custom cards or for the standard loot cards with special properties. These loot cards are always included in the deck when available.

Serializable.

This predicate recognizes valid loot cards. It is also a valid -contract?.

value

loot-type/c : flat-contract?

 = (or/c 'money material-kind? herb-kind? 'random-item 'special)
This contract recognizes the type of a loot card.

procedure

(card->type c)  loot-type/c

  c : loot-card?
Convert a loot card to its type.

procedure

((format-loot-card n) card)  string?

  n : num-players/c
  card : loot-card?
Formats a loot card for display.

Constants designating the maximum number of certain kinds of cards.

Standard decks of loot cards from which you draw to make the loot deck.

procedure

(apply-sticker card)  loot-card?

  card : 
(and/c loot-card?
       (not/c random-item?)
       (not/c special-loot?))
Returns card with amounts increased by 1.

7.5.3 Monster Cards🔗

 (require frosthaven-manager/defns/monsters)
  package: frosthaven-manager

struct

(struct monster-stats (max-hp
    move
    attack
    bonuses
    effects
    immunities)
    #:prefab)
  max-hp : (or/c positive-integer? string?)
  move : (or/c #f natural-number/c)
  attack : (or/c natural-number/c string?)
  bonuses : (listof string?)
  effects : (listof string?)
  immunities : (listof string?)
The monster statistic representation, usually used with pre-fabs.

struct

(struct monster-info (set-name name normal-stats elite-stats)
    #:prefab)
  set-name : string?
  name : string?
  normal-stats : (apply list/c (make-list number-of-levels monster-stats?))
  elite-stats : (apply list/c (make-list number-of-levels monster-stats?))
The monster information representation, often for reading pre-fab structs.

struct

(struct monster-ability (set-name
    name
    initiative
    abilities
    shuffle?)
    #:prefab)
  set-name : string?
  name : string?
  initiative : initiative?
  abilities : (listof (listof (or/c string? pict?)))
  shuffle? : boolean?
The monster ability representation, often for reading pre-fab structs.

Note that pre-fab syntax does not permit path? or pict? objects.

The monster abilities are a list of sub-abilities, much like a character’s +contract?.

value

loot-type/c : flat-contract?

 = (or/c 'money material-kind? herb-kind? 'random-item 'special)
This contract recognizes the type of a loot card.

procedure

(card->type c)  loot-type/c

  c : loot-card?
Convert a loot card to its type.

procedure

((format-loot-card n) card)  string?

  n : num-players/c
  card : loot-card?
Formats a loot card for display.

Constants designating the maximum number of certain kinds of cards.

Standard decks of loot cards from which you draw to make the loot deck.

procedure

(apply-sticker card)  loot-card?

  card : 
(and/c loot-card?
       (not/c random-item?)
       (not/c special-loot?))
Returns card with amounts increased by 1.

7.6.3 Monster Cards🔗

 (require frosthaven-manager/defns/monsters)
  package: frosthaven-manager

struct

(struct monster-stats (max-hp
    move
    attack
    bonuses
    effects
    immunities)
    #:prefab)
  max-hp : (or/c positive-integer? string?)
  move : (or/c #f natural-number/c)
  attack : (or/c natural-number/c string?)
  bonuses : (listof string?)
  effects : (listof string?)
  immunities : (listof string?)
The monster statistic representation, usually used with pre-fabs.

struct

(struct monster-info (set-name name normal-stats elite-stats)
    #:prefab)
  set-name : string?
  name : string?
  normal-stats : (apply list/c (make-list number-of-levels monster-stats?))
  elite-stats : (apply list/c (make-list number-of-levels monster-stats?))
The monster information representation, often for reading pre-fab structs.

struct

(struct monster-ability (set-name
    name
    initiative
    abilities
    shuffle?)
    #:prefab)
  set-name : string?
  name : string?
  initiative : initiative?
  abilities : (listof (listof (or/c string? pict?)))
  shuffle? : boolean?
The monster ability representation, often for reading pre-fab structs.

Note that pre-fab syntax does not permit path? or pict? objects.

The monster abilities are a list of sub-abilities, much like a character’s ability card. Each sub-ability is a list of parts, which may include pictures such as for embedded AoE diagrams.

A contract that recognizes valid monster numbers.

struct

(struct monster (number elite? current-hp conditions)
    #:transparent)
  number : monster-number/c
  elite? : boolean?
  current-hp : natural-number/c
  conditions : (listof condition?)
A monster captures the individual status of a monster, but not its game statistics. Those are listed in its parent monster-group.

Prefer the smart constructor make-monster.

Serializable.

struct

(struct monster-group (set-name
    name
    level
    normal-stats
    elite-stats
    monsters)
    #:transparent)
  set-name : string?
  name : string?
  level : level/c
  normal-stats : monster-stats?
  elite-stats : monster-stats?
  monsters : (listof monster?)
A monster-group describes a group of monsters and their stats.

Prefer the smart constructor make-monster-group and the update @@ -57,7 +61,7 @@ is elite if-and-only-if elite? is #true.

procedure

(monster-group-first-monster mg)  (or/c #f monster-number/c)

  mg : monster-group?
The number of the first monster in the monster group mg, or #false if there are no such monsters.

procedure

(monster-group-update-level mg    
  info    
  new-level)  monster-group?
  mg : monster-group?
  info : monster-info?
  new-level : level/c
Converts mg to new-level by extracting stats from info.

procedure

(monster->hp-text m ms env)  string?

  m : monster?
  ms : monster-stats
  env : env/c
Formats the string "HP: current/max" for the monster m.

The same monster group, but with all elite monsters normal and vice-versa.

procedure

(swap-monster-elite m)  monster?

  m : monster?
The same monster, but normal instead of elite and vice-versa.

procedure

(monster-group-change-max-HP mg f env)  monster-group?

  mg : monster-group?
  f : (-> (or/c 'normal 'elite) natural-number/c number?)
  env : env/c
Updates a monster-group’s maximum HP value in all statistics by -applying a procedure.

7.5.4 Players🔗

 (require frosthaven-manager/defns/players)
  package: frosthaven-manager

struct

(struct player (name
    max-hp
    current-hp
    xp
    conditions
    initiative
    loot
    summons)
    #:transparent)
  name : string?
  max-hp : positive-integer?
  current-hp : natural-number/c
  xp : natural-number/c
  conditions : (listof condition?)
  initiative : initiative?
  loot : (listof loot-card?)
  summons : (listof summon?)
A player captures everything about a player that Frosthaven Manager +applying a procedure.

7.6.4 Players🔗

 (require frosthaven-manager/defns/players)
  package: frosthaven-manager

struct

(struct player (name
    max-hp
    current-hp
    xp
    conditions
    initiative
    loot
    summons)
    #:transparent)
  name : string?
  max-hp : positive-integer?
  current-hp : natural-number/c
  xp : natural-number/c
  conditions : (listof condition?)
  initiative : initiative?
  loot : (listof loot-card?)
  summons : (listof summon?)
A player captures everything about a player that Frosthaven Manager needs.

You will not usually need the player constructor: use the smart constructor make-player instead.

Serializable.

procedure

(make-player name max-hp)  player?

  name : string?
  max-hp : positive-integer?
Creates a player with name and max-hp.

procedure

((player-update-name new-name) p)  player?

  new-name : string?
  p : player?
Transforms p to have player-name equal to new-name.

procedure

((player-act-on-hp f) p)  player?

  f : (-> natural-number/c number?)
  p : player?
Transforms (player-current-hp p) by f. If the result is not positive? the update is ignored.

procedure

((player-act-on-max-hp f) p)  player?

  f : (-> natural-number/c number?)
  p : player?
Similarly to player-act-on-hp, transforms (player-max-hp p) by @@ -73,18 +77,18 @@ c.

procedure

((summon-condition-handler c?) s)  summon?

  c? : (list/c condition? boolean?)
  s : summon?
Dispatches to summon-add-condition or summon-remove-condition based on (second c?): #true means summon-add-condition. The condition to be added or removed is -(first c?).

procedure

((summon-afflicted-by? c) s)  boolean?

  c : condition?
  s : summon?
True if-and-only-if (summon-conditions c) includes c.

procedure

(summon-dead? s)  boolean?

  s : summon?
True if-and-only-if (summon-current-hp s) is zero?.

In practice, summon HP does not currently fall below 1. This may be a bug.

procedure

(summon-at-max-health? s)  boolean?

  s : summon?
True if-and-only-if (summon-current-hp s) is (summon-max-hp s).

procedure

(summon->hp-text s)  string?

  s : summon?
Formats the string "HP: current/max" for the summon s.

procedure

(summon-conditions* s)  (listof condition?)

  s : summon?
Same as (summon-conditions s) but sorted.

procedure

(player-summon p name max-hp)  player?

  p : player?
  name : string?
  max-hp : positive-integer?
Adds a summon to p.

procedure

((update-player-summon i f) p)  player?

  i : natural-number/c
  f : (-> summon? summon?)
  p : player?
Update the ith summon via f.

procedure

((player-kill-summon i) p)  player?

  i : natural-number/c
  p : player?
Kill the ith summon.

7.5.5 Scenario🔗

 (require frosthaven-manager/defns/scenario)
  package: frosthaven-manager

value

element? : predicate/c

value

fire : element?

value

ice : element?

value

air : element?

value

earth : element?

value

light : element?

value

dark : element?

The elements.

Serializable.

Monster modifier cards.

Serializable.

The condition? predicate recognizes all valid conditions, which are +(first c?).

procedure

((summon-afflicted-by? c) s)  boolean?

  c : condition?
  s : summon?
True if-and-only-if (summon-conditions c) includes c.

procedure

(summon-dead? s)  boolean?

  s : summon?
True if-and-only-if (summon-current-hp s) is zero?.

In practice, summon HP does not currently fall below 1. This may be a bug.

procedure

(summon-at-max-health? s)  boolean?

  s : summon?
True if-and-only-if (summon-current-hp s) is (summon-max-hp s).

procedure

(summon->hp-text s)  string?

  s : summon?
Formats the string "HP: current/max" for the summon s.

procedure

(summon-conditions* s)  (listof condition?)

  s : summon?
Same as (summon-conditions s) but sorted.

procedure

(player-summon p name max-hp)  player?

  p : player?
  name : string?
  max-hp : positive-integer?
Adds a summon to p.

procedure

((update-player-summon i f) p)  player?

  i : natural-number/c
  f : (-> summon? summon?)
  p : player?
Update the ith summon via f.

procedure

((player-kill-summon i) p)  player?

  i : natural-number/c
  p : player?
Kill the ith summon.

7.6.5 Scenario🔗

 (require frosthaven-manager/defns/scenario)
  package: frosthaven-manager

value

element? : predicate/c

value

fire : element?

value

ice : element?

value

air : element?

value

earth : element?

value

light : element?

value

dark : element?

The elements.

Serializable.

Monster modifier cards.

Serializable.

The condition? predicate recognizes all valid conditions, which are listed here.

Serializable.

procedure

(discriminator:condition c)  integer?

  c : condition?

procedure

(selector:condition i)  condition?

  i : integer?
Enum discriminator and enum selector for condition? values. Both contract error when the argument is outside the -appropriate domain.

procedure

(initiative? v)  boolean?

  v : any/c
A predicate recognizing valid initiative values.

All the conditions together.

value

expirable-conditions : (setof conditions?)

The conditions that expire at end-of-next-turn.

procedure

(conditions->string cs)  string?

  cs : (listof condition?)
Converts a set of conditions to a string.

A full deck of 20 monster modifier cards.

Full decks of 10 monster curse and bless cards.

procedure

(shuffle-modifier-deck? deck)  boolean?

  deck : (listof monster-modifier?)
True if-and-only-if deck contains a null or crit.

procedure

(better-modifier a b)  monster-modifier?

  a : monster-modifier?
  b : monster-modifier?

procedure

(worse-modifier a b)  monster-modifier?

  a : monster-modifier?
  b : monster-modifier?
Returns the better or worse of the two modifier cards.

Returns the cards in monster-modifier-deck not in cards.

7.6 elements🔗

 (require frosthaven-manager/elements)
  package: frosthaven-manager

The size of the element pictures.

struct

(struct element-pics (name infused waning unfused consume)
    #:transparent)
  name : string?
  infused : pict?
  waning : pict?
  unfused : pict?
  consume : pict?
A container for a named set of element pictures.

procedure

(elements)  (listof element-pics?)

Returns all of the elements bundled together. This module also provides bindings +appropriate domain.

procedure

(initiative? v)  boolean?

  v : any/c
A predicate recognizing valid initiative values.

All the conditions together.

value

expirable-conditions : (setof conditions?)

The conditions that expire at end-of-next-turn.

procedure

(conditions->string cs)  string?

  cs : (listof condition?)
Converts a set of conditions to a string.

A full deck of 20 monster modifier cards.

Full decks of 10 monster curse and bless cards.

procedure

(shuffle-modifier-deck? deck)  boolean?

  deck : (listof monster-modifier?)
True if-and-only-if deck contains a null or crit.

procedure

(better-modifier a b)  monster-modifier?

  a : monster-modifier?
  b : monster-modifier?

procedure

(worse-modifier a b)  monster-modifier?

  a : monster-modifier?
  b : monster-modifier?
Returns the better or worse of the two modifier cards.

Returns the cards in monster-modifier-deck not in cards.

7.7 elements🔗

 (require frosthaven-manager/elements)
  package: frosthaven-manager

The size of the element pictures.

struct

(struct element-pics (name infused waning unfused consume)
    #:transparent)
  name : string?
  infused : pict?
  waning : pict?
  unfused : pict?
  consume : pict?
A container for a named set of element pictures.

procedure

(elements)  (listof element-pics?)

Returns all of the elements bundled together. This module also provides bindings from the names of the elemnts to procedures returning element-pics values, but they are not documented here. See Elements tracker for the -various element names and pictures.

7.7 enum-helpers🔗

 (require frosthaven-manager/enum-helpers)
  package: frosthaven-manager

syntax

(define-serializable-enum-type id (constant-id ...) enum-option ...)

 
enum-option = #:omit-root-binding
  | #:descriptor-name descriptor-id
  | #:predicate-name predicate-id
  | #:discriminator-name discriminator-id
  | #:selector-name selector-id
  | #:property-maker prop-maker-expr
  | #:inspector inspector-expr
 
  prop-maker-expr : 
(-> uninitialized-enum-descriptor?
    (listof (cons/c struct-type-property? any/c)))
  inspector-expr : inspector?
Exactly like define-enum-type, but with the addition of +various element names and pictures.

7.8 enum-helpers🔗

 (require frosthaven-manager/enum-helpers)
  package: frosthaven-manager

syntax

(define-serializable-enum-type id (constant-id ...) enum-option ...)

 
enum-option = #:omit-root-binding
  | #:descriptor-name descriptor-id
  | #:predicate-name predicate-id
  | #:discriminator-name discriminator-id
  | #:selector-name selector-id
  | #:property-maker prop-maker-expr
  | #:inspector inspector-expr
 
  prop-maker-expr : 
(-> uninitialized-enum-descriptor?
    (listof (cons/c struct-type-property? any/c)))
  inspector-expr : inspector?
Exactly like define-enum-type, but with the addition of prop:serializable via a deserialize-info named -deserialize-info:id.

7.8 icons🔗

 (require frosthaven-manager/icons)
  package: frosthaven-manager

This module provides various icons that are spliced into ability card texts. +deserialize-info:id.

7.9 icons🔗

 (require frosthaven-manager/icons)
  package: frosthaven-manager

This module provides various icons that are spliced into ability card texts. All replacements are case insensitive; any numbers or other accompanying text -are preserved. The signifier N denotes where a number is expected.

procedure

(target)  pict?

image
Provides replacements for

procedure

(range)  pict?

image
Provides replacements for

procedure

(push)  pict?

image
Provides replacements for

procedure

(pull)  pict?

image
Provides replacements for

procedure

(move)  pict?

image
Provides replacements for

procedure

(jump)  pict?

image
Provides replacements for

procedure

(teleport)  pict?

image
Provides replacements for

procedure

(attack)  pict?

image
Provides replacements for

7.9 manager🔗

 (require frosthaven-manager/manager)
  package: frosthaven-manager

This module reprovides all the bindings from +are preserved. The signifier N denotes where a number is expected.

procedure

(target)  pict?

image
Provides replacements for

procedure

(range)  pict?

image
Provides replacements for

procedure

(push)  pict?

image
Provides replacements for

procedure

(pull)  pict?

image
Provides replacements for

procedure

(move)  pict?

image
Provides replacements for

procedure

(jump)  pict?

image
Provides replacements for

procedure

(teleport)  pict?

image
Provides replacements for

procedure

(attack)  pict?

image
Provides replacements for

7.10 manager🔗

 (require frosthaven-manager/manager)
  package: frosthaven-manager

This module reprovides all the bindings from frosthaven-manager/manager/state, frosthaven-manager/manager/ability-decks, frosthaven-manager/manager/modifier-decks, @@ -93,7 +97,7 @@ frosthaven-manager/manager/loot, frosthaven-manager/manager/round-prompts, frosthaven-manager/manager/transition, and -frosthaven-manager/manager/save.

7.9.1 manager/state🔗

 (require frosthaven-manager/manager/state)
  package: frosthaven-manager

This module provides facilities for manipulating manager-level state.

struct

(struct creature (id v)
    #:transparent)
  id : any/c
  v : (or/c player? monster-group*?)
A creature is displayed in the central area of the Frosthaven Manager +frosthaven-manager/manager/save.

7.10.1 manager/state🔗

 (require frosthaven-manager/manager/state)
  package: frosthaven-manager

This module provides facilities for manipulating manager-level state.

struct

(struct creature (id v)
    #:transparent)
  id : any/c
  v : (or/c player? monster-group*?)
A creature is displayed in the central area of the Frosthaven Manager GUI, as described in Creature list. Therefore a creature-v can be either a player or a monster-group*.

A creature is identified by its unique creature-id.

Serializable.

struct

(struct monster-group* (active mg)
    #:transparent)
  active : (or/c #f monster-number/c)
  mg : monster-group?
A monster-group* wraps a monster-group with a possibly active monster-number/c, which identifies the monster currently displayed in @@ -118,19 +122,19 @@ card for set.

It is the caller’s responsibility to verify that a monster has been added and needs to potentially trigger a new card.

procedure

(initiative-public? in-draw?)  boolean?

  in-draw? : boolean?
True if, according to in-draw?, initiative values should be publicly revealed.

procedure

(add-prompt s)  (-> prompt/c any)

  s : state?
Add a prompt to s.

procedure

((remove-prompt s) i p)  any

  s : state?
  i : natural-number/c
  p : prompt/c
Remove a prompt p from s by index i. If the prompt at -index i is not p, no prompts are removed.

7.9.2 manager/ability-decks🔗

 (require frosthaven-manager/manager/ability-decks)
  package: frosthaven-manager

struct

(struct ability-decks (current draw discard)
    #:transparent)
  current : (or/c #f monster-ability?)
  draw : (listof monster-ability?)
  discard : (listof monster-ability?)
Monster ability deck, with currently active card, draw pile, and discard pile.

Serializable.

Draws a card from the ability deck. The value of (ability-decks-current ad) +index i is not p, no prompts are removed.

7.10.2 manager/ability-decks🔗

 (require frosthaven-manager/manager/ability-decks)
  package: frosthaven-manager

struct

(struct ability-decks (current draw discard)
    #:transparent)
  current : (or/c #f monster-ability?)
  draw : (listof monster-ability?)
  discard : (listof monster-ability?)
Monster ability deck, with currently active card, draw pile, and discard pile.

Serializable.

Draws a card from the ability deck. The value of (ability-decks-current ad) is silently discarded; if it is a monster-ability?, it is effectively -lost.

Discards the active card and shuffles the ability deck if necessary.

Updates each deck via f, which is called with the monster set and deck.

Moves the top card of the draw pile to its bottom.

7.9.3 manager/modifier-decks🔗

 (require frosthaven-manager/manager/modifier-decks)
  package: frosthaven-manager

This module provides facilities for manipulating the modifier deck.

procedure

(reshuffle-modifier-deck s)  any

  s : state?
Reshuffle the monster modifier deck.

procedure

(discard s card)  any

  s : state?
  card : monster-modifier?
Discard a card to the appropriate pile.

procedure

(draw-modifier s)  (-> any)

  s : state?
Draws and discards a single modifier card.

procedure

(draw-modifier* s keep)  (-> any)

  s : state?
  keep : (-> monster-modifier? monster-modifier? monster-modifier?)
Draws two modifier cards and discards them with the kept card on top.

procedure

(do-curse-monster s)  (-> any)

  s : state?

procedure

(do-bless-monster s)  (-> any)

  s : state?

procedure

(do-bless-player s)  (-> any)

  s : state?

procedure

(do-unbless-player s)  (-> any)

  s : state?
Add a curse or bless to the appropriate deck.

procedure

(add-monster-modifier s)  (-> monster-modifier? any)

  s : state?

procedure

(remove-monster-modifier s)

  (-> exact-nonnegative-integer? any)
  s : state?
Handles events emitted by card-swapper. These are intended for use when +lost.

Discards the active card and shuffles the ability deck if necessary.

Updates each deck via f, which is called with the monster set and deck.

Moves the top card of the draw pile to its bottom.

7.10.3 manager/modifier-decks🔗

 (require frosthaven-manager/manager/modifier-decks)
  package: frosthaven-manager

This module provides facilities for manipulating the modifier deck.

procedure

(reshuffle-modifier-deck s)  any

  s : state?
Reshuffle the monster modifier deck.

procedure

(discard s card)  any

  s : state?
  card : monster-modifier?
Discard a card to the appropriate pile.

procedure

(draw-modifier s)  (-> any)

  s : state?
Draws and discards a single modifier card.

procedure

(draw-modifier* s keep)  (-> any)

  s : state?
  keep : (-> monster-modifier? monster-modifier? monster-modifier?)
Draws two modifier cards and discards them with the kept card on top.

procedure

(do-curse-monster s)  (-> any)

  s : state?

procedure

(do-bless-monster s)  (-> any)

  s : state?

procedure

(do-bless-player s)  (-> any)

  s : state?

procedure

(do-unbless-player s)  (-> any)

  s : state?
Add a curse or bless to the appropriate deck.

procedure

(add-monster-modifier s)  (-> monster-modifier? any)

  s : state?

procedure

(remove-monster-modifier s)

  (-> exact-nonnegative-integer? any)
  s : state?
Handles events emitted by card-swapper. These are intended for use when the deck handed to card-swapper consists of something like this:
In particular, remove-monster-modifier translates indexes to both the -modifier deck and the discard pile.

7.9.4 manager/db🔗

 (require frosthaven-manager/manager/db)
  package: frosthaven-manager

This module provides facilities for manipulating the active monster databases.

procedure

(init-dbs db s)  any

  db : path-string?
  s : state?
Initialize the active monster databases.

procedure

(init-dbs-and-foes db s)  any

  db : path-string?
  s : state?
Initialize the active monster databases, exactly as init-dbs. +modifier deck and the discard pile.

7.10.4 manager/db🔗

 (require frosthaven-manager/manager/db)
  package: frosthaven-manager

This module provides facilities for manipulating the active monster databases.

procedure

(init-dbs db s)  any

  db : path-string?
  s : state?
Initialize the active monster databases.

procedure

(init-dbs-and-foes db s)  any

  db : path-string?
  s : state?
Initialize the active monster databases, exactly as init-dbs. Additionally, initialize the foes from db if it provides a foes specification. This manipulates (state-@creatures s); see also add-or-remove-monster-group and -frosthaven-manager/foes.

7.9.5 manager/elements🔗

 (require frosthaven-manager/manager/elements)
  package: frosthaven-manager

value

element-state/c : contract? = (or/c 'unfused 'infused 'waning)

A contract recognizing valid element states.

procedure

(make-states es)  (listof (obs/c element-state/c))

  es : (listof any/c)
Builds an equally-sized list of element states to control es in +frosthaven-manager/foes.

7.10.5 manager/elements🔗

 (require frosthaven-manager/manager/elements)
  package: frosthaven-manager

value

element-state/c : contract? = (or/c 'unfused 'infused 'waning)

A contract recognizing valid element states.

procedure

(make-states es)  (listof (obs/c element-state/c))

  es : (listof any/c)
Builds an equally-sized list of element states to control es in elements-cycler.

procedure

(infuse-all es)  any

  es : (listof (obs/c element-state/c))

procedure

(consume-all es)  any

  es : (listof (obs/c element-state/c))
Set all element states es to 'infused or 'unfused, respectively.

procedure

(wane-element state)  element-state/c

  state : element-state/c
Returns the new element state after waning for one cycle.

procedure

(transition-element-state state)  element-state/c

  state : element-state/c
Returns the new element state after cycling once, with unfused wrapping around -to infused.

7.9.6 manager/loot🔗

 (require frosthaven-manager/manager/loot)
  package: frosthaven-manager

This module provides facilities for manipulating the loot deck.

procedure

(update-loot-deck-and-num-loot-cards s)

  (-> (list/c (or/c 'add 'remove) loot-type/c) any)
  s : state?
Update the loot deck based on the loot-picker event.

procedure

(build-loot-deck type->number-of-cards    
  type->deck)  (listof loot-card?)
  type->number-of-cards : (hash/c loot-type/c natural-number/c)
  type->deck : (hash/c loot-type/c (listof loot-card?))
Converts two mappings into a shuffled deck of loot cards. This can be considered +to infused.

7.10.6 manager/loot🔗

 (require frosthaven-manager/manager/loot)
  package: frosthaven-manager

This module provides facilities for manipulating the loot deck.

procedure

(update-loot-deck-and-num-loot-cards s)

  (-> (list/c (or/c 'add 'remove) loot-type/c) any)
  s : state?
Update the loot deck based on the loot-picker event.

procedure

(build-loot-deck type->number-of-cards    
  type->deck)  (listof loot-card?)
  type->number-of-cards : (hash/c loot-type/c natural-number/c)
  type->deck : (hash/c loot-type/c (listof loot-card?))
Converts two mappings into a shuffled deck of loot cards. This can be considered the interpreter for a language whose values are like those produced by loot-picker; namely, mappings from decks to number of cards.

The mapping type->number-of-cards maps a loot card type to a number of loot cards of that type. The mapping type->deck specifies which deck @@ -140,32 +144,32 @@ (length (hash-ref type->deck t)).

procedure

(build-loot-deck! s)  any

  s : state?
Updates s by applying build-loot-deck.

procedure

((give-player-loot s) k)  any

  s : state?
  k : any/c
Give player k the top loot card.

procedure

(place-loot-on-bottom s)  any

  s : state?
Rotate the top loot card to the bottom of the deck.

procedure

(player->rewards p num-players level)  (listof string?)

  p : player?
  num-players : num-players/c
  level : level/c
Each string is a reward for player p except the first, which is the player’s name. The values are an indicator if the player got the random item, the player’s XP, gold, each material amount, each herb amount, and a -comma-separated list of special cards.

7.9.7 manager/round-prompts🔗

 (require frosthaven-manager/manager/round-prompts)
  package: frosthaven-manager

This module provides facilities for manipulating round prompt values.

syntax

(prompt [time rule] ...)

 
rule = m-expr
  | even
  | odd
  | every n-expr starting-at start-expr
 
  time : time/c
  m-expr : natural-number/c
  n-expr : natural-number/c
  start-expr : natural-number/c
Notation for describing round prompt values. The result of a prompt +comma-separated list of special cards.

7.10.7 manager/round-prompts🔗

 (require frosthaven-manager/manager/round-prompts)
  package: frosthaven-manager

This module provides facilities for manipulating round prompt values.

syntax

(prompt [time rule] ...)

 
rule = m-expr
  | even
  | odd
  | every n-expr starting-at start-expr
 
  time : time/c
  m-expr : natural-number/c
  n-expr : natural-number/c
  start-expr : natural-number/c
Notation for describing round prompt values. The result of a prompt expression is a list of prompt/c values.

Each round prompt value is denoted by a time and rule.
  • A rule consisting of m-expr means to prompt at round m-expr.

  • A rule consisting of even means to prompt at every even round.

  • A rule consisting of odd means to prompt at every odd round.

  • A rule consisting of every n-expr starting-at start-expr means to prompt at every n-exprth round, starting at the start-exprth round.

procedure

(should-do-prompt? t current-round prompts)  any/c

  t : time/c
  current-round : natural-number/c
  prompts : (listof prompt/c)
Returns true iff at time t and round current-round the round prompt rules in prompts determine that a prompt should happen.

A serializable round prompt value. A round prompt value expresses rules both for which round(s) to prompt in and when.

Times for round prompts representing the beginning of the round and the end of -the round.

procedure

(prompt->string p)  string?

  p : prompt/c
A textual description of a round prompt value meant for human use.

7.9.8 manager/transition🔗

 (require frosthaven-manager/manager/transition)
  package: frosthaven-manager

value

transition/c : contract? = (-> state? (-> any))

A transition function consumes a state? and produces a thunk typically +the round.

procedure

(prompt->string p)  string?

  p : prompt/c
A textual description of a round prompt value meant for human use.

7.10.8 manager/transition🔗

 (require frosthaven-manager/manager/transition)
  package: frosthaven-manager

value

transition/c : contract? = (-> state? (-> any))

A transition function consumes a state? and produces a thunk typically used as the action for a button.

Transition functions that define how to progress through the round structure of the game. These are idempotent in that if they are called with the wrong -state-@in-draw?, they do nothing.

7.9.9 manager/save🔗

 (require frosthaven-manager/manager/save)
  package: frosthaven-manager

procedure

(do-save-game s)  any

  s : state?
Prompts the user to save the game to a file of their choice.

procedure

(do-load-game s)  any

  s : state?
Prompts the user to load the game from a file of their choice.

procedure

((load-game s) p)  any

  s : state?
  p : path-string?
Load a game from p.

7.10 gui🔗

This collection provides modules for operating GUIs.

7.10.1 gui/common-menu🔗

 (require frosthaven-manager/gui/common-menu)
  package: frosthaven-manager

Menu items for Frosthaven Manager.

procedure

(do-about)  renderer?

Renders an About window, as in about-menu-item. Useful with -application-about-handler.

7.10.2 gui/counter🔗

 (require frosthaven-manager/gui/counter)
  package: frosthaven-manager

procedure

(counter @label up down)  (is-a?/c view<%>)

  @label : (maybe-obs/c string?)
  up : (-> any)
  down : (-> any)
A GUI component for a counter with a label and up and down callbacks.

7.10.3 gui/elements🔗

 (require frosthaven-manager/gui/elements)
  package: frosthaven-manager

procedure

(elements-cycler @states es [panel])  (is-a?/c view<%>)

  @states : (listof (obs/c element-state/c))
  es : (listof element-pics?)
  panel : (unconstrained-domain-> (is-a?/c view<%>)) = hpanel
Returns a GUI view displaying the element-pics. Each element of -es is controlled by the corresponding element of @states.

7.10.4 gui/font🔗

 (require frosthaven-manager/gui/font)
  package: frosthaven-manager

This module provides helpers for manipulating font objects, as in +state-@in-draw?, they do nothing.

7.10.9 manager/save🔗

 (require frosthaven-manager/manager/save)
  package: frosthaven-manager

procedure

(do-save-game s)  any

  s : state?
Prompts the user to save the game to a file of their choice.

procedure

(do-load-game s)  any

  s : state?
Prompts the user to load the game from a file of their choice.

procedure

((load-game s) p)  any

  s : state?
  p : path-string?
Load a game from p.

7.11 gui🔗

This collection provides modules for operating GUIs.

7.11.1 gui/common-menu🔗

 (require frosthaven-manager/gui/common-menu)
  package: frosthaven-manager

value

about-menu-item : (-> (is-a?/c view<%>))

value

issue-menu-item : (-> (is-a?/c view<%>))

value

feature-menu-item : (-> (is-a?/c view<%>))

value

contribute-menu-item : (-> (is-a?/c view<%>))

value

send-feedback-menu-item : (-> (is-a?/c view<%>))

value

how-to-play-menu-item : (-> (is-a?/c view<%>))

value

launch-server-menu-item : (-> (is-a?/c view<%>))

value

gc-menu-item : (-> (is-a?/c view<%>))

Menu items for Frosthaven Manager.

procedure

(do-about)  renderer?

Renders an About window, as in about-menu-item. Useful with +application-about-handler.

7.11.2 gui/counter🔗

 (require frosthaven-manager/gui/counter)
  package: frosthaven-manager

procedure

(counter @label up down)  (is-a?/c view<%>)

  @label : (maybe-obs/c string?)
  up : (-> any)
  down : (-> any)
A GUI component for a counter with a label and up and down callbacks.

7.11.3 gui/elements🔗

 (require frosthaven-manager/gui/elements)
  package: frosthaven-manager

procedure

(elements-cycler @states es [panel])  (is-a?/c view<%>)

  @states : (listof (obs/c element-state/c))
  es : (listof element-pics?)
  panel : (unconstrained-domain-> (is-a?/c view<%>)) = hpanel
Returns a GUI view displaying the element-pics. Each element of +es is controlled by the corresponding element of @states.

7.11.4 gui/font🔗

 (require frosthaven-manager/gui/font)
  package: frosthaven-manager

This module provides helpers for manipulating font objects, as in font%.

procedure

(copy-font f 
  [#:size size 
  #:face face 
  #:family family 
  #:style style 
  #:weight weight 
  #:underlined? underlined? 
  #:smoothing smoothing 
  #:size-in-pixels? size-in-pixels? 
  #:hinting hinting 
  #:feature-settings feature-settings 
  #:font-list font-list]) 
  (is-a?/c font%)
  f : (is-a?/c font%)
  size : (real-in 0.0 1024.0)
   = (send f get-size size-in-pixels?)
  face : (or/c string? #f) = (send f get-face)
  family : (or/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system)
   = (send f get-family)
  style : (or/c 'normal 'italic 'slant) = (send f get-style)
  weight : font-weight/c = (send f get-weight)
  underlined? : any/c = (send f get-underlined)
  smoothing : (or/c 'default 'partly-smoothed 'smoothed 'unsmoothed)
   = (send f get-smoothing)
  size-in-pixels? : any/c = (send f get-size-in-pixels)
  hinting : (or/c 'aligned 'unaligned) = (send f get-hinting)
  feature-settings : font-feature-settings/c
   = (send f get-feature-settings)
  font-list : (or/c (is-a?/c font-list%) #f)
   = (current-font-list)
Copy all the features of font f to a brand new font object. Supply modified values via the keyword arguments.

value

big-control-font : (is-a?/c font%)

A font bigger than normal-control-font and italic, but otherwise the -same.

7.10.5 gui/formula-editor🔗

 (require frosthaven-manager/gui/formula-editor)
  package: frosthaven-manager

This module provides GUI objects for interactive formula editing.

procedure

(formula-editor @env)  (is-a?/c view<%>)

  @env : env/c
A window containing an interactive formula editor.

procedure

(formula-menu-item @env)  (is-a?/c view<%>)

  @env : env/c
A menu item that displays an interactive formula editor.

7.10.6 gui/helpers🔗

 (require frosthaven-manager/gui/helpers)
  package: frosthaven-manager

procedure

(translate-to-top-coords this top x y)

  
position-integer? position-integer?
  this : (is-a?/c area<%>)
  top : (is-a?/c area<%>)
  x : position-integer?
  y : position-integer?
Returns translated x and y coordinates relative to +same.

7.11.5 gui/formula-editor🔗

 (require frosthaven-manager/gui/formula-editor)
  package: frosthaven-manager

This module provides GUI objects for interactive formula editing.

procedure

(formula-editor @env)  (is-a?/c view<%>)

  @env : env/c
A window containing an interactive formula editor.

procedure

(formula-menu-item @env)  (is-a?/c view<%>)

  @env : env/c
A menu item that displays an interactive formula editor.

7.11.6 gui/helpers🔗

 (require frosthaven-manager/gui/helpers)
  package: frosthaven-manager

procedure

(translate-to-top-coords this top x y)

  
position-integer? position-integer?
  this : (is-a?/c area<%>)
  top : (is-a?/c area<%>)
  x : position-integer?
  y : position-integer?
Returns translated x and y coordinates relative to top, assuming they were originally relative to this.

procedure

(escape-text s)  string?

  s : string?
Escapes s for use in text; only needed when s is derived from user input.

syntax

(define-error-text @error-text-id with-error-text-id)

Binds @error-text-id to an observable string and with-error-text-id to a form accepting arbitrarily many expressions. The form resets @error-text-id evaluates all of its body expressions and returns the result of the last one; if any raise an exception, instead, the exception’s error message is stored in @error-text-id and returned -from the form.

7.10.7 gui/level-info🔗

 (require frosthaven-manager/gui/level-info)
  package: frosthaven-manager

procedure

(level-stats @level @num-players)  (is-a?/c view<%>)

  @level : (obs/c level/c)
  @num-players : (obs/c num-players/c)
A GUI view that displays the level-info corresponding to +from the form.

7.11.7 gui/level-info🔗

 (require frosthaven-manager/gui/level-info)
  package: frosthaven-manager

procedure

(level-stats @level @num-players)  (is-a?/c view<%>)

  @level : (obs/c level/c)
  @num-players : (obs/c num-players/c)
A GUI view that displays the level-info corresponding to @level and @num-players.

procedure

(level-table @level)  (is-a?/c view<%>)

  @level : (obs/c level/c)
A GUI view of a button that shows a table of level-info values for each level. The current @level starts selected.

procedure

(inspiration-table @num-players)  (is-a?/c view<%>)

  @num-players : (obs/c num-players/c)
A GUI view of a button that shows a table of inspiration rewards for each -possible number of players. The current @num-players starts selected.

7.10.8 gui/level-picker🔗

 (require frosthaven-manager/gui/level-picker)
  package: frosthaven-manager

procedure

(level-picker #:choose on-choose    
  #:selection selection    
  [#:label label])  (is-a?/c view<%>)
  on-choose : (-> level/c any)
  selection : (maybe-obs/c level/c)
  label : (maybe-obs/c maybe-label/c) = #f
A GUI view that presents a choice of Frosthaven level values; on-choose +possible number of players. The current @num-players starts selected.

7.11.8 gui/level-picker🔗

 (require frosthaven-manager/gui/level-picker)
  package: frosthaven-manager

procedure

(level-picker #:choose on-choose    
  #:selection selection    
  [#:label label])  (is-a?/c view<%>)
  on-choose : (-> level/c any)
  selection : (maybe-obs/c level/c)
  label : (maybe-obs/c maybe-label/c) = #f
A GUI view that presents a choice of Frosthaven level values; on-choose is invoked whenever the choice changes. The selection may be controlled with -selection. The optional label is used as with choice.

7.10.9 gui/loot🔗

 (require frosthaven-manager/gui/loot)
  package: frosthaven-manager

procedure

(loot-picker @type->cards    
  @type->deck    
  [#:on-card on-card    
  #:on-deck on-deck])  (is-a?/c view<%>)
  @type->cards : (obs/c (hash/c loot-type/c natural-number/c))
  @type->deck : (obs/c (hash/c loot-type/c (listof loot-card?)))
  on-card : (-> (list/c (or/c 'add 'remove) loot-type/c) any)
   = void
  on-deck : (-> (hash/c loot-type/c (listof loot-card?)) any)
   = void
A GUI view to build a loot deck by including certain loot cards. The callback +selection. The optional label is used as with choice.

7.11.9 gui/loot🔗

 (require frosthaven-manager/gui/loot)
  package: frosthaven-manager

procedure

(loot-picker @type->cards    
  @type->deck    
  [#:on-card on-card    
  #:on-deck on-deck])  (is-a?/c view<%>)
  @type->cards : (obs/c (hash/c loot-type/c natural-number/c))
  @type->deck : (obs/c (hash/c loot-type/c (listof loot-card?)))
  on-card : (-> (list/c (or/c 'add 'remove) loot-type/c) any)
   = void
  on-deck : (-> (hash/c loot-type/c (listof loot-card?)) any)
   = void
A GUI view to build a loot deck by including certain loot cards. The callback on-card is invoked with an "event" that specifies a type of cards from which one card should be added or removed. The callback on-deck is invoked with a mapping from loot types to decks that should be used to interpret @@ -179,8 +183,8 @@ the view is closed.

Additionally, buttons for the top and bottom of the deck trigger the on-top and on-bottom callbacks, which then also close the view.

See Scenario information and loot for how loot-button -functions in Frosthaven Manager.

procedure

(loot-preview @loot-deck @num-players)  (is-a?/c view<%>)

  @loot-deck : (obs/c (listof loot-card?))
  @num-players : (obs/c num-players/c)
A button that, when clicked, shows a loot deck previewer.

7.10.10 gui/manager🔗

 (require frosthaven-manager/gui/manager)
  package: frosthaven-manager

This module’s main function is to run the Frosthaven Manager. It provides only -a single binding:

procedure

(manager s)  (is-a?/c window-view<%>)

  s : state?
A view for the Frosthaven Manager. Render with render/eventspace.

7.10.11 gui/markdown🔗

 (require frosthaven-manager/gui/markdown)
  package: frosthaven-manager

procedure

(markdown-text @content    
  [#:min-size min-size    
  #:stretch stretch    
  #:margin margin    
  #:inset inset    
  #:style style])  (is-a?/c view<%>)
  @content : (maybe-obs/c (or/c string? path?))
  min-size : (maybe-obs/c size/c) = '(#f #f)
  stretch : (maybe-obs/c stretch/c) = '(#t #t)
  margin : (maybe-obs/c margin/c) = '(0 0)
  inset : (maybe-obs/c margin/c) = '(5 5)
  style : 
(listof (one-of/c 'no-border 'control-border 'combo
                  'no-hscroll 'no-vscroll
                  'hide-hscroll 'hide-vscroll
                  'auto-vscroll 'auto-hscroll
                  'resize-corner 'deleted 'transparent))
   = '(no-hscroll)
A GUI view rendering the markdown in @content, which is either a +functions in Frosthaven Manager.

procedure

(loot-preview @loot-deck @num-players)  (is-a?/c view<%>)

  @loot-deck : (obs/c (listof loot-card?))
  @num-players : (obs/c num-players/c)
A button that, when clicked, shows a loot deck previewer.

7.11.10 gui/manager🔗

 (require frosthaven-manager/gui/manager)
  package: frosthaven-manager

This module’s main function is to run the Frosthaven Manager. It provides only +a single binding:

procedure

(manager s)  (is-a?/c window-view<%>)

  s : state?
A view for the Frosthaven Manager. Render with render/eventspace.

7.11.11 gui/markdown🔗

 (require frosthaven-manager/gui/markdown)
  package: frosthaven-manager

procedure

(markdown-text @content    
  [#:min-size min-size    
  #:stretch stretch    
  #:margin margin    
  #:inset inset    
  #:style style])  (is-a?/c view<%>)
  @content : (maybe-obs/c (or/c string? path?))
  min-size : (maybe-obs/c size/c) = '(#f #f)
  stretch : (maybe-obs/c stretch/c) = '(#t #t)
  margin : (maybe-obs/c margin/c) = '(0 0)
  inset : (maybe-obs/c margin/c) = '(5 5)
  style : 
(listof (one-of/c 'no-border 'control-border 'combo
                  'no-hscroll 'no-vscroll
                  'hide-hscroll 'hide-vscroll
                  'auto-vscroll 'auto-hscroll
                  'resize-corner 'deleted 'transparent))
   = '(no-hscroll)
A GUI view rendering the markdown in @content, which is either a string of Markdown or a path to a file containing Markdown. The view updates when @content does—note that in the string case this means the Markdown content has changed, but in the path case this means the @@ -190,17 +194,17 @@
  • Any string

  • Any expression tagged !HTML-COMMENT, the tag for HTML comments

  • Any expression tagged a

  • Any expression tagged blockquote

  • Any expression tagged ul

  • Any expression tagged ol

  • Any expression tagged li

  • Any expression tagged hr

  • Any expression tagged p

  • Any expression tagged strong

  • Any expression tagged em

  • Any expression tagged code

  • Any expression tagged h1

  • Any expression tagged h2

  • Any expression tagged h3

  • Any expression tagged h4

  • Any expression tagged h5

  • Any expression tagged h6

Any other tag found in the parsed Markdown is a runtime error.

Note that Markdown technically requires 4 spaces or a single tab as leading indent for nesting lists and other blocks; while many Markdown implementations (such as those used on GitHub) are more lenient, the implementation backing -markdown-text is stricter on this point.

7.10.12 gui/mixins🔗

 (require frosthaven-manager/gui/mixins)
  package: frosthaven-manager

procedure

(make-closing-proc-mixin out)

  (make-mixin-contract top-level-window<%>)
  out : (-> (-> any) any)
Produces a mixin that calls out on instantiation +markdown-text is stricter on this point.

7.11.12 gui/mixins🔗

 (require frosthaven-manager/gui/mixins)
  package: frosthaven-manager

procedure

(make-closing-proc-mixin out)

  (make-mixin-contract top-level-window<%>)
  out : (-> (-> any) any)
Produces a mixin that calls out on instantiation with a procedure that closes the window. Many uses of out are to store a local binding to this "close" procedure.

procedure

(make-on-close-mixin proc)

  (make-mixin-contract top-level-window<%>)
  proc : (-> any)
Produces a mixin that augments on-close to call proc.

syntax

(define-close! close!-id set-close-mixin-id)

If the mixin set-close-mixin-id is applied to a top-level-window<%> then close!-id is a nullary procedure that -closes it.

mixin

hide-caret/selection : (class? . -> . class?)

  argument extends/implements: text%
  result implements: text%
Augments the text editor to hide the caret but still permit and show selections.

7.10.13 gui/monster-modifier🔗

 (require frosthaven-manager/gui/monster-modifier)
  package: frosthaven-manager

procedure

(modify-monster-deck-menu-item @cards 
  [#:on-add on-add 
  #:on-remove on-remove] 
  #:on-shuffle on-shuffle) 
  (is-a?/c view<%>)
  @cards : (obs/c (listof monster-modifier?))
  on-add : (-> monster-modifier? any) = void
  on-remove : (-> exact-nonnegative-integer? any) = void
  on-shuffle : (-> any)
A menu-item rendering favors-dialog.

procedure

(favors-dialog @cards 
  [#:on-add on-add 
  #:on-remove on-remove] 
  #:on-shuffle on-shuffle) 
  (is-a?/c window-view<%>)
  @cards : (obs/c (listof monster-modifier?))
  on-add : (-> monster-modifier? any) = void
  on-remove : (-> exact-nonnegative-integer? any) = void
  on-shuffle : (-> any)
A dialog that wraps card-swapper and adds a Shuffle button +closes it.

mixin

hide-caret/selection : (class? . -> . class?)

  argument extends/implements: text%
  result implements: text%
Augments the text editor to hide the caret but still permit and show selections.

7.11.13 gui/monster-modifier🔗

 (require frosthaven-manager/gui/monster-modifier)
  package: frosthaven-manager

procedure

(modify-monster-deck-menu-item @cards 
  [#:on-add on-add 
  #:on-remove on-remove] 
  #:on-shuffle on-shuffle) 
  (is-a?/c view<%>)
  @cards : (obs/c (listof monster-modifier?))
  on-add : (-> monster-modifier? any) = void
  on-remove : (-> exact-nonnegative-integer? any) = void
  on-shuffle : (-> any)
A menu-item rendering favors-dialog.

procedure

(favors-dialog @cards 
  [#:on-add on-add 
  #:on-remove on-remove] 
  #:on-shuffle on-shuffle) 
  (is-a?/c window-view<%>)
  @cards : (obs/c (listof monster-modifier?))
  on-add : (-> monster-modifier? any) = void
  on-remove : (-> exact-nonnegative-integer? any) = void
  on-shuffle : (-> any)
A dialog that wraps card-swapper and adds a Shuffle button which emits on-shuffle.

procedure

(card-swapper @cards    
  [#:on-add on-add    
  #:on-remove on-remove])  (is-a?/c view<%>)
  @cards : (obs/c (listof monster-modifier?))
  on-add : (-> monster-modifier? any) = void
  on-remove : (-> exact-nonnegative-integer? any) = void
A view that permits swapping cards in or out of @cards, a subset of monster-modifier-deck according to absent-from-modifier-deck, by clicking <= and => arrows.

When a card is added via the <= arrow, calls on-add with the card. When a card is removed via the => arrow, calls on-remove -with the cards index.

7.10.14 gui/monsters🔗

 (require frosthaven-manager/gui/monsters)
  package: frosthaven-manager

procedure

(single-monster-picker info-db 
  @initial-level 
  [#:on-change on-change 
  #:unavailable unavailable]) 
  (is-a?/c view<%>)
  info-db : info-db/c
  @initial-level : (obs/c level/c)
  on-change : (-> single-monster-event/c any) = void
  unavailable : (set/c string?) = empty
A GUI view used to build a monster group by choosing the set, name, and included +with the cards index.

7.11.14 gui/monsters🔗

 (require frosthaven-manager/gui/monsters)
  package: frosthaven-manager

procedure

(single-monster-picker info-db 
  @initial-level 
  [#:on-change on-change 
  #:unavailable unavailable]) 
  (is-a?/c view<%>)
  info-db : info-db/c
  @initial-level : (obs/c level/c)
  on-change : (-> single-monster-event/c any) = void
  unavailable : (set/c string?) = empty
A GUI view used to build a monster group by choosing the set, name, and included monsters (along with their elite status and level). The available choices come from info-db less unavailable (a set of monster names). The callback on-change is invoked each time changes are made. The default @@ -216,10 +220,10 @@ on-group if one is selected. The value of @initial-level is used for the initial level of the group, which can be adjusted in the dialog. Similarly, @monster-names specifies which names are not available for -the new group.

7.10.15 gui/number-players🔗

 (require frosthaven-manager/gui/number-players)
  package: frosthaven-manager

procedure

(number-players-picker #:choose on-choose 
  #:selection selection 
  [#:label label]) 
  (is-a?/c view<%>)
  on-choose : (-> level/c any)
  selection : (maybe-obs/c level/c)
  label : (maybe-obs/c maybe-label/c) = "Number of Players"
A GUI view that presents a choice of the number of players for Frosthaven; +the new group.

7.11.15 gui/number-players🔗

 (require frosthaven-manager/gui/number-players)
  package: frosthaven-manager

procedure

(number-players-picker #:choose on-choose 
  #:selection selection 
  [#:label label]) 
  (is-a?/c view<%>)
  on-choose : (-> level/c any)
  selection : (maybe-obs/c level/c)
  label : (maybe-obs/c maybe-label/c) = "Number of Players"
A GUI view that presents a choice of the number of players for Frosthaven; on-choose is invoked whenever the choice changes. The selection may be controlled with selection. The optional label is used as with -choice.

7.10.16 gui/player-info🔗

 (require frosthaven-manager/gui/player-info)
  package: frosthaven-manager

procedure

(player-view @player 
  [#:on-condition on-condition 
  #:on-hp on-hp 
  #:on-xp on-xp 
  #:on-initiative on-initiative] 
  #:on-update arbitrary-update 
  #:on-summon add-summon 
  #:on-summon-hp update-summon-hp 
  #:on-summon-condition update-summon-condition 
  #:kill-summon kill-summon) 
  (is-a?/c view<%>)
  @player : (obs/c player?)
  on-condition : (-> (list/c condition? boolean?) any) = void
  on-hp : (-> (-> number? number?) any) = void
  on-xp : (-> (-> number? number?) any) = void
  on-initiative : (-> number? any) = void
  arbitrary-update : (-> (-> player? player?) any)
  add-summon : (-> string? positive-integer? any)
  update-summon-hp : (-> natural-number/c (-> number? number?) any)
  update-summon-condition : (-> natural-number/c (list/c condition? boolean?) any)
  kill-summon : (-> natural-number/c any)
A GUI view of a single player. See Player controls. The callback +choice.

7.11.16 gui/player-info🔗

 (require frosthaven-manager/gui/player-info)
  package: frosthaven-manager

procedure

(player-view @player 
  [#:on-condition on-condition 
  #:on-hp on-hp 
  #:on-xp on-xp 
  #:on-initiative on-initiative] 
  #:on-update arbitrary-update 
  #:on-summon add-summon 
  #:on-summon-hp update-summon-hp 
  #:on-summon-condition update-summon-condition 
  #:kill-summon kill-summon) 
  (is-a?/c view<%>)
  @player : (obs/c player?)
  on-condition : (-> (list/c condition? boolean?) any) = void
  on-hp : (-> (-> number? number?) any) = void
  on-xp : (-> (-> number? number?) any) = void
  on-initiative : (-> number? any) = void
  arbitrary-update : (-> (-> player? player?) any)
  add-summon : (-> string? positive-integer? any)
  update-summon-hp : (-> natural-number/c (-> number? number?) any)
  update-summon-condition : (-> natural-number/c (list/c condition? boolean?) any)
  kill-summon : (-> natural-number/c any)
A GUI view of a single player. See Player controls. The callback on-condition is given an condition and value that determines whether the condition should be applied (#true) or removed (#false). The callbacks on-hp and on-xp are given procedures to modify @@ -228,7 +232,7 @@ The number of players is used to format the player’s loot appropriately.

The summon callbacks are given the summon number, a list index, to indicate which summon to update. Adding a summon is done by name and max HP.

The arbitrary-update callback is invoked with a function that computes a new player?; it is intended to update @player for more -complicated events that are logically a single step.

7.10.17 gui/render🔗

 (require frosthaven-manager/gui/render)
  package: frosthaven-manager

parameter

(current-renderer)  (or/c #f renderer?)

(current-renderer r)  void?
  r : (or/c #f renderer?)
 = #f
A parameter for the current renderer. This can be set so that sub-views can +complicated events that are logically a single step.

7.11.17 gui/render🔗

 (require frosthaven-manager/gui/render)
  package: frosthaven-manager

parameter

(current-renderer)  (or/c #f renderer?)

(current-renderer r)  void?
  r : (or/c #f renderer?)
 = #f
A parameter for the current renderer. This can be set so that sub-views can access the top-level renderer. Note that it is not re-entrant, in the sense that to make it effective one must render an application by
(define root (render ...))
(current-renderer root)
Any other application running in the same thread cannot use @@ -248,26 +252,26 @@
For example, the following produces either #t or #f depending on whether window A or window B was closed first. Note also the use of render/eventspace to set current-renderer correctly. -
(require racket/gui/easy)
(define main-es (make-eventspace))
(render/eventspace #:eventspace main-es (window #:title "A" (text "A")))
(define aux-es
  (with-closing-custodian/eventspace
    (render/eventspace
      #:eventspace closing-eventspace
      (window #:mixin close-custodian-mixin
              #:title "B"
              (text "B")))
    closing-eventspace))
 
(sync main-es) ;; wait until window A is closed
(eventspace-shutdown? aux-es) ;; true if window B was closed first

7.10.18 gui/rewards🔗

 (require frosthaven-manager/gui/rewards)
  package: frosthaven-manager

This module contains views for end-of-scenario rewards.

procedure

(player-rewards-view @num-players    
  @level    
  @players    
  [#:mixin mix])  (is-a?/c view<%>)
  @num-players : (obs/c num-players/c)
  @level : (obs/c level/c)
  @players : (obs/c (listof player?))
  mix : (make-mixin-contract top-level-window<%>) = values
Produces a window for displaying a players rewards, such as loot, gold, +
(require racket/gui/easy)
(define main-es (make-eventspace))
(render/eventspace #:eventspace main-es (window #:title "A" (text "A")))
(define aux-es
  (with-closing-custodian/eventspace
    (render/eventspace
      #:eventspace closing-eventspace
      (window #:mixin close-custodian-mixin
              #:title "B"
              (text "B")))
    closing-eventspace))
 
(sync main-es) ;; wait until window A is closed
(eventspace-shutdown? aux-es) ;; true if window B was closed first

7.11.18 gui/rewards🔗

 (require frosthaven-manager/gui/rewards)
  package: frosthaven-manager

This module contains views for end-of-scenario rewards.

procedure

(player-rewards-view @num-players    
  @level    
  @players    
  [#:mixin mix])  (is-a?/c view<%>)
  @num-players : (obs/c num-players/c)
  @level : (obs/c level/c)
  @players : (obs/c (listof player?))
  mix : (make-mixin-contract top-level-window<%>) = values
Produces a window for displaying a players rewards, such as loot, gold, and XP. The selected player’s loot cards are also displayed. The mixin -mix is applied to the window.

7.10.19 gui/rich-text-display🔗

 (require frosthaven-manager/gui/rich-text-display)
  package: frosthaven-manager

This module provides a view-based rich text display, suitable for certain +mix is applied to the window.

7.11.19 gui/rich-text-display🔗

 (require frosthaven-manager/gui/rich-text-display)
  package: frosthaven-manager

This module provides a view-based rich text display, suitable for certain replacements of text.

procedure

(rich-text-display @content    
  [#:font @font    
  #:min-size @min-size    
  #:stretch @stretch    
  #:margin @margin    
  #:inset @inset    
  #:style style])  (is-a?/c view<%>)
  @content : 
(maybe-obs/c (listof (or/c string?
                           pict?
                           pict/alt-text?
                           newline?)))
  @font : (maybe-obs/c (is-a?/c font%)) = normal-control-font
  @min-size : (maybe-obs/c size/c) = '(#f #f)
  @stretch : (maybe-obs/c stretch/c) = '(#t #t)
  @margin : (maybe-obs/c margin/c) = '(0 0)
  @inset : (maybe-obs/c margin/c) = '(5 5)
  style : 
(listof (one-of/c 'no-border 'control-border 'combo
                  'no-hscroll 'no-vscroll
                  'hide-hscroll 'hide-vscroll
                  'auto-vscroll 'auto-hscroll
                  'resize-corner 'deleted 'transparent))
   = '(no-hscroll)
Displays @content via a text%. Keyword arguments except @font control the text%. The @font controls the font at which text is displayed and to which pictures are scaled.

Contents are selectable and copyable with the usual keyboard shortcuts, and can -also be selected with mouse. Contents are automatically reflowed.

7.10.19.1 Rich Text Model🔗

 (require (submod frosthaven-manager/gui/rich-text-display model))

value

newline : newline?

When used with rich-text-display, forces a hard newline.

struct

(struct pict/alt-text (p alt-text))

  p : pict?
  alt-text : string?
When used with rich-text-display, displays a pict?. Copying +also be selected with mouse. Contents are automatically reflowed.

7.11.19.1 Rich Text Model🔗

 (require (submod frosthaven-manager/gui/rich-text-display model))

value

newline : newline?

When used with rich-text-display, forces a hard newline.

struct

(struct pict/alt-text (p alt-text))

  p : pict?
  alt-text : string?
When used with rich-text-display, displays a pict?. Copying the pict copies the alt-text instead.

procedure

(newline? x)  boolean?

  x : any/c
A predicate that recognizes the newline value.

procedure

(scale-icon p)  pict?

  p : pict?
Produces a scaled pict suitable for an icon size. Note that this does not take a font object for scaling, so the size may not be correct when providing fonts to -rich-text-display.

7.10.20 gui/round-number🔗

 (require frosthaven-manager/gui/round-number)
  package: frosthaven-manager

This module contains GUI components for interacting with the round number.

procedure

(round-number-modifier @round 
  [#:new-round-number new-round-number]) 
  (is-a?/c window-view<%>)
  @round : (obs/c natural-number/c)
  new-round-number : (-> (-> natural-number/c natural-number/c) any)
   = void
This dialog, when rendered, provides buttons to set the displayed +rich-text-display.

7.11.20 gui/round-number🔗

 (require frosthaven-manager/gui/round-number)
  package: frosthaven-manager

This module contains GUI components for interacting with the round number.

procedure

(round-number-modifier @round 
  [#:new-round-number new-round-number]) 
  (is-a?/c window-view<%>)
  @round : (obs/c natural-number/c)
  new-round-number : (-> (-> natural-number/c natural-number/c) any)
   = void
This dialog, when rendered, provides buttons to set the displayed @round. The action passed up by new-round-number is a -procedure that computes a new round value from the old one.

7.10.21 gui/round-prompts🔗

 (require frosthaven-manager/gui/round-prompts)
  package: frosthaven-manager

This module contains GUI utilities for +procedure that computes a new round value from the old one.

7.11.21 gui/round-prompts🔗

 (require frosthaven-manager/gui/round-prompts)
  package: frosthaven-manager

This module contains GUI utilities for frosthaven-manager/manager/round-prompts.

procedure

(prompts-input-view @prompts    
  [#:on-add on-add    
  #:on-remove on-remove])  (is-a?/c view<%>)
  @prompts : (obs/c (listof prompt/c))
  on-add : (-> prompt/c any) = void
  on-remove : (-> natural-number/c prompt/c any) = void
Views and constructs a list of round prompt values. The on-add event is emitted when a round prompt is added, and on-remove when a round prompt is removed. The on-remove event signals both the index of the round prompt and the prompt value to be removed.

procedure

(manage-prompt-menu-item @prompts 
  [#:on-add on-add 
  #:on-remove on-remove]) 
  (is-a?/c view<%>)
  @prompts : (obs/c (listof prompt/c))
  on-add : (-> prompt/c any) = void
  on-remove : (-> natural-number/c prompt/c any) = void
Renders a dialog for managing round prompts in the same style as prompts-input-view.

procedure

(do-round-prompt t round)  any

  t : time/c
  round : natural-number/c
Renders a dialog prompting players to check the rules based on the timing of the -current round.

7.10.22 gui/server🔗

 (require frosthaven-manager/gui/server)
  package: frosthaven-manager

procedure

(launch-server s)  renderer?

  s : state?
Renders a window in a new closing eventspace with server information, and +current round.

7.11.22 gui/server🔗

 (require frosthaven-manager/gui/server)
  package: frosthaven-manager

procedure

(launch-server s)  renderer?

  s : state?
Renders a window in a new closing eventspace with server information, and launches a server. See with-closing-custodian/eventspace and -server:launch-server.

7.10.23 gui/stacked-tables🔗

 (require frosthaven-manager/gui/stacked-tables)
  package: frosthaven-manager

procedure

(stacked-tables [#:topleft? topleft?    
  #:panel panel]    
  @data    
  final-view    
  column1    
  column-spec ...)  (is-a?/c view<%>)
  topleft? : boolean? = #t
  panel : (-> (is-a?/c view<%>) ... (is-a?/c view<%>)) = hpanel
  @data : (obs/c (vectorof any/c))
  final-view : (-> (obs/c (or/c #f any/c)) (is-a?/c view<%>))
  column1 : column?
  column-spec : column?
A view of @data using stacked tables. The tables are horizontal, +server:launch-server.

7.11.23 gui/stacked-tables🔗

 (require frosthaven-manager/gui/stacked-tables)
  package: frosthaven-manager

procedure

(stacked-tables [#:topleft? topleft?    
  #:panel panel]    
  @data    
  final-view    
  column1    
  column-spec ...)  (is-a?/c view<%>)
  topleft? : boolean? = #t
  panel : (-> (is-a?/c view<%>) ... (is-a?/c view<%>)) = hpanel
  @data : (obs/c (vectorof any/c))
  final-view : (-> (obs/c (or/c #f any/c)) (is-a?/c view<%>))
  column1 : column?
  column-spec : column?
A view of @data using stacked tables. The tables are horizontal, left-to-right by default. Supplying vpanel for panel makes the stack vertical. When topleft? is true, the first table is on the left or top of the stack. Otherwise it is on the right or bottom, reversing the order @@ -290,7 +294,7 @@ columns likely have multiple choices. As a convenience, when there is only one, you may omit the vector. For the final column, you likely want to omit the vector unless the selected data is one: the data here is the -final selection, of which there should probably be one.

7.10.24 gui/static-table🔗

 (require frosthaven-manager/gui/static-table)
  package: frosthaven-manager

procedure

(static-table columns    
  num-rows    
  entry->columns    
  [#:index->entry index->entry    
  #:entry->value entry->value    
  #:selection @selection    
  #:widths widths])  (is-a?/c view<%>)
  columns : (listof label-string?)
  num-rows : natural-number/c
  entry->columns : (listof (-> any/c any/c))
  index->entry : (-> natural-number/c natural-number/c) = values
  entry->value : (-> natural-number/c any/c) = values
  @selection : 
(maybe-obs/c
  (or/c #f
        exact-nonnegative-integer?
        (listof exact-nonnegative-integer?)))
   = #f
  widths : 
(maybe-obs/c
  (or/c #f
        (listof
          (or/c (list/c exact-nonnegative-integer?
                        dimension-integer?)
                (list/c exact-nonnegative-integer?
                        dimension-integer?
                        dimension-integer?
                        dimension-integer?)))))
   = #f
A GUI view for static tables. The columns are labelled by columns, and +final selection, of which there should probably be one.

7.11.24 gui/static-table🔗

 (require frosthaven-manager/gui/static-table)
  package: frosthaven-manager

procedure

(static-table columns    
  num-rows    
  entry->columns    
  [#:index->entry index->entry    
  #:entry->value entry->value    
  #:selection @selection    
  #:widths widths])  (is-a?/c view<%>)
  columns : (listof label-string?)
  num-rows : natural-number/c
  entry->columns : (listof (-> any/c any/c))
  index->entry : (-> natural-number/c natural-number/c) = values
  entry->value : (-> natural-number/c any/c) = values
  @selection : 
(maybe-obs/c
  (or/c #f
        exact-nonnegative-integer?
        (listof exact-nonnegative-integer?)))
   = #f
  widths : 
(maybe-obs/c
  (or/c #f
        (listof
          (or/c (list/c exact-nonnegative-integer?
                        dimension-integer?)
                (list/c exact-nonnegative-integer?
                        dimension-integer?
                        dimension-integer?
                        dimension-integer?)))))
   = #f
A GUI view for static tables. The columns are labelled by columns, and there are exactly num-rows rows. Each row is indexed by a natural number i from 0 to (sub1 num-rows); (entry->value (index->entry i)) computes a value v on which @@ -299,41 +303,41 @@ [0,num-rows). An entry is computed by index->entry. A value is computed from the entry by entry->value. From this value, functions in entry->columns compute the elements of the row.

The selection is determined by @selection as with table.

The column widths are calculated automatically based on columns, or are -provided as widths.

7.10.25 gui/table🔗

 (require frosthaven-manager/gui/table)
  package: frosthaven-manager

procedure

(make-preview-rows xs 
  n 
  #:reveal reveal 
  #:hide hide) 
  (vectorof (vectorof string?))
  xs : list?
  n : (or/c 'all natural-number/c)
  reveal : (-> any/c (vectorof string?))
  hide : (-> any/c (vectorof string?))
Separates xs into n revealed rows and otherwise hidden rows. +provided as widths.

7.11.25 gui/table🔗

 (require frosthaven-manager/gui/table)
  package: frosthaven-manager

procedure

(make-preview-rows xs 
  n 
  #:reveal reveal 
  #:hide hide) 
  (vectorof (vectorof string?))
  xs : list?
  n : (or/c 'all natural-number/c)
  reveal : (-> any/c (vectorof string?))
  hide : (-> any/c (vectorof string?))
Separates xs into n revealed rows and otherwise hidden rows. Rows are generated by applying the corresponding functions to elements of xs.

If n is 'all or greater than the length of xs, all -elements are considered revealed.

Rows correspond to the notion of rows or entries in table.

7.11 files🔗

 (require frosthaven-manager/files)
  package: frosthaven-manager

procedure

(get-file/filter message filter)  (or/c path? #f)

  message : label-string?
  filter : (list/c string? string?)
Returns get-file with message and filter. +elements are considered revealed.

Rows correspond to the notion of rows or entries in table.

7.12 files🔗

 (require frosthaven-manager/files)
  package: frosthaven-manager

procedure

(get-file/filter message filter)  (or/c path? #f)

  message : label-string?
  filter : (list/c string? string?)
Returns get-file with message and filter. Additionally permits an "Any" filter. The Windows extensions is provided from (second filter).

procedure

(put-file/filter message    
  filter    
  [directory    
  file])  (or/c path? #f)
  message : label-string?
  filter : (list/c string? string?)
  directory : path-string? = #f
  file : path-string? = #f
Returns put-file with message and filter. Additionally permits an "Any" filter. The Windows extensions is provided from -(second filter).

7.12 bestiary🔗

This module implements the bestiary language. See +(second filter).

7.13 bestiary🔗

This module implements the bestiary language. See Programming a Scenario and -frosthaven-manager/bestiary for more information.

7.13 monster-db🔗

 (require frosthaven-manager/monster-db)
  package: frosthaven-manager

See Programming a Scenario for more information on custom monster +frosthaven-manager/bestiary for more information.

7.14 monster-db🔗

 (require frosthaven-manager/monster-db)
  package: frosthaven-manager

See Programming a Scenario for more information on custom monster databases.

Contracts recognizing monster databases of monster-info and monster-ability values.

procedure

(datums->dbs xs)  
info-db/c ability-db/c
  xs : (listof any/c)
Filters the monster-info and monster-ability values out of -xs and produces monster databases.

procedure

(get-dbs db-file)  
info-db/c ability-db/c
  db-file : path-string?
Reads db-file and produces the monster databases.

The demo, default monster database included with Frosthaven Manager.

7.14 parsers🔗

This collection contains parsers that support various #langs.

7.14.1 parsers/foes🔗

 (require frosthaven-manager/parsers/foes)
  package: frosthaven-manager

This module contains parsers for #lang +xs and produces monster databases.

procedure

(get-dbs db-file)  
info-db/c ability-db/c
  db-file : path-string?
Reads db-file and produces the monster databases.

The demo, default monster database included with Frosthaven Manager.

7.15 parsers🔗

This collection contains parsers that support various #langs.

7.15.1 parsers/foes🔗

 (require frosthaven-manager/parsers/foes)
  package: frosthaven-manager

This module contains parsers for #lang frosthaven-manager/foes. See Programming a Scenario for more details.

procedure

(parse-foes src in #:syntax? syn?)  (or/c syntax? foes/pc)

  src : any/c
  in : input-port?
  syn? : any/c
The result is syntax? with source src if syn? is -true, and the datum it contains matches foes/pc.

value

foes/pc : flat-contract?

 = (list/c (cons/c 'import (listof string?)) (cons/c 'info (listof monster-info?)) (cons/c 'ability (listof monster-ability?)) (cons/c 'foe (listof foe/pc)))

value

foe/pc : flat-contract?

 = (list/c string? string? numbering/pc (listof spec/pc))

value

spec/pc : flat-contract?

 = (hash/c num-players/c monster-type/pc #:immutable #t)

value

numbering/pc : flat-contract? = (or/c "ordered" "random" #f)

value

monster-type/pc : flat-contract?

 = (or/c "absent" "normal" "elite")
Contracts for foes values.

Textual parsers for parts of the foes language.

7.14.2 parsers/formula🔗

 (require frosthaven-manager/parsers/formula)
  package: frosthaven-manager

This module contains parsers for arithmetic formulas over addition, subtraction, +true, and the datum it contains matches foes/pc.

value

foes/pc : flat-contract?

 = (list/c (cons/c 'import (listof string?)) (cons/c 'info (listof monster-info?)) (cons/c 'ability (listof monster-ability?)) (cons/c 'foe (listof foe/pc)))

value

foe/pc : flat-contract?

 = (list/c string? string? numbering/pc (listof spec/pc))

value

spec/pc : flat-contract?

 = (hash/c num-players/c monster-type/pc #:immutable #t)

value

numbering/pc : flat-contract? = (or/c "ordered" "random" #f)

value

monster-type/pc : flat-contract?

 = (or/c "absent" "normal" "elite")
Contracts for foes values.

Textual parsers for parts of the foes language.

7.15.2 parsers/formula🔗

 (require frosthaven-manager/parsers/formula)
  package: frosthaven-manager

This module contains parsers for arithmetic formulas over addition, subtraction, multiplication, division, rounding, and a limited set of variables. The parse -result is a function from an environment of variables to a number.

value

env/c : flat-contract?

 = (hash/c (or/c "L" "C") number? #:flat? #t)

value

expr/pc : contract? = (-> env/c number?)

Contracts for the parse results of formulas.

Textual parser for formulas.

procedure

(parse-expr in)  expr/pc

  in : string?
Parses a string as a formula or fails.

7.14.3 parsers/monster🔗

 (require frosthaven-manager/parsers/monster)
  package: frosthaven-manager

This module contains parsers for #lang +result is a function from an environment of variables to a number.

value

env/c : flat-contract?

 = (hash/c (or/c "L" "C") number? #:flat? #t)

value

expr/pc : contract? = (-> env/c number?)

Contracts for the parse results of formulas.

Textual parser for formulas.

procedure

(parse-expr in)  expr/pc

  in : string?
Parses a string as a formula or fails.

7.15.3 parsers/monster🔗

 (require frosthaven-manager/parsers/monster)
  package: frosthaven-manager

This module contains parsers for #lang frosthaven-manager/bestiary. See Programming a Scenario for more details.

procedure

(parse-bestiary src in #:syntax? syn?)

  (or/c syntax? bestiary/c)
  src : any/c
  in : input-port?
  syn? : any/c
The result is syntax? with source src if syn? is true, and the datum it contains matches bestiary/c.

value

bestiary/c : flat-contract?

 = 
(list/c (cons/c 'import (listof string?))
        (cons/c 'info (listof monster-info?))
        (cons/c 'ability (listof monster-ability?)))
A contract for bestiary values.

Textual parsers for parts of the bestiary language.

procedure

(bestiary-dupes xs)  
(or/c #f (listof string?))
(or/c #f (listof string?))
  xs : (listof any/c)
Returns duplicate monster names from bestiaries and ability decks in xs. The first value is based on any monster-infos and the -second on monster-ability decks.

7.15 observable-operator🔗

 (require frosthaven-manager/observable-operator)
  package: frosthaven-manager

In addition to the shorthands below, this module exports define/obs, +second on monster-ability decks.

7.16 observable-operator🔗

 (require frosthaven-manager/observable-operator)
  package: frosthaven-manager

In addition to the shorthands below, this module exports define/obs, @, :=, and λ:= from racket/gui/easy/operator and everything from qi -via frosthaven-manager/curlique.

procedure

(<@ @o f)  any/c

  @o : obs?
  f : (-> any/c any/c)
An alias for obs-update!.

procedure

(@> @o f)  obs?

  @o : obs?
  f : (-> any/c any/c)
An alias for obs-map.

procedure

(λ<@ @o f)  (-> any/c)

  @o : obs?
  f : (-> any/c any/c)
An alias for λ<~.

procedure

(@! @o)  any/c

  @o : obs?
An alias for obs-peek.

7.16 pp🔗

This collection holds pretty printers based on -pretty-expressive.

7.16.1 pp/bestiary🔗

 (require frosthaven-manager/pp/bestiary)
  package: frosthaven-manager

This module pretty-prints bestiary files. It can be run as a program with

racket -l- frosthaven-manager/pp/bestiary

to format standard in or a provided file to standard out. Use --help for +via frosthaven-manager/curlique.

procedure

(<@ @o f)  any/c

  @o : obs?
  f : (-> any/c any/c)
An alias for obs-update!.

procedure

(@> @o f)  obs?

  @o : obs?
  f : (-> any/c any/c)
An alias for obs-map.

procedure

(λ<@ @o f)  (-> any/c)

  @o : obs?
  f : (-> any/c any/c)
An alias for λ<~.

procedure

(@! @o)  any/c

  @o : obs?
An alias for obs-peek.

7.17 pp🔗

This collection holds pretty printers based on +pretty-expressive.

7.17.1 pp/bestiary🔗

 (require frosthaven-manager/pp/bestiary)
  package: frosthaven-manager

This module pretty-prints bestiary files. It can be run as a program with

racket -l- frosthaven-manager/pp/bestiary

to format standard in or a provided file to standard out. Use --help for more options.

procedure

(pretty-bestiary bestiary    
  [#:lang-line? lang-line?])  pretty:doc?
  bestiary : bestiary/c
  lang-line? : any/c = #t
Creates a document for pretty printing from the results of a parsed bestiary. The document starts with a #lang line preceding the result if -lang-line? is not #f.

7.17 qi/list2hash🔗

 (require frosthaven-manager/qi/list2hash)
  package: frosthaven-manager

syntax

(list~>hash maybe->key maybe->value)

 
maybe->key = 
  | #:->key ->key-flo
     
maybe->value = 
  | #:->value ->value-flo
This Qi form transforms the input value (a list) into a hash, where each element +lang-line? is not #f.

7.18 qi/list2hash🔗

 (require frosthaven-manager/qi/list2hash)
  package: frosthaven-manager

syntax

(list~>hash maybe->key maybe->value)

 
maybe->key = 
  | #:->key ->key-flo
     
maybe->value = 
  | #:->value ->value-flo
This Qi form transforms the input value (a list) into a hash, where each element of the list is mapped into a key via ->key-flo and a value via ->value-flo. It uses list->hash as implementation.

procedure

(list->hash xs    
  [#:->key ->key    
  #:->value ->value])  hash?
  xs : list?
  ->key : (-> any/c any/c) = identity
  ->value : (-> any/c any/c) = identity
Transforms xs to a hash by mapping each element into a key via -->key and a value via ->value.

7.18 qi/utils🔗

 (require frosthaven-manager/qi/utils)
  package: frosthaven-manager

procedure

(list-remove xs i)  
list? any/c
  xs : list?
  i : natural-number/c
Returns a new list consisting of all elements of xs excepth the +->key and a value via ->value.

7.19 qi/utils🔗

 (require frosthaven-manager/qi/utils)
  package: frosthaven-manager

procedure

(list-remove xs i)  
list? any/c
  xs : list?
  i : natural-number/c
Returns a new list consisting of all elements of xs excepth the ith, and the ith value. If i is out of bounds, raises -an exception.

7.19 rich-text-helpers🔗

 (require frosthaven-manager/rich-text-helpers)
  package: frosthaven-manager

This module provides helpers for converting values to the rich text model of +an exception.

7.20 rich-text-helpers🔗

 (require frosthaven-manager/rich-text-helpers)
  package: frosthaven-manager

This module provides helpers for converting values to the rich text model of (submod frosthaven-manager/gui/rich-text-display model). In particular, these helpers work with functions that take single values to lists which are intended to be spliced into the resulting model list.

procedure

(only-on-text f arg ...)  (-> any/c list?)

  f : (-> any/c ... list?)
  arg : any/c
Returns a function over x that returns (f arg ... x) when @@ -349,10 +353,10 @@ prefix/suffix matching seen in the example above, but the algorithm is more general and can find newly generated matches in result-expr. Take care to avoid generating an infinite loop by unconditionally placing a new match in -the result.

7.20 server🔗

 (require frosthaven-manager/server)
  package: frosthaven-manager

procedure

(launch-server s send-event)  
string? (-> any)
  s : state?
  send-event : procedure?
Launches the actual web server for s. The callback protocol for +the result.

7.21 server🔗

 (require frosthaven-manager/server)
  package: frosthaven-manager

procedure

(launch-server s send-event)  
string? (-> any)
  s : state?
  send-event : procedure?
Launches the actual web server for s. The callback protocol for send-event is not yet formalized and very unstable.

Returns the server address (on a best-guess basis) and a stop procedure -that stops the server when called.

7.21 syntax🔗

The modules in this collection provide helpers for macros, syntax, and -languages.

7.21.1 syntax/module-reader🔗

 (require frosthaven-manager/syntax/module-reader)
  package: frosthaven-manager

This expander language wraps syntax/module-reader by assuming a +that stops the server when called.

7.22 syntax🔗

The modules in this collection provide helpers for macros, syntax, and +languages.

7.22.1 syntax/module-reader🔗

 (require frosthaven-manager/syntax/module-reader)
  package: frosthaven-manager

This expander language wraps syntax/module-reader by assuming a specific reading protocol.

This module does not have a reader of its own, so should be used with module or #lang s-exp.

syntax

(#%module-begin expander-mod-path
 [parser-id from parser-mod-path])
The following example demonstrates the entire grammer of the expander language:
#lang s-exp frosthaven-manager/syntax/module-reader
frosthaven-manager/foes
[parse-foes from frosthaven-manager/parsers/foes]

Or with module: @@ -370,7 +374,7 @@ with line-counting enabled. Then it must accept a keyword option #:syntax?, whose value is a boolean indicating whether or not to produce a syntax object.

Examples of valid parsers include parse-foes and -parse-bestiary.

7.21.2 syntax/monsters🔗

 (require frosthaven-manager/syntax/monsters)
  package: frosthaven-manager

syntax

(make-dbs (provide info-db-id ability-db-id)
          (import import-mod-path ...)
          (info monster-info ...)
          (ability monster-ability ...))
 
  monster-info : monster-info?
  monster-ability : monster-ability?
Binds and provides info-db-id and ability-db-id to +parse-bestiary.

7.22.2 syntax/monsters🔗

 (require frosthaven-manager/syntax/monsters)
  package: frosthaven-manager

syntax

(make-dbs (provide info-db-id ability-db-id)
          (import import-mod-path ...)
          (info monster-info ...)
          (ability monster-ability ...))
 
  monster-info : monster-info?
  monster-ability : monster-ability?
Binds and provides info-db-id and ability-db-id to info-db/c and ability-db/c values, respectively, by importing all the monster information from each import-mod-path and merging it with the provided monster-info and monster-ability.

Each import-mod-path is expected to provide the same diff --git a/doc-index.html b/doc-index.html index 9abf54d..2a96562 100644 --- a/doc-index.html +++ b/doc-index.html @@ -1,2 +1,2 @@ -Index

Index🔗

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

#%module-begin
(submod frosthaven-manager/gui/rich-text-display model)
<@
@!
@>
ability-db/c
ability-deck/p
ability-decks (struct)
ability-decks-current
ability-decks-discard
ability-decks-discard-and-maybe-shuffle
ability-decks-draw
ability-decks-draw-next
ability-decks?
About Frosthaven Manager
about-menu-item
absent-from-modifier-deck
add-monster-event/c
add-monster-group
add-monster-modifier
add-or-remove-monster-group
add-prompt
add-special-loot
Adding bless and curse
Adding monsters to the scenario
Advancing the scenario
air
aoe
aoe-images
apply-sticker
Area-of-Effect Specification by Example
Area-of-Effect Specification Reference
arrowvine
attack
axenut
bane
beginning-of
bestiary
Bestiary Format by Example
Bestiary Format Reference
bestiary-dupes
bestiary/c
bestiary/p
better-modifier
big-control-font
bless
bless-deck
border-size
brittle
build-loot-deck
build-loot-deck!
card->type
card-swapper
check-foes-have-monsters
check-foes-have-monsters-message
check-monsters-have-abilities
check-monsters-have-abilities-message
Choosing a bestiary
close-custodian-mixin
closing-custodian
closing-eventspace
column (struct)
column-entry->label
column-entry->next
column-title
column?
condition?
conditions
conditions->string
Constant Formatting and Parsing
consume-all
contracts
contribute-menu-item
Contributing guidelines
Contributor’s Guide
copy-font
copy-state
corpsecap
counter
creature (struct)
Creature list
creature-id
creature-initiative
creature-is-mg*?
creature-v
creature?
crit
current-renderer
curse
dark
datums->dbs
db-view
Debugging
default-monster-db
define-close!
define-constant-format
define-constant-format/parse
define-constant-parse
define-error-text
define-serializable-enum-type
defns
deserialize-state
Developer Reference
disarm
discard
discriminator:condition
do-about
do-bless-monster
do-bless-player
do-curse-monster
do-load-game
do-round-prompt
do-save-game
do-unbless-player
draw-abilities
draw-modifier
draw-modifier*
draw-new-card-mid-round-if-needed
Drawing from the monster modifier deck
earth
element-pics (struct)
element-pics-consume
element-pics-infused
element-pics-name
element-pics-unfused
element-pics-waning
element-pics?
element-state/c
element?
elements
elements
Elements tracker
elements-cycler
end-of
enum-helpers
env/c
escape-text
expirable-conditions
expr/p
expr/pc
extend-standard-deck
FAQs
favors-dialog
feature-menu-item
files
fire
flamefruit
Foe Specification by Example
Foe Specification Format Reference
foe/p
foe/pc
foes/p
foes/pc
format-loot-card
formula-editor
formula-menu-item
Frosthaven Manager
frosthaven-manager/aoe
frosthaven-manager/aoe-images
frosthaven-manager/bestiary
frosthaven-manager/constants
frosthaven-manager/contracts
frosthaven-manager/defns
frosthaven-manager/defns/level
frosthaven-manager/defns/loot
frosthaven-manager/defns/monsters
frosthaven-manager/defns/players
frosthaven-manager/defns/scenario
frosthaven-manager/elements
frosthaven-manager/enum-helpers
frosthaven-manager/files
frosthaven-manager/foes
frosthaven-manager/gui/common-menu
frosthaven-manager/gui/counter
frosthaven-manager/gui/elements
frosthaven-manager/gui/font
frosthaven-manager/gui/formula-editor
frosthaven-manager/gui/helpers
frosthaven-manager/gui/level-info
frosthaven-manager/gui/level-picker
frosthaven-manager/gui/loot
frosthaven-manager/gui/manager
frosthaven-manager/gui/markdown
frosthaven-manager/gui/mixins
frosthaven-manager/gui/monster-modifier
frosthaven-manager/gui/monsters
frosthaven-manager/gui/number-players
frosthaven-manager/gui/player-info
frosthaven-manager/gui/render
frosthaven-manager/gui/rewards
frosthaven-manager/gui/rich-text-display
frosthaven-manager/gui/round-number
frosthaven-manager/gui/round-prompts
frosthaven-manager/gui/server
frosthaven-manager/gui/stacked-tables
frosthaven-manager/gui/static-table
frosthaven-manager/gui/table
frosthaven-manager/icons
frosthaven-manager/loot-cards
frosthaven-manager/manager
frosthaven-manager/manager/ability-decks
frosthaven-manager/manager/db
frosthaven-manager/manager/elements
frosthaven-manager/manager/loot
frosthaven-manager/manager/modifier-decks
frosthaven-manager/manager/round-prompts
frosthaven-manager/manager/save
frosthaven-manager/manager/state
frosthaven-manager/manager/transition
frosthaven-manager/monster-db
frosthaven-manager/observable-operator
frosthaven-manager/parsers/foes
frosthaven-manager/parsers/formula
frosthaven-manager/parsers/monster
frosthaven-manager/pp/bestiary
frosthaven-manager/qi/list2hash
frosthaven-manager/qi/utils
frosthaven-manager/rich-text-helpers
frosthaven-manager/server
frosthaven-manager/syntax/module-reader
frosthaven-manager/syntax/monsters
game number
Game text
gc-menu-item
Get Involved
get-dbs
get-file/filter
get-level-info
get-monster-stats
Getting started
give-player-loot
gui
gui/common-menu
gui/counter
gui/elements
gui/font
gui/formula-editor
gui/helpers
gui/level-info
gui/level-picker
gui/loot
gui/manager
gui/markdown
gui/mixins
gui/monster-modifier
gui/monsters
gui/number-players
gui/player-info
gui/render
gui/rewards
gui/rich-text-display
gui/round-number
gui/round-prompts
gui/server
gui/stacked-tables
gui/static-table
gui/table
herb (struct)
herb-amount
herb-decks
herb-kind?
herb-kinds
herb-name
herb?
hex-size
hide
hide-caret/selection
How to play
how-to-play-menu-item
ice
icons
immobilize
impair
import-monsters/p
imports->dbs
info-db/c
infuse-all
init-dbs
init-dbs-and-foes
initiative-public?
initiative?
inspiration-reward
inspiration-table
Installing Frosthaven Manager
invisible
issue-menu-item
jump
kill-monster
launch-server
launch-server
launch-server-menu-item
Level Info
level-info (struct)
level-info-exp
level-info-gold
level-info-hazardous-terrain
level-info-monster-level
level-info-trap-damage
level-info?
level-picker
level-stats
level-table
level/c
light
Linux
list->hash
list-remove
list~>hash
load-game
Loot Deck
loot-button
loot-card?
loot-picker
loot-preview
loot-type/c
lumber
M
macOS
make-closing-proc-mixin
make-dbs
make-monster
make-monster-group
make-on-close-mixin
make-player
make-player-creature
make-preview-rows
make-state
make-states
make-undo
manage-prompt-menu-item
manager
manager
manager/ability-decks
manager/db
manager/elements
manager/loot
manager/modifier-decks
manager/round-prompts
manager/save
manager/state
manager/transition
markdown-text
match-loop
material (struct)
material-amount
material-amount*
material-decks
material-kind?
material-kinds
material-name
material?
max-herb-cards
max-level
max-material-cards
max-money-cards
max-players
max-random-item-cards
metal
minus1
minus2
modify-monster-deck-menu-item
money (struct)
money-amount
money-deck
money?
monster (struct)
Monster and round controls
Monster Cards
Monster group controls
monster->hp-text
monster-ability (struct)
monster-ability-abilities
monster-ability-ability->rich-text
monster-ability-initiative
monster-ability-initiative->text
monster-ability-name
monster-ability-name->text
monster-ability-set-name
monster-ability-shuffle?
monster-ability?
monster-at-max-health?
monster-conditions
monster-current-hp
monster-curse-deck
monster-db
monster-dead?
monster-elite?
monster-expire-conditions
monster-group (struct)
monster-group* (struct)
monster-group*-active
monster-group*-mg
monster-group*?
monster-group-add
monster-group-change-max-HP
monster-group-elite-stats
monster-group-first-monster
monster-group-level
monster-group-monsters
monster-group-name
monster-group-normal-stats
monster-group-remove
monster-group-set-name
monster-group-update-level
monster-group-update-num
monster-group-view
monster-group?
monster-info (struct)
monster-info-elite-stats
monster-info-name
monster-info-normal-stats
monster-info-set-name
monster-info?
monster-modifier-deck
monster-modifier?
monster-number
monster-number/c
monster-stats (struct)
monster-stats-attack
monster-stats-attack*
monster-stats-bonuses
monster-stats-bonuses-string
monster-stats-effects
monster-stats-effects-string
monster-stats-immunities
monster-stats-immunities-string
monster-stats-max-hp
monster-stats-max-hp*
monster-stats-move
monster-stats?
monster-type/pc
monster-update-condition
monster-update-hp
monster/p
monster?
move
move-top-draw-to-bottom
muddle
Navigating the code
newline
newline?
next-round
null
num-players/c
number-of-levels
number-players-picker
numbering/pc
O
observable-operator
only-on-text
Other utilities
parse-bestiary
parse-expr
parse-foes
parsers
parsers/foes
parsers/formula
parsers/monster
pict/alt-text (struct)
pict/alt-text-alt-text
pict/alt-text-p
pict/alt-text?
place-loot-on-bottom
Play the scenario
player (struct)
Player controls
player->hp-text
player->rewards
player-act-on-hp
player-act-on-max-hp
player-act-on-xp
player-add-condition
player-add-loot
player-afflicted-by?
player-at-max-health?
player-clear-initiative
player-condition-handler
player-conditions
player-conditions*
player-current-hp
player-dead?
player-expire-conditions
player-initiative
player-kill-summon
player-loot
player-max-hp
player-name
player-remove-condition
player-rewards-view
player-set-initiative
player-summon
player-summons
player-update-name
player-view
player-xp
player?
Players
plus1
plus2
poison
pp
pp/bestiary
pretty-bestiary
Programming a Scenario
Programming Loot
prompt
prompt->string
prompt/c
prompts-input-view
pull
push
put-file/filter
qi/list2hash
qi/utils
r
random-item
random-item?
range
Rebuild the package
Reference Material
regenerate
remove-monster-event/c
remove-monster-modifier
remove-prompt
render/eventspace
reshuffle-modifier-deck
Rich Text Model
rich-text-display
rich-text-helpers
rockroot
round-number-modifier
Running tests
S
Saving and loading a game
scale-icon
Scenario
Scenario information and loot
selector:condition
send-feedback-menu-item
serialize-state
server
Setting up for development
Setting up round prompts
Setting up the loot deck
Setting up the monsters
Setting up the players
Setting up the scenario
setup-players
should-do-prompt?
shuffle-modifier-deck?
simple-monster-group-view
single-monster-event/c
single-monster-picker
size
snowthistle
spec->shape
spec-sym?
spec/pc
spec?
special-loot (struct)
special-loot-name
special-loot?
stacked-tables
standard-loot-deck
state (struct)
state-@ability-db
state-@ability-decks
state-@bestiary-path
state-@blesses
state-@creatures
state-@curses
state-@elements
state-@env
state-@in-draw?
state-@info-db
state-@level
state-@loot-deck
state-@modifier
state-@monster-discard
state-@monster-modifier-deck
state-@monster-prev-discard
state-@num-loot-cards
state-@num-players
state-@player-blesses
state-@prompts
state-@round
state-@type->deck
state-@type->number-of-cards
state?
static-table
sticker
strengthen
string->spec
struct:ability-decks
struct:column
struct:creature
struct:element-pics
struct:herb
struct:level-info
struct:material
struct:money
struct:monster
struct:monster-ability
struct:monster-group
struct:monster-group*
struct:monster-info
struct:monster-stats
struct:pict/alt-text
struct:player
struct:special-loot
struct:state
struct:summon
stun
summon (struct)
summon->hp-text
summon-act-on-hp
summon-act-on-max-hp
summon-add-condition
summon-afflicted-by?
summon-at-max-health?
summon-condition-handler
summon-conditions
summon-conditions*
summon-current-hp
summon-dead?
summon-max-hp
summon-name
summon-remove-condition
summon-update-name
summon?
swap-monster-elite
swap-monster-group-elites
syntax
syntax/module-reader
syntax/monsters
syntaxes->spec
syntaxes-can-be-spec?
target
teleport
Thanks
time/c
transition-element-state
transition/c
translate-to-top-coords
Troubleshooting
undo!
undo?
undoable?
unique-with/c
update-ability-decks
update-all-monster-groups
update-all-players
update-loot-deck-and-num-loot-cards
update-monster-groups
update-player-max-hp
update-player-name
update-player-summon
update-players
Using Multiple Bestiaries
View the local documentation
wane-element
ward
Where Can I Store Scenario Programs?
Windows
with-closing-custodian/eventspace
worse-modifier
wound
Write Your Own Monster
X
zero
λ<@

 
\ No newline at end of file +Index

Index🔗

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 

#%module-begin
(submod frosthaven-manager/gui/rich-text-display model)
<@
@!
@>
ability-db/c
ability-deck/p
ability-decks (struct)
ability-decks-current
ability-decks-discard
ability-decks-discard-and-maybe-shuffle
ability-decks-draw
ability-decks-draw-next
ability-decks?
About Frosthaven Manager
about-menu-item
absent-from-modifier-deck
add-monster-event/c
add-monster-group
add-monster-modifier
add-or-remove-monster-group
add-prompt
add-special-loot
Adding bless and curse
Adding monsters to the scenario
Advancing the scenario
air
aoe
aoe-images
apply-sticker
Area-of-Effect Specification by Example
Area-of-Effect Specification Reference
arrowvine
attack
axenut
bane
beginning-of
bestiary
Bestiary Format by Example
Bestiary Format Reference
bestiary-dupes
bestiary/c
bestiary/p
better-modifier
big-control-font
bless
bless-deck
border-size
brittle
build-loot-deck
build-loot-deck!
card->type
card-swapper
check-foes-have-monsters
check-foes-have-monsters-message
check-monsters-have-abilities
check-monsters-have-abilities-message
Choosing a bestiary
close-custodian-mixin
closing-custodian
closing-eventspace
column (struct)
column-entry->label
column-entry->next
column-title
column?
condition?
conditions
conditions->string
Constant Formatting and Parsing
consume-all
contracts
contribute-menu-item
Contributing guidelines
Contributor’s Guide
copy-font
copy-state
corpsecap
counter
creature (struct)
Creature list
creature-id
creature-initiative
creature-is-mg*?
creature-v
creature?
crit
curlique
current-renderer
curse
dark
datums->dbs
db-view
Debugging
default-monster-db
define-close!
define-constant-format
define-constant-format/parse
define-constant-parse
define-error-text
define-serializable-enum-type
defns
deserialize-state
Developer Reference
disarm
discard
discriminator:condition
do-about
do-bless-monster
do-bless-player
do-curse-monster
do-load-game
do-round-prompt
do-save-game
do-unbless-player
draw-abilities
draw-modifier
draw-modifier*
draw-new-card-mid-round-if-needed
Drawing from the monster modifier deck
earth
element-pics (struct)
element-pics-consume
element-pics-infused
element-pics-name
element-pics-unfused
element-pics-waning
element-pics?
element-state/c
element?
elements
elements
Elements tracker
elements-cycler
end-of
enum-helpers
env/c
escape-text
expirable-conditions
expr/p
expr/pc
extend-standard-deck
FAQs
favors-dialog
feature-menu-item
files
fire
flamefruit
Foe Specification by Example
Foe Specification Format Reference
foe/p
foe/pc
foes/p
foes/pc
format-loot-card
formula-editor
formula-menu-item
Frosthaven Manager
frosthaven-manager/aoe
frosthaven-manager/aoe-images
frosthaven-manager/bestiary
frosthaven-manager/constants
frosthaven-manager/contracts
frosthaven-manager/curlique
frosthaven-manager/defns
frosthaven-manager/defns/level
frosthaven-manager/defns/loot
frosthaven-manager/defns/monsters
frosthaven-manager/defns/players
frosthaven-manager/defns/scenario
frosthaven-manager/elements
frosthaven-manager/enum-helpers
frosthaven-manager/files
frosthaven-manager/foes
frosthaven-manager/gui/common-menu
frosthaven-manager/gui/counter
frosthaven-manager/gui/elements
frosthaven-manager/gui/font
frosthaven-manager/gui/formula-editor
frosthaven-manager/gui/helpers
frosthaven-manager/gui/level-info
frosthaven-manager/gui/level-picker
frosthaven-manager/gui/loot
frosthaven-manager/gui/manager
frosthaven-manager/gui/markdown
frosthaven-manager/gui/mixins
frosthaven-manager/gui/monster-modifier
frosthaven-manager/gui/monsters
frosthaven-manager/gui/number-players
frosthaven-manager/gui/player-info
frosthaven-manager/gui/render
frosthaven-manager/gui/rewards
frosthaven-manager/gui/rich-text-display
frosthaven-manager/gui/round-number
frosthaven-manager/gui/round-prompts
frosthaven-manager/gui/server
frosthaven-manager/gui/stacked-tables
frosthaven-manager/gui/static-table
frosthaven-manager/gui/table
frosthaven-manager/icons
frosthaven-manager/loot-cards
frosthaven-manager/manager
frosthaven-manager/manager/ability-decks
frosthaven-manager/manager/db
frosthaven-manager/manager/elements
frosthaven-manager/manager/loot
frosthaven-manager/manager/modifier-decks
frosthaven-manager/manager/round-prompts
frosthaven-manager/manager/save
frosthaven-manager/manager/state
frosthaven-manager/manager/transition
frosthaven-manager/monster-db
frosthaven-manager/observable-operator
frosthaven-manager/parsers/foes
frosthaven-manager/parsers/formula
frosthaven-manager/parsers/monster
frosthaven-manager/pp/bestiary
frosthaven-manager/qi/list2hash
frosthaven-manager/qi/utils
frosthaven-manager/rich-text-helpers
frosthaven-manager/server
frosthaven-manager/syntax/module-reader
frosthaven-manager/syntax/monsters
game number
Game text
gc-menu-item
Get Involved
get-dbs
get-file/filter
get-level-info
get-monster-stats
Getting started
give-player-loot
gui
gui/common-menu
gui/counter
gui/elements
gui/font
gui/formula-editor
gui/helpers
gui/level-info
gui/level-picker
gui/loot
gui/manager
gui/markdown
gui/mixins
gui/monster-modifier
gui/monsters
gui/number-players
gui/player-info
gui/render
gui/rewards
gui/rich-text-display
gui/round-number
gui/round-prompts
gui/server
gui/stacked-tables
gui/static-table
gui/table
herb (struct)
herb-amount
herb-decks
herb-kind?
herb-kinds
herb-name
herb?
hex-size
hide
hide-caret/selection
How to play
how-to-play-menu-item
ice
icons
immobilize
impair
import-monsters/p
imports->dbs
info-db/c
infuse-all
init-dbs
init-dbs-and-foes
initiative-public?
initiative?
inspiration-reward
inspiration-table
Installing Frosthaven Manager
invisible
issue-menu-item
jump
kill-monster
launch-server
launch-server
launch-server-menu-item
Level Info
level-info (struct)
level-info-exp
level-info-gold
level-info-hazardous-terrain
level-info-monster-level
level-info-trap-damage
level-info?
level-picker
level-stats
level-table
level/c
light
Linux
list->hash
list-remove
list~>hash
load-game
Loot Deck
loot-button
loot-card?
loot-picker
loot-preview
loot-type/c
lumber
M
macOS
make-closing-proc-mixin
make-dbs
make-monster
make-monster-group
make-on-close-mixin
make-player
make-player-creature
make-preview-rows
make-state
make-states
make-undo
manage-prompt-menu-item
manager
manager
manager/ability-decks
manager/db
manager/elements
manager/loot
manager/modifier-decks
manager/round-prompts
manager/save
manager/state
manager/transition
markdown-text
match-loop
material (struct)
material-amount
material-amount*
material-decks
material-kind?
material-kinds
material-name
material?
max-herb-cards
max-level
max-material-cards
max-money-cards
max-players
max-random-item-cards
metal
minus1
minus2
modify-monster-deck-menu-item
money (struct)
money-amount
money-deck
money?
monster (struct)
Monster and round controls
Monster Cards
Monster group controls
monster->hp-text
monster-ability (struct)
monster-ability-abilities
monster-ability-ability->rich-text
monster-ability-initiative
monster-ability-initiative->text
monster-ability-name
monster-ability-name->text
monster-ability-set-name
monster-ability-shuffle?
monster-ability?
monster-at-max-health?
monster-conditions
monster-current-hp
monster-curse-deck
monster-db
monster-dead?
monster-elite?
monster-expire-conditions
monster-group (struct)
monster-group* (struct)
monster-group*-active
monster-group*-mg
monster-group*?
monster-group-add
monster-group-change-max-HP
monster-group-elite-stats
monster-group-first-monster
monster-group-level
monster-group-monsters
monster-group-name
monster-group-normal-stats
monster-group-remove
monster-group-set-name
monster-group-update-level
monster-group-update-num
monster-group-view
monster-group?
monster-info (struct)
monster-info-elite-stats
monster-info-name
monster-info-normal-stats
monster-info-set-name
monster-info?
monster-modifier-deck
monster-modifier?
monster-number
monster-number/c
monster-stats (struct)
monster-stats-attack
monster-stats-attack*
monster-stats-bonuses
monster-stats-bonuses-string
monster-stats-effects
monster-stats-effects-string
monster-stats-immunities
monster-stats-immunities-string
monster-stats-max-hp
monster-stats-max-hp*
monster-stats-move
monster-stats?
monster-type/pc
monster-update-condition
monster-update-hp
monster/p
monster?
move
move-top-draw-to-bottom
muddle
Navigating the code
newline
newline?
next-round
null
num-players/c
number-of-levels
number-players-picker
numbering/pc
O
observable-operator
only-on-text
Other utilities
parse-bestiary
parse-expr
parse-foes
parsers
parsers/foes
parsers/formula
parsers/monster
pict/alt-text (struct)
pict/alt-text-alt-text
pict/alt-text-p
pict/alt-text?
place-loot-on-bottom
Play the scenario
player (struct)
Player controls
player->hp-text
player->rewards
player-act-on-hp
player-act-on-max-hp
player-act-on-xp
player-add-condition
player-add-loot
player-afflicted-by?
player-at-max-health?
player-clear-initiative
player-condition-handler
player-conditions
player-conditions*
player-current-hp
player-dead?
player-expire-conditions
player-initiative
player-kill-summon
player-loot
player-max-hp
player-name
player-remove-condition
player-rewards-view
player-set-initiative
player-summon
player-summons
player-update-name
player-view
player-xp
player?
Players
plus1
plus2
poison
pp
pp/bestiary
pretty-bestiary
Programming a Scenario
Programming Loot
prompt
prompt->string
prompt/c
prompts-input-view
pull
push
put-file/filter
qi/list2hash
qi/utils
r
random-item
random-item?
range
Rebuild the package
Reference Material
regenerate
remove-monster-event/c
remove-monster-modifier
remove-prompt
render/eventspace
reshuffle-modifier-deck
Rich Text Model
rich-text-display
rich-text-helpers
rockroot
round-number-modifier
Running tests
S
Saving and loading a game
scale-icon
Scenario
Scenario information and loot
selector:condition
send-feedback-menu-item
serialize-state
server
Setting up for development
Setting up round prompts
Setting up the loot deck
Setting up the monsters
Setting up the players
Setting up the scenario
setup-players
should-do-prompt?
shuffle-modifier-deck?
simple-monster-group-view
single-monster-event/c
single-monster-picker
size
snowthistle
spec->shape
spec-sym?
spec/pc
spec?
special-loot (struct)
special-loot-name
special-loot?
stacked-tables
standard-loot-deck
state (struct)
state-@ability-db
state-@ability-decks
state-@bestiary-path
state-@blesses
state-@creatures
state-@curses
state-@elements
state-@env
state-@in-draw?
state-@info-db
state-@level
state-@loot-deck
state-@modifier
state-@monster-discard
state-@monster-modifier-deck
state-@monster-prev-discard
state-@num-loot-cards
state-@num-players
state-@player-blesses
state-@prompts
state-@round
state-@type->deck
state-@type->number-of-cards
state?
static-table
sticker
strengthen
string->spec
struct:ability-decks
struct:column
struct:creature
struct:element-pics
struct:herb
struct:level-info
struct:material
struct:money
struct:monster
struct:monster-ability
struct:monster-group
struct:monster-group*
struct:monster-info
struct:monster-stats
struct:pict/alt-text
struct:player
struct:special-loot
struct:state
struct:summon
stun
summon (struct)
summon->hp-text
summon-act-on-hp
summon-act-on-max-hp
summon-add-condition
summon-afflicted-by?
summon-at-max-health?
summon-condition-handler
summon-conditions
summon-conditions*
summon-current-hp
summon-dead?
summon-max-hp
summon-name
summon-remove-condition
summon-update-name
summon?
swap-monster-elite
swap-monster-group-elites
switch
syntax
syntax/module-reader
syntax/monsters
syntaxes->spec
syntaxes-can-be-spec?
target
teleport
Thanks
time/c
transition-element-state
transition/c
translate-to-top-coords
Troubleshooting
undo!
undo?
undoable?
unique-with/c
update-ability-decks
update-all-monster-groups
update-all-players
update-loot-deck-and-num-loot-cards
update-monster-groups
update-player-max-hp
update-player-name
update-player-summon
update-players
Using Multiple Bestiaries
View the local documentation
wane-element
ward
Where Can I Store Scenario Programs?
Windows
with-closing-custodian/eventspace
worse-modifier
wound
Write Your Own Monster
X
zero
~>
~>>
λ<@

 
\ No newline at end of file diff --git a/index.html b/index.html index b4a8084..4de4f67 100644 --- a/index.html +++ b/index.html @@ -1,2 +1,2 @@ -Frosthaven Manager
8.15

Frosthaven Manager🔗

D. Ben Knoble

    1 About Frosthaven Manager

      1.1 Thanks

      1.2 Get Involved

    2 Installing Frosthaven Manager

      2.1 Windows

      2.2 Linux

      2.3 macOS

    3 How to play

      3.1 Getting started

      3.2 Setting up the players

      3.3 Setting up the scenario

      3.4 Setting up the monsters

        3.4.1 Choosing a bestiary

        3.4.2 Adding monsters to the scenario

      3.5 Setting up the loot deck

      3.6 Setting up round prompts

      3.7 Play the scenario

        3.7.1 Elements tracker

        3.7.2 Monster and round controls

          3.7.2.1 Adding bless and curse

          3.7.2.2 Drawing from the monster modifier deck

          3.7.2.3 Advancing the scenario

        3.7.3 Creature list

          3.7.3.1 Player controls

          3.7.3.2 Monster group controls

        3.7.4 Scenario information and loot

      3.8 Saving and loading a game

      3.9 Other utilities

    4 Troubleshooting

      4.1 Reference Material

      4.2 FAQs

    5 Programming a Scenario

      5.1 Where Can I Store Scenario Programs?

      5.2 Bestiary Format by Example

        5.2.1 Write Your Own Monster

        5.2.2 Using Multiple Bestiaries

      5.3 Bestiary Format Reference

      5.4 Area-of-Effect Specification by Example

      5.5 Area-of-Effect Specification Reference

      5.6 Foe Specification by Example

      5.7 Foe Specification Format Reference

      5.8 Programming Loot

    6 Contributor’s Guide

      6.1 Setting up for development

        6.1.1 Running tests

        6.1.2 Rebuild the package

        6.1.3 View the local documentation

      6.2 Contributing guidelines

      6.3 Navigating the code

      6.4 Debugging

    7 Developer Reference

      7.1 aoe

      7.2 aoe-images

      7.3 Constant Formatting and Parsing

      7.4 contracts

      7.5 defns

        7.5.1 Level Info

        7.5.2 Loot Deck

        7.5.3 Monster Cards

        7.5.4 Players

        7.5.5 Scenario

      7.6 elements

      7.7 enum-helpers

      7.8 icons

      7.9 manager

        7.9.1 manager/state

        7.9.2 manager/ability-decks

        7.9.3 manager/modifier-decks

        7.9.4 manager/db

        7.9.5 manager/elements

        7.9.6 manager/loot

        7.9.7 manager/round-prompts

        7.9.8 manager/transition

        7.9.9 manager/save

      7.10 gui

        7.10.1 gui/common-menu

        7.10.2 gui/counter

        7.10.3 gui/elements

        7.10.4 gui/font

        7.10.5 gui/formula-editor

        7.10.6 gui/helpers

        7.10.7 gui/level-info

        7.10.8 gui/level-picker

        7.10.9 gui/loot

        7.10.10 gui/manager

        7.10.11 gui/markdown

        7.10.12 gui/mixins

        7.10.13 gui/monster-modifier

        7.10.14 gui/monsters

        7.10.15 gui/number-players

        7.10.16 gui/player-info

        7.10.17 gui/render

        7.10.18 gui/rewards

        7.10.19 gui/rich-text-display

          7.10.19.1 Rich Text Model

        7.10.20 gui/round-number

        7.10.21 gui/round-prompts

        7.10.22 gui/server

        7.10.23 gui/stacked-tables

        7.10.24 gui/static-table

        7.10.25 gui/table

      7.11 files

      7.12 bestiary

      7.13 monster-db

      7.14 parsers

        7.14.1 parsers/foes

        7.14.2 parsers/formula

        7.14.3 parsers/monster

      7.15 observable-operator

      7.16 pp

        7.16.1 pp/bestiary

      7.17 qi/list2hash

      7.18 qi/utils

      7.19 rich-text-helpers

      7.20 server

      7.21 syntax

        7.21.1 syntax/module-reader

        7.21.2 syntax/monsters

    Index

 
\ No newline at end of file +Frosthaven Manager
8.15

Frosthaven Manager🔗

D. Ben Knoble

    1 About Frosthaven Manager

      1.1 Thanks

      1.2 Get Involved

    2 Installing Frosthaven Manager

      2.1 Windows

      2.2 Linux

      2.3 macOS

    3 How to play

      3.1 Getting started

      3.2 Setting up the players

      3.3 Setting up the scenario

      3.4 Setting up the monsters

        3.4.1 Choosing a bestiary

        3.4.2 Adding monsters to the scenario

      3.5 Setting up the loot deck

      3.6 Setting up round prompts

      3.7 Play the scenario

        3.7.1 Elements tracker

        3.7.2 Monster and round controls

          3.7.2.1 Adding bless and curse

          3.7.2.2 Drawing from the monster modifier deck

          3.7.2.3 Advancing the scenario

        3.7.3 Creature list

          3.7.3.1 Player controls

          3.7.3.2 Monster group controls

        3.7.4 Scenario information and loot

      3.8 Saving and loading a game

      3.9 Other utilities

    4 Troubleshooting

      4.1 Reference Material

      4.2 FAQs

    5 Programming a Scenario

      5.1 Where Can I Store Scenario Programs?

      5.2 Bestiary Format by Example

        5.2.1 Write Your Own Monster

        5.2.2 Using Multiple Bestiaries

      5.3 Bestiary Format Reference

      5.4 Area-of-Effect Specification by Example

      5.5 Area-of-Effect Specification Reference

      5.6 Foe Specification by Example

      5.7 Foe Specification Format Reference

      5.8 Programming Loot

    6 Contributor’s Guide

      6.1 Setting up for development

        6.1.1 Running tests

        6.1.2 Rebuild the package

        6.1.3 View the local documentation

      6.2 Contributing guidelines

      6.3 Navigating the code

      6.4 Debugging

    7 Developer Reference

      7.1 aoe

      7.2 aoe-images

      7.3 Constant Formatting and Parsing

      7.4 contracts

      7.5 curlique

      7.6 defns

        7.6.1 Level Info

        7.6.2 Loot Deck

        7.6.3 Monster Cards

        7.6.4 Players

        7.6.5 Scenario

      7.7 elements

      7.8 enum-helpers

      7.9 icons

      7.10 manager

        7.10.1 manager/state

        7.10.2 manager/ability-decks

        7.10.3 manager/modifier-decks

        7.10.4 manager/db

        7.10.5 manager/elements

        7.10.6 manager/loot

        7.10.7 manager/round-prompts

        7.10.8 manager/transition

        7.10.9 manager/save

      7.11 gui

        7.11.1 gui/common-menu

        7.11.2 gui/counter

        7.11.3 gui/elements

        7.11.4 gui/font

        7.11.5 gui/formula-editor

        7.11.6 gui/helpers

        7.11.7 gui/level-info

        7.11.8 gui/level-picker

        7.11.9 gui/loot

        7.11.10 gui/manager

        7.11.11 gui/markdown

        7.11.12 gui/mixins

        7.11.13 gui/monster-modifier

        7.11.14 gui/monsters

        7.11.15 gui/number-players

        7.11.16 gui/player-info

        7.11.17 gui/render

        7.11.18 gui/rewards

        7.11.19 gui/rich-text-display

          7.11.19.1 Rich Text Model

        7.11.20 gui/round-number

        7.11.21 gui/round-prompts

        7.11.22 gui/server

        7.11.23 gui/stacked-tables

        7.11.24 gui/static-table

        7.11.25 gui/table

      7.12 files

      7.13 bestiary

      7.14 monster-db

      7.15 parsers

        7.15.1 parsers/foes

        7.15.2 parsers/formula

        7.15.3 parsers/monster

      7.16 observable-operator

      7.17 pp

        7.17.1 pp/bestiary

      7.18 qi/list2hash

      7.19 qi/utils

      7.20 rich-text-helpers

      7.21 server

      7.22 syntax

        7.22.1 syntax/module-reader

        7.22.2 syntax/monsters

    Index

 
\ No newline at end of file