aboutsummaryrefslogtreecommitdiff
path: root/internal/action/behavior.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-10 01:48:28 -0400
committerhistoria <[not public]>2026-06-10 01:48:28 -0400
commita226d72e51eecb768b13600303f73483118d9104 (patch)
tree458d15ef049732c15dacc591a830d3beddbedfde /internal/action/behavior.go
parent6a0f3d7a252de4b1741cfe5e1c561412c602becc (diff)
downloadthehouseoficarus-a226d72e51eecb768b13600303f73483118d9104.tar.gz
feat: implemented janky object interaction model
Diffstat (limited to 'internal/action/behavior.go')
-rw-r--r--internal/action/behavior.go68
1 files changed, 68 insertions, 0 deletions
diff --git a/internal/action/behavior.go b/internal/action/behavior.go
new file mode 100644
index 0000000..d7f683a
--- /dev/null
+++ b/internal/action/behavior.go
@@ -0,0 +1,68 @@
+package action
+
+type GatherConfig struct {
+ Skill string `yaml:"skill"`
+ Level int `yaml:"level"`
+ BaseWait int `yaml:"base_wait"`
+ Tool string `yaml:"tool"`
+ Success SuccessFormula `yaml:"success"`
+ GatherMsg string `yaml:"gather_message"`
+ FailMsg string `yaml:"fail_message"`
+ Drops []DropEntry `yaml:"drops"`
+ DepleteDelay int `yaml:"deplete_delay"`
+ RespawnMsg string `yaml:"respawn_message"`
+ RespawnBroadcast string `yaml:"respawn_broadcast"`
+}
+
+type SuccessFormula struct {
+ Base float64 `yaml:"base"`
+ PerLevel float64 `yaml:"per_level"`
+ Cap float64 `yaml:"cap"`
+}
+
+type TalkConfig struct {
+ Nodes map[string]TalkNode `yaml:"nodes"`
+}
+
+type TalkNode struct {
+ Message string `yaml:"message"`
+ Options []TalkOption `yaml:"options"`
+ Action *NodeAction `yaml:"action"`
+}
+
+type TalkOption struct {
+ Text string `yaml:"text"`
+ Goto string `yaml:"goto"`
+ End bool `yaml:"end"`
+ Condition *Condition `yaml:"condition"`
+}
+
+type NodeAction struct {
+ SetFlags map[string]any `yaml:"set_flags"`
+ GiveItem string `yaml:"give_item"`
+ TakeItem string `yaml:"take_item"`
+}
+
+type Condition struct {
+ Flag string `yaml:"flag"`
+ Value any `yaml:"value"`
+ Not bool `yaml:"not"`
+ HasItem string `yaml:"has_item"`
+}
+
+type UseConfig struct {
+ Message string `yaml:"message"`
+ Wait int `yaml:"wait"`
+ Consume map[string]int `yaml:"consume"`
+ Reward DropEntry `yaml:"reward"`
+ FailMsg string `yaml:"fail_message"`
+ Success *SuccessFormula `yaml:"success"`
+ Skill string `yaml:"skill"`
+ Level int `yaml:"level"`
+}
+
+type ToggleConfig struct {
+ Message string `yaml:"message"`
+ SetFlags map[string]any `yaml:"set_flags"`
+ Check *Condition `yaml:"check"`
+}