BREAKING CHANGES: - Relationship syntax now requires blocks for all participants - Removed self/other perspective blocks from relationships - Replaced 'guard' keyword with 'if' for behavior tree decorators Language Features: - Add tree-sitter grammar with improved if/condition disambiguation - Add comprehensive tutorial and reference documentation - Add SBIR v0.2.0 binary format specification - Add resource linking system for behaviors and schedules - Add year-long schedule patterns (day, season, recurrence) - Add behavior tree enhancements (named nodes, decorators) Documentation: - Complete tutorial series (9 chapters) with baker family examples - Complete reference documentation for all language features - SBIR v0.2.0 specification with binary format details - Added locations and institutions documentation Examples: - Convert all examples to baker family scenario - Add comprehensive working examples Tooling: - Zed extension with LSP integration - Tree-sitter grammar for syntax highlighting - Build scripts and development tools Version Updates: - Main package: 0.1.0 → 0.2.0 - Tree-sitter grammar: 0.1.0 → 0.2.0 - Zed extension: 0.1.0 → 0.2.0 - Storybook editor: 0.1.0 → 0.2.0
76 lines
1.9 KiB
Plaintext
76 lines
1.9 KiB
Plaintext
//! White Rabbit: The anxious herald of Wonderland
|
|
|
|
use schema::core_enums::{Size, EmotionalState};
|
|
use schema::templates::{WonderlandCreature, CourtMember};
|
|
use schema::beings::Rabbit;
|
|
|
|
character WhiteRabbit: Rabbit from WonderlandCreature, CourtMember {
|
|
// Physical traits
|
|
current_size: small
|
|
wears_waistcoat: true
|
|
has_pocket_watch: true
|
|
|
|
// Personality
|
|
emotional_state: frightened
|
|
follows_logic: true
|
|
awareness_of_absurdity: 0.3
|
|
|
|
// Court relations
|
|
loyalty_to_queen: 0.95
|
|
times_threatened_with_beheading: 47
|
|
survival_instinct: 1.0
|
|
|
|
// Time obsession
|
|
minutes_late: 2..1000 // Always perceives himself as late
|
|
watch_checks_per_hour: 30
|
|
|
|
---appearance
|
|
A white rabbit with pink eyes, dressed in a waistcoat with a
|
|
watch-pocket. Constantly glances at his pocket watch while
|
|
muttering "Oh dear! Oh dear! I shall be too late!"
|
|
---
|
|
}
|
|
|
|
behavior WhiteRabbit_ConstantlyLate {
|
|
---description
|
|
Models the White Rabbit's perpetual anxiety about time and
|
|
his duties to the Queen. Uses a selector to try multiple
|
|
panic responses.
|
|
---
|
|
|
|
// Top-level selector: try different panic strategies
|
|
choose panic_response {
|
|
// Sequence: Check time, panic, flee
|
|
then check_time {
|
|
CheckPocketWatch
|
|
RealizeHowLate
|
|
MutterAnxiously
|
|
ScurryToDestination
|
|
}
|
|
|
|
// Sequence: Encounter obstacle, panic more
|
|
then obstacle_panic {
|
|
EncounterObstacle
|
|
DropGloves
|
|
DropFan
|
|
PanicFurther
|
|
ReverseDirection
|
|
}
|
|
|
|
// Sequence: See Queen, extreme panic
|
|
then queen_panic {
|
|
SpotQueen
|
|
FlattenEarsInFear
|
|
TremblingBow
|
|
AwaitCommands
|
|
}
|
|
|
|
// Fallback: Just keep running
|
|
then default_panic {
|
|
CheckWatch
|
|
RunInCircles
|
|
CheckWatchAgain
|
|
}
|
|
}
|
|
}
|