diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a7a95be9..6f8624d2 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.0.0 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -11,6 +11,7 @@ defaults: shell: bash env: PUB_ENVIRONMENT: bot.github +permissions: read-all jobs: job_001: @@ -18,119 +19,127 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead;commands:analyze_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: edgehead_pub_upgrade name: edgehead; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: edgehead - run: dart pub upgrade - name: "edgehead; dart analyze --fatal-infos --fatal-warnings ." + run: dart analyze --fatal-infos --fatal-warnings . if: "always() && steps.edgehead_pub_upgrade.conclusion == 'success'" working-directory: edgehead - run: dart analyze --fatal-infos --fatal-warnings . job_002: - name: "analyze; PKG: egamebook_builder; `dart analyze --fatal-infos --fatal-warnings .`" + name: "analyze; PKG: edgehead; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 - - id: egamebook_builder_pub_upgrade - name: egamebook_builder; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: egamebook_builder + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: edgehead_pub_upgrade + name: edgehead; dart pub upgrade run: dart pub upgrade - - name: "egamebook_builder; dart analyze --fatal-infos --fatal-warnings ." - if: "always() && steps.egamebook_builder_pub_upgrade.conclusion == 'success'" - working-directory: egamebook_builder - run: dart analyze --fatal-infos --fatal-warnings . + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: edgehead + - name: "edgehead; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.edgehead_pub_upgrade.conclusion == 'success'" + working-directory: edgehead job_003: - name: "analyze; PKG: edgehead; `dart format --output=none --set-exit-if-changed .`" + name: "analyze; PKG: egamebook_builder; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 - - id: edgehead_pub_upgrade - name: edgehead; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: edgehead + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: egamebook_builder_pub_upgrade + name: egamebook_builder; dart pub upgrade run: dart pub upgrade - - name: "edgehead; dart format --output=none --set-exit-if-changed ." - if: "always() && steps.edgehead_pub_upgrade.conclusion == 'success'" - working-directory: edgehead + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: egamebook_builder + - name: "egamebook_builder; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.egamebook_builder_pub_upgrade.conclusion == 'success'" + working-directory: egamebook_builder job_004: - name: "analyze; PKG: egamebook_builder; `dart format --output=none --set-exit-if-changed .`" + name: "analyze; PKG: egamebook_builder; `dart analyze --fatal-warnings .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder;commands:analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: egamebook_builder_pub_upgrade name: egamebook_builder; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: egamebook_builder - run: dart pub upgrade - - name: "egamebook_builder; dart format --output=none --set-exit-if-changed ." + - name: "egamebook_builder; dart analyze --fatal-warnings ." + run: dart analyze --fatal-warnings . if: "always() && steps.egamebook_builder_pub_upgrade.conclusion == 'success'" working-directory: egamebook_builder - run: "dart format --output=none --set-exit-if-changed ." job_005: - name: "unit_test; PKG: edgehead; `pub run build_runner build --delete-conflicting-outputs && dart test`" + name: "unit_test; PKG: edgehead; `dart run build_runner build --delete-conflicting-outputs && dart test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:edgehead;commands:command" @@ -139,20 +148,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: edgehead_pub_upgrade name: edgehead; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: edgehead - run: dart pub upgrade - - name: "edgehead; pub run build_runner build --delete-conflicting-outputs && dart test" + - name: "edgehead; dart run build_runner build --delete-conflicting-outputs && dart test" + run: "dart run build_runner build --delete-conflicting-outputs && dart test" if: "always() && steps.edgehead_pub_upgrade.conclusion == 'success'" working-directory: edgehead - run: "pub run build_runner build --delete-conflicting-outputs && dart test" needs: - job_001 - job_002 @@ -163,7 +174,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2.1.7 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:egamebook_builder;commands:test" @@ -172,20 +183,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:stable os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout - uses: actions/checkout@v2.4.0 + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: egamebook_builder_pub_upgrade name: egamebook_builder; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: egamebook_builder - run: dart pub upgrade - name: egamebook_builder; dart test + run: dart test if: "always() && steps.egamebook_builder_pub_upgrade.conclusion == 'success'" working-directory: egamebook_builder - run: dart test needs: - job_001 - job_002 diff --git a/README.md b/README.md index 6576f174..214a0661 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To play the IFCOMP 2017 entry called _Insignificant Little Vermin_, Most development happens inside the subfolders of this monorepo. But for CI, you'll need to use the Dart `mono_repo` package: - pub global activate mono_repo + dart pub global activate mono_repo This installs the `mono_repo` command line tool. diff --git a/edgehead/README.md b/edgehead/README.md index f7f5a681..c68c1047 100644 --- a/edgehead/README.md +++ b/edgehead/README.md @@ -60,7 +60,7 @@ Here are some additional "philosophical" pillars: 4. Go to the `edgehead` sub-project (`cd edgehead`) 5. Install Dart packages (`pub get`) -Now you can try running tests (`pub run test`) or play the game on the command +Now you can try running tests (`dart run test`) or play the game on the command line (`dart --enable-asserts bin/play.dart --log`). ### Playtesting @@ -153,13 +153,13 @@ to Trello cards by dragging and dropping them. Run the following when developing: - pub run build_runner watch --delete-conflicting-outputs + dart run build_runner watch --delete-conflicting-outputs This will make sure that generated files (`*.g.dart`) are regenerated when needed. Most writing is in text files in the `assets/text/` directory. -When the `pub run build_runner watch` watcher is running, it will, among other +When the `dart run build_runner watch` watcher is running, it will, among other things, watch for changes of the text files. It will compile the texts into the `lib/writers_input.compiled.dart` file, which is then used by the game itself. @@ -173,16 +173,16 @@ This is often caused by an earlier problem (for example, hitting save while your `egb.txt` files are in some in-between state), which makes the source generator build the files in the wrong order. The remedy is to run: - pub run build_runner clean + dart run build_runner clean -After this, run the `pub run build_runner watch` command again and all should +After this, run the `dart run build_runner watch` command again and all should be good. Most behavior and game-related code is in the other files in `lib/`. You might want to start with `lib/edgehead_lib.dart`. -To test, run `pub run test`, and to include long-running fuzzy tests, -run `pub run --enable-asserts test --run-skipped`. +To test, run `dart run test`, and to include long-running fuzzy tests, +run `dart run --enable-asserts test --run-skipped`. #### Debug play-testing @@ -206,7 +206,7 @@ variables in the IDE. ### Testing -Run `pub run test` or setup your IDE for continuous unit testing. +Run `dart run test` or setup your IDE for continuous unit testing. Also included are long-running tests that are skipped by default. These tests are "fuzzy" -- meaning that they will try to play the game randomly until @@ -214,7 +214,7 @@ completion or error. Run all the tests, including the long-running ones, using this command: - pub run --enable-asserts test --run-skipped + dart run --enable-asserts test --run-skipped The `--enable-asserts` flag tells Dart to run assertions and generally be more fail-fast. It also makes the code run a few percent slower. @@ -225,7 +225,7 @@ If you're feeling especially paranoid (e.g. before a production release), you can run the fuzzy test in an infinite loop with the following Unix command: ```bash -while pub run --enable-asserts test -t long-running --run-skipped; do :; done +while dart run --enable-asserts test -t long-running --run-skipped; do :; done ``` The command will run forever unless a test fails or until you press `Ctrl-C`. @@ -235,7 +235,7 @@ test suite several times in a row. Like this: ```bash for n in {1..10}; do echo "=== Run number ${n} ==="; \ - pub run --enable-asserts test --run-skipped; done + dart run --enable-asserts test --run-skipped; done ``` #### Sharded testing @@ -243,9 +243,9 @@ for n in {1..10}; do echo "=== Run number ${n} ==="; \ To run tests in parallel, you can use sharding: ```bash -$ pub run --enable-asserts test --total-shards 3 --shard-index 0 --run-skipped -$ pub run --enable-asserts test --total-shards 3 --shard-index 1 --run-skipped -$ pub run --enable-asserts test --total-shards 3 --shard-index 2 --run-skipped +$ dart run --enable-asserts test --total-shards 3 --shard-index 0 --run-skipped +$ dart run --enable-asserts test --total-shards 3 --shard-index 1 --run-skipped +$ dart run --enable-asserts test --total-shards 3 --shard-index 2 --run-skipped ``` ### Playing on the command line diff --git a/edgehead/benchmark/full.dart b/edgehead/benchmark/full.dart index b22e23c2..9e701ab6 100644 --- a/edgehead/benchmark/full.dart +++ b/edgehead/benchmark/full.dart @@ -58,10 +58,10 @@ class FullRunBenchmark extends _BenchmarkBase { /// of the speed of the game (especially the AI). class _BenchmarkBase { final String name; - final _ScoreEmitter emitter; + _ScoreEmitter get emitter => const _PrintEmitter(); // Empty constructor. - const _BenchmarkBase(this.name, {this.emitter = const _PrintEmitter()}); + const _BenchmarkBase(this.name); // The benchmark code. // This function is not used, if both [warmup] and [exercise] are overwritten. diff --git a/edgehead/lib/director/environmental/karl_heard.dart b/edgehead/lib/director/environmental/karl_heard.dart index 6002458b..dfd3b9c0 100644 --- a/edgehead/lib/director/environmental/karl_heard.dart +++ b/edgehead/lib/director/environmental/karl_heard.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; final _karlHeardFirstTime = Rule(_id++, 1, true, (ApplicabilityContext c) { // Only heard from within the Pyramid. diff --git a/edgehead/lib/director/situational/darg_leaves_crowdsource.dart b/edgehead/lib/director/situational/darg_leaves_crowdsource.dart index 18ed91eb..da325066 100644 --- a/edgehead/lib/director/situational/darg_leaves_crowdsource.dart +++ b/edgehead/lib/director/situational/darg_leaves_crowdsource.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; final _dargLeavesCrowdsource = Rule(_id++, 3, true, (ApplicabilityContext c) { return !c.hasHappened(evKilledDarg) && diff --git a/edgehead/lib/director/situational/leroy_quits.dart b/edgehead/lib/director/situational/leroy_quits.dart index 0e72eab0..4277a122 100644 --- a/edgehead/lib/director/situational/leroy_quits.dart +++ b/edgehead/lib/director/situational/leroy_quits.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; final _leroyQuitsAfterGoblinCamp = Rule(_id++, 2, true, (ApplicabilityContext c) { diff --git a/edgehead/lib/director/situational/player_hurts.dart b/edgehead/lib/director/situational/player_hurts.dart index 78aa8a40..632e4863 100644 --- a/edgehead/lib/director/situational/player_hurts.dart +++ b/edgehead/lib/director/situational/player_hurts.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; final _playerHurt = Rule(_id++, 1, false, (ApplicabilityContext c) { return c.isHurt(playerId); diff --git a/edgehead/lib/director/temporal/caravan_arrival.dart b/edgehead/lib/director/temporal/caravan_arrival.dart index f86ae8b9..95c9da4a 100644 --- a/edgehead/lib/director/temporal/caravan_arrival.dart +++ b/edgehead/lib/director/temporal/caravan_arrival.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Caravan Arrival. /// diff --git a/edgehead/lib/director/temporal/caravan_departure.dart b/edgehead/lib/director/temporal/caravan_departure.dart index cc000f56..b86f5718 100644 --- a/edgehead/lib/director/temporal/caravan_departure.dart +++ b/edgehead/lib/director/temporal/caravan_departure.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Caravan Departure /// diff --git a/edgehead/lib/director/temporal/orc_offensive.dart b/edgehead/lib/director/temporal/orc_offensive.dart index c101db21..adc57713 100644 --- a/edgehead/lib/director/temporal/orc_offensive.dart +++ b/edgehead/lib/director/temporal/orc_offensive.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Orc Offensive. /// diff --git a/edgehead/lib/director/temporal/quake_1.dart b/edgehead/lib/director/temporal/quake_1.dart index 336034fd..4cc42b26 100644 --- a/edgehead/lib/director/temporal/quake_1.dart +++ b/edgehead/lib/director/temporal/quake_1.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Quake 1. /// diff --git a/edgehead/lib/director/temporal/quake_2.dart b/edgehead/lib/director/temporal/quake_2.dart index 40de7337..ca868efd 100644 --- a/edgehead/lib/director/temporal/quake_2.dart +++ b/edgehead/lib/director/temporal/quake_2.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Quake 2. /// diff --git a/edgehead/lib/director/temporal/quake_3.dart b/edgehead/lib/director/temporal/quake_3.dart index e788480d..0dd8404d 100644 --- a/edgehead/lib/director/temporal/quake_3.dart +++ b/edgehead/lib/director/temporal/quake_3.dart @@ -1,4 +1,4 @@ -part of edgehead_director; +part of '../../edgehead_director.dart'; /// Quake 3. /// diff --git a/edgehead/lib/edgehead_action_builders_gather.gathered.dart b/edgehead/lib/edgehead_action_builders_gather.gathered.dart index fef5a958..866b6593 100644 --- a/edgehead/lib/edgehead_action_builders_gather.gathered.dart +++ b/edgehead/lib/edgehead_action_builders_gather.gathered.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of edgehead.action_builders; +part of 'edgehead_action_builders_gather.dart'; // ************************************************************************** // InstanceSerializerGenerator diff --git a/edgehead/lib/edgehead_event_callbacks_gather.gathered.dart b/edgehead/lib/edgehead_event_callbacks_gather.gathered.dart index f6a57426..96a3ab05 100644 --- a/edgehead/lib/edgehead_event_callbacks_gather.gathered.dart +++ b/edgehead/lib/edgehead_event_callbacks_gather.gathered.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of edgehead.event_callbacks; +part of 'edgehead_event_callbacks_gather.dart'; // ************************************************************************** // InstanceSerializerGenerator diff --git a/edgehead/lib/edgehead_facts.dart b/edgehead/lib/edgehead_facts.dart index 1b25add9..5e5e8df8 100644 --- a/edgehead/lib/edgehead_facts.dart +++ b/edgehead/lib/edgehead_facts.dart @@ -1,5 +1,3 @@ -library edgehead_facts; - import 'package:edgehead/edgehead_facts_enums.dart'; import 'package:edgehead/edgehead_ids.dart'; import 'package:edgehead/fractal_stories/context.dart'; diff --git a/edgehead/lib/edgehead_global.g.dart b/edgehead/lib/edgehead_global.g.dart index 9d902579..886d9d68 100644 --- a/edgehead/lib/edgehead_global.g.dart +++ b/edgehead/lib/edgehead_global.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of edgehead_global; +part of 'edgehead_global.dart'; // ************************************************************************** // BuiltValueGenerator @@ -40,13 +40,13 @@ class _$EdgeheadGlobalStateSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'isInTesterMode': result.isInTesterMode = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -61,11 +61,11 @@ class _$EdgeheadGlobalState extends EdgeheadGlobalState { factory _$EdgeheadGlobalState( [void Function(EdgeheadGlobalStateBuilder)? updates]) => - (new EdgeheadGlobalStateBuilder()..update(updates)).build(); + (new EdgeheadGlobalStateBuilder()..update(updates))._build(); _$EdgeheadGlobalState._({required this.isInTesterMode}) : super._() { BuiltValueNullFieldError.checkNotNull( - isInTesterMode, 'EdgeheadGlobalState', 'isInTesterMode'); + isInTesterMode, r'EdgeheadGlobalState', 'isInTesterMode'); } @override @@ -86,12 +86,15 @@ class _$EdgeheadGlobalState extends EdgeheadGlobalState { @override int get hashCode { - return $jf($jc(0, isInTesterMode.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, isInTesterMode.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('EdgeheadGlobalState') + return (newBuiltValueToStringHelper(r'EdgeheadGlobalState') ..add('isInTesterMode', isInTesterMode)) .toString(); } @@ -129,14 +132,16 @@ class EdgeheadGlobalStateBuilder } @override - _$EdgeheadGlobalState build() { + EdgeheadGlobalState build() => _build(); + + _$EdgeheadGlobalState _build() { final _$result = _$v ?? new _$EdgeheadGlobalState._( isInTesterMode: BuiltValueNullFieldError.checkNotNull( - isInTesterMode, 'EdgeheadGlobalState', 'isInTesterMode')); + isInTesterMode, r'EdgeheadGlobalState', 'isInTesterMode')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/edgehead_ids_actors.dart b/edgehead/lib/edgehead_ids_actors.dart index 1090a610..f9675798 100644 --- a/edgehead/lib/edgehead_ids_actors.dart +++ b/edgehead/lib/edgehead_ids_actors.dart @@ -1,4 +1,4 @@ -part of edgehead.ids; +part of 'edgehead_ids.dart'; const int albinoGoblinId = 6011; diff --git a/edgehead/lib/edgehead_ids_events.dart b/edgehead/lib/edgehead_ids_events.dart index 2f96e8a2..5cba6ac8 100644 --- a/edgehead/lib/edgehead_ids_events.dart +++ b/edgehead/lib/edgehead_ids_events.dart @@ -1,4 +1,4 @@ -part of edgehead.ids; +part of 'edgehead_ids.dart'; const evCaravanArrived = "evCaravanArrived"; diff --git a/edgehead/lib/edgehead_ids_items.dart b/edgehead/lib/edgehead_ids_items.dart index e1a5a2ae..fb31bc50 100644 --- a/edgehead/lib/edgehead_ids_items.dart +++ b/edgehead/lib/edgehead_ids_items.dart @@ -1,4 +1,4 @@ -part of edgehead.ids; +part of 'edgehead_ids.dart'; const int akxeId = 77012; diff --git a/edgehead/lib/edgehead_lib.dart b/edgehead/lib/edgehead_lib.dart index b8f56746..3f04caad 100644 --- a/edgehead/lib/edgehead_lib.dart +++ b/edgehead/lib/edgehead_lib.dart @@ -211,14 +211,12 @@ class EdgeheadGame extends Book { "Tried using sanity when ${actor.name} had none left."); storyline.addCustomElement(StatUpdate.sanity(actor.sanity, -1)); builder.updateActorById(actor.id, (b) => b.sanity = b.sanity! - 1); - break; case Resource.stamina: assert(consequence.world.getActorById(actor.id).stamina > 0, "Tried using stamina when ${actor.name} had none left."); storyline.addCustomElement(StatUpdate.stamina(actor.stamina, -1)); builder.updateActorById( actor.id, (b) => b..stamina = b.stamina! - 1); - break; } world = builder.build(); consequence = PlanConsequence.withUpdatedWorld(consequence, world); @@ -582,7 +580,7 @@ class EdgeheadGame extends Book { } } -/// An exception to be thrown when [new EdgeheadGame] is called with +/// An exception to be thrown when [EdgeheadGame.new] is called with /// an outdated or corrupt savegame. class EdgeheadSaveGameParseException implements Exception { final Error? underlyingError; diff --git a/edgehead/lib/edgehead_serializers.g.dart b/edgehead/lib/edgehead_serializers.g.dart index 9176177f..15857bfc 100644 --- a/edgehead/lib/edgehead_serializers.g.dart +++ b/edgehead/lib/edgehead_serializers.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of edgehead.serializers; +part of 'edgehead_serializers.dart'; // ************************************************************************** // BuiltValueGenerator @@ -130,4 +130,4 @@ Serializers _$serializers = (new Serializers().toBuilder() () => new SetBuilder())) .build(); -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/commands/command_base.g.dart b/edgehead/lib/egamebook/commands/command_base.g.dart index 79b6c5e8..b18fe403 100644 --- a/edgehead/lib/egamebook/commands/command_base.g.dart +++ b/edgehead/lib/egamebook/commands/command_base.g.dart @@ -6,9 +6,9 @@ part of 'command_base.dart'; // BuiltValueGenerator // ************************************************************************** -abstract class CommandBaseBuilder { +abstract mixin class CommandBaseBuilder { void replace(CommandBase other); void update(void Function(CommandBaseBuilder) updates); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/commands/load_game_command.g.dart b/edgehead/lib/egamebook/commands/load_game_command.g.dart index 593fb59e..ff444d5c 100644 --- a/edgehead/lib/egamebook/commands/load_game_command.g.dart +++ b/edgehead/lib/egamebook/commands/load_game_command.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.command.load_game; +part of 'load_game_command.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,13 +33,13 @@ class _$LoadGameSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'saveGameSerialized': result.saveGameSerialized = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -53,11 +53,11 @@ class _$LoadGame extends LoadGame { final String saveGameSerialized; factory _$LoadGame([void Function(LoadGameBuilder)? updates]) => - (new LoadGameBuilder()..update(updates)).build(); + (new LoadGameBuilder()..update(updates))._build(); _$LoadGame._({required this.saveGameSerialized}) : super._() { BuiltValueNullFieldError.checkNotNull( - saveGameSerialized, 'LoadGame', 'saveGameSerialized'); + saveGameSerialized, r'LoadGame', 'saveGameSerialized'); } @override @@ -75,12 +75,15 @@ class _$LoadGame extends LoadGame { @override int get hashCode { - return $jf($jc(0, saveGameSerialized.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, saveGameSerialized.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('LoadGame') + return (newBuiltValueToStringHelper(r'LoadGame') ..add('saveGameSerialized', saveGameSerialized)) .toString(); } @@ -117,14 +120,16 @@ class LoadGameBuilder implements Builder { } @override - _$LoadGame build() { + LoadGame build() => _build(); + + _$LoadGame _build() { final _$result = _$v ?? new _$LoadGame._( saveGameSerialized: BuiltValueNullFieldError.checkNotNull( - saveGameSerialized, 'LoadGame', 'saveGameSerialized')); + saveGameSerialized, r'LoadGame', 'saveGameSerialized')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/commands/pick_choice_command.g.dart b/edgehead/lib/egamebook/commands/pick_choice_command.g.dart index 3b43392e..692ed431 100644 --- a/edgehead/lib/egamebook/commands/pick_choice_command.g.dart +++ b/edgehead/lib/egamebook/commands/pick_choice_command.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.command.pick_choice; +part of 'pick_choice_command.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,7 +33,7 @@ class _$PickChoiceSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -53,10 +53,10 @@ class _$PickChoice extends PickChoice { final Choice choice; factory _$PickChoice([void Function(PickChoiceBuilder)? updates]) => - (new PickChoiceBuilder()..update(updates)).build(); + (new PickChoiceBuilder()..update(updates))._build(); _$PickChoice._({required this.choice}) : super._() { - BuiltValueNullFieldError.checkNotNull(choice, 'PickChoice', 'choice'); + BuiltValueNullFieldError.checkNotNull(choice, r'PickChoice', 'choice'); } @override @@ -74,12 +74,15 @@ class _$PickChoice extends PickChoice { @override int get hashCode { - return $jf($jc(0, choice.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, choice.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('PickChoice')..add('choice', choice)) + return (newBuiltValueToStringHelper(r'PickChoice')..add('choice', choice)) .toString(); } } @@ -114,7 +117,9 @@ class PickChoiceBuilder implements Builder { } @override - _$PickChoice build() { + PickChoice build() => _build(); + + _$PickChoice _build() { _$PickChoice _$result; try { _$result = _$v ?? new _$PickChoice._(choice: choice.build()); @@ -125,7 +130,7 @@ class PickChoiceBuilder implements Builder { choice.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'PickChoice', _$failedField, e.toString()); + r'PickChoice', _$failedField, e.toString()); } rethrow; } @@ -134,4 +139,4 @@ class PickChoiceBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/commands/resolve_slot_machine_command.dart b/edgehead/lib/egamebook/commands/resolve_slot_machine_command.dart index 8c92dc20..5d1d7abc 100644 --- a/edgehead/lib/egamebook/commands/resolve_slot_machine_command.dart +++ b/edgehead/lib/egamebook/commands/resolve_slot_machine_command.dart @@ -41,7 +41,7 @@ class SlotResult extends EnumClass { static BuiltSet get values => _$values; - const SlotResult._(String name) : super(name); + const SlotResult._(super.name); slot.Result get asResult { switch (this) { case success: diff --git a/edgehead/lib/egamebook/commands/resolve_slot_machine_command.g.dart b/edgehead/lib/egamebook/commands/resolve_slot_machine_command.g.dart index 6cf08b5e..88d401a2 100644 --- a/edgehead/lib/egamebook/commands/resolve_slot_machine_command.g.dart +++ b/edgehead/lib/egamebook/commands/resolve_slot_machine_command.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.command.resolve_slot_machine; +part of 'resolve_slot_machine_command.dart'; // ************************************************************************** // BuiltValueGenerator @@ -69,17 +69,17 @@ class _$ResolveSlotMachineSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'result': result.result = serializers.deserialize(value, - specifiedType: const FullType(SlotResult)) as SlotResult; + specifiedType: const FullType(SlotResult))! as SlotResult; break; case 'wasRerolled': result.wasRerolled = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -113,14 +113,14 @@ class _$ResolveSlotMachine extends ResolveSlotMachine { factory _$ResolveSlotMachine( [void Function(ResolveSlotMachineBuilder)? updates]) => - (new ResolveSlotMachineBuilder()..update(updates)).build(); + (new ResolveSlotMachineBuilder()..update(updates))._build(); _$ResolveSlotMachine._({required this.result, required this.wasRerolled}) : super._() { BuiltValueNullFieldError.checkNotNull( - result, 'ResolveSlotMachine', 'result'); + result, r'ResolveSlotMachine', 'result'); BuiltValueNullFieldError.checkNotNull( - wasRerolled, 'ResolveSlotMachine', 'wasRerolled'); + wasRerolled, r'ResolveSlotMachine', 'wasRerolled'); } @override @@ -142,12 +142,16 @@ class _$ResolveSlotMachine extends ResolveSlotMachine { @override int get hashCode { - return $jf($jc($jc(0, result.hashCode), wasRerolled.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, result.hashCode); + _$hash = $jc(_$hash, wasRerolled.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ResolveSlotMachine') + return (newBuiltValueToStringHelper(r'ResolveSlotMachine') ..add('result', result) ..add('wasRerolled', wasRerolled)) .toString(); @@ -190,16 +194,18 @@ class ResolveSlotMachineBuilder } @override - _$ResolveSlotMachine build() { + ResolveSlotMachine build() => _build(); + + _$ResolveSlotMachine _build() { final _$result = _$v ?? new _$ResolveSlotMachine._( result: BuiltValueNullFieldError.checkNotNull( - result, 'ResolveSlotMachine', 'result'), + result, r'ResolveSlotMachine', 'result'), wasRerolled: BuiltValueNullFieldError.checkNotNull( - wasRerolled, 'ResolveSlotMachine', 'wasRerolled')); + wasRerolled, r'ResolveSlotMachine', 'wasRerolled')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/commands/serializers.g.dart b/edgehead/lib/egamebook/commands/serializers.g.dart index bc1ab05a..75715895 100644 --- a/edgehead/lib/egamebook/commands/serializers.g.dart +++ b/edgehead/lib/egamebook/commands/serializers.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.command.serializers; +part of 'serializers.dart'; // ************************************************************************** // BuiltValueGenerator @@ -23,4 +23,4 @@ Serializers _$serializers = (new Serializers().toBuilder() () => new ListBuilder())) .build(); -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/choice_block_element.g.dart b/edgehead/lib/egamebook/elements/choice_block_element.g.dart index 2a20f50d..f90f5974 100644 --- a/edgehead/lib/egamebook/elements/choice_block_element.g.dart +++ b/edgehead/lib/egamebook/elements/choice_block_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.choice_block; +part of 'choice_block_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -37,7 +37,7 @@ class _$ChoiceBlockSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -65,11 +65,11 @@ class _$ChoiceBlock extends ChoiceBlock { final SaveGame saveGame; factory _$ChoiceBlock([void Function(ChoiceBlockBuilder)? updates]) => - (new ChoiceBlockBuilder()..update(updates)).build(); + (new ChoiceBlockBuilder()..update(updates))._build(); _$ChoiceBlock._({required this.choices, required this.saveGame}) : super._() { - BuiltValueNullFieldError.checkNotNull(choices, 'ChoiceBlock', 'choices'); - BuiltValueNullFieldError.checkNotNull(saveGame, 'ChoiceBlock', 'saveGame'); + BuiltValueNullFieldError.checkNotNull(choices, r'ChoiceBlock', 'choices'); + BuiltValueNullFieldError.checkNotNull(saveGame, r'ChoiceBlock', 'saveGame'); } @override @@ -89,12 +89,16 @@ class _$ChoiceBlock extends ChoiceBlock { @override int get hashCode { - return $jf($jc($jc(0, choices.hashCode), saveGame.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, choices.hashCode); + _$hash = $jc(_$hash, saveGame.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ChoiceBlock') + return (newBuiltValueToStringHelper(r'ChoiceBlock') ..add('choices', choices) ..add('saveGame', saveGame)) .toString(); @@ -137,7 +141,9 @@ class ChoiceBlockBuilder implements Builder { } @override - _$ChoiceBlock build() { + ChoiceBlock build() => _build(); + + _$ChoiceBlock _build() { _$ChoiceBlock _$result; try { _$result = _$v ?? @@ -152,7 +158,7 @@ class ChoiceBlockBuilder implements Builder { saveGame.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'ChoiceBlock', _$failedField, e.toString()); + r'ChoiceBlock', _$failedField, e.toString()); } rethrow; } @@ -161,4 +167,4 @@ class ChoiceBlockBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/choice_element.g.dart b/edgehead/lib/egamebook/elements/choice_element.g.dart index 8e62c888..d8e72955 100644 --- a/edgehead/lib/egamebook/elements/choice_element.g.dart +++ b/edgehead/lib/egamebook/elements/choice_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.choice; +part of 'choice_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -61,13 +61,13 @@ class _$ChoiceSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'actionName': result.actionName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'additionalData': result.additionalData.replace(serializers.deserialize(value, @@ -88,7 +88,7 @@ class _$ChoiceSerializer implements StructuredSerializer { break; case 'commandSentence': result.commandSentence = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'helpMessage': result.helpMessage = serializers.deserialize(value, @@ -96,11 +96,11 @@ class _$ChoiceSerializer implements StructuredSerializer { break; case 'isImplicit': result.isImplicit = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'successChance': result.successChance = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; + specifiedType: const FullType(double))! as double; break; } } @@ -128,7 +128,7 @@ class _$Choice extends Choice { final double successChance; factory _$Choice([void Function(ChoiceBuilder)? updates]) => - (new ChoiceBuilder()..update(updates)).build(); + (new ChoiceBuilder()..update(updates))._build(); _$Choice._( {required this.actionName, @@ -140,17 +140,18 @@ class _$Choice extends Choice { required this.isImplicit, required this.successChance}) : super._() { - BuiltValueNullFieldError.checkNotNull(actionName, 'Choice', 'actionName'); + BuiltValueNullFieldError.checkNotNull(actionName, r'Choice', 'actionName'); BuiltValueNullFieldError.checkNotNull( - additionalData, 'Choice', 'additionalData'); + additionalData, r'Choice', 'additionalData'); BuiltValueNullFieldError.checkNotNull( - additionalStrings, 'Choice', 'additionalStrings'); - BuiltValueNullFieldError.checkNotNull(commandPath, 'Choice', 'commandPath'); + additionalStrings, r'Choice', 'additionalStrings'); BuiltValueNullFieldError.checkNotNull( - commandSentence, 'Choice', 'commandSentence'); - BuiltValueNullFieldError.checkNotNull(isImplicit, 'Choice', 'isImplicit'); + commandPath, r'Choice', 'commandPath'); BuiltValueNullFieldError.checkNotNull( - successChance, 'Choice', 'successChance'); + commandSentence, r'Choice', 'commandSentence'); + BuiltValueNullFieldError.checkNotNull(isImplicit, r'Choice', 'isImplicit'); + BuiltValueNullFieldError.checkNotNull( + successChance, r'Choice', 'successChance'); } @override @@ -176,25 +177,22 @@ class _$Choice extends Choice { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, actionName.hashCode), - additionalData.hashCode), - additionalStrings.hashCode), - commandPath.hashCode), - commandSentence.hashCode), - helpMessage.hashCode), - isImplicit.hashCode), - successChance.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actionName.hashCode); + _$hash = $jc(_$hash, additionalData.hashCode); + _$hash = $jc(_$hash, additionalStrings.hashCode); + _$hash = $jc(_$hash, commandPath.hashCode); + _$hash = $jc(_$hash, commandSentence.hashCode); + _$hash = $jc(_$hash, helpMessage.hashCode); + _$hash = $jc(_$hash, isImplicit.hashCode); + _$hash = $jc(_$hash, successChance.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('Choice') + return (newBuiltValueToStringHelper(r'Choice') ..add('actionName', actionName) ..add('additionalData', additionalData) ..add('additionalStrings', additionalStrings) @@ -280,23 +278,25 @@ class ChoiceBuilder implements Builder { } @override - _$Choice build() { + Choice build() => _build(); + + _$Choice _build() { _$Choice _$result; try { _$result = _$v ?? new _$Choice._( actionName: BuiltValueNullFieldError.checkNotNull( - actionName, 'Choice', 'actionName'), + actionName, r'Choice', 'actionName'), additionalData: additionalData.build(), additionalStrings: additionalStrings.build(), commandPath: commandPath.build(), commandSentence: BuiltValueNullFieldError.checkNotNull( - commandSentence, 'Choice', 'commandSentence'), + commandSentence, r'Choice', 'commandSentence'), helpMessage: helpMessage, isImplicit: BuiltValueNullFieldError.checkNotNull( - isImplicit, 'Choice', 'isImplicit'), + isImplicit, r'Choice', 'isImplicit'), successChance: BuiltValueNullFieldError.checkNotNull( - successChance, 'Choice', 'successChance')); + successChance, r'Choice', 'successChance')); } catch (_) { late String _$failedField; try { @@ -308,7 +308,7 @@ class ChoiceBuilder implements Builder { commandPath.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'Choice', _$failedField, e.toString()); + r'Choice', _$failedField, e.toString()); } rethrow; } @@ -317,4 +317,4 @@ class ChoiceBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/choice_tree.dart b/edgehead/lib/egamebook/elements/choice_tree.dart index 63951adb..0d35cdc1 100644 --- a/edgehead/lib/egamebook/elements/choice_tree.dart +++ b/edgehead/lib/egamebook/elements/choice_tree.dart @@ -48,7 +48,7 @@ ChoiceTreeNode _makeNode(int order, String prefix, Iterable<_Choice> choices) { // A closure that gets the current prefix of a choice. For example, in // order 0, the prefix will be always "", for level 1 it could be "Attack", // and for level 2 it could be "goblin". - String _getPrefix(_Choice choice) { + String getPrefix(_Choice choice) { if (order == 0) return ''; assert( order - 1 < choice.commandPath.length, @@ -60,7 +60,7 @@ ChoiceTreeNode _makeNode(int order, String prefix, Iterable<_Choice> choices) { // Group all non-single choices by current prefix. final nonSingles = list.where((choice) => !singles.contains(choice)); - final groups = _groupBy(nonSingles, _getPrefix); + final groups = _groupBy(nonSingles, getPrefix); return ChoiceTreeNode( order, diff --git a/edgehead/lib/egamebook/elements/element_base.g.dart b/edgehead/lib/egamebook/elements/element_base.g.dart index 0bed75b3..6042f0f2 100644 --- a/edgehead/lib/egamebook/elements/element_base.g.dart +++ b/edgehead/lib/egamebook/elements/element_base.g.dart @@ -6,9 +6,9 @@ part of 'element_base.dart'; // BuiltValueGenerator // ************************************************************************** -abstract class ElementBaseBuilder { +abstract mixin class ElementBaseBuilder { void replace(ElementBase other); void update(void Function(ElementBaseBuilder) updates); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/error_element.g.dart b/edgehead/lib/egamebook/elements/error_element.g.dart index a5ddca36..4b181c0b 100644 --- a/edgehead/lib/egamebook/elements/error_element.g.dart +++ b/edgehead/lib/egamebook/elements/error_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.error; +part of 'error_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -38,17 +38,17 @@ class _$ErrorElementSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'message': result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'stackTrace': result.stackTrace = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -64,13 +64,13 @@ class _$ErrorElement extends ErrorElement { final String stackTrace; factory _$ErrorElement([void Function(ErrorElementBuilder)? updates]) => - (new ErrorElementBuilder()..update(updates)).build(); + (new ErrorElementBuilder()..update(updates))._build(); _$ErrorElement._({required this.message, required this.stackTrace}) : super._() { - BuiltValueNullFieldError.checkNotNull(message, 'ErrorElement', 'message'); + BuiltValueNullFieldError.checkNotNull(message, r'ErrorElement', 'message'); BuiltValueNullFieldError.checkNotNull( - stackTrace, 'ErrorElement', 'stackTrace'); + stackTrace, r'ErrorElement', 'stackTrace'); } @override @@ -90,12 +90,16 @@ class _$ErrorElement extends ErrorElement { @override int get hashCode { - return $jf($jc($jc(0, message.hashCode), stackTrace.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, message.hashCode); + _$hash = $jc(_$hash, stackTrace.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ErrorElement') + return (newBuiltValueToStringHelper(r'ErrorElement') ..add('message', message) ..add('stackTrace', stackTrace)) .toString(); @@ -138,16 +142,18 @@ class ErrorElementBuilder } @override - _$ErrorElement build() { + ErrorElement build() => _build(); + + _$ErrorElement _build() { final _$result = _$v ?? new _$ErrorElement._( message: BuiltValueNullFieldError.checkNotNull( - message, 'ErrorElement', 'message'), + message, r'ErrorElement', 'message'), stackTrace: BuiltValueNullFieldError.checkNotNull( - stackTrace, 'ErrorElement', 'stackTrace')); + stackTrace, r'ErrorElement', 'stackTrace')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/log_element.g.dart b/edgehead/lib/egamebook/elements/log_element.g.dart index c4efd840..2b3f2c05 100644 --- a/edgehead/lib/egamebook/elements/log_element.g.dart +++ b/edgehead/lib/egamebook/elements/log_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.log; +part of 'log_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -36,17 +36,17 @@ class _$LogElementSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'level': result.level = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'message': result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -62,11 +62,11 @@ class _$LogElement extends LogElement { final String message; factory _$LogElement([void Function(LogElementBuilder)? updates]) => - (new LogElementBuilder()..update(updates)).build(); + (new LogElementBuilder()..update(updates))._build(); _$LogElement._({required this.level, required this.message}) : super._() { - BuiltValueNullFieldError.checkNotNull(level, 'LogElement', 'level'); - BuiltValueNullFieldError.checkNotNull(message, 'LogElement', 'message'); + BuiltValueNullFieldError.checkNotNull(level, r'LogElement', 'level'); + BuiltValueNullFieldError.checkNotNull(message, r'LogElement', 'message'); } @override @@ -86,12 +86,16 @@ class _$LogElement extends LogElement { @override int get hashCode { - return $jf($jc($jc(0, level.hashCode), message.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, level.hashCode); + _$hash = $jc(_$hash, message.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('LogElement') + return (newBuiltValueToStringHelper(r'LogElement') ..add('level', level) ..add('message', message)) .toString(); @@ -133,16 +137,18 @@ class LogElementBuilder implements Builder { } @override - _$LogElement build() { + LogElement build() => _build(); + + _$LogElement _build() { final _$result = _$v ?? new _$LogElement._( level: BuiltValueNullFieldError.checkNotNull( - level, 'LogElement', 'level'), + level, r'LogElement', 'level'), message: BuiltValueNullFieldError.checkNotNull( - message, 'LogElement', 'message')); + message, r'LogElement', 'message')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/lose_element.g.dart b/edgehead/lib/egamebook/elements/lose_element.g.dart index 885aae76..e46cdb45 100644 --- a/edgehead/lib/egamebook/elements/lose_element.g.dart +++ b/edgehead/lib/egamebook/elements/lose_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.lose; +part of 'lose_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,13 +33,13 @@ class _$LoseGameSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'markdownText': result.markdownText = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -53,11 +53,11 @@ class _$LoseGame extends LoseGame { final String markdownText; factory _$LoseGame([void Function(LoseGameBuilder)? updates]) => - (new LoseGameBuilder()..update(updates)).build(); + (new LoseGameBuilder()..update(updates))._build(); _$LoseGame._({required this.markdownText}) : super._() { BuiltValueNullFieldError.checkNotNull( - markdownText, 'LoseGame', 'markdownText'); + markdownText, r'LoseGame', 'markdownText'); } @override @@ -75,12 +75,15 @@ class _$LoseGame extends LoseGame { @override int get hashCode { - return $jf($jc(0, markdownText.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, markdownText.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('LoseGame') + return (newBuiltValueToStringHelper(r'LoseGame') ..add('markdownText', markdownText)) .toString(); } @@ -116,14 +119,16 @@ class LoseGameBuilder implements Builder { } @override - _$LoseGame build() { + LoseGame build() => _build(); + + _$LoseGame _build() { final _$result = _$v ?? new _$LoseGame._( markdownText: BuiltValueNullFieldError.checkNotNull( - markdownText, 'LoseGame', 'markdownText')); + markdownText, r'LoseGame', 'markdownText')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/save_element.g.dart b/edgehead/lib/egamebook/elements/save_element.g.dart index e69aa48c..fe67d43d 100644 --- a/edgehead/lib/egamebook/elements/save_element.g.dart +++ b/edgehead/lib/egamebook/elements/save_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.save; +part of 'save_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,13 +33,13 @@ class _$SaveGameSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'saveGameSerialized': result.saveGameSerialized = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -53,11 +53,11 @@ class _$SaveGame extends SaveGame { final String saveGameSerialized; factory _$SaveGame([void Function(SaveGameBuilder)? updates]) => - (new SaveGameBuilder()..update(updates)).build(); + (new SaveGameBuilder()..update(updates))._build(); _$SaveGame._({required this.saveGameSerialized}) : super._() { BuiltValueNullFieldError.checkNotNull( - saveGameSerialized, 'SaveGame', 'saveGameSerialized'); + saveGameSerialized, r'SaveGame', 'saveGameSerialized'); } @override @@ -75,12 +75,15 @@ class _$SaveGame extends SaveGame { @override int get hashCode { - return $jf($jc(0, saveGameSerialized.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, saveGameSerialized.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('SaveGame') + return (newBuiltValueToStringHelper(r'SaveGame') ..add('saveGameSerialized', saveGameSerialized)) .toString(); } @@ -117,14 +120,16 @@ class SaveGameBuilder implements Builder { } @override - _$SaveGame build() { + SaveGame build() => _build(); + + _$SaveGame _build() { final _$result = _$v ?? new _$SaveGame._( saveGameSerialized: BuiltValueNullFieldError.checkNotNull( - saveGameSerialized, 'SaveGame', 'saveGameSerialized')); + saveGameSerialized, r'SaveGame', 'saveGameSerialized')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/serializers.g.dart b/edgehead/lib/egamebook/elements/serializers.g.dart index dbd80e0b..e2220e3f 100644 --- a/edgehead/lib/egamebook/elements/serializers.g.dart +++ b/edgehead/lib/egamebook/elements/serializers.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.serializers; +part of 'serializers.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,4 +33,4 @@ Serializers _$serializers = (new Serializers().toBuilder() () => new ListBuilder())) .build(); -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/slot_machine_element.g.dart b/edgehead/lib/egamebook/elements/slot_machine_element.g.dart index 9ea3c9ac..36c7cad2 100644 --- a/edgehead/lib/egamebook/elements/slot_machine_element.g.dart +++ b/edgehead/lib/egamebook/elements/slot_machine_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.slot_machine; +part of 'slot_machine_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -46,17 +46,17 @@ class _$SlotMachineSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'probability': result.probability = serializers.deserialize(value, - specifiedType: const FullType(double)) as double; + specifiedType: const FullType(double))! as double; break; case 'rerollable': result.rerollable = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'rerollEffectDescription': result.rerollEffectDescription = serializers.deserialize(value, @@ -64,7 +64,7 @@ class _$SlotMachineSerializer implements StructuredSerializer { break; case 'rollReason': result.rollReason = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -84,7 +84,7 @@ class _$SlotMachine extends SlotMachine { final String rollReason; factory _$SlotMachine([void Function(SlotMachineBuilder)? updates]) => - (new SlotMachineBuilder()..update(updates)).build(); + (new SlotMachineBuilder()..update(updates))._build(); _$SlotMachine._( {required this.probability, @@ -93,11 +93,11 @@ class _$SlotMachine extends SlotMachine { required this.rollReason}) : super._() { BuiltValueNullFieldError.checkNotNull( - probability, 'SlotMachine', 'probability'); + probability, r'SlotMachine', 'probability'); BuiltValueNullFieldError.checkNotNull( - rerollable, 'SlotMachine', 'rerollable'); + rerollable, r'SlotMachine', 'rerollable'); BuiltValueNullFieldError.checkNotNull( - rollReason, 'SlotMachine', 'rollReason'); + rollReason, r'SlotMachine', 'rollReason'); } @override @@ -119,15 +119,18 @@ class _$SlotMachine extends SlotMachine { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, probability.hashCode), rerollable.hashCode), - rerollEffectDescription.hashCode), - rollReason.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, probability.hashCode); + _$hash = $jc(_$hash, rerollable.hashCode); + _$hash = $jc(_$hash, rerollEffectDescription.hashCode); + _$hash = $jc(_$hash, rollReason.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('SlotMachine') + return (newBuiltValueToStringHelper(r'SlotMachine') ..add('probability', probability) ..add('rerollable', rerollable) ..add('rerollEffectDescription', rerollEffectDescription) @@ -182,19 +185,21 @@ class SlotMachineBuilder implements Builder { } @override - _$SlotMachine build() { + SlotMachine build() => _build(); + + _$SlotMachine _build() { final _$result = _$v ?? new _$SlotMachine._( probability: BuiltValueNullFieldError.checkNotNull( - probability, 'SlotMachine', 'probability'), + probability, r'SlotMachine', 'probability'), rerollable: BuiltValueNullFieldError.checkNotNull( - rerollable, 'SlotMachine', 'rerollable'), + rerollable, r'SlotMachine', 'rerollable'), rerollEffectDescription: rerollEffectDescription, rollReason: BuiltValueNullFieldError.checkNotNull( - rollReason, 'SlotMachine', 'rollReason')); + rollReason, r'SlotMachine', 'rollReason')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/stat_initialization_element.g.dart b/edgehead/lib/egamebook/elements/stat_initialization_element.g.dart index bd631ee4..0732e9ba 100644 --- a/edgehead/lib/egamebook/elements/stat_initialization_element.g.dart +++ b/edgehead/lib/egamebook/elements/stat_initialization_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.stat_initialization; +part of 'stat_initialization_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -39,17 +39,17 @@ class _$StatInitializationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'initialValue': result.initialValue = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -66,13 +66,13 @@ class _$StatInitialization extends StatInitialization { factory _$StatInitialization( [void Function(StatInitializationBuilder)? updates]) => - (new StatInitializationBuilder()..update(updates)).build(); + (new StatInitializationBuilder()..update(updates))._build(); _$StatInitialization._({required this.initialValue, required this.name}) : super._() { BuiltValueNullFieldError.checkNotNull( - initialValue, 'StatInitialization', 'initialValue'); - BuiltValueNullFieldError.checkNotNull(name, 'StatInitialization', 'name'); + initialValue, r'StatInitialization', 'initialValue'); + BuiltValueNullFieldError.checkNotNull(name, r'StatInitialization', 'name'); } @override @@ -94,12 +94,16 @@ class _$StatInitialization extends StatInitialization { @override int get hashCode { - return $jf($jc($jc(0, initialValue.hashCode), name.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, initialValue.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('StatInitialization') + return (newBuiltValueToStringHelper(r'StatInitialization') ..add('initialValue', initialValue) ..add('name', name)) .toString(); @@ -142,16 +146,18 @@ class StatInitializationBuilder } @override - _$StatInitialization build() { + StatInitialization build() => _build(); + + _$StatInitialization _build() { final _$result = _$v ?? new _$StatInitialization._( initialValue: BuiltValueNullFieldError.checkNotNull( - initialValue, 'StatInitialization', 'initialValue'), + initialValue, r'StatInitialization', 'initialValue'), name: BuiltValueNullFieldError.checkNotNull( - name, 'StatInitialization', 'name')); + name, r'StatInitialization', 'name')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/stat_update_element.g.dart b/edgehead/lib/egamebook/elements/stat_update_element.g.dart index 63f63a7a..d44e97b1 100644 --- a/edgehead/lib/egamebook/elements/stat_update_element.g.dart +++ b/edgehead/lib/egamebook/elements/stat_update_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.stat_update; +part of 'stat_update_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -37,21 +37,21 @@ class _$StatUpdateSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'change': result.change = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'newValue': result.newValue = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -69,14 +69,14 @@ class _$StatUpdate extends StatUpdate { final int newValue; factory _$StatUpdate([void Function(StatUpdateBuilder)? updates]) => - (new StatUpdateBuilder()..update(updates)).build(); + (new StatUpdateBuilder()..update(updates))._build(); _$StatUpdate._( {required this.change, required this.name, required this.newValue}) : super._() { - BuiltValueNullFieldError.checkNotNull(change, 'StatUpdate', 'change'); - BuiltValueNullFieldError.checkNotNull(name, 'StatUpdate', 'name'); - BuiltValueNullFieldError.checkNotNull(newValue, 'StatUpdate', 'newValue'); + BuiltValueNullFieldError.checkNotNull(change, r'StatUpdate', 'change'); + BuiltValueNullFieldError.checkNotNull(name, r'StatUpdate', 'name'); + BuiltValueNullFieldError.checkNotNull(newValue, r'StatUpdate', 'newValue'); } @override @@ -97,13 +97,17 @@ class _$StatUpdate extends StatUpdate { @override int get hashCode { - return $jf( - $jc($jc($jc(0, change.hashCode), name.hashCode), newValue.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, change.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, newValue.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('StatUpdate') + return (newBuiltValueToStringHelper(r'StatUpdate') ..add('change', change) ..add('name', name) ..add('newValue', newValue)) @@ -151,18 +155,20 @@ class StatUpdateBuilder implements Builder { } @override - _$StatUpdate build() { + StatUpdate build() => _build(); + + _$StatUpdate _build() { final _$result = _$v ?? new _$StatUpdate._( change: BuiltValueNullFieldError.checkNotNull( - change, 'StatUpdate', 'change'), + change, r'StatUpdate', 'change'), name: BuiltValueNullFieldError.checkNotNull( - name, 'StatUpdate', 'name'), + name, r'StatUpdate', 'name'), newValue: BuiltValueNullFieldError.checkNotNull( - newValue, 'StatUpdate', 'newValue')); + newValue, r'StatUpdate', 'newValue')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/text_element.g.dart b/edgehead/lib/egamebook/elements/text_element.g.dart index 251686ef..915020a4 100644 --- a/edgehead/lib/egamebook/elements/text_element.g.dart +++ b/edgehead/lib/egamebook/elements/text_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.text; +part of 'text_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,13 +33,13 @@ class _$TextOutputSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'markdownText': result.markdownText = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -53,11 +53,11 @@ class _$TextOutput extends TextOutput { final String markdownText; factory _$TextOutput([void Function(TextOutputBuilder)? updates]) => - (new TextOutputBuilder()..update(updates)).build(); + (new TextOutputBuilder()..update(updates))._build(); _$TextOutput._({required this.markdownText}) : super._() { BuiltValueNullFieldError.checkNotNull( - markdownText, 'TextOutput', 'markdownText'); + markdownText, r'TextOutput', 'markdownText'); } @override @@ -75,12 +75,15 @@ class _$TextOutput extends TextOutput { @override int get hashCode { - return $jf($jc(0, markdownText.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, markdownText.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('TextOutput') + return (newBuiltValueToStringHelper(r'TextOutput') ..add('markdownText', markdownText)) .toString(); } @@ -116,14 +119,16 @@ class TextOutputBuilder implements Builder { } @override - _$TextOutput build() { + TextOutput build() => _build(); + + _$TextOutput _build() { final _$result = _$v ?? new _$TextOutput._( markdownText: BuiltValueNullFieldError.checkNotNull( - markdownText, 'TextOutput', 'markdownText')); + markdownText, r'TextOutput', 'markdownText')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/elements/win_element.g.dart b/edgehead/lib/egamebook/elements/win_element.g.dart index 88b52d2b..91e62e32 100644 --- a/edgehead/lib/egamebook/elements/win_element.g.dart +++ b/edgehead/lib/egamebook/elements/win_element.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of egamebook.element.win; +part of 'win_element.dart'; // ************************************************************************** // BuiltValueGenerator @@ -33,13 +33,13 @@ class _$WinGameSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'markdownText': result.markdownText = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -53,11 +53,11 @@ class _$WinGame extends WinGame { final String markdownText; factory _$WinGame([void Function(WinGameBuilder)? updates]) => - (new WinGameBuilder()..update(updates)).build(); + (new WinGameBuilder()..update(updates))._build(); _$WinGame._({required this.markdownText}) : super._() { BuiltValueNullFieldError.checkNotNull( - markdownText, 'WinGame', 'markdownText'); + markdownText, r'WinGame', 'markdownText'); } @override @@ -75,12 +75,15 @@ class _$WinGame extends WinGame { @override int get hashCode { - return $jf($jc(0, markdownText.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, markdownText.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('WinGame') + return (newBuiltValueToStringHelper(r'WinGame') ..add('markdownText', markdownText)) .toString(); } @@ -116,14 +119,16 @@ class WinGameBuilder implements Builder { } @override - _$WinGame build() { + WinGame build() => _build(); + + _$WinGame _build() { final _$result = _$v ?? new _$WinGame._( markdownText: BuiltValueNullFieldError.checkNotNull( - markdownText, 'WinGame', 'markdownText')); + markdownText, r'WinGame', 'markdownText')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/egamebook/presenter.dart b/edgehead/lib/egamebook/presenter.dart index c6ab5c8c..591ff2cc 100644 --- a/edgehead/lib/egamebook/presenter.dart +++ b/edgehead/lib/egamebook/presenter.dart @@ -1,11 +1,11 @@ -/// UI of the book. Egamebook UIs, be they CLI-based, web-based or Flutter-based -/// all need to subclass [Presenter]. import 'dart:async'; import 'package:edgehead/egamebook/book.dart'; import 'package:edgehead/egamebook/elements/elements.dart'; import 'package:meta/meta.dart'; +/// UI of the book. Egamebook UIs, be they CLI-based, web-based or Flutter-based +/// all need to subclass [Presenter]. abstract class Presenter implements Sink { @protected T? book; diff --git a/edgehead/lib/fractal_stories/action.dart b/edgehead/lib/fractal_stories/action.dart index f02e6220..e878428d 100644 --- a/edgehead/lib/fractal_stories/action.dart +++ b/edgehead/lib/fractal_stories/action.dart @@ -1,5 +1,3 @@ -library stranded.action; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/context.dart'; import 'package:edgehead/fractal_stories/history/action_history.dart'; @@ -340,6 +338,7 @@ abstract class OnGroundItemAction extends Action { referredEntities: context.world.actors.where((actor) => !actor.isDirector)) ..add(commandPathTemplate.join(' >> '), + // ignore: dead_code object: templateContainsObject ? object : null)) .realizeAsString() // Then split again into a list. diff --git a/edgehead/lib/fractal_stories/actor.g.dart b/edgehead/lib/fractal_stories/actor.g.dart index 4eac6d38..1634e2ff 100644 --- a/edgehead/lib/fractal_stories/actor.g.dart +++ b/edgehead/lib/fractal_stories/actor.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.actor; +part of 'actor.dart'; // ************************************************************************** // BuiltValueGenerator @@ -119,7 +119,7 @@ class _$ActorSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -133,7 +133,7 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'constitution': result.constitution = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'currentRoomName': result.currentRoomName = serializers.deserialize(value, @@ -141,7 +141,7 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'dexterity': result.dexterity = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'director': result.director.replace(serializers.deserialize(value, @@ -150,23 +150,23 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'foldFunctionHandle': result.foldFunctionHandle = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'gold': result.gold = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'hitpoints': result.hitpoints = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'initiative': result.initiative = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'inventory': result.inventory.replace(serializers.deserialize(value, @@ -174,35 +174,35 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'isActive': result.isActive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isConfused': result.isConfused = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isInvincible': result.isInvincible = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isPlayer': result.isPlayer = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isSurvivor': result.isSurvivor = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'maxHitpoints': result.maxHitpoints = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'nameIsProperNoun': result.nameIsProperNoun = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'npc': result.npc.replace(serializers.deserialize(value, @@ -210,11 +210,11 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'pose': result.pose = serializers.deserialize(value, - specifiedType: const FullType(Pose)) as Pose; + specifiedType: const FullType(Pose))! as Pose; break; case 'poseMax': result.poseMax = serializers.deserialize(value, - specifiedType: const FullType(Pose)) as Pose; + specifiedType: const FullType(Pose))! as Pose; break; case 'pronoun': result.pronoun.replace(serializers.deserialize(value, @@ -222,15 +222,15 @@ class _$ActorSerializer implements StructuredSerializer { break; case 'recoveringUntil': result.recoveringUntil = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; case 'sanity': result.sanity = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'stamina': result.stamina = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'team': result.team.replace(serializers.deserialize(value, @@ -302,7 +302,7 @@ class _$Actor extends Actor { final Team team; factory _$Actor([void Function(ActorBuilder)? updates]) => - (new ActorBuilder()..update(updates)).build(); + (new ActorBuilder()..update(updates))._build(); _$Actor._( {this.adjective, @@ -334,37 +334,37 @@ class _$Actor extends Actor { required this.stamina, required this.team}) : super._() { - BuiltValueNullFieldError.checkNotNull(anatomy, 'Actor', 'anatomy'); + BuiltValueNullFieldError.checkNotNull(anatomy, r'Actor', 'anatomy'); BuiltValueNullFieldError.checkNotNull( - constitution, 'Actor', 'constitution'); - BuiltValueNullFieldError.checkNotNull(dexterity, 'Actor', 'dexterity'); + constitution, r'Actor', 'constitution'); + BuiltValueNullFieldError.checkNotNull(dexterity, r'Actor', 'dexterity'); BuiltValueNullFieldError.checkNotNull( - foldFunctionHandle, 'Actor', 'foldFunctionHandle'); - BuiltValueNullFieldError.checkNotNull(gold, 'Actor', 'gold'); - BuiltValueNullFieldError.checkNotNull(hitpoints, 'Actor', 'hitpoints'); - BuiltValueNullFieldError.checkNotNull(id, 'Actor', 'id'); - BuiltValueNullFieldError.checkNotNull(initiative, 'Actor', 'initiative'); - BuiltValueNullFieldError.checkNotNull(inventory, 'Actor', 'inventory'); - BuiltValueNullFieldError.checkNotNull(isActive, 'Actor', 'isActive'); - BuiltValueNullFieldError.checkNotNull(isConfused, 'Actor', 'isConfused'); + foldFunctionHandle, r'Actor', 'foldFunctionHandle'); + BuiltValueNullFieldError.checkNotNull(gold, r'Actor', 'gold'); + BuiltValueNullFieldError.checkNotNull(hitpoints, r'Actor', 'hitpoints'); + BuiltValueNullFieldError.checkNotNull(id, r'Actor', 'id'); + BuiltValueNullFieldError.checkNotNull(initiative, r'Actor', 'initiative'); + BuiltValueNullFieldError.checkNotNull(inventory, r'Actor', 'inventory'); + BuiltValueNullFieldError.checkNotNull(isActive, r'Actor', 'isActive'); + BuiltValueNullFieldError.checkNotNull(isConfused, r'Actor', 'isConfused'); BuiltValueNullFieldError.checkNotNull( - isInvincible, 'Actor', 'isInvincible'); - BuiltValueNullFieldError.checkNotNull(isPlayer, 'Actor', 'isPlayer'); - BuiltValueNullFieldError.checkNotNull(isSurvivor, 'Actor', 'isSurvivor'); + isInvincible, r'Actor', 'isInvincible'); + BuiltValueNullFieldError.checkNotNull(isPlayer, r'Actor', 'isPlayer'); + BuiltValueNullFieldError.checkNotNull(isSurvivor, r'Actor', 'isSurvivor'); BuiltValueNullFieldError.checkNotNull( - maxHitpoints, 'Actor', 'maxHitpoints'); - BuiltValueNullFieldError.checkNotNull(name, 'Actor', 'name'); + maxHitpoints, r'Actor', 'maxHitpoints'); + BuiltValueNullFieldError.checkNotNull(name, r'Actor', 'name'); BuiltValueNullFieldError.checkNotNull( - nameIsProperNoun, 'Actor', 'nameIsProperNoun'); - BuiltValueNullFieldError.checkNotNull(npc, 'Actor', 'npc'); - BuiltValueNullFieldError.checkNotNull(pose, 'Actor', 'pose'); - BuiltValueNullFieldError.checkNotNull(poseMax, 'Actor', 'poseMax'); - BuiltValueNullFieldError.checkNotNull(pronoun, 'Actor', 'pronoun'); + nameIsProperNoun, r'Actor', 'nameIsProperNoun'); + BuiltValueNullFieldError.checkNotNull(npc, r'Actor', 'npc'); + BuiltValueNullFieldError.checkNotNull(pose, r'Actor', 'pose'); + BuiltValueNullFieldError.checkNotNull(poseMax, r'Actor', 'poseMax'); + BuiltValueNullFieldError.checkNotNull(pronoun, r'Actor', 'pronoun'); BuiltValueNullFieldError.checkNotNull( - recoveringUntil, 'Actor', 'recoveringUntil'); - BuiltValueNullFieldError.checkNotNull(sanity, 'Actor', 'sanity'); - BuiltValueNullFieldError.checkNotNull(stamina, 'Actor', 'stamina'); - BuiltValueNullFieldError.checkNotNull(team, 'Actor', 'team'); + recoveringUntil, r'Actor', 'recoveringUntil'); + BuiltValueNullFieldError.checkNotNull(sanity, r'Actor', 'sanity'); + BuiltValueNullFieldError.checkNotNull(stamina, r'Actor', 'stamina'); + BuiltValueNullFieldError.checkNotNull(team, r'Actor', 'team'); } @override @@ -410,44 +410,37 @@ class _$Actor extends Actor { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, adjective.hashCode), anatomy.hashCode), constitution.hashCode), currentRoomName.hashCode), dexterity.hashCode), director.hashCode), foldFunctionHandle.hashCode), gold.hashCode), hitpoints.hashCode), - id.hashCode), - initiative.hashCode), - inventory.hashCode), - isActive.hashCode), - isConfused.hashCode), - isInvincible.hashCode), - isPlayer.hashCode), - isSurvivor.hashCode), - maxHitpoints.hashCode), - name.hashCode), - nameIsProperNoun.hashCode), - npc.hashCode), - pose.hashCode), - poseMax.hashCode), - pronoun.hashCode), - recoveringUntil.hashCode), - sanity.hashCode), - stamina.hashCode), - team.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, adjective.hashCode); + _$hash = $jc(_$hash, anatomy.hashCode); + _$hash = $jc(_$hash, constitution.hashCode); + _$hash = $jc(_$hash, currentRoomName.hashCode); + _$hash = $jc(_$hash, dexterity.hashCode); + _$hash = $jc(_$hash, director.hashCode); + _$hash = $jc(_$hash, foldFunctionHandle.hashCode); + _$hash = $jc(_$hash, gold.hashCode); + _$hash = $jc(_$hash, hitpoints.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, initiative.hashCode); + _$hash = $jc(_$hash, inventory.hashCode); + _$hash = $jc(_$hash, isActive.hashCode); + _$hash = $jc(_$hash, isConfused.hashCode); + _$hash = $jc(_$hash, isInvincible.hashCode); + _$hash = $jc(_$hash, isPlayer.hashCode); + _$hash = $jc(_$hash, isSurvivor.hashCode); + _$hash = $jc(_$hash, maxHitpoints.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, nameIsProperNoun.hashCode); + _$hash = $jc(_$hash, npc.hashCode); + _$hash = $jc(_$hash, pose.hashCode); + _$hash = $jc(_$hash, poseMax.hashCode); + _$hash = $jc(_$hash, pronoun.hashCode); + _$hash = $jc(_$hash, recoveringUntil.hashCode); + _$hash = $jc(_$hash, sanity.hashCode); + _$hash = $jc(_$hash, stamina.hashCode); + _$hash = $jc(_$hash, team.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -623,7 +616,9 @@ class ActorBuilder implements Builder { } @override - _$Actor build() { + Actor build() => _build(); + + _$Actor _build() { _$Actor _$result; try { _$result = _$v ?? @@ -631,40 +626,40 @@ class ActorBuilder implements Builder { adjective: adjective, anatomy: anatomy.build(), constitution: BuiltValueNullFieldError.checkNotNull( - constitution, 'Actor', 'constitution'), + constitution, r'Actor', 'constitution'), currentRoomName: currentRoomName, dexterity: BuiltValueNullFieldError.checkNotNull( - dexterity, 'Actor', 'dexterity'), + dexterity, r'Actor', 'dexterity'), director: _director?.build(), foldFunctionHandle: BuiltValueNullFieldError.checkNotNull( - foldFunctionHandle, 'Actor', 'foldFunctionHandle'), + foldFunctionHandle, r'Actor', 'foldFunctionHandle'), gold: - BuiltValueNullFieldError.checkNotNull(gold, 'Actor', 'gold'), + BuiltValueNullFieldError.checkNotNull(gold, r'Actor', 'gold'), hitpoints: BuiltValueNullFieldError.checkNotNull( - hitpoints, 'Actor', 'hitpoints'), - id: BuiltValueNullFieldError.checkNotNull(id, 'Actor', 'id'), + hitpoints, r'Actor', 'hitpoints'), + id: BuiltValueNullFieldError.checkNotNull(id, r'Actor', 'id'), initiative: BuiltValueNullFieldError.checkNotNull( - initiative, 'Actor', 'initiative'), + initiative, r'Actor', 'initiative'), inventory: inventory.build(), isActive: BuiltValueNullFieldError.checkNotNull( - isActive, 'Actor', 'isActive'), + isActive, r'Actor', 'isActive'), isConfused: BuiltValueNullFieldError.checkNotNull( - isConfused, 'Actor', 'isConfused'), + isConfused, r'Actor', 'isConfused'), isInvincible: BuiltValueNullFieldError.checkNotNull( - isInvincible, 'Actor', 'isInvincible'), + isInvincible, r'Actor', 'isInvincible'), isPlayer: - BuiltValueNullFieldError.checkNotNull(isPlayer, 'Actor', 'isPlayer'), - isSurvivor: BuiltValueNullFieldError.checkNotNull(isSurvivor, 'Actor', 'isSurvivor'), - maxHitpoints: BuiltValueNullFieldError.checkNotNull(maxHitpoints, 'Actor', 'maxHitpoints'), - name: BuiltValueNullFieldError.checkNotNull(name, 'Actor', 'name'), - nameIsProperNoun: BuiltValueNullFieldError.checkNotNull(nameIsProperNoun, 'Actor', 'nameIsProperNoun'), + BuiltValueNullFieldError.checkNotNull(isPlayer, r'Actor', 'isPlayer'), + isSurvivor: BuiltValueNullFieldError.checkNotNull(isSurvivor, r'Actor', 'isSurvivor'), + maxHitpoints: BuiltValueNullFieldError.checkNotNull(maxHitpoints, r'Actor', 'maxHitpoints'), + name: BuiltValueNullFieldError.checkNotNull(name, r'Actor', 'name'), + nameIsProperNoun: BuiltValueNullFieldError.checkNotNull(nameIsProperNoun, r'Actor', 'nameIsProperNoun'), npc: npc.build(), - pose: BuiltValueNullFieldError.checkNotNull(pose, 'Actor', 'pose'), - poseMax: BuiltValueNullFieldError.checkNotNull(poseMax, 'Actor', 'poseMax'), + pose: BuiltValueNullFieldError.checkNotNull(pose, r'Actor', 'pose'), + poseMax: BuiltValueNullFieldError.checkNotNull(poseMax, r'Actor', 'poseMax'), pronoun: pronoun.build(), - recoveringUntil: BuiltValueNullFieldError.checkNotNull(recoveringUntil, 'Actor', 'recoveringUntil'), - sanity: BuiltValueNullFieldError.checkNotNull(sanity, 'Actor', 'sanity'), - stamina: BuiltValueNullFieldError.checkNotNull(stamina, 'Actor', 'stamina'), + recoveringUntil: BuiltValueNullFieldError.checkNotNull(recoveringUntil, r'Actor', 'recoveringUntil'), + sanity: BuiltValueNullFieldError.checkNotNull(sanity, r'Actor', 'sanity'), + stamina: BuiltValueNullFieldError.checkNotNull(stamina, r'Actor', 'stamina'), team: team.build()); } catch (_) { late String _$failedField; @@ -688,7 +683,7 @@ class ActorBuilder implements Builder { team.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'Actor', _$failedField, e.toString()); + r'Actor', _$failedField, e.toString()); } rethrow; } @@ -697,4 +692,4 @@ class ActorBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/anatomy/anatomy.g.dart b/edgehead/lib/fractal_stories/anatomy/anatomy.g.dart index 61d7f68a..bd6f7c76 100644 --- a/edgehead/lib/fractal_stories/anatomy/anatomy.g.dart +++ b/edgehead/lib/fractal_stories/anatomy/anatomy.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.anatomy; +part of 'anatomy.dart'; // ************************************************************************** // BuiltValueGenerator @@ -36,13 +36,13 @@ class _$AnatomySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'isUndead': result.isUndead = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'torso': result.torso.replace(serializers.deserialize(value, @@ -72,11 +72,11 @@ class _$Anatomy extends Anatomy { bool ___secondaryWeaponAppendage = false; factory _$Anatomy([void Function(AnatomyBuilder)? updates]) => - (new AnatomyBuilder()..update(updates)).build(); + (new AnatomyBuilder()..update(updates))._build(); _$Anatomy._({required this.isUndead, required this.torso}) : super._() { - BuiltValueNullFieldError.checkNotNull(isUndead, 'Anatomy', 'isUndead'); - BuiltValueNullFieldError.checkNotNull(torso, 'Anatomy', 'torso'); + BuiltValueNullFieldError.checkNotNull(isUndead, r'Anatomy', 'isUndead'); + BuiltValueNullFieldError.checkNotNull(torso, r'Anatomy', 'torso'); } @override @@ -135,12 +135,16 @@ class _$Anatomy extends Anatomy { @override int get hashCode { - return $jf($jc($jc(0, isUndead.hashCode), torso.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, isUndead.hashCode); + _$hash = $jc(_$hash, torso.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('Anatomy') + return (newBuiltValueToStringHelper(r'Anatomy') ..add('isUndead', isUndead) ..add('torso', torso)) .toString(); @@ -182,13 +186,15 @@ class AnatomyBuilder implements Builder { } @override - _$Anatomy build() { + Anatomy build() => _build(); + + _$Anatomy _build() { _$Anatomy _$result; try { _$result = _$v ?? new _$Anatomy._( isUndead: BuiltValueNullFieldError.checkNotNull( - isUndead, 'Anatomy', 'isUndead'), + isUndead, r'Anatomy', 'isUndead'), torso: torso.build()); } catch (_) { late String _$failedField; @@ -197,7 +203,7 @@ class AnatomyBuilder implements Builder { torso.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'Anatomy', _$failedField, e.toString()); + r'Anatomy', _$failedField, e.toString()); } rethrow; } @@ -206,4 +212,4 @@ class AnatomyBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/anatomy/body_part.dart b/edgehead/lib/fractal_stories/anatomy/body_part.dart index 61f8296e..4d9e583d 100644 --- a/edgehead/lib/fractal_stories/anatomy/body_part.dart +++ b/edgehead/lib/fractal_stories/anatomy/body_part.dart @@ -318,7 +318,7 @@ class BodyPartDesignation extends EnumClass { static BuiltSet get values => _$specificBodyPartValues; - const BodyPartDesignation._(String name) : super(name); + const BodyPartDesignation._(super.name); /// This is `false` for [primaryHand] and [secondaryHand]. Just the arm /// counts. @@ -402,7 +402,7 @@ class BodyPartFunction extends EnumClass { static BuiltSet get values => _$bodyPartFunctionValues; - const BodyPartFunction._(String name) : super(name); + const BodyPartFunction._(super.name); static BodyPartFunction valueOf(String name) => _$valueOfBodyPartFunction(name); diff --git a/edgehead/lib/fractal_stories/anatomy/body_part.g.dart b/edgehead/lib/fractal_stories/anatomy/body_part.g.dart index 606f58c0..887ff134 100644 --- a/edgehead/lib/fractal_stories/anatomy/body_part.g.dart +++ b/edgehead/lib/fractal_stories/anatomy/body_part.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.anatomy.body_part; +part of 'body_part.dart'; // ************************************************************************** // BuiltValueGenerator @@ -203,13 +203,13 @@ class _$BodyPartSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'bluntHitsCount': result.bluntHitsCount = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'children': result.children.replace(serializers.deserialize(value, @@ -224,73 +224,73 @@ class _$BodyPartSerializer implements StructuredSerializer { break; case 'designation': result.designation = serializers.deserialize(value, - specifiedType: const FullType(BodyPartDesignation)) + specifiedType: const FullType(BodyPartDesignation))! as BodyPartDesignation; break; case 'firstOwnerId': result.firstOwnerId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'function': result.function = serializers.deserialize(value, - specifiedType: const FullType(BodyPartFunction)) + specifiedType: const FullType(BodyPartFunction))! as BodyPartFunction; break; case 'hitpoints': result.hitpoints = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'isActive': result.isActive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isSeverable': result.isSeverable = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isSevered': result.isSevered = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'isVital': result.isVital = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'majorCutsCount': result.majorCutsCount = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'maxHitpoints': result.maxHitpoints = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'minorCutsCount': result.minorCutsCount = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'randomDesignation': result.randomDesignation = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'swingSurfaceLeft': result.swingSurfaceLeft = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'swingSurfaceRight': result.swingSurfaceRight = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'thrustSurface': result.thrustSurface = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -378,7 +378,7 @@ class _$BodyPart extends BodyPart { final int thrustSurface; factory _$BodyPart([void Function(BodyPartBuilder)? updates]) => - (new BodyPartBuilder()..update(updates)).build(); + (new BodyPartBuilder()..update(updates))._build(); _$BodyPart._( {required this.bluntHitsCount, @@ -403,35 +403,35 @@ class _$BodyPart extends BodyPart { required this.thrustSurface}) : super._() { BuiltValueNullFieldError.checkNotNull( - bluntHitsCount, 'BodyPart', 'bluntHitsCount'); - BuiltValueNullFieldError.checkNotNull(children, 'BodyPart', 'children'); + bluntHitsCount, r'BodyPart', 'bluntHitsCount'); + BuiltValueNullFieldError.checkNotNull(children, r'BodyPart', 'children'); BuiltValueNullFieldError.checkNotNull( - designation, 'BodyPart', 'designation'); + designation, r'BodyPart', 'designation'); BuiltValueNullFieldError.checkNotNull( - firstOwnerId, 'BodyPart', 'firstOwnerId'); - BuiltValueNullFieldError.checkNotNull(function, 'BodyPart', 'function'); - BuiltValueNullFieldError.checkNotNull(hitpoints, 'BodyPart', 'hitpoints'); - BuiltValueNullFieldError.checkNotNull(id, 'BodyPart', 'id'); - BuiltValueNullFieldError.checkNotNull(isActive, 'BodyPart', 'isActive'); + firstOwnerId, r'BodyPart', 'firstOwnerId'); + BuiltValueNullFieldError.checkNotNull(function, r'BodyPart', 'function'); + BuiltValueNullFieldError.checkNotNull(hitpoints, r'BodyPart', 'hitpoints'); + BuiltValueNullFieldError.checkNotNull(id, r'BodyPart', 'id'); + BuiltValueNullFieldError.checkNotNull(isActive, r'BodyPart', 'isActive'); BuiltValueNullFieldError.checkNotNull( - isSeverable, 'BodyPart', 'isSeverable'); - BuiltValueNullFieldError.checkNotNull(isSevered, 'BodyPart', 'isSevered'); - BuiltValueNullFieldError.checkNotNull(isVital, 'BodyPart', 'isVital'); + isSeverable, r'BodyPart', 'isSeverable'); + BuiltValueNullFieldError.checkNotNull(isSevered, r'BodyPart', 'isSevered'); + BuiltValueNullFieldError.checkNotNull(isVital, r'BodyPart', 'isVital'); BuiltValueNullFieldError.checkNotNull( - majorCutsCount, 'BodyPart', 'majorCutsCount'); + majorCutsCount, r'BodyPart', 'majorCutsCount'); BuiltValueNullFieldError.checkNotNull( - maxHitpoints, 'BodyPart', 'maxHitpoints'); + maxHitpoints, r'BodyPart', 'maxHitpoints'); BuiltValueNullFieldError.checkNotNull( - minorCutsCount, 'BodyPart', 'minorCutsCount'); - BuiltValueNullFieldError.checkNotNull(name, 'BodyPart', 'name'); + minorCutsCount, r'BodyPart', 'minorCutsCount'); + BuiltValueNullFieldError.checkNotNull(name, r'BodyPart', 'name'); BuiltValueNullFieldError.checkNotNull( - randomDesignation, 'BodyPart', 'randomDesignation'); + randomDesignation, r'BodyPart', 'randomDesignation'); BuiltValueNullFieldError.checkNotNull( - swingSurfaceLeft, 'BodyPart', 'swingSurfaceLeft'); + swingSurfaceLeft, r'BodyPart', 'swingSurfaceLeft'); BuiltValueNullFieldError.checkNotNull( - swingSurfaceRight, 'BodyPart', 'swingSurfaceRight'); + swingSurfaceRight, r'BodyPart', 'swingSurfaceRight'); BuiltValueNullFieldError.checkNotNull( - thrustSurface, 'BodyPart', 'thrustSurface'); + thrustSurface, r'BodyPart', 'thrustSurface'); } @override @@ -469,44 +469,29 @@ class _$BodyPart extends BodyPart { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, bluntHitsCount.hashCode), - children.hashCode), - damageCapability.hashCode), - designation.hashCode), - firstOwnerId.hashCode), - function.hashCode), - hitpoints.hashCode), - id.hashCode), - isActive.hashCode), - isSeverable.hashCode), - isSevered.hashCode), - isVital.hashCode), - majorCutsCount.hashCode), - maxHitpoints.hashCode), - minorCutsCount.hashCode), - name.hashCode), - randomDesignation.hashCode), - swingSurfaceLeft.hashCode), - swingSurfaceRight.hashCode), - thrustSurface.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, bluntHitsCount.hashCode); + _$hash = $jc(_$hash, children.hashCode); + _$hash = $jc(_$hash, damageCapability.hashCode); + _$hash = $jc(_$hash, designation.hashCode); + _$hash = $jc(_$hash, firstOwnerId.hashCode); + _$hash = $jc(_$hash, function.hashCode); + _$hash = $jc(_$hash, hitpoints.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, isActive.hashCode); + _$hash = $jc(_$hash, isSeverable.hashCode); + _$hash = $jc(_$hash, isSevered.hashCode); + _$hash = $jc(_$hash, isVital.hashCode); + _$hash = $jc(_$hash, majorCutsCount.hashCode); + _$hash = $jc(_$hash, maxHitpoints.hashCode); + _$hash = $jc(_$hash, minorCutsCount.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, randomDesignation.hashCode); + _$hash = $jc(_$hash, swingSurfaceLeft.hashCode); + _$hash = $jc(_$hash, swingSurfaceRight.hashCode); + _$hash = $jc(_$hash, thrustSurface.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -646,39 +631,41 @@ class BodyPartBuilder implements Builder { } @override - _$BodyPart build() { + BodyPart build() => _build(); + + _$BodyPart _build() { _$BodyPart _$result; try { _$result = _$v ?? new _$BodyPart._( bluntHitsCount: BuiltValueNullFieldError.checkNotNull( - bluntHitsCount, 'BodyPart', 'bluntHitsCount'), + bluntHitsCount, r'BodyPart', 'bluntHitsCount'), children: children.build(), damageCapability: _damageCapability?.build(), designation: BuiltValueNullFieldError.checkNotNull( - designation, 'BodyPart', 'designation'), + designation, r'BodyPart', 'designation'), firstOwnerId: BuiltValueNullFieldError.checkNotNull( - firstOwnerId, 'BodyPart', 'firstOwnerId'), + firstOwnerId, r'BodyPart', 'firstOwnerId'), function: BuiltValueNullFieldError.checkNotNull( - function, 'BodyPart', 'function'), + function, r'BodyPart', 'function'), hitpoints: BuiltValueNullFieldError.checkNotNull( - hitpoints, 'BodyPart', 'hitpoints'), - id: BuiltValueNullFieldError.checkNotNull(id, 'BodyPart', 'id'), + hitpoints, r'BodyPart', 'hitpoints'), + id: BuiltValueNullFieldError.checkNotNull(id, r'BodyPart', 'id'), isActive: BuiltValueNullFieldError.checkNotNull( - isActive, 'BodyPart', 'isActive'), + isActive, r'BodyPart', 'isActive'), isSeverable: BuiltValueNullFieldError.checkNotNull( - isSeverable, 'BodyPart', 'isSeverable'), + isSeverable, r'BodyPart', 'isSeverable'), isSevered: BuiltValueNullFieldError.checkNotNull( - isSevered, 'BodyPart', 'isSevered'), - isVital: BuiltValueNullFieldError.checkNotNull(isVital, 'BodyPart', 'isVital'), - majorCutsCount: BuiltValueNullFieldError.checkNotNull(majorCutsCount, 'BodyPart', 'majorCutsCount'), - maxHitpoints: BuiltValueNullFieldError.checkNotNull(maxHitpoints, 'BodyPart', 'maxHitpoints'), - minorCutsCount: BuiltValueNullFieldError.checkNotNull(minorCutsCount, 'BodyPart', 'minorCutsCount'), - name: BuiltValueNullFieldError.checkNotNull(name, 'BodyPart', 'name'), - randomDesignation: BuiltValueNullFieldError.checkNotNull(randomDesignation, 'BodyPart', 'randomDesignation'), - swingSurfaceLeft: BuiltValueNullFieldError.checkNotNull(swingSurfaceLeft, 'BodyPart', 'swingSurfaceLeft'), - swingSurfaceRight: BuiltValueNullFieldError.checkNotNull(swingSurfaceRight, 'BodyPart', 'swingSurfaceRight'), - thrustSurface: BuiltValueNullFieldError.checkNotNull(thrustSurface, 'BodyPart', 'thrustSurface')); + isSevered, r'BodyPart', 'isSevered'), + isVital: BuiltValueNullFieldError.checkNotNull(isVital, r'BodyPart', 'isVital'), + majorCutsCount: BuiltValueNullFieldError.checkNotNull(majorCutsCount, r'BodyPart', 'majorCutsCount'), + maxHitpoints: BuiltValueNullFieldError.checkNotNull(maxHitpoints, r'BodyPart', 'maxHitpoints'), + minorCutsCount: BuiltValueNullFieldError.checkNotNull(minorCutsCount, r'BodyPart', 'minorCutsCount'), + name: BuiltValueNullFieldError.checkNotNull(name, r'BodyPart', 'name'), + randomDesignation: BuiltValueNullFieldError.checkNotNull(randomDesignation, r'BodyPart', 'randomDesignation'), + swingSurfaceLeft: BuiltValueNullFieldError.checkNotNull(swingSurfaceLeft, r'BodyPart', 'swingSurfaceLeft'), + swingSurfaceRight: BuiltValueNullFieldError.checkNotNull(swingSurfaceRight, r'BodyPart', 'swingSurfaceRight'), + thrustSurface: BuiltValueNullFieldError.checkNotNull(thrustSurface, r'BodyPart', 'thrustSurface')); } catch (_) { late String _$failedField; try { @@ -688,7 +675,7 @@ class BodyPartBuilder implements Builder { _damageCapability?.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'BodyPart', _$failedField, e.toString()); + r'BodyPart', _$failedField, e.toString()); } rethrow; } @@ -697,4 +684,4 @@ class BodyPartBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/context.dart b/edgehead/lib/fractal_stories/context.dart index b4862b7c..b14b7209 100644 --- a/edgehead/lib/fractal_stories/context.dart +++ b/edgehead/lib/fractal_stories/context.dart @@ -1,5 +1,3 @@ -library stranded.context; - import 'package:edgehead/fractal_stories/action.dart'; import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/simulation.dart'; diff --git a/edgehead/lib/fractal_stories/director/director.g.dart b/edgehead/lib/fractal_stories/director/director.g.dart index ffaa12ea..1c7d319e 100644 --- a/edgehead/lib/fractal_stories/director/director.g.dart +++ b/edgehead/lib/fractal_stories/director/director.g.dart @@ -37,13 +37,13 @@ class _$DirectorCapabilitySerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'isActive': result.isActive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -58,11 +58,11 @@ class _$DirectorCapability extends DirectorCapability { factory _$DirectorCapability( [void Function(DirectorCapabilityBuilder)? updates]) => - (new DirectorCapabilityBuilder()..update(updates)).build(); + (new DirectorCapabilityBuilder()..update(updates))._build(); _$DirectorCapability._({required this.isActive}) : super._() { BuiltValueNullFieldError.checkNotNull( - isActive, 'DirectorCapability', 'isActive'); + isActive, r'DirectorCapability', 'isActive'); } @override @@ -82,12 +82,15 @@ class _$DirectorCapability extends DirectorCapability { @override int get hashCode { - return $jf($jc(0, isActive.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, isActive.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('DirectorCapability') + return (newBuiltValueToStringHelper(r'DirectorCapability') ..add('isActive', isActive)) .toString(); } @@ -124,14 +127,16 @@ class DirectorCapabilityBuilder } @override - _$DirectorCapability build() { + DirectorCapability build() => _build(); + + _$DirectorCapability _build() { final _$result = _$v ?? new _$DirectorCapability._( isActive: BuiltValueNullFieldError.checkNotNull( - isActive, 'DirectorCapability', 'isActive')); + isActive, r'DirectorCapability', 'isActive')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/history/action_history.g.dart b/edgehead/lib/fractal_stories/history/action_history.g.dart index 134bb1b2..6c3be30c 100644 --- a/edgehead/lib/fractal_stories/history/action_history.g.dart +++ b/edgehead/lib/fractal_stories/history/action_history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.history.action; +part of 'action_history.dart'; // ************************************************************************** // BuiltValueGenerator @@ -50,7 +50,7 @@ class _$ActionHistorySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -142,13 +142,13 @@ class _$ActionRecordSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'actionName': result.actionName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'dataString': result.dataString = serializers.deserialize(value, @@ -156,7 +156,7 @@ class _$ActionRecordSerializer implements StructuredSerializer { break; case 'description': result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'protagonist': result.protagonist = serializers.deserialize(value, @@ -170,23 +170,23 @@ class _$ActionRecordSerializer implements StructuredSerializer { break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; case 'wasAggressive': result.wasAggressive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'wasFailure': result.wasFailure = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'wasProactive': result.wasProactive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'wasSuccess': result.wasSuccess = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -206,7 +206,7 @@ class _$ActionHistory extends ActionHistory { final BuiltList records; factory _$ActionHistory([void Function(ActionHistoryBuilder)? updates]) => - (new ActionHistoryBuilder()..update(updates)).build(); + (new ActionHistoryBuilder()..update(updates))._build(); _$ActionHistory._( {required this.latestAggression, @@ -215,12 +215,12 @@ class _$ActionHistory extends ActionHistory { required this.records}) : super._() { BuiltValueNullFieldError.checkNotNull( - latestAggression, 'ActionHistory', 'latestAggression'); + latestAggression, r'ActionHistory', 'latestAggression'); BuiltValueNullFieldError.checkNotNull( - latestByActorId, 'ActionHistory', 'latestByActorId'); + latestByActorId, r'ActionHistory', 'latestByActorId'); BuiltValueNullFieldError.checkNotNull( - latestProactiveByActorId, 'ActionHistory', 'latestProactiveByActorId'); - BuiltValueNullFieldError.checkNotNull(records, 'ActionHistory', 'records'); + latestProactiveByActorId, r'ActionHistory', 'latestProactiveByActorId'); + BuiltValueNullFieldError.checkNotNull(records, r'ActionHistory', 'records'); } @override @@ -242,15 +242,18 @@ class _$ActionHistory extends ActionHistory { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, latestAggression.hashCode), latestByActorId.hashCode), - latestProactiveByActorId.hashCode), - records.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, latestAggression.hashCode); + _$hash = $jc(_$hash, latestByActorId.hashCode); + _$hash = $jc(_$hash, latestProactiveByActorId.hashCode); + _$hash = $jc(_$hash, records.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ActionHistory') + return (newBuiltValueToStringHelper(r'ActionHistory') ..add('latestAggression', latestAggression) ..add('latestByActorId', latestByActorId) ..add('latestProactiveByActorId', latestProactiveByActorId) @@ -313,7 +316,9 @@ class ActionHistoryBuilder } @override - _$ActionHistory build() { + ActionHistory build() => _build(); + + _$ActionHistory _build() { _$ActionHistory _$result; try { _$result = _$v ?? @@ -335,7 +340,7 @@ class ActionHistoryBuilder records.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'ActionHistory', _$failedField, e.toString()); + r'ActionHistory', _$failedField, e.toString()); } rethrow; } @@ -367,7 +372,7 @@ class _$ActionRecord extends ActionRecord { final bool wasSuccess; factory _$ActionRecord([void Function(ActionRecordBuilder)? updates]) => - (new ActionRecordBuilder()..update(updates)).build(); + (new ActionRecordBuilder()..update(updates))._build(); _$ActionRecord._( {required this.actionName, @@ -382,20 +387,20 @@ class _$ActionRecord extends ActionRecord { required this.wasSuccess}) : super._() { BuiltValueNullFieldError.checkNotNull( - actionName, 'ActionRecord', 'actionName'); + actionName, r'ActionRecord', 'actionName'); BuiltValueNullFieldError.checkNotNull( - description, 'ActionRecord', 'description'); + description, r'ActionRecord', 'description'); BuiltValueNullFieldError.checkNotNull( - sufferers, 'ActionRecord', 'sufferers'); - BuiltValueNullFieldError.checkNotNull(time, 'ActionRecord', 'time'); + sufferers, r'ActionRecord', 'sufferers'); + BuiltValueNullFieldError.checkNotNull(time, r'ActionRecord', 'time'); BuiltValueNullFieldError.checkNotNull( - wasAggressive, 'ActionRecord', 'wasAggressive'); + wasAggressive, r'ActionRecord', 'wasAggressive'); BuiltValueNullFieldError.checkNotNull( - wasFailure, 'ActionRecord', 'wasFailure'); + wasFailure, r'ActionRecord', 'wasFailure'); BuiltValueNullFieldError.checkNotNull( - wasProactive, 'ActionRecord', 'wasProactive'); + wasProactive, r'ActionRecord', 'wasProactive'); BuiltValueNullFieldError.checkNotNull( - wasSuccess, 'ActionRecord', 'wasSuccess'); + wasSuccess, r'ActionRecord', 'wasSuccess'); } @override @@ -423,24 +428,19 @@ class _$ActionRecord extends ActionRecord { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, actionName.hashCode), - dataString.hashCode), - description.hashCode), - protagonist.hashCode), - sufferers.hashCode), - time.hashCode), - wasAggressive.hashCode), - wasFailure.hashCode), - wasProactive.hashCode), - wasSuccess.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actionName.hashCode); + _$hash = $jc(_$hash, dataString.hashCode); + _$hash = $jc(_$hash, description.hashCode); + _$hash = $jc(_$hash, protagonist.hashCode); + _$hash = $jc(_$hash, sufferers.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jc(_$hash, wasAggressive.hashCode); + _$hash = $jc(_$hash, wasFailure.hashCode); + _$hash = $jc(_$hash, wasProactive.hashCode); + _$hash = $jc(_$hash, wasSuccess.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -521,28 +521,30 @@ class ActionRecordBuilder } @override - _$ActionRecord build() { + ActionRecord build() => _build(); + + _$ActionRecord _build() { _$ActionRecord _$result; try { _$result = _$v ?? new _$ActionRecord._( actionName: BuiltValueNullFieldError.checkNotNull( - actionName, 'ActionRecord', 'actionName'), + actionName, r'ActionRecord', 'actionName'), dataString: dataString, description: BuiltValueNullFieldError.checkNotNull( - description, 'ActionRecord', 'description'), + description, r'ActionRecord', 'description'), protagonist: protagonist, sufferers: sufferers.build(), time: BuiltValueNullFieldError.checkNotNull( - time, 'ActionRecord', 'time'), + time, r'ActionRecord', 'time'), wasAggressive: BuiltValueNullFieldError.checkNotNull( - wasAggressive, 'ActionRecord', 'wasAggressive'), + wasAggressive, r'ActionRecord', 'wasAggressive'), wasFailure: BuiltValueNullFieldError.checkNotNull( - wasFailure, 'ActionRecord', 'wasFailure'), + wasFailure, r'ActionRecord', 'wasFailure'), wasProactive: BuiltValueNullFieldError.checkNotNull( - wasProactive, 'ActionRecord', 'wasProactive'), + wasProactive, r'ActionRecord', 'wasProactive'), wasSuccess: BuiltValueNullFieldError.checkNotNull( - wasSuccess, 'ActionRecord', 'wasSuccess')); + wasSuccess, r'ActionRecord', 'wasSuccess')); } catch (_) { late String _$failedField; try { @@ -550,7 +552,7 @@ class ActionRecordBuilder sufferers.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'ActionRecord', _$failedField, e.toString()); + r'ActionRecord', _$failedField, e.toString()); } rethrow; } @@ -559,4 +561,4 @@ class ActionRecordBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/history/custom_event_history.g.dart b/edgehead/lib/fractal_stories/history/custom_event_history.g.dart index 9135d75f..3f1378c5 100644 --- a/edgehead/lib/fractal_stories/history/custom_event_history.g.dart +++ b/edgehead/lib/fractal_stories/history/custom_event_history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.history.custom_event; +part of 'custom_event_history.dart'; // ************************************************************************** // BuiltValueGenerator @@ -50,7 +50,7 @@ class _$CustomEventSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -64,11 +64,11 @@ class _$CustomEventSerializer implements StructuredSerializer { break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; } } @@ -106,7 +106,7 @@ class _$CustomEventHistorySerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -135,13 +135,13 @@ class _$CustomEvent extends CustomEvent { final DateTime time; factory _$CustomEvent([void Function(CustomEventBuilder)? updates]) => - (new CustomEventBuilder()..update(updates)).build(); + (new CustomEventBuilder()..update(updates))._build(); _$CustomEvent._( {this.actorId, this.data, required this.name, required this.time}) : super._() { - BuiltValueNullFieldError.checkNotNull(name, 'CustomEvent', 'name'); - BuiltValueNullFieldError.checkNotNull(time, 'CustomEvent', 'time'); + BuiltValueNullFieldError.checkNotNull(name, r'CustomEvent', 'name'); + BuiltValueNullFieldError.checkNotNull(time, r'CustomEvent', 'time'); } @override @@ -163,14 +163,18 @@ class _$CustomEvent extends CustomEvent { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, actorId.hashCode), data.hashCode), name.hashCode), - time.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actorId.hashCode); + _$hash = $jc(_$hash, data.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('CustomEvent') + return (newBuiltValueToStringHelper(r'CustomEvent') ..add('actorId', actorId) ..add('data', data) ..add('name', name) @@ -224,15 +228,17 @@ class CustomEventBuilder implements Builder { } @override - _$CustomEvent build() { + CustomEvent build() => _build(); + + _$CustomEvent _build() { final _$result = _$v ?? new _$CustomEvent._( actorId: actorId, data: data, name: BuiltValueNullFieldError.checkNotNull( - name, 'CustomEvent', 'name'), + name, r'CustomEvent', 'name'), time: BuiltValueNullFieldError.checkNotNull( - time, 'CustomEvent', 'time')); + time, r'CustomEvent', 'time')); replace(_$result); return _$result; } @@ -244,11 +250,11 @@ class _$CustomEventHistory extends CustomEventHistory { factory _$CustomEventHistory( [void Function(CustomEventHistoryBuilder)? updates]) => - (new CustomEventHistoryBuilder()..update(updates)).build(); + (new CustomEventHistoryBuilder()..update(updates))._build(); _$CustomEventHistory._({required this.records}) : super._() { BuiltValueNullFieldError.checkNotNull( - records, 'CustomEventHistory', 'records'); + records, r'CustomEventHistory', 'records'); } @override @@ -268,12 +274,15 @@ class _$CustomEventHistory extends CustomEventHistory { @override int get hashCode { - return $jf($jc(0, records.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, records.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('CustomEventHistory') + return (newBuiltValueToStringHelper(r'CustomEventHistory') ..add('records', records)) .toString(); } @@ -312,7 +321,9 @@ class CustomEventHistoryBuilder } @override - _$CustomEventHistory build() { + CustomEventHistory build() => _build(); + + _$CustomEventHistory _build() { _$CustomEventHistory _$result; try { _$result = _$v ?? new _$CustomEventHistory._(records: records.build()); @@ -323,7 +334,7 @@ class CustomEventHistoryBuilder records.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'CustomEventHistory', _$failedField, e.toString()); + r'CustomEventHistory', _$failedField, e.toString()); } rethrow; } @@ -332,4 +343,4 @@ class CustomEventHistoryBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/history/history.dart b/edgehead/lib/fractal_stories/history/history.dart index 23fba1e9..3e2448ef 100644 --- a/edgehead/lib/fractal_stories/history/history.dart +++ b/edgehead/lib/fractal_stories/history/history.dart @@ -1,5 +1,3 @@ -library stranded.history; - /// The result of querying a history. abstract class QueryResult { /// Whether or not this query found at least one event. @@ -23,7 +21,7 @@ abstract class Record { /// The counterpart class is [SingleQueryResult]. class SerialQueryResult implements QueryResult { /// Records are in reverse chronological order, so the first result is - /// the latest. See [new SerialQueryResult]. + /// the latest. See [SerialQueryResult.new]. final Iterable _records; bool _walked = false; diff --git a/edgehead/lib/fractal_stories/history/rule_history.g.dart b/edgehead/lib/fractal_stories/history/rule_history.g.dart index 34e56291..8e7e78fe 100644 --- a/edgehead/lib/fractal_stories/history/rule_history.g.dart +++ b/edgehead/lib/fractal_stories/history/rule_history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.history.rule; +part of 'rule_history.dart'; // ************************************************************************** // BuiltValueGenerator @@ -42,7 +42,7 @@ class _$RuleHistorySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -89,17 +89,17 @@ class _$RuleRecordSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'ruleId': result.ruleId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; } } @@ -115,10 +115,10 @@ class _$RuleHistory extends RuleHistory { final BuiltMap records; factory _$RuleHistory([void Function(RuleHistoryBuilder)? updates]) => - (new RuleHistoryBuilder()..update(updates)).build(); + (new RuleHistoryBuilder()..update(updates))._build(); _$RuleHistory._({this.latestRule, required this.records}) : super._() { - BuiltValueNullFieldError.checkNotNull(records, 'RuleHistory', 'records'); + BuiltValueNullFieldError.checkNotNull(records, r'RuleHistory', 'records'); } @override @@ -138,12 +138,16 @@ class _$RuleHistory extends RuleHistory { @override int get hashCode { - return $jf($jc($jc(0, latestRule.hashCode), records.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, latestRule.hashCode); + _$hash = $jc(_$hash, records.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('RuleHistory') + return (newBuiltValueToStringHelper(r'RuleHistory') ..add('latestRule', latestRule) ..add('records', records)) .toString(); @@ -189,7 +193,9 @@ class RuleHistoryBuilder implements Builder { } @override - _$RuleHistory build() { + RuleHistory build() => _build(); + + _$RuleHistory _build() { _$RuleHistory _$result; try { _$result = _$v ?? @@ -204,7 +210,7 @@ class RuleHistoryBuilder implements Builder { records.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'RuleHistory', _$failedField, e.toString()); + r'RuleHistory', _$failedField, e.toString()); } rethrow; } @@ -220,11 +226,11 @@ class _$RuleRecord extends RuleRecord { final DateTime time; factory _$RuleRecord([void Function(RuleRecordBuilder)? updates]) => - (new RuleRecordBuilder()..update(updates)).build(); + (new RuleRecordBuilder()..update(updates))._build(); _$RuleRecord._({required this.ruleId, required this.time}) : super._() { - BuiltValueNullFieldError.checkNotNull(ruleId, 'RuleRecord', 'ruleId'); - BuiltValueNullFieldError.checkNotNull(time, 'RuleRecord', 'time'); + BuiltValueNullFieldError.checkNotNull(ruleId, r'RuleRecord', 'ruleId'); + BuiltValueNullFieldError.checkNotNull(time, r'RuleRecord', 'time'); } @override @@ -242,12 +248,16 @@ class _$RuleRecord extends RuleRecord { @override int get hashCode { - return $jf($jc($jc(0, ruleId.hashCode), time.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, ruleId.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('RuleRecord') + return (newBuiltValueToStringHelper(r'RuleRecord') ..add('ruleId', ruleId) ..add('time', time)) .toString(); @@ -289,16 +299,18 @@ class RuleRecordBuilder implements Builder { } @override - _$RuleRecord build() { + RuleRecord build() => _build(); + + _$RuleRecord _build() { final _$result = _$v ?? new _$RuleRecord._( ruleId: BuiltValueNullFieldError.checkNotNull( - ruleId, 'RuleRecord', 'ruleId'), + ruleId, r'RuleRecord', 'ruleId'), time: BuiltValueNullFieldError.checkNotNull( - time, 'RuleRecord', 'time')); + time, r'RuleRecord', 'time')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/history/slay_history.g.dart b/edgehead/lib/fractal_stories/history/slay_history.g.dart index c7462a4c..63b2666b 100644 --- a/edgehead/lib/fractal_stories/history/slay_history.g.dart +++ b/edgehead/lib/fractal_stories/history/slay_history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.history.slay; +part of 'slay_history.dart'; // ************************************************************************** // BuiltValueGenerator @@ -35,7 +35,7 @@ class _$SlayHistorySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -90,13 +90,13 @@ class _$SlayRecordSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'actorId': result.actorId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'parentRoomName': result.parentRoomName = serializers.deserialize(value, @@ -104,11 +104,11 @@ class _$SlayRecordSerializer implements StructuredSerializer { break; case 'roomName': result.roomName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; } } @@ -122,10 +122,10 @@ class _$SlayHistory extends SlayHistory { final BuiltListMultimap records; factory _$SlayHistory([void Function(SlayHistoryBuilder)? updates]) => - (new SlayHistoryBuilder()..update(updates)).build(); + (new SlayHistoryBuilder()..update(updates))._build(); _$SlayHistory._({required this.records}) : super._() { - BuiltValueNullFieldError.checkNotNull(records, 'SlayHistory', 'records'); + BuiltValueNullFieldError.checkNotNull(records, r'SlayHistory', 'records'); } @override @@ -143,12 +143,16 @@ class _$SlayHistory extends SlayHistory { @override int get hashCode { - return $jf($jc(0, records.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, records.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('SlayHistory')..add('records', records)) + return (newBuiltValueToStringHelper(r'SlayHistory') + ..add('records', records)) .toString(); } } @@ -185,7 +189,9 @@ class SlayHistoryBuilder implements Builder { } @override - _$SlayHistory build() { + SlayHistory build() => _build(); + + _$SlayHistory _build() { _$SlayHistory _$result; try { _$result = _$v ?? new _$SlayHistory._(records: records.build()); @@ -196,7 +202,7 @@ class SlayHistoryBuilder implements Builder { records.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'SlayHistory', _$failedField, e.toString()); + r'SlayHistory', _$failedField, e.toString()); } rethrow; } @@ -216,7 +222,7 @@ class _$SlayRecord extends SlayRecord { final DateTime time; factory _$SlayRecord([void Function(SlayRecordBuilder)? updates]) => - (new SlayRecordBuilder()..update(updates)).build(); + (new SlayRecordBuilder()..update(updates))._build(); _$SlayRecord._( {required this.actorId, @@ -224,9 +230,9 @@ class _$SlayRecord extends SlayRecord { required this.roomName, required this.time}) : super._() { - BuiltValueNullFieldError.checkNotNull(actorId, 'SlayRecord', 'actorId'); - BuiltValueNullFieldError.checkNotNull(roomName, 'SlayRecord', 'roomName'); - BuiltValueNullFieldError.checkNotNull(time, 'SlayRecord', 'time'); + BuiltValueNullFieldError.checkNotNull(actorId, r'SlayRecord', 'actorId'); + BuiltValueNullFieldError.checkNotNull(roomName, r'SlayRecord', 'roomName'); + BuiltValueNullFieldError.checkNotNull(time, r'SlayRecord', 'time'); } @override @@ -248,15 +254,18 @@ class _$SlayRecord extends SlayRecord { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, actorId.hashCode), parentRoomName.hashCode), - roomName.hashCode), - time.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actorId.hashCode); + _$hash = $jc(_$hash, parentRoomName.hashCode); + _$hash = $jc(_$hash, roomName.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('SlayRecord') + return (newBuiltValueToStringHelper(r'SlayRecord') ..add('actorId', actorId) ..add('parentRoomName', parentRoomName) ..add('roomName', roomName) @@ -311,19 +320,21 @@ class SlayRecordBuilder implements Builder { } @override - _$SlayRecord build() { + SlayRecord build() => _build(); + + _$SlayRecord _build() { final _$result = _$v ?? new _$SlayRecord._( actorId: BuiltValueNullFieldError.checkNotNull( - actorId, 'SlayRecord', 'actorId'), + actorId, r'SlayRecord', 'actorId'), parentRoomName: parentRoomName, roomName: BuiltValueNullFieldError.checkNotNull( - roomName, 'SlayRecord', 'roomName'), + roomName, r'SlayRecord', 'roomName'), time: BuiltValueNullFieldError.checkNotNull( - time, 'SlayRecord', 'time')); + time, r'SlayRecord', 'time')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/history/visit_history.g.dart b/edgehead/lib/fractal_stories/history/visit_history.g.dart index 3d526845..ea4ba1c7 100644 --- a/edgehead/lib/fractal_stories/history/visit_history.g.dart +++ b/edgehead/lib/fractal_stories/history/visit_history.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.history.visit; +part of 'visit_history.dart'; // ************************************************************************** // BuiltValueGenerator @@ -37,7 +37,7 @@ class _$VisitHistorySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -95,17 +95,17 @@ class _$VisitRecordSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'actorId': result.actorId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'fromRoomName': result.fromRoomName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'parentRoomName': result.parentRoomName = serializers.deserialize(value, @@ -113,11 +113,11 @@ class _$VisitRecordSerializer implements StructuredSerializer { break; case 'roomName': result.roomName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; } } @@ -131,10 +131,10 @@ class _$VisitHistory extends VisitHistory { final BuiltListMultimap records; factory _$VisitHistory([void Function(VisitHistoryBuilder)? updates]) => - (new VisitHistoryBuilder()..update(updates)).build(); + (new VisitHistoryBuilder()..update(updates))._build(); _$VisitHistory._({required this.records}) : super._() { - BuiltValueNullFieldError.checkNotNull(records, 'VisitHistory', 'records'); + BuiltValueNullFieldError.checkNotNull(records, r'VisitHistory', 'records'); } @override @@ -152,12 +152,15 @@ class _$VisitHistory extends VisitHistory { @override int get hashCode { - return $jf($jc(0, records.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, records.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('VisitHistory') + return (newBuiltValueToStringHelper(r'VisitHistory') ..add('records', records)) .toString(); } @@ -196,7 +199,9 @@ class VisitHistoryBuilder } @override - _$VisitHistory build() { + VisitHistory build() => _build(); + + _$VisitHistory _build() { _$VisitHistory _$result; try { _$result = _$v ?? new _$VisitHistory._(records: records.build()); @@ -207,7 +212,7 @@ class VisitHistoryBuilder records.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'VisitHistory', _$failedField, e.toString()); + r'VisitHistory', _$failedField, e.toString()); } rethrow; } @@ -229,7 +234,7 @@ class _$VisitRecord extends VisitRecord { final DateTime time; factory _$VisitRecord([void Function(VisitRecordBuilder)? updates]) => - (new VisitRecordBuilder()..update(updates)).build(); + (new VisitRecordBuilder()..update(updates))._build(); _$VisitRecord._( {required this.actorId, @@ -238,11 +243,11 @@ class _$VisitRecord extends VisitRecord { required this.roomName, required this.time}) : super._() { - BuiltValueNullFieldError.checkNotNull(actorId, 'VisitRecord', 'actorId'); + BuiltValueNullFieldError.checkNotNull(actorId, r'VisitRecord', 'actorId'); BuiltValueNullFieldError.checkNotNull( - fromRoomName, 'VisitRecord', 'fromRoomName'); - BuiltValueNullFieldError.checkNotNull(roomName, 'VisitRecord', 'roomName'); - BuiltValueNullFieldError.checkNotNull(time, 'VisitRecord', 'time'); + fromRoomName, r'VisitRecord', 'fromRoomName'); + BuiltValueNullFieldError.checkNotNull(roomName, r'VisitRecord', 'roomName'); + BuiltValueNullFieldError.checkNotNull(time, r'VisitRecord', 'time'); } @override @@ -265,17 +270,19 @@ class _$VisitRecord extends VisitRecord { @override int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, actorId.hashCode), fromRoomName.hashCode), - parentRoomName.hashCode), - roomName.hashCode), - time.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actorId.hashCode); + _$hash = $jc(_$hash, fromRoomName.hashCode); + _$hash = $jc(_$hash, parentRoomName.hashCode); + _$hash = $jc(_$hash, roomName.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('VisitRecord') + return (newBuiltValueToStringHelper(r'VisitRecord') ..add('actorId', actorId) ..add('fromRoomName', fromRoomName) ..add('parentRoomName', parentRoomName) @@ -336,21 +343,23 @@ class VisitRecordBuilder implements Builder { } @override - _$VisitRecord build() { + VisitRecord build() => _build(); + + _$VisitRecord _build() { final _$result = _$v ?? new _$VisitRecord._( actorId: BuiltValueNullFieldError.checkNotNull( - actorId, 'VisitRecord', 'actorId'), + actorId, r'VisitRecord', 'actorId'), fromRoomName: BuiltValueNullFieldError.checkNotNull( - fromRoomName, 'VisitRecord', 'fromRoomName'), + fromRoomName, r'VisitRecord', 'fromRoomName'), parentRoomName: parentRoomName, roomName: BuiltValueNullFieldError.checkNotNull( - roomName, 'VisitRecord', 'roomName'), + roomName, r'VisitRecord', 'roomName'), time: BuiltValueNullFieldError.checkNotNull( - time, 'VisitRecord', 'time')); + time, r'VisitRecord', 'time')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/ink_ast.dart b/edgehead/lib/fractal_stories/ink_ast.dart index 0f8e2af5..5ef349ad 100644 --- a/edgehead/lib/fractal_stories/ink_ast.dart +++ b/edgehead/lib/fractal_stories/ink_ast.dart @@ -1,7 +1,7 @@ import 'package:edgehead/fractal_stories/context.dart'; class InkAst extends InkSequenceNode { - const InkAst(List children) : super(children); + const InkAst(super.children); List getNextPosition(List path) { final node = getNodeAt(path); @@ -79,7 +79,7 @@ class InkChoiceNode extends InkSequenceNode { } class InkForkNode extends InkSequenceNode { - const InkForkNode(List inkChoices) : super(inkChoices); + const InkForkNode(List super.inkChoices); List get inkChoices => children as List; } diff --git a/edgehead/lib/fractal_stories/item.g.dart b/edgehead/lib/fractal_stories/item.g.dart index 2f439361..4d7495aa 100644 --- a/edgehead/lib/fractal_stories/item.g.dart +++ b/edgehead/lib/fractal_stories/item.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.item; +part of 'item.dart'; // ************************************************************************** // BuiltValueGenerator @@ -63,7 +63,7 @@ class _$ItemSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -90,15 +90,15 @@ class _$ItemSerializer implements StructuredSerializer { break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'nameIsProperNoun': result.nameIsProperNoun = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -126,7 +126,7 @@ class _$Item extends Item { final bool nameIsProperNoun; factory _$Item([void Function(ItemBuilder)? updates]) => - (new ItemBuilder()..update(updates)).build(); + (new ItemBuilder()..update(updates))._build(); _$Item._( {this.adjective, @@ -139,12 +139,12 @@ class _$Item extends Item { required this.nameIsProperNoun}) : super._() { BuiltValueNullFieldError.checkNotNull( - damageCapability, 'Item', 'damageCapability'); - BuiltValueNullFieldError.checkNotNull(edibility, 'Item', 'edibility'); - BuiltValueNullFieldError.checkNotNull(id, 'Item', 'id'); - BuiltValueNullFieldError.checkNotNull(name, 'Item', 'name'); + damageCapability, r'Item', 'damageCapability'); + BuiltValueNullFieldError.checkNotNull(edibility, r'Item', 'edibility'); + BuiltValueNullFieldError.checkNotNull(id, r'Item', 'id'); + BuiltValueNullFieldError.checkNotNull(name, r'Item', 'name'); BuiltValueNullFieldError.checkNotNull( - nameIsProperNoun, 'Item', 'nameIsProperNoun'); + nameIsProperNoun, r'Item', 'nameIsProperNoun'); } @override @@ -170,18 +170,17 @@ class _$Item extends Item { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, adjective.hashCode), bodyPart.hashCode), - damageCapability.hashCode), - edibility.hashCode), - firstOwnerId.hashCode), - id.hashCode), - name.hashCode), - nameIsProperNoun.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, adjective.hashCode); + _$hash = $jc(_$hash, bodyPart.hashCode); + _$hash = $jc(_$hash, damageCapability.hashCode); + _$hash = $jc(_$hash, edibility.hashCode); + _$hash = $jc(_$hash, firstOwnerId.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, nameIsProperNoun.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -254,7 +253,9 @@ class ItemBuilder implements Builder { } @override - _$Item build() { + Item build() => _build(); + + _$Item _build() { _$Item _$result; try { _$result = _$v ?? @@ -264,10 +265,11 @@ class ItemBuilder implements Builder { damageCapability: damageCapability.build(), edibility: edibility.build(), firstOwnerId: firstOwnerId, - id: BuiltValueNullFieldError.checkNotNull(id, 'Item', 'id'), - name: BuiltValueNullFieldError.checkNotNull(name, 'Item', 'name'), + id: BuiltValueNullFieldError.checkNotNull(id, r'Item', 'id'), + name: + BuiltValueNullFieldError.checkNotNull(name, r'Item', 'name'), nameIsProperNoun: BuiltValueNullFieldError.checkNotNull( - nameIsProperNoun, 'Item', 'nameIsProperNoun')); + nameIsProperNoun, r'Item', 'nameIsProperNoun')); } catch (_) { late String _$failedField; try { @@ -279,7 +281,7 @@ class ItemBuilder implements Builder { edibility.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'Item', _$failedField, e.toString()); + r'Item', _$failedField, e.toString()); } rethrow; } @@ -288,4 +290,4 @@ class ItemBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/items/damage_capability.g.dart b/edgehead/lib/fractal_stories/items/damage_capability.g.dart index ffb89eea..701317e7 100644 --- a/edgehead/lib/fractal_stories/items/damage_capability.g.dart +++ b/edgehead/lib/fractal_stories/items/damage_capability.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.items.weapon; +part of 'damage_capability.dart'; // ************************************************************************** // BuiltValueGenerator @@ -53,37 +53,37 @@ class _$DamageCapabilitySerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'bluntDamage': result.bluntDamage = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'isCleaving': result.isCleaving = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'length': result.length = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'slashingDamage': result.slashingDamage = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'tearingDamage': result.tearingDamage = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'thrustingDamage': result.thrustingDamage = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'type': result.type = serializers.deserialize(value, - specifiedType: const FullType(WeaponType)) as WeaponType; + specifiedType: const FullType(WeaponType))! as WeaponType; break; } } @@ -110,7 +110,7 @@ class _$DamageCapability extends DamageCapability { factory _$DamageCapability( [void Function(DamageCapabilityBuilder)? updates]) => - (new DamageCapabilityBuilder()..update(updates)).build(); + (new DamageCapabilityBuilder()..update(updates))._build(); _$DamageCapability._( {required this.bluntDamage, @@ -122,17 +122,18 @@ class _$DamageCapability extends DamageCapability { required this.type}) : super._() { BuiltValueNullFieldError.checkNotNull( - bluntDamage, 'DamageCapability', 'bluntDamage'); + bluntDamage, r'DamageCapability', 'bluntDamage'); BuiltValueNullFieldError.checkNotNull( - isCleaving, 'DamageCapability', 'isCleaving'); - BuiltValueNullFieldError.checkNotNull(length, 'DamageCapability', 'length'); + isCleaving, r'DamageCapability', 'isCleaving'); BuiltValueNullFieldError.checkNotNull( - slashingDamage, 'DamageCapability', 'slashingDamage'); + length, r'DamageCapability', 'length'); BuiltValueNullFieldError.checkNotNull( - tearingDamage, 'DamageCapability', 'tearingDamage'); + slashingDamage, r'DamageCapability', 'slashingDamage'); BuiltValueNullFieldError.checkNotNull( - thrustingDamage, 'DamageCapability', 'thrustingDamage'); - BuiltValueNullFieldError.checkNotNull(type, 'DamageCapability', 'type'); + tearingDamage, r'DamageCapability', 'tearingDamage'); + BuiltValueNullFieldError.checkNotNull( + thrustingDamage, r'DamageCapability', 'thrustingDamage'); + BuiltValueNullFieldError.checkNotNull(type, r'DamageCapability', 'type'); } @override @@ -158,16 +159,16 @@ class _$DamageCapability extends DamageCapability { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, bluntDamage.hashCode), isCleaving.hashCode), - length.hashCode), - slashingDamage.hashCode), - tearingDamage.hashCode), - thrustingDamage.hashCode), - type.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, bluntDamage.hashCode); + _$hash = $jc(_$hash, isCleaving.hashCode); + _$hash = $jc(_$hash, length.hashCode); + _$hash = $jc(_$hash, slashingDamage.hashCode); + _$hash = $jc(_$hash, tearingDamage.hashCode); + _$hash = $jc(_$hash, thrustingDamage.hashCode); + _$hash = $jc(_$hash, type.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -235,26 +236,28 @@ class DamageCapabilityBuilder } @override - _$DamageCapability build() { + DamageCapability build() => _build(); + + _$DamageCapability _build() { final _$result = _$v ?? new _$DamageCapability._( bluntDamage: BuiltValueNullFieldError.checkNotNull( - bluntDamage, 'DamageCapability', 'bluntDamage'), + bluntDamage, r'DamageCapability', 'bluntDamage'), isCleaving: BuiltValueNullFieldError.checkNotNull( - isCleaving, 'DamageCapability', 'isCleaving'), + isCleaving, r'DamageCapability', 'isCleaving'), length: BuiltValueNullFieldError.checkNotNull( - length, 'DamageCapability', 'length'), + length, r'DamageCapability', 'length'), slashingDamage: BuiltValueNullFieldError.checkNotNull( - slashingDamage, 'DamageCapability', 'slashingDamage'), + slashingDamage, r'DamageCapability', 'slashingDamage'), tearingDamage: BuiltValueNullFieldError.checkNotNull( - tearingDamage, 'DamageCapability', 'tearingDamage'), + tearingDamage, r'DamageCapability', 'tearingDamage'), thrustingDamage: BuiltValueNullFieldError.checkNotNull( - thrustingDamage, 'DamageCapability', 'thrustingDamage'), + thrustingDamage, r'DamageCapability', 'thrustingDamage'), type: BuiltValueNullFieldError.checkNotNull( - type, 'DamageCapability', 'type')); + type, r'DamageCapability', 'type')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/items/edibility.g.dart b/edgehead/lib/fractal_stories/items/edibility.g.dart index 03f8d5c2..33e913f6 100644 --- a/edgehead/lib/fractal_stories/items/edibility.g.dart +++ b/edgehead/lib/fractal_stories/items/edibility.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.items.edibility; +part of 'edibility.dart'; // ************************************************************************** // BuiltValueGenerator @@ -43,7 +43,7 @@ class _$EdibilitySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -53,11 +53,11 @@ class _$EdibilitySerializer implements StructuredSerializer { break; case 'isEdibleByHumanoids': result.isEdibleByHumanoids = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'staminaBonus': result.staminaBonus = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -75,7 +75,7 @@ class _$Edibility extends Edibility { final int staminaBonus; factory _$Edibility([void Function(EdibilityBuilder)? updates]) => - (new EdibilityBuilder()..update(updates)).build(); + (new EdibilityBuilder()..update(updates))._build(); _$Edibility._( {this.eatingReport, @@ -83,9 +83,9 @@ class _$Edibility extends Edibility { required this.staminaBonus}) : super._() { BuiltValueNullFieldError.checkNotNull( - isEdibleByHumanoids, 'Edibility', 'isEdibleByHumanoids'); + isEdibleByHumanoids, r'Edibility', 'isEdibleByHumanoids'); BuiltValueNullFieldError.checkNotNull( - staminaBonus, 'Edibility', 'staminaBonus'); + staminaBonus, r'Edibility', 'staminaBonus'); } @override @@ -106,14 +106,17 @@ class _$Edibility extends Edibility { @override int get hashCode { - return $jf($jc( - $jc($jc(0, eatingReport.hashCode), isEdibleByHumanoids.hashCode), - staminaBonus.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, eatingReport.hashCode); + _$hash = $jc(_$hash, isEdibleByHumanoids.hashCode); + _$hash = $jc(_$hash, staminaBonus.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('Edibility') + return (newBuiltValueToStringHelper(r'Edibility') ..add('eatingReport', eatingReport) ..add('isEdibleByHumanoids', isEdibleByHumanoids) ..add('staminaBonus', staminaBonus)) @@ -162,17 +165,19 @@ class EdibilityBuilder implements Builder { } @override - _$Edibility build() { + Edibility build() => _build(); + + _$Edibility _build() { final _$result = _$v ?? new _$Edibility._( eatingReport: eatingReport, isEdibleByHumanoids: BuiltValueNullFieldError.checkNotNull( - isEdibleByHumanoids, 'Edibility', 'isEdibleByHumanoids'), + isEdibleByHumanoids, r'Edibility', 'isEdibleByHumanoids'), staminaBonus: BuiltValueNullFieldError.checkNotNull( - staminaBonus, 'Edibility', 'staminaBonus')); + staminaBonus, r'Edibility', 'staminaBonus')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/items/inventory.g.dart b/edgehead/lib/fractal_stories/items/inventory.g.dart index 5cc803bf..d70e8746 100644 --- a/edgehead/lib/fractal_stories/items/inventory.g.dart +++ b/edgehead/lib/fractal_stories/items/inventory.g.dart @@ -51,7 +51,7 @@ class _$InventorySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -71,7 +71,7 @@ class _$InventorySerializer implements StructuredSerializer { break; case 'weaponInPrimaryAppendage': result.weaponInPrimaryAppendage = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -99,9 +99,9 @@ class _$Inventory extends Inventory { required this.items, required this.weaponInPrimaryAppendage}) : super._() { - BuiltValueNullFieldError.checkNotNull(items, 'Inventory', 'items'); + BuiltValueNullFieldError.checkNotNull(items, r'Inventory', 'items'); BuiltValueNullFieldError.checkNotNull( - weaponInPrimaryAppendage, 'Inventory', 'weaponInPrimaryAppendage'); + weaponInPrimaryAppendage, r'Inventory', 'weaponInPrimaryAppendage'); } @override @@ -123,15 +123,18 @@ class _$Inventory extends Inventory { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, currentShield.hashCode), currentWeapon.hashCode), - items.hashCode), - weaponInPrimaryAppendage.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, currentShield.hashCode); + _$hash = $jc(_$hash, currentWeapon.hashCode); + _$hash = $jc(_$hash, items.hashCode); + _$hash = $jc(_$hash, weaponInPrimaryAppendage.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('Inventory') + return (newBuiltValueToStringHelper(r'Inventory') ..add('currentShield', currentShield) ..add('currentWeapon', currentWeapon) ..add('items', items) @@ -217,7 +220,9 @@ class _$InventoryBuilder extends InventoryBuilder { } @override - _$Inventory build() { + Inventory build() => _build(); + + _$Inventory _build() { _$Inventory _$result; try { _$result = _$v ?? @@ -227,7 +232,7 @@ class _$InventoryBuilder extends InventoryBuilder { items: items.build(), weaponInPrimaryAppendage: BuiltValueNullFieldError.checkNotNull( weaponInPrimaryAppendage, - 'Inventory', + r'Inventory', 'weaponInPrimaryAppendage')); } catch (_) { late String _$failedField; @@ -236,7 +241,7 @@ class _$InventoryBuilder extends InventoryBuilder { items.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'Inventory', _$failedField, e.toString()); + r'Inventory', _$failedField, e.toString()); } rethrow; } @@ -245,4 +250,4 @@ class _$InventoryBuilder extends InventoryBuilder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/items/weapon_type.dart b/edgehead/lib/fractal_stories/items/weapon_type.dart index 5f862c4c..1bac8087 100644 --- a/edgehead/lib/fractal_stories/items/weapon_type.dart +++ b/edgehead/lib/fractal_stories/items/weapon_type.dart @@ -63,7 +63,7 @@ class WeaponType extends EnumClass { static BuiltSet get values => _$values; - const WeaponType._(String name) : super(name); + const WeaponType._(super.name); /// The weapon can block thrusts. Typical examples are shields. bool get canBlockThrust { diff --git a/edgehead/lib/fractal_stories/items/weapon_type.g.dart b/edgehead/lib/fractal_stories/items/weapon_type.g.dart index 02769446..1044a22b 100644 --- a/edgehead/lib/fractal_stories/items/weapon_type.g.dart +++ b/edgehead/lib/fractal_stories/items/weapon_type.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.items.weapon_type; +part of 'weapon_type.dart'; // ************************************************************************** // BuiltValueGenerator @@ -89,4 +89,4 @@ class _$WeaponTypeSerializer implements PrimitiveSerializer { WeaponType.valueOf(serialized as String); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/npc/npc_capability.g.dart b/edgehead/lib/fractal_stories/npc/npc_capability.g.dart index 6ea07ddc..eb146c7f 100644 --- a/edgehead/lib/fractal_stories/npc/npc_capability.g.dart +++ b/edgehead/lib/fractal_stories/npc/npc_capability.g.dart @@ -41,7 +41,7 @@ class _$NpcCapabilitySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -51,7 +51,7 @@ class _$NpcCapabilitySerializer implements StructuredSerializer { break; case 'isHireable': result.isHireable = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; } } @@ -67,12 +67,12 @@ class _$NpcCapability extends NpcCapability { final bool isHireable; factory _$NpcCapability([void Function(NpcCapabilityBuilder)? updates]) => - (new NpcCapabilityBuilder()..update(updates)).build(); + (new NpcCapabilityBuilder()..update(updates))._build(); _$NpcCapability._({this.followingActorId, required this.isHireable}) : super._() { BuiltValueNullFieldError.checkNotNull( - isHireable, 'NpcCapability', 'isHireable'); + isHireable, r'NpcCapability', 'isHireable'); } @override @@ -92,12 +92,16 @@ class _$NpcCapability extends NpcCapability { @override int get hashCode { - return $jf($jc($jc(0, followingActorId.hashCode), isHireable.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, followingActorId.hashCode); + _$hash = $jc(_$hash, isHireable.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('NpcCapability') + return (newBuiltValueToStringHelper(r'NpcCapability') ..add('followingActorId', followingActorId) ..add('isHireable', isHireable)) .toString(); @@ -141,15 +145,17 @@ class NpcCapabilityBuilder } @override - _$NpcCapability build() { + NpcCapability build() => _build(); + + _$NpcCapability _build() { final _$result = _$v ?? new _$NpcCapability._( followingActorId: followingActorId, isHireable: BuiltValueNullFieldError.checkNotNull( - isHireable, 'NpcCapability', 'isHireable')); + isHireable, r'NpcCapability', 'isHireable')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/plan_consequence.dart b/edgehead/lib/fractal_stories/plan_consequence.dart index 01f18b76..2c73ccf8 100644 --- a/edgehead/lib/fractal_stories/plan_consequence.dart +++ b/edgehead/lib/fractal_stories/plan_consequence.dart @@ -1,5 +1,3 @@ -library stranded.plan_consequence; - import 'package:edgehead/fractal_stories/action.dart'; import 'package:edgehead/fractal_stories/actor_score.dart'; import 'package:edgehead/fractal_stories/storyline/storyline.dart'; diff --git a/edgehead/lib/fractal_stories/planner.dart b/edgehead/lib/fractal_stories/planner.dart index 2a106f5c..beea7717 100644 --- a/edgehead/lib/fractal_stories/planner.dart +++ b/edgehead/lib/fractal_stories/planner.dart @@ -1,5 +1,3 @@ -library stranded.planner; - import 'dart:collection'; import 'package:edgehead/fractal_stories/action.dart'; diff --git a/edgehead/lib/fractal_stories/planner_recommendation.dart b/edgehead/lib/fractal_stories/planner_recommendation.dart index 654c9eaf..b6950b81 100644 --- a/edgehead/lib/fractal_stories/planner_recommendation.dart +++ b/edgehead/lib/fractal_stories/planner_recommendation.dart @@ -57,9 +57,9 @@ class PlannerRecommendation { var bestSelfPreserving = _findBest((score) => score.selfPreservation); var bestEnemyDamaging = _findBest((score) => -score.enemy, - skip: [bestSelfPreserving].whereNotNull().toList()); + skip: [bestSelfPreserving].nonNulls.toList()); var bestTeamPreserving = _findBest((score) => score.teamPreservation, - skip: [bestSelfPreserving, bestEnemyDamaging].whereNotNull().toList()); + skip: [bestSelfPreserving, bestEnemyDamaging].nonNulls.toList()); int count = 0; diff --git a/edgehead/lib/fractal_stories/pose.dart b/edgehead/lib/fractal_stories/pose.dart index fbb42075..9c5db68b 100644 --- a/edgehead/lib/fractal_stories/pose.dart +++ b/edgehead/lib/fractal_stories/pose.dart @@ -44,7 +44,7 @@ class Pose extends EnumClass implements Comparable { combat, ]; - const Pose._(String name) : super(name); + const Pose._(super.name); bool operator <(Pose other) => compareTo(other) < 0; diff --git a/edgehead/lib/fractal_stories/pose.g.dart b/edgehead/lib/fractal_stories/pose.g.dart index 7920ff7d..625df18e 100644 --- a/edgehead/lib/fractal_stories/pose.g.dart +++ b/edgehead/lib/fractal_stories/pose.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of fractal_stories.pose; +part of 'pose.dart'; // ************************************************************************** // BuiltValueGenerator @@ -56,4 +56,4 @@ class _$PoseSerializer implements PrimitiveSerializer { Pose.valueOf(serialized as String); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/room.dart b/edgehead/lib/fractal_stories/room.dart index 62984f6a..51d6d3c8 100644 --- a/edgehead/lib/fractal_stories/room.dart +++ b/edgehead/lib/fractal_stories/room.dart @@ -1,5 +1,3 @@ -library stranded.room; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/context.dart'; import 'package:edgehead/fractal_stories/item.dart'; diff --git a/edgehead/lib/fractal_stories/simulation.dart b/edgehead/lib/fractal_stories/simulation.dart index e41fa9e5..323ed4ab 100644 --- a/edgehead/lib/fractal_stories/simulation.dart +++ b/edgehead/lib/fractal_stories/simulation.dart @@ -1,5 +1,3 @@ -library stranded.world; - import 'package:edgehead/fractal_stories/action.dart'; import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/context.dart'; diff --git a/edgehead/lib/fractal_stories/situation.dart b/edgehead/lib/fractal_stories/situation.dart index 04824908..d9f68995 100644 --- a/edgehead/lib/fractal_stories/situation.dart +++ b/edgehead/lib/fractal_stories/situation.dart @@ -1,5 +1,3 @@ -library stranded.situation; - import 'package:edgehead/fractal_stories/action.dart'; import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/context.dart'; diff --git a/edgehead/lib/fractal_stories/storyline/randomly.dart b/edgehead/lib/fractal_stories/storyline/randomly.dart index 766b220e..6800bbe1 100644 --- a/edgehead/lib/fractal_stories/storyline/randomly.dart +++ b/edgehead/lib/fractal_stories/storyline/randomly.dart @@ -1,5 +1,3 @@ -library randomly; - import 'dart:math'; // ignore: avoid_classes_with_only_static_members @@ -181,16 +179,12 @@ class Randomly { switch (index) { case 0: script1(); - break; case 1: script2(); - break; case 2: script3!(); - break; case 4: script4!(); - break; } } diff --git a/edgehead/lib/fractal_stories/storyline/shadow_graph/shadow_graph.dart b/edgehead/lib/fractal_stories/storyline/shadow_graph/shadow_graph.dart index 232c807c..b75706ca 100644 --- a/edgehead/lib/fractal_stories/storyline/shadow_graph/shadow_graph.dart +++ b/edgehead/lib/fractal_stories/storyline/shadow_graph/shadow_graph.dart @@ -3,7 +3,7 @@ library storyline.shadow_graph; import 'dart:collection'; import 'dart:math'; -import 'package:built_value/built_value.dart' show $jf, $jc; +import 'package:built_value/built_value.dart' show $jc, $jf; import 'package:edgehead/fractal_stories/storyline/storyline.dart'; import 'package:logging/logging.dart'; diff --git a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/identifier.dart b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/identifier.dart index 3955f509..3cc1c3ef 100644 --- a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/identifier.dart +++ b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/identifier.dart @@ -1,4 +1,4 @@ -part of storyline.shadow_graph; +part of '../shadow_graph.dart'; /// A list of [IdentifierLevel]s, going from most verbose to least. /// diff --git a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/report_pair.dart b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/report_pair.dart index 3e03b35a..ee7045e6 100644 --- a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/report_pair.dart +++ b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/report_pair.dart @@ -1,4 +1,4 @@ -part of storyline.shadow_graph; +part of '../shadow_graph.dart'; class _ReportPair { final int index; diff --git a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/sentence_join_type.dart b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/sentence_join_type.dart index 82d5bbce..e6f80f98 100644 --- a/edgehead/lib/fractal_stories/storyline/shadow_graph/src/sentence_join_type.dart +++ b/edgehead/lib/fractal_stories/storyline/shadow_graph/src/sentence_join_type.dart @@ -1,4 +1,4 @@ -part of storyline.shadow_graph; +part of '../shadow_graph.dart'; enum SentenceConjunction { /// Just straight nothing (after a [SentenceJoinType.period], for example). diff --git a/edgehead/lib/fractal_stories/storyline/storyline.dart b/edgehead/lib/fractal_stories/storyline/storyline.dart index b290527f..8c318c67 100644 --- a/edgehead/lib/fractal_stories/storyline/storyline.dart +++ b/edgehead/lib/fractal_stories/storyline/storyline.dart @@ -652,42 +652,30 @@ class Storyline { switch (conjunction) { case SentenceConjunction.nothing: needsCapitalization = true; - break; case SentenceConjunction.and: strBuf.write('And '); - break; case SentenceConjunction.but: strBuf.write('But '); - break; } - break; case SentenceJoinType.period: strBuf.write('. '); switch (conjunction) { case SentenceConjunction.nothing: needsCapitalization = true; - break; case SentenceConjunction.and: strBuf.write('And '); - break; case SentenceConjunction.but: strBuf.write('But '); - break; } - break; case SentenceJoinType.comma: switch (conjunction) { case SentenceConjunction.nothing: strBuf.write(', '); - break; case SentenceConjunction.and: strBuf.write(' and '); - break; case SentenceConjunction.but: strBuf.write(' but '); - break; } - break; } String randomReport = _reports[i].string; @@ -1071,7 +1059,6 @@ class Storyline { throw UnimplementedError('Only subjects can be omitted in $result, ' 'but $qualifications show it for $complement'); } - break; case IdentifierLevel.pronoun: result = _replaceFirstThenAll( @@ -1085,7 +1072,6 @@ class Storyline { complement.genericPossessive: complement.pronounPossessive, }, ); - break; case IdentifierLevel.adjectiveOne: result = _replaceFirstThenAll( result, @@ -1098,7 +1084,6 @@ class Storyline { complement.genericPossessive: complement.pronounPossessive, }, ); - break; // IdentifierLevel.ownerNoun renders the same as IdentifierLevel.noun. // That level only forces owners to appear before the noun. case IdentifierLevel.ownerNoun: @@ -1114,7 +1099,6 @@ class Storyline { complement.genericPossessive: complement.pronounPossessive, }, ); - break; // IdentifierLevel.ownerAdjectiveNoun renders the same as // IdentifierLevel.adjectiveNoun. That level only forces owners // to appear before the adjective & noun. @@ -1132,7 +1116,6 @@ class Storyline { complement.genericPossessive: complement.pronounPossessive, }, ); - break; case IdentifierLevel.properNoun: result = _replaceFirstThenAll( result, @@ -1145,7 +1128,6 @@ class Storyline { complement.genericPossessive: complement.pronounPossessive, }, ); - break; } assert(!result.contains(complement.generic), diff --git a/edgehead/lib/fractal_stories/storyline/storyline_complement.dart b/edgehead/lib/fractal_stories/storyline/storyline_complement.dart index 20be21ba..fc3b5f4a 100644 --- a/edgehead/lib/fractal_stories/storyline/storyline_complement.dart +++ b/edgehead/lib/fractal_stories/storyline/storyline_complement.dart @@ -1,6 +1,6 @@ // ignore_for_file: constant_identifier_names -part of storyline; +part of 'storyline.dart'; /// A data structure holding the stopwords associated with a type of complement /// (a.k.a. grammatical object, or object argument). @@ -13,6 +13,7 @@ part of storyline; /// sentence, or either of the two objects in a ditransitive sentence). /// See https://en.wikipedia.org/wiki/Object_(grammar) and /// https://en.wikipedia.org/wiki/Complement_(linguistics). +// ignore: use_enums class ComplementType { /// Lists all the complement types. static const all = [ diff --git a/edgehead/lib/fractal_stories/storyline/storyline_entity.dart b/edgehead/lib/fractal_stories/storyline/storyline_entity.dart index b508928e..4bc2ef4a 100644 --- a/edgehead/lib/fractal_stories/storyline/storyline_entity.dart +++ b/edgehead/lib/fractal_stories/storyline/storyline_entity.dart @@ -1,4 +1,4 @@ -part of storyline; +part of 'storyline.dart'; /// Entity is a thing, a creature, a robot, or a person that is an interactive /// part of the gamebook environment. diff --git a/edgehead/lib/fractal_stories/storyline/storyline_pronoun.g.dart b/edgehead/lib/fractal_stories/storyline/storyline_pronoun.g.dart index 7a18d672..3bc701b9 100644 --- a/edgehead/lib/fractal_stories/storyline/storyline_pronoun.g.dart +++ b/edgehead/lib/fractal_stories/storyline/storyline_pronoun.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of storyline.pronoun; +part of 'storyline_pronoun.dart'; // ************************************************************************** // BuiltValueGenerator @@ -41,25 +41,25 @@ class _$PronounSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'accusative': result.accusative = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'genitive': result.genitive = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'nominative': result.nominative = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'self': result.self = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; } } @@ -79,7 +79,7 @@ class _$Pronoun extends Pronoun { final String self; factory _$Pronoun([void Function(PronounBuilder)? updates]) => - (new PronounBuilder()..update(updates)).build(); + (new PronounBuilder()..update(updates))._build(); _$Pronoun._( {required this.accusative, @@ -87,10 +87,10 @@ class _$Pronoun extends Pronoun { required this.nominative, required this.self}) : super._() { - BuiltValueNullFieldError.checkNotNull(accusative, 'Pronoun', 'accusative'); - BuiltValueNullFieldError.checkNotNull(genitive, 'Pronoun', 'genitive'); - BuiltValueNullFieldError.checkNotNull(nominative, 'Pronoun', 'nominative'); - BuiltValueNullFieldError.checkNotNull(self, 'Pronoun', 'self'); + BuiltValueNullFieldError.checkNotNull(accusative, r'Pronoun', 'accusative'); + BuiltValueNullFieldError.checkNotNull(genitive, r'Pronoun', 'genitive'); + BuiltValueNullFieldError.checkNotNull(nominative, r'Pronoun', 'nominative'); + BuiltValueNullFieldError.checkNotNull(self, r'Pronoun', 'self'); } @override @@ -112,10 +112,13 @@ class _$Pronoun extends Pronoun { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, accusative.hashCode), genitive.hashCode), - nominative.hashCode), - self.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, accusative.hashCode); + _$hash = $jc(_$hash, genitive.hashCode); + _$hash = $jc(_$hash, nominative.hashCode); + _$hash = $jc(_$hash, self.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -164,20 +167,22 @@ class PronounBuilder implements Builder { } @override - _$Pronoun build() { + Pronoun build() => _build(); + + _$Pronoun _build() { final _$result = _$v ?? new _$Pronoun._( accusative: BuiltValueNullFieldError.checkNotNull( - accusative, 'Pronoun', 'accusative'), + accusative, r'Pronoun', 'accusative'), genitive: BuiltValueNullFieldError.checkNotNull( - genitive, 'Pronoun', 'genitive'), + genitive, r'Pronoun', 'genitive'), nominative: BuiltValueNullFieldError.checkNotNull( - nominative, 'Pronoun', 'nominative'), - self: - BuiltValueNullFieldError.checkNotNull(self, 'Pronoun', 'self')); + nominative, r'Pronoun', 'nominative'), + self: BuiltValueNullFieldError.checkNotNull( + self, r'Pronoun', 'self')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/team.g.dart b/edgehead/lib/fractal_stories/team.g.dart index 6e072c37..8cf89804 100644 --- a/edgehead/lib/fractal_stories/team.g.dart +++ b/edgehead/lib/fractal_stories/team.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.team; +part of 'team.dart'; // ************************************************************************** // BuiltValueGenerator @@ -32,13 +32,13 @@ class _$TeamSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -52,10 +52,10 @@ class _$Team extends Team { final int id; factory _$Team([void Function(TeamBuilder)? updates]) => - (new TeamBuilder()..update(updates)).build(); + (new TeamBuilder()..update(updates))._build(); _$Team._({required this.id}) : super._() { - BuiltValueNullFieldError.checkNotNull(id, 'Team', 'id'); + BuiltValueNullFieldError.checkNotNull(id, r'Team', 'id'); } @override @@ -73,12 +73,15 @@ class _$Team extends Team { @override int get hashCode { - return $jf($jc(0, id.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('Team')..add('id', id)).toString(); + return (newBuiltValueToStringHelper(r'Team')..add('id', id)).toString(); } } @@ -112,13 +115,15 @@ class TeamBuilder implements Builder { } @override - _$Team build() { + Team build() => _build(); + + _$Team _build() { final _$result = _$v ?? new _$Team._( - id: BuiltValueNullFieldError.checkNotNull(id, 'Team', 'id')); + id: BuiltValueNullFieldError.checkNotNull(id, r'Team', 'id')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/fractal_stories/util/alternate_iterables.dart b/edgehead/lib/fractal_stories/util/alternate_iterables.dart index 0477de24..a1ecf936 100644 --- a/edgehead/lib/fractal_stories/util/alternate_iterables.dart +++ b/edgehead/lib/fractal_stories/util/alternate_iterables.dart @@ -1,5 +1,3 @@ -library alternate_iterables; - /// Alternates between two iterables. Once one iterable is depleted, the other /// one runs through to the end. Iterable alternate(Iterable first, Iterable second) sync* { diff --git a/edgehead/lib/fractal_stories/util/throw_if_duplicate.dart b/edgehead/lib/fractal_stories/util/throw_if_duplicate.dart index 99f6b4a1..8bcea597 100644 --- a/edgehead/lib/fractal_stories/util/throw_if_duplicate.dart +++ b/edgehead/lib/fractal_stories/util/throw_if_duplicate.dart @@ -1,5 +1,3 @@ -library throw_if_duplicate; - /// Throws when [set] has duplicate entries. bool hasDuplicities(Iterable set) { var control = {}; diff --git a/edgehead/lib/fractal_stories/world_state.g.dart b/edgehead/lib/fractal_stories/world_state.g.dart index 490006df..4d3f2d01 100644 --- a/edgehead/lib/fractal_stories/world_state.g.dart +++ b/edgehead/lib/fractal_stories/world_state.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.world_state; +part of 'world_state.dart'; // ************************************************************************** // BuiltValueGenerator @@ -73,7 +73,7 @@ class _$WorldStateSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -117,11 +117,11 @@ class _$WorldStateSerializer implements StructuredSerializer { break; case 'statefulRandomState': result.statefulRandomState = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'time': result.time = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; + specifiedType: const FullType(DateTime))! as DateTime; break; case 'visitHistory': result.visitHistory.replace(serializers.deserialize(value, @@ -159,7 +159,7 @@ class _$WorldState extends WorldState { final VisitHistory visitHistory; factory _$WorldState([void Function(WorldStateBuilder)? updates]) => - (new WorldStateBuilder()..update(updates)).build(); + (new WorldStateBuilder()..update(updates))._build(); _$WorldState._( {required this.actionHistory, @@ -175,21 +175,21 @@ class _$WorldState extends WorldState { required this.visitHistory}) : super._() { BuiltValueNullFieldError.checkNotNull( - actionHistory, 'WorldState', 'actionHistory'); - BuiltValueNullFieldError.checkNotNull(actors, 'WorldState', 'actors'); + actionHistory, r'WorldState', 'actionHistory'); + BuiltValueNullFieldError.checkNotNull(actors, r'WorldState', 'actors'); BuiltValueNullFieldError.checkNotNull( - customHistory, 'WorldState', 'customHistory'); + customHistory, r'WorldState', 'customHistory'); BuiltValueNullFieldError.checkNotNull( - ruleHistory, 'WorldState', 'ruleHistory'); + ruleHistory, r'WorldState', 'ruleHistory'); BuiltValueNullFieldError.checkNotNull( - situations, 'WorldState', 'situations'); + situations, r'WorldState', 'situations'); BuiltValueNullFieldError.checkNotNull( - slayHistory, 'WorldState', 'slayHistory'); + slayHistory, r'WorldState', 'slayHistory'); BuiltValueNullFieldError.checkNotNull( - statefulRandomState, 'WorldState', 'statefulRandomState'); - BuiltValueNullFieldError.checkNotNull(time, 'WorldState', 'time'); + statefulRandomState, r'WorldState', 'statefulRandomState'); + BuiltValueNullFieldError.checkNotNull(time, r'WorldState', 'time'); BuiltValueNullFieldError.checkNotNull( - visitHistory, 'WorldState', 'visitHistory'); + visitHistory, r'WorldState', 'visitHistory'); } @override @@ -218,26 +218,20 @@ class _$WorldState extends WorldState { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, actionHistory.hashCode), - actors.hashCode), - customHistory.hashCode), - director.hashCode), - global.hashCode), - ruleHistory.hashCode), - situations.hashCode), - slayHistory.hashCode), - statefulRandomState.hashCode), - time.hashCode), - visitHistory.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actionHistory.hashCode); + _$hash = $jc(_$hash, actors.hashCode); + _$hash = $jc(_$hash, customHistory.hashCode); + _$hash = $jc(_$hash, director.hashCode); + _$hash = $jc(_$hash, global.hashCode); + _$hash = $jc(_$hash, ruleHistory.hashCode); + _$hash = $jc(_$hash, situations.hashCode); + _$hash = $jc(_$hash, slayHistory.hashCode); + _$hash = $jc(_$hash, statefulRandomState.hashCode); + _$hash = $jc(_$hash, time.hashCode); + _$hash = $jc(_$hash, visitHistory.hashCode); + _$hash = $jf(_$hash); + return _$hash; } } @@ -336,7 +330,9 @@ class WorldStateBuilder implements Builder { } @override - _$WorldState build() { + WorldState build() => _build(); + + _$WorldState _build() { _$WorldState _$result; try { _$result = _$v ?? @@ -350,9 +346,9 @@ class WorldStateBuilder implements Builder { situations: situations.build(), slayHistory: slayHistory.build(), statefulRandomState: BuiltValueNullFieldError.checkNotNull( - statefulRandomState, 'WorldState', 'statefulRandomState'), + statefulRandomState, r'WorldState', 'statefulRandomState'), time: BuiltValueNullFieldError.checkNotNull( - time, 'WorldState', 'time'), + time, r'WorldState', 'time'), visitHistory: visitHistory.build()); } catch (_) { late String _$failedField; @@ -377,7 +373,7 @@ class WorldStateBuilder implements Builder { visitHistory.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'WorldState', _$failedField, e.toString()); + r'WorldState', _$failedField, e.toString()); } rethrow; } @@ -386,4 +382,4 @@ class WorldStateBuilder implements Builder { } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/ruleset/ruleset.dart b/edgehead/lib/ruleset/ruleset.dart index 3d23dc37..b22717c9 100644 --- a/edgehead/lib/ruleset/ruleset.dart +++ b/edgehead/lib/ruleset/ruleset.dart @@ -1,5 +1,3 @@ -library edgehead.ruleset; - import 'package:edgehead/fractal_stories/context.dart'; import 'package:edgehead/fractal_stories/world_state.dart'; import 'package:meta/meta.dart'; diff --git a/edgehead/lib/src/fight/actions/equip_weapon.dart b/edgehead/lib/src/fight/actions/equip_weapon.dart index 985f272d..4fc8c50c 100644 --- a/edgehead/lib/src/fight/actions/equip_weapon.dart +++ b/edgehead/lib/src/fight/actions/equip_weapon.dart @@ -133,6 +133,7 @@ abstract class InventoryItemAction extends Action { referredEntities: context.world.actors.where((actor) => !actor.isDirector)) ..add(commandPathTemplate.join(' >> '), + // ignore: dead_code object: templateContainsObject ? object : null)) .realizeAsString() // Then split again into a list. diff --git a/edgehead/lib/src/fight/actions/regain_balance.dart b/edgehead/lib/src/fight/actions/regain_balance.dart index 21dc5543..f529f177 100644 --- a/edgehead/lib/src/fight/actions/regain_balance.dart +++ b/edgehead/lib/src/fight/actions/regain_balance.dart @@ -69,13 +69,13 @@ class RegainBalance extends Action { } @override - Duration getRecoveryDuration(ApplicabilityContext context, Nothing? _) { + Duration getRecoveryDuration(ApplicabilityContext context, Nothing? object) { if (context.actor.isPlayer) { // This move should be super fast for the player. return const Duration(milliseconds: 200); } - return super.getRecoveryDuration(context, _); + return super.getRecoveryDuration(context, object); } @override diff --git a/edgehead/lib/src/fight/actions/wait.dart b/edgehead/lib/src/fight/actions/wait.dart index 90ec6a16..85140372 100644 --- a/edgehead/lib/src/fight/actions/wait.dart +++ b/edgehead/lib/src/fight/actions/wait.dart @@ -65,13 +65,13 @@ class Wait extends Action { @override bool isApplicable(ApplicabilityContext c, Actor a, Simulation sim, - WorldState world, void _) => + WorldState world, void o) => a.isPlayer && // Don't allow waiting when there are no friendlies. getPartyOf(a, sim, world).length > 1 && // Don't allow waiting if cowering, scrambling, or thrashing // around is an option. - !Cower.singleton.isApplicable(c, a, sim, world, _) && - !Scramble.singleton.isApplicable(c, a, sim, world, _) && - !ThrashAroundBlind.singleton.isApplicable(c, a, sim, world, _); + !Cower.singleton.isApplicable(c, a, sim, world, o) && + !Scramble.singleton.isApplicable(c, a, sim, world, o) && + !ThrashAroundBlind.singleton.isApplicable(c, a, sim, world, o); } diff --git a/edgehead/lib/src/fight/bite/bite_defense/bite_defense_situation.dart b/edgehead/lib/src/fight/bite/bite_defense/bite_defense_situation.dart index 2773a6a4..b5c1bca8 100644 --- a/edgehead/lib/src/fight/bite/bite_defense/bite_defense_situation.dart +++ b/edgehead/lib/src/fight/bite/bite_defense/bite_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.slash_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/bite/bite_defense/actions/dodge_bite.dart'; import 'package:edgehead/src/fight/bite/bite_defense/actions/impale_biter.dart'; diff --git a/edgehead/lib/src/fight/bite/bite_situation.dart b/edgehead/lib/src/fight/bite/bite_situation.dart index a4f34eb5..0e1c1e77 100644 --- a/edgehead/lib/src/fight/bite/bite_situation.dart +++ b/edgehead/lib/src/fight/bite/bite_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.bite_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/anatomy/body_part.dart'; import 'package:edgehead/fractal_stories/situation.dart'; diff --git a/edgehead/lib/src/fight/blunt_swing/blunt_swing_defense/blunt_swing_defense_situation.dart b/edgehead/lib/src/fight/blunt_swing/blunt_swing_defense/blunt_swing_defense_situation.dart index 8f93d63c..4813e3d1 100644 --- a/edgehead/lib/src/fight/blunt_swing/blunt_swing_defense/blunt_swing_defense_situation.dart +++ b/edgehead/lib/src/fight/blunt_swing/blunt_swing_defense/blunt_swing_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.blunt_swing_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/blunt_swing/blunt_swing_defense/actions/defensive_parry_blunt_swing.dart'; import 'package:edgehead/src/fight/blunt_swing/blunt_swing_defense/actions/dodge_blunt_swing.dart'; diff --git a/edgehead/lib/src/fight/blunt_swing/blunt_swing_situation.dart b/edgehead/lib/src/fight/blunt_swing/blunt_swing_situation.dart index 5a3e6fc8..26a7562a 100644 --- a/edgehead/lib/src/fight/blunt_swing/blunt_swing_situation.dart +++ b/edgehead/lib/src/fight/blunt_swing/blunt_swing_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.blunt_swing_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/anatomy/body_part.dart'; import 'package:edgehead/fractal_stories/situation.dart'; diff --git a/edgehead/lib/src/fight/clash/clash_defense/clash_defense_situation.dart b/edgehead/lib/src/fight/clash/clash_defense/clash_defense_situation.dart index 1cba9daf..d152c1f7 100644 --- a/edgehead/lib/src/fight/clash/clash_defense/clash_defense_situation.dart +++ b/edgehead/lib/src/fight/clash/clash_defense/clash_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.clash_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/clash/clash_defense/actions/counter_clash.dart'; import 'package:edgehead/src/fight/clash/clash_defense/actions/withstand_clash.dart'; diff --git a/edgehead/lib/src/fight/clash/clash_situation.dart b/edgehead/lib/src/fight/clash/clash_situation.dart index daf11415..ab63dfb4 100644 --- a/edgehead/lib/src/fight/clash/clash_situation.dart +++ b/edgehead/lib/src/fight/clash/clash_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.clash_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/clash/actions/finish_clash.dart'; diff --git a/edgehead/lib/src/fight/common/attacker_situation.dart b/edgehead/lib/src/fight/common/attacker_situation.dart index 7b05b53d..8e904c12 100644 --- a/edgehead/lib/src/fight/common/attacker_situation.dart +++ b/edgehead/lib/src/fight/common/attacker_situation.dart @@ -59,7 +59,7 @@ class AttackDirection extends EnumClass { static BuiltSet get values => _$attackDirectionValues; - const AttackDirection._(String name) : super(name); + const AttackDirection._(super.name); BodyPartDesignation toBodyPartDesignation() { assert( diff --git a/edgehead/lib/src/fight/common/attacker_situation.g.dart b/edgehead/lib/src/fight/common/attacker_situation.g.dart index 953201eb..b848e0d7 100644 --- a/edgehead/lib/src/fight/common/attacker_situation.g.dart +++ b/edgehead/lib/src/fight/common/attacker_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.attacker_situation; +part of 'attacker_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -146,7 +146,7 @@ class _$AttackerSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -156,12 +156,12 @@ class _$AttackerSituationSerializer break; case 'attackDirection': result.attackDirection = serializers.deserialize(value, - specifiedType: const FullType(AttackDirection)) + specifiedType: const FullType(AttackDirection))! as AttackDirection; break; case 'attacker': result.attacker = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'builtEnemyTargetActionGenerators': result.builtEnemyTargetActionGenerators.replace( @@ -179,7 +179,7 @@ class _$AttackerSituationSerializer break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'move': result.move.replace(serializers.deserialize(value, @@ -187,15 +187,15 @@ class _$AttackerSituationSerializer break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'target': result.target = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -236,17 +236,17 @@ class _$MoveEntitySerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'firstOwnerId': result.firstOwnerId = serializers.deserialize(value, @@ -283,7 +283,7 @@ class _$AttackerSituation extends AttackerSituation { factory _$AttackerSituation( [void Function(AttackerSituationBuilder)? updates]) => - (new AttackerSituationBuilder()..update(updates)).build(); + (new AttackerSituationBuilder()..update(updates))._build(); _$AttackerSituation._( {this.additionalData, @@ -298,19 +298,19 @@ class _$AttackerSituation extends AttackerSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - attackDirection, 'AttackerSituation', 'attackDirection'); + attackDirection, r'AttackerSituation', 'attackDirection'); BuiltValueNullFieldError.checkNotNull( - attacker, 'AttackerSituation', 'attacker'); + attacker, r'AttackerSituation', 'attacker'); BuiltValueNullFieldError.checkNotNull(builtEnemyTargetActionGenerators, - 'AttackerSituation', 'builtEnemyTargetActionGenerators'); + r'AttackerSituation', 'builtEnemyTargetActionGenerators'); BuiltValueNullFieldError.checkNotNull(builtOtherActorActionGenerators, - 'AttackerSituation', 'builtOtherActorActionGenerators'); - BuiltValueNullFieldError.checkNotNull(id, 'AttackerSituation', 'id'); - BuiltValueNullFieldError.checkNotNull(move, 'AttackerSituation', 'move'); - BuiltValueNullFieldError.checkNotNull(name, 'AttackerSituation', 'name'); + r'AttackerSituation', 'builtOtherActorActionGenerators'); + BuiltValueNullFieldError.checkNotNull(id, r'AttackerSituation', 'id'); + BuiltValueNullFieldError.checkNotNull(move, r'AttackerSituation', 'move'); + BuiltValueNullFieldError.checkNotNull(name, r'AttackerSituation', 'name'); BuiltValueNullFieldError.checkNotNull( - target, 'AttackerSituation', 'target'); - BuiltValueNullFieldError.checkNotNull(turn, 'AttackerSituation', 'turn'); + target, r'AttackerSituation', 'target'); + BuiltValueNullFieldError.checkNotNull(turn, r'AttackerSituation', 'turn'); } @override @@ -341,29 +341,24 @@ class _$AttackerSituation extends AttackerSituation { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, additionalData.hashCode), - attackDirection.hashCode), - attacker.hashCode), - builtEnemyTargetActionGenerators.hashCode), - builtOtherActorActionGenerators.hashCode), - id.hashCode), - move.hashCode), - name.hashCode), - target.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, additionalData.hashCode); + _$hash = $jc(_$hash, attackDirection.hashCode); + _$hash = $jc(_$hash, attacker.hashCode); + _$hash = $jc(_$hash, builtEnemyTargetActionGenerators.hashCode); + _$hash = $jc(_$hash, builtOtherActorActionGenerators.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, move.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, target.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('AttackerSituation') + return (newBuiltValueToStringHelper(r'AttackerSituation') ..add('additionalData', additionalData) ..add('attackDirection', attackDirection) ..add('attacker', attacker) @@ -469,29 +464,31 @@ class AttackerSituationBuilder } @override - _$AttackerSituation build() { + AttackerSituation build() => _build(); + + _$AttackerSituation _build() { _$AttackerSituation _$result; try { _$result = _$v ?? new _$AttackerSituation._( additionalData: additionalData, attackDirection: BuiltValueNullFieldError.checkNotNull( - attackDirection, 'AttackerSituation', 'attackDirection'), + attackDirection, r'AttackerSituation', 'attackDirection'), attacker: BuiltValueNullFieldError.checkNotNull( - attacker, 'AttackerSituation', 'attacker'), + attacker, r'AttackerSituation', 'attacker'), builtEnemyTargetActionGenerators: builtEnemyTargetActionGenerators.build(), builtOtherActorActionGenerators: builtOtherActorActionGenerators.build(), id: BuiltValueNullFieldError.checkNotNull( - id, 'AttackerSituation', 'id'), + id, r'AttackerSituation', 'id'), move: move.build(), name: BuiltValueNullFieldError.checkNotNull( - name, 'AttackerSituation', 'name'), + name, r'AttackerSituation', 'name'), target: BuiltValueNullFieldError.checkNotNull( - target, 'AttackerSituation', 'target'), + target, r'AttackerSituation', 'target'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'AttackerSituation', 'turn')); + turn, r'AttackerSituation', 'turn')); } catch (_) { late String _$failedField; try { @@ -504,7 +501,7 @@ class AttackerSituationBuilder move.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'AttackerSituation', _$failedField, e.toString()); + r'AttackerSituation', _$failedField, e.toString()); } rethrow; } @@ -522,12 +519,12 @@ class _$MoveEntity extends MoveEntity { final int? firstOwnerId; factory _$MoveEntity([void Function(MoveEntityBuilder)? updates]) => - (new MoveEntityBuilder()..update(updates)).build(); + (new MoveEntityBuilder()..update(updates))._build(); _$MoveEntity._({required this.id, required this.name, this.firstOwnerId}) : super._() { - BuiltValueNullFieldError.checkNotNull(id, 'MoveEntity', 'id'); - BuiltValueNullFieldError.checkNotNull(name, 'MoveEntity', 'name'); + BuiltValueNullFieldError.checkNotNull(id, r'MoveEntity', 'id'); + BuiltValueNullFieldError.checkNotNull(name, r'MoveEntity', 'name'); } @override @@ -548,13 +545,17 @@ class _$MoveEntity extends MoveEntity { @override int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), name.hashCode), firstOwnerId.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, firstOwnerId.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('MoveEntity') + return (newBuiltValueToStringHelper(r'MoveEntity') ..add('id', id) ..add('name', name) ..add('firstOwnerId', firstOwnerId)) @@ -602,16 +603,18 @@ class MoveEntityBuilder implements Builder { } @override - _$MoveEntity build() { + MoveEntity build() => _build(); + + _$MoveEntity _build() { final _$result = _$v ?? new _$MoveEntity._( - id: BuiltValueNullFieldError.checkNotNull(id, 'MoveEntity', 'id'), + id: BuiltValueNullFieldError.checkNotNull(id, r'MoveEntity', 'id'), name: BuiltValueNullFieldError.checkNotNull( - name, 'MoveEntity', 'name'), + name, r'MoveEntity', 'name'), firstOwnerId: firstOwnerId); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/common/conflict_chance.dart b/edgehead/lib/src/fight/common/conflict_chance.dart index cac2884c..9cc67164 100644 --- a/edgehead/lib/src/fight/common/conflict_chance.dart +++ b/edgehead/lib/src/fight/common/conflict_chance.dart @@ -329,7 +329,7 @@ bool _partDisabled(Actor actor, BodyPartDesignation designation) { /// A [Bonus] can evaluate to `0` adjustment. @immutable class Bonus extends Modifier { - const Bonus(int maxAdjustment, R reason) : super(maxAdjustment, reason); + const Bonus(super.maxAdjustment, super.reason); } /// Reasons for the performer of a move (e.g. attacker) to be successful @@ -439,5 +439,5 @@ class Modifier { /// A [Penalty] can evaluate to `0` adjustment. @immutable class Penalty extends Modifier { - const Penalty(int maxAdjustment, R reason) : super(maxAdjustment, reason); + const Penalty(super.maxAdjustment, super.reason); } diff --git a/edgehead/lib/src/fight/common/defense_situation.g.dart b/edgehead/lib/src/fight/common/defense_situation.g.dart index d95f8654..8ff85e2f 100644 --- a/edgehead/lib/src/fight/common/defense_situation.g.dart +++ b/edgehead/lib/src/fight/common/defense_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.defense_situation; +part of 'defense_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -55,13 +55,13 @@ class _$DefenseSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'attacker': result.attacker = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'builtEnemyTargetActionGenerators': result.builtEnemyTargetActionGenerators.replace( @@ -79,24 +79,24 @@ class _$DefenseSituationSerializer break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'name': result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'predeterminedResult': result.predeterminedResult = serializers.deserialize(value, - specifiedType: const FullType(Predetermination)) + specifiedType: const FullType(Predetermination))! as Predetermination; break; case 'target': result.target = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -125,7 +125,7 @@ class _$DefenseSituation extends DefenseSituation { factory _$DefenseSituation( [void Function(DefenseSituationBuilder)? updates]) => - (new DefenseSituationBuilder()..update(updates)).build(); + (new DefenseSituationBuilder()..update(updates))._build(); _$DefenseSituation._( {required this.attacker, @@ -138,17 +138,18 @@ class _$DefenseSituation extends DefenseSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - attacker, 'DefenseSituation', 'attacker'); + attacker, r'DefenseSituation', 'attacker'); BuiltValueNullFieldError.checkNotNull(builtEnemyTargetActionGenerators, - 'DefenseSituation', 'builtEnemyTargetActionGenerators'); + r'DefenseSituation', 'builtEnemyTargetActionGenerators'); BuiltValueNullFieldError.checkNotNull(builtOtherActorActionGenerators, - 'DefenseSituation', 'builtOtherActorActionGenerators'); - BuiltValueNullFieldError.checkNotNull(id, 'DefenseSituation', 'id'); - BuiltValueNullFieldError.checkNotNull(name, 'DefenseSituation', 'name'); + r'DefenseSituation', 'builtOtherActorActionGenerators'); + BuiltValueNullFieldError.checkNotNull(id, r'DefenseSituation', 'id'); + BuiltValueNullFieldError.checkNotNull(name, r'DefenseSituation', 'name'); BuiltValueNullFieldError.checkNotNull( - predeterminedResult, 'DefenseSituation', 'predeterminedResult'); - BuiltValueNullFieldError.checkNotNull(target, 'DefenseSituation', 'target'); - BuiltValueNullFieldError.checkNotNull(turn, 'DefenseSituation', 'turn'); + predeterminedResult, r'DefenseSituation', 'predeterminedResult'); + BuiltValueNullFieldError.checkNotNull( + target, r'DefenseSituation', 'target'); + BuiltValueNullFieldError.checkNotNull(turn, r'DefenseSituation', 'turn'); } @override @@ -177,25 +178,22 @@ class _$DefenseSituation extends DefenseSituation { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, attacker.hashCode), - builtEnemyTargetActionGenerators.hashCode), - builtOtherActorActionGenerators.hashCode), - id.hashCode), - name.hashCode), - predeterminedResult.hashCode), - target.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, attacker.hashCode); + _$hash = $jc(_$hash, builtEnemyTargetActionGenerators.hashCode); + _$hash = $jc(_$hash, builtOtherActorActionGenerators.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, name.hashCode); + _$hash = $jc(_$hash, predeterminedResult.hashCode); + _$hash = $jc(_$hash, target.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('DefenseSituation') + return (newBuiltValueToStringHelper(r'DefenseSituation') ..add('attacker', attacker) ..add('builtEnemyTargetActionGenerators', builtEnemyTargetActionGenerators) @@ -288,29 +286,31 @@ class DefenseSituationBuilder } @override - _$DefenseSituation build() { + DefenseSituation build() => _build(); + + _$DefenseSituation _build() { _$DefenseSituation _$result; try { _$result = _$v ?? new _$DefenseSituation._( attacker: BuiltValueNullFieldError.checkNotNull( - attacker, 'DefenseSituation', 'attacker'), + attacker, r'DefenseSituation', 'attacker'), builtEnemyTargetActionGenerators: builtEnemyTargetActionGenerators.build(), builtOtherActorActionGenerators: builtOtherActorActionGenerators.build(), id: BuiltValueNullFieldError.checkNotNull( - id, 'DefenseSituation', 'id'), + id, r'DefenseSituation', 'id'), name: BuiltValueNullFieldError.checkNotNull( - name, 'DefenseSituation', 'name'), + name, r'DefenseSituation', 'name'), predeterminedResult: BuiltValueNullFieldError.checkNotNull( predeterminedResult, - 'DefenseSituation', + r'DefenseSituation', 'predeterminedResult'), target: BuiltValueNullFieldError.checkNotNull( - target, 'DefenseSituation', 'target'), + target, r'DefenseSituation', 'target'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'DefenseSituation', 'turn')); + turn, r'DefenseSituation', 'turn')); } catch (_) { late String _$failedField; try { @@ -320,7 +320,7 @@ class DefenseSituationBuilder builtOtherActorActionGenerators.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'DefenseSituation', _$failedField, e.toString()); + r'DefenseSituation', _$failedField, e.toString()); } rethrow; } @@ -329,4 +329,4 @@ class DefenseSituationBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/common/humanoid_pain_or_death.dart b/edgehead/lib/src/fight/common/humanoid_pain_or_death.dart index 21625329..00d90150 100644 --- a/edgehead/lib/src/fight/common/humanoid_pain_or_death.dart +++ b/edgehead/lib/src/fight/common/humanoid_pain_or_death.dart @@ -141,17 +141,14 @@ void killHumanoid(ActionContext context, int actorId) { : ''; actor.report(s, " collapse, dead$again", negative: true, endSentence: true); - break; case 1: actor.report(s, " fall backward", negative: true); actor.report(s, " twist", negative: true); actor.report(s, " hit the $groundMaterial face down", negative: true, endSentence: true); - break; case 2: actor.report(s, " drop to knees", negative: true); actor.report(s, " keel over", negative: true); - break; } s.addParagraph(); } diff --git a/edgehead/lib/src/fight/common/lerp.dart b/edgehead/lib/src/fight/common/lerp.dart index 391d8e29..c917de06 100644 --- a/edgehead/lib/src/fight/common/lerp.dart +++ b/edgehead/lib/src/fight/common/lerp.dart @@ -2,7 +2,6 @@ /// [outMin]-[outMax]. /// /// Taken from https://github.com/munificent/hauberk/blob/master/lib/src/engine/core/math.dart. - double lerpDouble(num value, num min, num max, double outMin, double outMax) { assert(min < max); diff --git a/edgehead/lib/src/fight/counter_attack/counter_attack_situation.g.dart b/edgehead/lib/src/fight/counter_attack/counter_attack_situation.g.dart index 3760f303..1b6446ab 100644 --- a/edgehead/lib/src/fight/counter_attack/counter_attack_situation.g.dart +++ b/edgehead/lib/src/fight/counter_attack/counter_attack_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.counter_attack_situation; +part of 'counter_attack_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -46,25 +46,25 @@ class _$CounterAttackSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'counterAttacker': result.counterAttacker = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'target': result.target = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -85,7 +85,7 @@ class _$CounterAttackSituation extends CounterAttackSituation { factory _$CounterAttackSituation( [void Function(CounterAttackSituationBuilder)? updates]) => - (new CounterAttackSituationBuilder()..update(updates)).build(); + (new CounterAttackSituationBuilder()..update(updates))._build(); _$CounterAttackSituation._( {required this.counterAttacker, @@ -94,12 +94,12 @@ class _$CounterAttackSituation extends CounterAttackSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - counterAttacker, 'CounterAttackSituation', 'counterAttacker'); - BuiltValueNullFieldError.checkNotNull(id, 'CounterAttackSituation', 'id'); + counterAttacker, r'CounterAttackSituation', 'counterAttacker'); + BuiltValueNullFieldError.checkNotNull(id, r'CounterAttackSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - target, 'CounterAttackSituation', 'target'); + target, r'CounterAttackSituation', 'target'); BuiltValueNullFieldError.checkNotNull( - turn, 'CounterAttackSituation', 'turn'); + turn, r'CounterAttackSituation', 'turn'); } @override @@ -123,15 +123,18 @@ class _$CounterAttackSituation extends CounterAttackSituation { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, counterAttacker.hashCode), id.hashCode), - target.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, counterAttacker.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, target.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('CounterAttackSituation') + return (newBuiltValueToStringHelper(r'CounterAttackSituation') ..add('counterAttacker', counterAttacker) ..add('id', id) ..add('target', target) @@ -187,20 +190,22 @@ class CounterAttackSituationBuilder } @override - _$CounterAttackSituation build() { + CounterAttackSituation build() => _build(); + + _$CounterAttackSituation _build() { final _$result = _$v ?? new _$CounterAttackSituation._( counterAttacker: BuiltValueNullFieldError.checkNotNull( - counterAttacker, 'CounterAttackSituation', 'counterAttacker'), + counterAttacker, r'CounterAttackSituation', 'counterAttacker'), id: BuiltValueNullFieldError.checkNotNull( - id, 'CounterAttackSituation', 'id'), + id, r'CounterAttackSituation', 'id'), target: BuiltValueNullFieldError.checkNotNull( - target, 'CounterAttackSituation', 'target'), + target, r'CounterAttackSituation', 'target'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'CounterAttackSituation', 'turn')); + turn, r'CounterAttackSituation', 'turn')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/fatality_on_ground/fatality_on_ground.dart b/edgehead/lib/src/fight/fatality_on_ground/fatality_on_ground.dart index ba4a7b43..fe6c3e34 100644 --- a/edgehead/lib/src/fight/fatality_on_ground/fatality_on_ground.dart +++ b/edgehead/lib/src/fight/fatality_on_ground/fatality_on_ground.dart @@ -1,5 +1,3 @@ -library stranded.fight.fatality_on_ground_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/simulation.dart'; import 'package:edgehead/fractal_stories/situation.dart'; diff --git a/edgehead/lib/src/fight/fatality_on_ground/wrestle_defense/wrestle_defense_situation.dart b/edgehead/lib/src/fight/fatality_on_ground/wrestle_defense/wrestle_defense_situation.dart index c7bbd357..37cbad9c 100644 --- a/edgehead/lib/src/fight/fatality_on_ground/wrestle_defense/wrestle_defense_situation.dart +++ b/edgehead/lib/src/fight/fatality_on_ground/wrestle_defense/wrestle_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.wrestle_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/simulation.dart'; import 'package:edgehead/fractal_stories/world_state.dart'; diff --git a/edgehead/lib/src/fight/feint/actions/finish_feint.dart b/edgehead/lib/src/fight/feint/actions/finish_feint.dart index bb7282a1..2fd1d855 100644 --- a/edgehead/lib/src/fight/feint/actions/finish_feint.dart +++ b/edgehead/lib/src/fight/feint/actions/finish_feint.dart @@ -58,10 +58,8 @@ class FinishFeint extends OtherActorAction { switch (type) { case FeintType.jab: stringType = "jab"; - break; case FeintType.slash: stringType = "slash"; - break; default: throw UnimplementedError('No string for $type'); } diff --git a/edgehead/lib/src/fight/feint/feint_defense/feint_defense_situation.dart b/edgehead/lib/src/fight/feint/feint_defense/feint_defense_situation.dart index fd4c1a68..252adf7f 100644 --- a/edgehead/lib/src/fight/feint/feint_defense/feint_defense_situation.dart +++ b/edgehead/lib/src/fight/feint/feint_defense/feint_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.feint_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/feint/feint_defense/actions/counter_feint.dart'; diff --git a/edgehead/lib/src/fight/feint/feint_situation.dart b/edgehead/lib/src/fight/feint/feint_situation.dart index e4e5a4af..b5c6650a 100644 --- a/edgehead/lib/src/fight/feint/feint_situation.dart +++ b/edgehead/lib/src/fight/feint/feint_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.feint_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/fight_situation.g.dart b/edgehead/lib/src/fight/fight_situation.g.dart index 7cf7b78f..0263cf4d 100644 --- a/edgehead/lib/src/fight/fight_situation.g.dart +++ b/edgehead/lib/src/fight/fight_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.fight_situation; +part of 'fight_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -61,7 +61,7 @@ class _$FightSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -92,11 +92,11 @@ class _$FightSituationSerializer break; case 'groundMaterial': result.groundMaterial = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'playerTeamIds': result.playerTeamIds.replace(serializers.deserialize(value, @@ -106,11 +106,11 @@ class _$FightSituationSerializer break; case 'roomRoamingSituationId': result.roomRoamingSituationId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -140,7 +140,7 @@ class _$FightSituation extends FightSituation { final int turn; factory _$FightSituation([void Function(FightSituationBuilder)? updates]) => - (new FightSituationBuilder()..update(updates)).build(); + (new FightSituationBuilder()..update(updates))._build(); _$FightSituation._( {required this.droppedItems, @@ -154,20 +154,20 @@ class _$FightSituation extends FightSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - droppedItems, 'FightSituation', 'droppedItems'); + droppedItems, r'FightSituation', 'droppedItems'); BuiltValueNullFieldError.checkNotNull( - droppedItemsOutOfReach, 'FightSituation', 'droppedItemsOutOfReach'); + droppedItemsOutOfReach, r'FightSituation', 'droppedItemsOutOfReach'); BuiltValueNullFieldError.checkNotNull( - enemyTeamIds, 'FightSituation', 'enemyTeamIds'); - BuiltValueNullFieldError.checkNotNull(events, 'FightSituation', 'events'); + enemyTeamIds, r'FightSituation', 'enemyTeamIds'); + BuiltValueNullFieldError.checkNotNull(events, r'FightSituation', 'events'); BuiltValueNullFieldError.checkNotNull( - groundMaterial, 'FightSituation', 'groundMaterial'); - BuiltValueNullFieldError.checkNotNull(id, 'FightSituation', 'id'); + groundMaterial, r'FightSituation', 'groundMaterial'); + BuiltValueNullFieldError.checkNotNull(id, r'FightSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - playerTeamIds, 'FightSituation', 'playerTeamIds'); + playerTeamIds, r'FightSituation', 'playerTeamIds'); BuiltValueNullFieldError.checkNotNull( - roomRoamingSituationId, 'FightSituation', 'roomRoamingSituationId'); - BuiltValueNullFieldError.checkNotNull(turn, 'FightSituation', 'turn'); + roomRoamingSituationId, r'FightSituation', 'roomRoamingSituationId'); + BuiltValueNullFieldError.checkNotNull(turn, r'FightSituation', 'turn'); } @override @@ -195,27 +195,23 @@ class _$FightSituation extends FightSituation { @override int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, droppedItems.hashCode), - droppedItemsOutOfReach.hashCode), - enemyTeamIds.hashCode), - events.hashCode), - groundMaterial.hashCode), - id.hashCode), - playerTeamIds.hashCode), - roomRoamingSituationId.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, droppedItems.hashCode); + _$hash = $jc(_$hash, droppedItemsOutOfReach.hashCode); + _$hash = $jc(_$hash, enemyTeamIds.hashCode); + _$hash = $jc(_$hash, events.hashCode); + _$hash = $jc(_$hash, groundMaterial.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, playerTeamIds.hashCode); + _$hash = $jc(_$hash, roomRoamingSituationId.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('FightSituation') + return (newBuiltValueToStringHelper(r'FightSituation') ..add('droppedItems', droppedItems) ..add('droppedItemsOutOfReach', droppedItemsOutOfReach) ..add('enemyTeamIds', enemyTeamIds) @@ -311,7 +307,9 @@ class FightSituationBuilder } @override - _$FightSituation build() { + FightSituation build() => _build(); + + _$FightSituation _build() { _$FightSituation _$result; try { _$result = _$v ?? @@ -321,16 +319,16 @@ class FightSituationBuilder enemyTeamIds: enemyTeamIds.build(), events: events.build(), groundMaterial: BuiltValueNullFieldError.checkNotNull( - groundMaterial, 'FightSituation', 'groundMaterial'), + groundMaterial, r'FightSituation', 'groundMaterial'), id: BuiltValueNullFieldError.checkNotNull( - id, 'FightSituation', 'id'), + id, r'FightSituation', 'id'), playerTeamIds: playerTeamIds.build(), roomRoamingSituationId: BuiltValueNullFieldError.checkNotNull( roomRoamingSituationId, - 'FightSituation', + r'FightSituation', 'roomRoamingSituationId'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'FightSituation', 'turn')); + turn, r'FightSituation', 'turn')); } catch (_) { late String _$failedField; try { @@ -347,7 +345,7 @@ class FightSituationBuilder playerTeamIds.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'FightSituation', _$failedField, e.toString()); + r'FightSituation', _$failedField, e.toString()); } rethrow; } @@ -356,4 +354,4 @@ class FightSituationBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/leap/leap_defense/leap_defense_situation.dart b/edgehead/lib/src/fight/leap/leap_defense/leap_defense_situation.dart index bbfa0fdd..c26ebeb1 100644 --- a/edgehead/lib/src/fight/leap/leap_defense/leap_defense_situation.dart +++ b/edgehead/lib/src/fight/leap/leap_defense/leap_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.leap_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/leap/leap_defense/actions/dodge_leap.dart'; diff --git a/edgehead/lib/src/fight/leap/leap_situation.dart b/edgehead/lib/src/fight/leap/leap_situation.dart index 35d9551d..922bc647 100644 --- a/edgehead/lib/src/fight/leap/leap_situation.dart +++ b/edgehead/lib/src/fight/leap/leap_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.leap_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/loot/loot_situation.g.dart b/edgehead/lib/src/fight/loot/loot_situation.g.dart index 78ad1f05..eb0a4451 100644 --- a/edgehead/lib/src/fight/loot/loot_situation.g.dart +++ b/edgehead/lib/src/fight/loot/loot_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.loot_situation; +part of 'loot_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -47,7 +47,7 @@ class _$LootSituationSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -59,11 +59,11 @@ class _$LootSituationSerializer implements StructuredSerializer { break; case 'groundMaterial': result.groundMaterial = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'playerTeamIds': result.playerTeamIds.replace(serializers.deserialize(value, @@ -73,7 +73,7 @@ class _$LootSituationSerializer implements StructuredSerializer { break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -95,7 +95,7 @@ class _$LootSituation extends LootSituation { final int turn; factory _$LootSituation([void Function(LootSituationBuilder)? updates]) => - (new LootSituationBuilder()..update(updates)).build(); + (new LootSituationBuilder()..update(updates))._build(); _$LootSituation._( {required this.droppedItems, @@ -105,13 +105,13 @@ class _$LootSituation extends LootSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - droppedItems, 'LootSituation', 'droppedItems'); + droppedItems, r'LootSituation', 'droppedItems'); BuiltValueNullFieldError.checkNotNull( - groundMaterial, 'LootSituation', 'groundMaterial'); - BuiltValueNullFieldError.checkNotNull(id, 'LootSituation', 'id'); + groundMaterial, r'LootSituation', 'groundMaterial'); + BuiltValueNullFieldError.checkNotNull(id, r'LootSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - playerTeamIds, 'LootSituation', 'playerTeamIds'); - BuiltValueNullFieldError.checkNotNull(turn, 'LootSituation', 'turn'); + playerTeamIds, r'LootSituation', 'playerTeamIds'); + BuiltValueNullFieldError.checkNotNull(turn, r'LootSituation', 'turn'); } @override @@ -134,17 +134,19 @@ class _$LootSituation extends LootSituation { @override int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, droppedItems.hashCode), groundMaterial.hashCode), - id.hashCode), - playerTeamIds.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, droppedItems.hashCode); + _$hash = $jc(_$hash, groundMaterial.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, playerTeamIds.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('LootSituation') + return (newBuiltValueToStringHelper(r'LootSituation') ..add('droppedItems', droppedItems) ..add('groundMaterial', groundMaterial) ..add('id', id) @@ -210,19 +212,21 @@ class LootSituationBuilder } @override - _$LootSituation build() { + LootSituation build() => _build(); + + _$LootSituation _build() { _$LootSituation _$result; try { _$result = _$v ?? new _$LootSituation._( droppedItems: droppedItems.build(), groundMaterial: BuiltValueNullFieldError.checkNotNull( - groundMaterial, 'LootSituation', 'groundMaterial'), + groundMaterial, r'LootSituation', 'groundMaterial'), id: BuiltValueNullFieldError.checkNotNull( - id, 'LootSituation', 'id'), + id, r'LootSituation', 'id'), playerTeamIds: playerTeamIds.build(), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'LootSituation', 'turn')); + turn, r'LootSituation', 'turn')); } catch (_) { late String _$failedField; try { @@ -233,7 +237,7 @@ class LootSituationBuilder playerTeamIds.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'LootSituation', _$failedField, e.toString()); + r'LootSituation', _$failedField, e.toString()); } rethrow; } @@ -242,4 +246,4 @@ class LootSituationBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/off_balance_opportunity/off_balance_opportunity_situation.g.dart b/edgehead/lib/src/fight/off_balance_opportunity/off_balance_opportunity_situation.g.dart index bc6ad04a..78a609bc 100644 --- a/edgehead/lib/src/fight/off_balance_opportunity/off_balance_opportunity_situation.g.dart +++ b/edgehead/lib/src/fight/off_balance_opportunity/off_balance_opportunity_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.fight.off_balance_situation; +part of 'off_balance_opportunity_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -50,13 +50,13 @@ class _$OffBalanceOpportunitySituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'actorId': result.actorId = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'culpritId': result.culpritId = serializers.deserialize(value, @@ -64,11 +64,11 @@ class _$OffBalanceOpportunitySituationSerializer break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -89,7 +89,7 @@ class _$OffBalanceOpportunitySituation extends OffBalanceOpportunitySituation { factory _$OffBalanceOpportunitySituation( [void Function(OffBalanceOpportunitySituationBuilder)? updates]) => - (new OffBalanceOpportunitySituationBuilder()..update(updates)).build(); + (new OffBalanceOpportunitySituationBuilder()..update(updates))._build(); _$OffBalanceOpportunitySituation._( {required this.actorId, @@ -98,11 +98,11 @@ class _$OffBalanceOpportunitySituation extends OffBalanceOpportunitySituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - actorId, 'OffBalanceOpportunitySituation', 'actorId'); + actorId, r'OffBalanceOpportunitySituation', 'actorId'); BuiltValueNullFieldError.checkNotNull( - id, 'OffBalanceOpportunitySituation', 'id'); + id, r'OffBalanceOpportunitySituation', 'id'); BuiltValueNullFieldError.checkNotNull( - turn, 'OffBalanceOpportunitySituation', 'turn'); + turn, r'OffBalanceOpportunitySituation', 'turn'); } @override @@ -126,14 +126,18 @@ class _$OffBalanceOpportunitySituation extends OffBalanceOpportunitySituation { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, actorId.hashCode), culpritId.hashCode), id.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, actorId.hashCode); + _$hash = $jc(_$hash, culpritId.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('OffBalanceOpportunitySituation') + return (newBuiltValueToStringHelper(r'OffBalanceOpportunitySituation') ..add('actorId', actorId) ..add('culpritId', culpritId) ..add('id', id) @@ -190,19 +194,21 @@ class OffBalanceOpportunitySituationBuilder } @override - _$OffBalanceOpportunitySituation build() { + OffBalanceOpportunitySituation build() => _build(); + + _$OffBalanceOpportunitySituation _build() { final _$result = _$v ?? new _$OffBalanceOpportunitySituation._( actorId: BuiltValueNullFieldError.checkNotNull( - actorId, 'OffBalanceOpportunitySituation', 'actorId'), + actorId, r'OffBalanceOpportunitySituation', 'actorId'), culpritId: culpritId, id: BuiltValueNullFieldError.checkNotNull( - id, 'OffBalanceOpportunitySituation', 'id'), + id, r'OffBalanceOpportunitySituation', 'id'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'OffBalanceOpportunitySituation', 'turn')); + turn, r'OffBalanceOpportunitySituation', 'turn')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/fight/punch/actions/finish_punch.dart b/edgehead/lib/src/fight/punch/actions/finish_punch.dart index 52fa0292..dee1243b 100644 --- a/edgehead/lib/src/fight/punch/actions/finish_punch.dart +++ b/edgehead/lib/src/fight/punch/actions/finish_punch.dart @@ -83,7 +83,6 @@ class FinishPunch extends OtherActorAction { positive: true); enemy.report(s, " {stagger|stumble} off balance", actionThread: thread, replacesThread: true, negative: true); - break; case Pose.onGround: s.add( " send to the $groundMaterial with " @@ -96,7 +95,6 @@ class FinishPunch extends OtherActorAction { // adds standard falling functionality, like reminding player // about lying down being bad. makeActorFall(context.world, w, s, enemy); - break; } return "${a.name} punches ${enemy.name} to $updatedPose"; } diff --git a/edgehead/lib/src/fight/punch/punch_defense/punch_defense_situation.dart b/edgehead/lib/src/fight/punch/punch_defense/punch_defense_situation.dart index 9322fc09..37f61dcb 100644 --- a/edgehead/lib/src/fight/punch/punch_defense/punch_defense_situation.dart +++ b/edgehead/lib/src/fight/punch/punch_defense/punch_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.punch_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/punch/punch_defense/actions/dodge_punch.dart'; diff --git a/edgehead/lib/src/fight/punch/punch_situation.dart b/edgehead/lib/src/fight/punch/punch_situation.dart index 76c9c3d3..04c2bd97 100644 --- a/edgehead/lib/src/fight/punch/punch_situation.dart +++ b/edgehead/lib/src/fight/punch/punch_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.punch_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/punch_on_ground/punch_defense/punch_defense_situation.dart b/edgehead/lib/src/fight/punch_on_ground/punch_defense/punch_defense_situation.dart index 75d290d6..161379e4 100644 --- a/edgehead/lib/src/fight/punch_on_ground/punch_defense/punch_defense_situation.dart +++ b/edgehead/lib/src/fight/punch_on_ground/punch_defense/punch_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.punch_on_ground_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/punch_on_ground/punch_defense/actions/dodge_punch_on_ground.dart'; diff --git a/edgehead/lib/src/fight/punch_on_ground/punch_situation.dart b/edgehead/lib/src/fight/punch_on_ground/punch_situation.dart index bde4edbe..927c8acc 100644 --- a/edgehead/lib/src/fight/punch_on_ground/punch_situation.dart +++ b/edgehead/lib/src/fight/punch_on_ground/punch_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.punch_on_ground_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/slash/slash_defense/slash_defense_situation.dart b/edgehead/lib/src/fight/slash/slash_defense/slash_defense_situation.dart index f30ff52d..c475390b 100644 --- a/edgehead/lib/src/fight/slash/slash_defense/slash_defense_situation.dart +++ b/edgehead/lib/src/fight/slash/slash_defense/slash_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.slash_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/slash/slash_defense/actions/defensive_parry_slash.dart'; diff --git a/edgehead/lib/src/fight/slash/slash_situation.dart b/edgehead/lib/src/fight/slash/slash_situation.dart index 7b8b26d3..e2ece756 100644 --- a/edgehead/lib/src/fight/slash/slash_situation.dart +++ b/edgehead/lib/src/fight/slash/slash_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.slash_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/anatomy/body_part.dart'; import 'package:edgehead/fractal_stories/anatomy/decide_slashing_hit.dart'; diff --git a/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_defense/slash_on_ground_defense_situation.dart b/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_defense/slash_on_ground_defense_situation.dart index b2a842dc..d49bc79e 100644 --- a/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_defense/slash_on_ground_defense_situation.dart +++ b/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_defense/slash_on_ground_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.slash_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/slash_on_ground/slash_on_ground_defense/actions/dodge_slash_on_ground.dart'; diff --git a/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_situation.dart b/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_situation.dart index 661b1530..236474ba 100644 --- a/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_situation.dart +++ b/edgehead/lib/src/fight/slash_on_ground/slash_on_ground_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.slash_on_ground_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/strike_down/strike_down_defense/on_ground_defense_situation.dart b/edgehead/lib/src/fight/strike_down/strike_down_defense/on_ground_defense_situation.dart index 9dad291e..f0d630a3 100644 --- a/edgehead/lib/src/fight/strike_down/strike_down_defense/on_ground_defense_situation.dart +++ b/edgehead/lib/src/fight/strike_down/strike_down_defense/on_ground_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.on_ground_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/strike_down/strike_down_defense/actions/on_ground_parry.dart'; diff --git a/edgehead/lib/src/fight/strike_down/strike_down_situation.dart b/edgehead/lib/src/fight/strike_down/strike_down_situation.dart index 002644c6..1cdd863c 100644 --- a/edgehead/lib/src/fight/strike_down/strike_down_situation.dart +++ b/edgehead/lib/src/fight/strike_down/strike_down_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.strike_down_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_defense/strike_from_ground_defense_situation.dart b/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_defense/strike_from_ground_defense_situation.dart index 6041213a..adb3273f 100644 --- a/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_defense/strike_from_ground_defense_situation.dart +++ b/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_defense/strike_from_ground_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.on_ground_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/strike_from_ground/strike_from_ground_defense/actions/jump_to_side_and_counter.dart'; diff --git a/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_situation.dart b/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_situation.dart index c9aa44fb..bf911fe0 100644 --- a/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_situation.dart +++ b/edgehead/lib/src/fight/strike_from_ground/strike_from_ground_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.strike_down_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/sweep_feet/sweep_feet_defense/sweep_feet_defense_situation.dart b/edgehead/lib/src/fight/sweep_feet/sweep_feet_defense/sweep_feet_defense_situation.dart index c64a4ac3..fd22718d 100644 --- a/edgehead/lib/src/fight/sweep_feet/sweep_feet_defense/sweep_feet_defense_situation.dart +++ b/edgehead/lib/src/fight/sweep_feet/sweep_feet_defense/sweep_feet_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.feint_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/sweep_feet/sweep_feet_defense/actions/avoid_sweep_feet.dart'; diff --git a/edgehead/lib/src/fight/sweep_feet/sweep_feet_situation.dart b/edgehead/lib/src/fight/sweep_feet/sweep_feet_situation.dart index 57869740..435ca02c 100644 --- a/edgehead/lib/src/fight/sweep_feet/sweep_feet_situation.dart +++ b/edgehead/lib/src/fight/sweep_feet/sweep_feet_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.sweep_feet_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/throw/throw_defense/throw_defense_situation.dart b/edgehead/lib/src/fight/throw/throw_defense/throw_defense_situation.dart index e9e45e59..90796948 100644 --- a/edgehead/lib/src/fight/throw/throw_defense/throw_defense_situation.dart +++ b/edgehead/lib/src/fight/throw/throw_defense/throw_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/throw/throw_defense/actions/catch_projectile.dart'; diff --git a/edgehead/lib/src/fight/throw/throw_situation.dart b/edgehead/lib/src/fight/throw/throw_situation.dart index 875c9980..e4fca886 100644 --- a/edgehead/lib/src/fight/throw/throw_situation.dart +++ b/edgehead/lib/src/fight/throw/throw_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/fight/thrust/thrust_defense/thrust_defense_situation.dart b/edgehead/lib/src/fight/thrust/thrust_defense/thrust_defense_situation.dart index b9b74538..7013290a 100644 --- a/edgehead/lib/src/fight/thrust/thrust_defense/thrust_defense_situation.dart +++ b/edgehead/lib/src/fight/thrust/thrust_defense/thrust_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/thrust/thrust_defense/actions/dodge_thrust.dart'; diff --git a/edgehead/lib/src/fight/thrust/thrust_situation.dart b/edgehead/lib/src/fight/thrust/thrust_situation.dart index 57a839c6..8ab8a391 100644 --- a/edgehead/lib/src/fight/thrust/thrust_situation.dart +++ b/edgehead/lib/src/fight/thrust/thrust_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/anatomy/body_part.dart'; import 'package:edgehead/fractal_stories/situation.dart'; diff --git a/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_defense/thrust_defense_situation.dart b/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_defense/thrust_defense_situation.dart index 2fc04438..49de8b74 100644 --- a/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_defense/thrust_defense_situation.dart +++ b/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_defense/thrust_defense_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_defense_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/src/fight/common/defense_situation.dart'; import 'package:edgehead/src/fight/thrust_on_ground/thrust_on_ground_defense/actions/dodge_thrust_on_ground.dart'; diff --git a/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_situation.dart b/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_situation.dart index 5e05399f..dd0d9e79 100644 --- a/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_situation.dart +++ b/edgehead/lib/src/fight/thrust_on_ground/thrust_on_ground_situation.dart @@ -1,5 +1,3 @@ -library stranded.fight.thrust_on_ground_situation; - import 'package:edgehead/fractal_stories/actor.dart'; import 'package:edgehead/fractal_stories/situation.dart'; import 'package:edgehead/src/fight/common/attacker_situation.dart'; diff --git a/edgehead/lib/src/ink/ink_situation.g.dart b/edgehead/lib/src/ink/ink_situation.g.dart index 120c8792..faa6e093 100644 --- a/edgehead/lib/src/ink/ink_situation.g.dart +++ b/edgehead/lib/src/ink/ink_situation.g.dart @@ -43,7 +43,7 @@ class _$InkSituationSerializer implements StructuredSerializer { final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { @@ -55,15 +55,15 @@ class _$InkSituationSerializer implements StructuredSerializer { break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'inkAstName': result.inkAstName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -83,7 +83,7 @@ class _$InkSituation extends InkSituation { final int turn; factory _$InkSituation([void Function(InkSituationBuilder)? updates]) => - (new InkSituationBuilder()..update(updates)).build(); + (new InkSituationBuilder()..update(updates))._build(); _$InkSituation._( {required this.currentPath, @@ -92,11 +92,11 @@ class _$InkSituation extends InkSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - currentPath, 'InkSituation', 'currentPath'); - BuiltValueNullFieldError.checkNotNull(id, 'InkSituation', 'id'); + currentPath, r'InkSituation', 'currentPath'); + BuiltValueNullFieldError.checkNotNull(id, r'InkSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - inkAstName, 'InkSituation', 'inkAstName'); - BuiltValueNullFieldError.checkNotNull(turn, 'InkSituation', 'turn'); + inkAstName, r'InkSituation', 'inkAstName'); + BuiltValueNullFieldError.checkNotNull(turn, r'InkSituation', 'turn'); } @override @@ -118,15 +118,18 @@ class _$InkSituation extends InkSituation { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, currentPath.hashCode), id.hashCode), - inkAstName.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, currentPath.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, inkAstName.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('InkSituation') + return (newBuiltValueToStringHelper(r'InkSituation') ..add('currentPath', currentPath) ..add('id', id) ..add('inkAstName', inkAstName) @@ -183,18 +186,20 @@ class InkSituationBuilder } @override - _$InkSituation build() { + InkSituation build() => _build(); + + _$InkSituation _build() { _$InkSituation _$result; try { _$result = _$v ?? new _$InkSituation._( currentPath: currentPath.build(), id: BuiltValueNullFieldError.checkNotNull( - id, 'InkSituation', 'id'), + id, r'InkSituation', 'id'), inkAstName: BuiltValueNullFieldError.checkNotNull( - inkAstName, 'InkSituation', 'inkAstName'), + inkAstName, r'InkSituation', 'inkAstName'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'InkSituation', 'turn')); + turn, r'InkSituation', 'turn')); } catch (_) { late String _$failedField; try { @@ -202,7 +207,7 @@ class InkSituationBuilder currentPath.build(); } catch (e) { throw new BuiltValueNestedFieldError( - 'InkSituation', _$failedField, e.toString()); + r'InkSituation', _$failedField, e.toString()); } rethrow; } @@ -211,4 +216,4 @@ class InkSituationBuilder } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/predetermined_result.dart b/edgehead/lib/src/predetermined_result.dart index 17e51b81..662b2253 100644 --- a/edgehead/lib/src/predetermined_result.dart +++ b/edgehead/lib/src/predetermined_result.dart @@ -22,7 +22,7 @@ class Predetermination extends EnumClass { static BuiltSet get values => _$values; - const Predetermination._(String name) : super(name); + const Predetermination._(super.name); static Predetermination valueOf(String name) => _$valueOf(name); } diff --git a/edgehead/lib/src/predetermined_result.g.dart b/edgehead/lib/src/predetermined_result.g.dart index 9154b77e..da096e9e 100644 --- a/edgehead/lib/src/predetermined_result.g.dart +++ b/edgehead/lib/src/predetermined_result.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of edgehead.predetermination; +part of 'predetermined_result.dart'; // ************************************************************************** // BuiltValueGenerator @@ -53,4 +53,4 @@ class _$PredeterminationSerializer Predetermination.valueOf(serialized as String); } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/src/room_roaming/room_roaming_situation.dart b/edgehead/lib/src/room_roaming/room_roaming_situation.dart index 1ed1659c..42289b6e 100644 --- a/edgehead/lib/src/room_roaming/room_roaming_situation.dart +++ b/edgehead/lib/src/room_roaming/room_roaming_situation.dart @@ -89,14 +89,14 @@ abstract class RoomRoamingSituation extends Object /// Only player can roam at the moment. But there is also Director. @override Iterable getActors(Simulation sim, WorldState w) { - var _player = _getPlayer(w); - if (_player == null) return []; + var player = _getPlayer(w); + if (player == null) return []; if (w.director != null) { - return [_player, w.director!]; + return [player, w.director!]; } - return [_player]; + return [player]; } @override diff --git a/edgehead/lib/src/room_roaming/room_roaming_situation.g.dart b/edgehead/lib/src/room_roaming/room_roaming_situation.g.dart index fff13010..45f812ef 100644 --- a/edgehead/lib/src/room_roaming/room_roaming_situation.g.dart +++ b/edgehead/lib/src/room_roaming/room_roaming_situation.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of stranded.room_roaming.room_roaming_situation; +part of 'room_roaming_situation.dart'; // ************************************************************************** // BuiltValueGenerator @@ -47,25 +47,25 @@ class _$RoomRoamingSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'currentRoomName': result.currentRoomName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; + specifiedType: const FullType(String))! as String; break; case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'monstersAlive': result.monstersAlive = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; + specifiedType: const FullType(bool))! as bool; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -86,7 +86,7 @@ class _$RoomRoamingSituation extends RoomRoamingSituation { factory _$RoomRoamingSituation( [void Function(RoomRoamingSituationBuilder)? updates]) => - (new RoomRoamingSituationBuilder()..update(updates)).build(); + (new RoomRoamingSituationBuilder()..update(updates))._build(); _$RoomRoamingSituation._( {required this.currentRoomName, @@ -95,11 +95,12 @@ class _$RoomRoamingSituation extends RoomRoamingSituation { required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - currentRoomName, 'RoomRoamingSituation', 'currentRoomName'); - BuiltValueNullFieldError.checkNotNull(id, 'RoomRoamingSituation', 'id'); + currentRoomName, r'RoomRoamingSituation', 'currentRoomName'); + BuiltValueNullFieldError.checkNotNull(id, r'RoomRoamingSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - monstersAlive, 'RoomRoamingSituation', 'monstersAlive'); - BuiltValueNullFieldError.checkNotNull(turn, 'RoomRoamingSituation', 'turn'); + monstersAlive, r'RoomRoamingSituation', 'monstersAlive'); + BuiltValueNullFieldError.checkNotNull( + turn, r'RoomRoamingSituation', 'turn'); } @override @@ -123,15 +124,18 @@ class _$RoomRoamingSituation extends RoomRoamingSituation { @override int get hashCode { - return $jf($jc( - $jc($jc($jc(0, currentRoomName.hashCode), id.hashCode), - monstersAlive.hashCode), - turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, currentRoomName.hashCode); + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, monstersAlive.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('RoomRoamingSituation') + return (newBuiltValueToStringHelper(r'RoomRoamingSituation') ..add('currentRoomName', currentRoomName) ..add('id', id) ..add('monstersAlive', monstersAlive) @@ -188,20 +192,22 @@ class RoomRoamingSituationBuilder } @override - _$RoomRoamingSituation build() { + RoomRoamingSituation build() => _build(); + + _$RoomRoamingSituation _build() { final _$result = _$v ?? new _$RoomRoamingSituation._( currentRoomName: BuiltValueNullFieldError.checkNotNull( - currentRoomName, 'RoomRoamingSituation', 'currentRoomName'), + currentRoomName, r'RoomRoamingSituation', 'currentRoomName'), id: BuiltValueNullFieldError.checkNotNull( - id, 'RoomRoamingSituation', 'id'), + id, r'RoomRoamingSituation', 'id'), monstersAlive: BuiltValueNullFieldError.checkNotNull( - monstersAlive, 'RoomRoamingSituation', 'monstersAlive'), + monstersAlive, r'RoomRoamingSituation', 'monstersAlive'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'RoomRoamingSituation', 'turn')); + turn, r'RoomRoamingSituation', 'turn')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/lib/stateful_random/stateful_random.dart b/edgehead/lib/stateful_random/stateful_random.dart index 536ff771..60b681d8 100644 --- a/edgehead/lib/stateful_random/stateful_random.dart +++ b/edgehead/lib/stateful_random/stateful_random.dart @@ -1,5 +1,3 @@ -library stateful_random; - import 'dart:math'; /// A function that returns a random id. Similar to [RandomIntGetter] diff --git a/edgehead/lib/writers_context_extensions.dart b/edgehead/lib/writers_context_extensions.dart index e8bf0939..2e54d3cf 100644 --- a/edgehead/lib/writers_context_extensions.dart +++ b/edgehead/lib/writers_context_extensions.dart @@ -126,31 +126,24 @@ extension ActionContextHelpers on ActionContext { break; case 1: set(_playerIsMale); - break; } switch (hair) { case 0: set(_playerHairColor, "black"); - break; case 1: set(_playerHairColor, "brown"); - break; case 2: set(_playerHairColor, "blond"); - break; } switch (debilitation) { case 0: set(_playerHasBurntFace); - break; case 1: set(_playerHasWoodenFoot); - break; case 2: set(_playerHasAsthma); - break; } } diff --git a/edgehead/lib/writers_helpers.dart b/edgehead/lib/writers_helpers.dart index 0a5e6d68..a8d532d1 100644 --- a/edgehead/lib/writers_helpers.dart +++ b/edgehead/lib/writers_helpers.dart @@ -449,11 +449,9 @@ FightSituation generateRandomEncounter(ActionContext c, "A goblin stands in front of me, " "wielding a ${hasSpear ? 'black spear' : 'rusty sword'}.", isRaw: true); - break; case 1: enemies.add(_makeOrc(w)); s.add("An orc stands in front of me, wielding a sword.", isRaw: true); - break; case 2: final orc = Actor.initialized(6000, w.randomInt, "orc", adjective: @@ -474,7 +472,6 @@ FightSituation generateRandomEncounter(ActionContext c, "An orc and a goblin stand in front of me. " "The orc is wielding a crude sword, the goblin is holding a spear.", isRaw: true); - break; default: throw UnimplementedError(); } @@ -530,7 +527,6 @@ FightSituation generateRandomEncounter(ActionContext c, switch (w.randomInt(4)) { case 0: initialPlayer.report(s, " barehanded"); - break; case 1: case 2: final name = w.randomBool() ? "sword" : "scimitar"; @@ -540,7 +536,6 @@ FightSituation generateRandomEncounter(ActionContext c, w.updateActorById( playerId, (b) => b.inventory.equip(sword, initialPlayer.anatomy)); initialPlayer.report(s, " {holding|wielding} a $name"); - break; case 3: final name = w.randomBool() ? "spear" : "pike"; final spear = Item.weapon(w.randomInt(), WeaponType.spear, @@ -548,7 +543,6 @@ FightSituation generateRandomEncounter(ActionContext c, w.updateActorById( playerId, (b) => b.inventory.equip(spear, initialPlayer.anatomy)); initialPlayer.report(s, " {holding|wielding} a $name"); - break; default: throw UnimplementedError(); } diff --git a/edgehead/lib/writers_input.compiled.dart b/edgehead/lib/writers_input.compiled.dart index 611d3f67..fad54e97 100644 --- a/edgehead/lib/writers_input.compiled.dart +++ b/edgehead/lib/writers_input.compiled.dart @@ -63,68 +63,104 @@ part 'writers_input.compiled.g.dart'; const bool DEV_MODE = false; final Approach endOfRoamFromRandomEncounter = Approach( - 'random_encounter', '__END_OF_ROAM__', 'End encounter', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}); -final Approach randomEncounterFromPreRandomEncounter = - Approach('pre_random_encounter', 'random_encounter', r'$IMPLICIT', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room preRandomEncounter = Room('pre_random_encounter', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null); -final Room randomEncounter = Room('random_encounter', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, generateRandomEncounter, null, positionX: 0, positionY: 0, mapName: 'N/A'); -final Approach bigOObservatoryFromBigOAntechamber = - Approach('big_o_antechamber', 'big_o_observatory', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "final_fight_ink_ink", - )); -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return w.actionHasBeenPerformed('open_antechamber_lock'); -}); + 'random_encounter', + '__END_OF_ROAM__', + 'End encounter', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, +); +final Approach randomEncounterFromPreRandomEncounter = Approach( + 'pre_random_encounter', + 'random_encounter', + r'$IMPLICIT', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room preRandomEncounter = Room( + 'pre_random_encounter', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, +); +final Room randomEncounter = Room( + 'random_encounter', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + generateRandomEncounter, + null, + positionX: 0, + positionY: 0, + mapName: 'N/A', +); +final Approach bigOObservatoryFromBigOAntechamber = Approach( + 'big_o_antechamber', + 'big_o_observatory', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "final_fight_ink_ink", + )); + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return w.actionHasBeenPerformed('open_antechamber_lock'); + }, +); final finalFightInkInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -138,8 +174,9 @@ final finalFightInkInk = InkAst([ ? '''I hear a distant scream from way below and for a second I think I recognize my brother's voice. But there's no time for that now.''' : ''''''; s.add( - '${weSubstitutionCapitalized} ascend the ladder through the dark. ${ifBlock_51c64d7fc} I emerge in the middle of a sunlit space far above the forest of San Francisco. I can see the shape of the overgrown Bay Bridge to the southeast. The iconic Black Gate guards the Bay far to the northwest, immersed in fog.\n', - isRaw: true); + '${weSubstitutionCapitalized} ascend the ladder through the dark. ${ifBlock_51c64d7fc} I emerge in the middle of a sunlit space far above the forest of San Francisco. I can see the shape of the overgrown Bay Bridge to the southeast. The iconic Black Gate guards the Bay far to the northwest, immersed in fog.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -149,8 +186,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'My eyes are now accustomed to the light. The space is open, with only a few pieces of furniture here and there. An exquisite chair, two workshop tables, a satin divan, a heavy white chest. All the windowpanes I can see are unbroken and pristine, though they vary slightly in color and texture. The air smells of the ocean. Whatever Big O is, he is rich. Richer than most kings.\n', - isRaw: true); + 'My eyes are now accustomed to the light. The space is open, with only a few pieces of furniture here and there. An exquisite chair, two workshop tables, a satin divan, a heavy white chest. All the windowpanes I can see are unbroken and pristine, though they vary slightly in color and texture. The air smells of the ocean. Whatever Big O is, he is rich. Richer than most kings.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -162,7 +200,10 @@ final finalFightInkInk = InkAst([ final ifBlock_1d986f16d = c.hasHappened(evConetDestroyed) ? '''A device similar to the one in Conet is installed in one corner of the room.''' : ''''''; - s.add('${ifBlock_1d986f16d}\n', isRaw: true); + s.add( + '${ifBlock_1d986f16d}\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -171,7 +212,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"You are a fool."\n', isRaw: true); + s.add( + '"You are a fool."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -181,8 +225,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The voice comes from above. I look up and see that there is a second floor overlooking half this space, connected to the first one by a narrow staircase without a rail.\nA figure stands at the edge of a concrete plate, looking down. At first I only see the outline of a tall man. It\'s only after a few heartbeats that I realize there is something wrong with the head. It\'s not a human head.\n', - isRaw: true); + 'The voice comes from above. I look up and see that there is a second floor overlooking half this space, connected to the first one by a narrow staircase without a rail.\nA figure stands at the edge of a concrete plate, looking down. At first I only see the outline of a tall man. It\'s only after a few heartbeats that I realize there is something wrong with the head. It\'s not a human head.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -192,8 +237,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '![Illustration of Big O, a necromancer with a dog\'s head.](bigo.png)\n', - isRaw: true); + '![Illustration of Big O, a necromancer with a dog\'s head.](bigo.png)\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -202,7 +248,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('It\'s a dog\'s head.\n', isRaw: true); + s.add( + 'It\'s a dog\'s head.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -212,8 +261,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Surprised?" The creature laughs. "I\'m glad. After such a long time, one doubts that the people below still haven\'t seen through the deceit."\n', - isRaw: true); + '"Surprised?" The creature laughs. "I\'m glad. After such a long time, one doubts that the people below still haven\'t seen through the deceit."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -226,8 +276,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Osiris," he nods. "Big O. Whatever the vermin down there call me these days."\n', - isRaw: true); + '"Osiris," he nods. "Big O. Whatever the vermin down there call me these days."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -237,8 +288,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He starts casually walking down the stairs, talking the whole way. "I\'m the big bad at the top. But as you can see, I\'m also the big hero." He chuckles: a sharp, unpleasant sound. "The Doghead.\n', - isRaw: true); + 'He starts casually walking down the stairs, talking the whole way. "I\'m the big bad at the top. But as you can see, I\'m also the big hero." He chuckles: a sharp, unpleasant sound. "The Doghead.\n', + isRaw: true, + ); }), ], ), @@ -252,8 +304,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"That, too," he says. "I prefer Osiris myself. Big O these days, among the people at the bottom."\n', - isRaw: true); + '"That, too," he says. "I prefer Osiris myself. Big O these days, among the people at the bottom."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -263,8 +316,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He starts casually walking down the stairs, talking the whole way. "I\'m the big bad at the top. And I\'m also Doghead, the big hero." He chuckles: a sharp, unpleasant sound. "You see,\n', - isRaw: true); + 'He starts casually walking down the stairs, talking the whole way. "I\'m the big bad at the top. And I\'m also Doghead, the big hero." He chuckles: a sharp, unpleasant sound. "You see,\n', + isRaw: true, + ); }), ], ), @@ -276,8 +330,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I invented the folktale two hundred years ago. You\'d be surprised how easy it is to get something like that going. People find a few ‘ancient’ artifacts and their imagination does the rest."\n', - isRaw: true); + 'I invented the folktale two hundred years ago. You\'d be surprised how easy it is to get something like that going. People find a few ‘ancient’ artifacts and their imagination does the rest."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -287,8 +342,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He takes a moment to relish in my confusion. I force my expression to harden. He chuckles again.\n', - isRaw: true); + 'He takes a moment to relish in my confusion. I force my expression to harden. He chuckles again.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -298,8 +354,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It\'s good insurance. If things ever go south, if I get desperate, I can just show my face, and ..." He spreads his arms and shows an ugly smile. "Everyone loves me."\n', - isRaw: true); + '"It\'s good insurance. If things ever go south, if I get desperate, I can just show my face, and ..." He spreads his arms and shows an ugly smile. "Everyone loves me."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -312,8 +369,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Big O\'s smile disappears. "But they won\'t. Today, you either join me or die. And if you\'re clever, you\'ll do the former.\n', - isRaw: true); + 'Big O\'s smile disappears. "But they won\'t. Today, you either join me or die. And if you\'re clever, you\'ll do the former.\n', + isRaw: true, + ); }), ], ), @@ -330,8 +388,9 @@ final finalFightInkInk = InkAst([ ? '''You're''' : '''You and your pathetic entourage are'''; s.add( - 'Big O\'s smile disappears. "But you won\'t. ${ifBlock_33dade49d} not strong enough. I figure you\'re too clever to try anything like that.\n', - isRaw: true); + 'Big O\'s smile disappears. "But you won\'t. ${ifBlock_33dade49d} not strong enough. I figure you\'re too clever to try anything like that.\n', + isRaw: true, + ); }), ], ), @@ -342,8 +401,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I think you know what will happen, sooner or later."\n', - isRaw: true); + s.add( + 'I think you know what will happen, sooner or later."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -353,8 +414,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He reaches the bottom of the stairs. "You. Are. A. Necromancer. You\'re not one of them. No, you\'re not, whatever you think now. They might like you now, but you know what happens soon."\n', - isRaw: true); + 'He reaches the bottom of the stairs. "You. Are. A. Necromancer. You\'re not one of them. No, you\'re not, whatever you think now. They might like you now, but you know what happens soon."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -364,8 +426,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He hits the floor with the handle of his scythe for emphasis. The marble cracks in a delicate web of lines. "They will call you a ‘neck.’ They will hate and laugh at you behind your back. At best, they will ignore your talent. They will act as if your talent doesn’t exist. What stupidity! You and I have the power to fight death itself."\n', - isRaw: true); + 'He hits the floor with the handle of his scythe for emphasis. The marble cracks in a delicate web of lines. "They will call you a ‘neck.’ They will hate and laugh at you behind your back. At best, they will ignore your talent. They will act as if your talent doesn’t exist. What stupidity! You and I have the power to fight death itself."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -375,57 +438,83 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; Ruleset( - Rule(524156053, 1, false, (ApplicabilityContext c) { + Rule( + 524156053, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.playerHasAsthma; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I cough. And then again. And again. The more I try to fight it, the worse it gets, and soon, I\'m deep in a coughing fit.\n', - isRaw: true); - }), - Rule(1058657121, 1, false, (ApplicabilityContext c) { + 'I cough. And then again. And again. The more I try to fight it, the worse it gets, and soon, I\'m deep in a coughing fit.\n', + isRaw: true, + ); + }, + ), + Rule( + 1058657121, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.playerHasWoodenFoot; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I have to shift my bad leg, and the wooden stump makes a sound on the marble. Big O briefly looks down and smiles. I raise my chin and keep my gaze level.\n', - isRaw: true); - }), - Rule(46628911, 1, false, (ApplicabilityContext c) { + 'I have to shift my bad leg, and the wooden stump makes a sound on the marble. Big O briefly looks down and smiles. I raise my chin and keep my gaze level.\n', + isRaw: true, + ); + }, + ), + Rule( + 46628911, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.playerHasBurntFace; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Big O squints and observes my face. I have to fight the urge to hide the burnt side.\n', - isRaw: true); - }), - Rule(811640080, 0, false, (ApplicabilityContext c) { + 'Big O squints and observes my face. I have to fight the urge to hide the burnt side.\n', + isRaw: true, + ); + }, + ), + Rule( + 811640080, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -433,7 +522,9 @@ final finalFightInkInk = InkAst([ final Storyline s = c.outputStoryline; assert(false, "The player doesn't have any feature: no asthma, no burnt face, no wooden foot."); - })).apply(ActionContext.updatedFrom(c)); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), InkParagraphNode((ActionContext c) { @@ -447,8 +538,9 @@ final finalFightInkInk = InkAst([ ? '''Almost unconsciously, my hand touches the Dragon Egg hidden in my pocket. ''' : ''''''; s.add( - 'Big O starts to circle around ${ifBlock_1aaeebfe6}, still well out of reach. ${ifBlock_35e089385} "And instead of support," Big O says, "necromancers get sneers and spits. We ought to be at the top and instead we are at the bottom. But not here. Not in San Francisco. Here, the necromancers are at the top."\n', - isRaw: true); + 'Big O starts to circle around ${ifBlock_1aaeebfe6}, still well out of reach. ${ifBlock_35e089385} "And instead of support," Big O says, "necromancers get sneers and spits. We ought to be at the top and instead we are at the bottom. But not here. Not in San Francisco. Here, the necromancers are at the top."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -461,8 +553,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"And giants, soon," he smiles. "You have to understand: they are tools. The orcs and goblins down there might be a bit crude and violent for your tender heart. But they are effective."\n', - isRaw: true); + '"And giants, soon," he smiles. "You have to understand: they are tools. The orcs and goblins down there might be a bit crude and violent for your tender heart. But they are effective."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -474,8 +567,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Effective for building a new civilization.\n', - isRaw: true); + s.add( + '"Effective for building a new civilization.\n', + isRaw: true, + ); }), ], ), @@ -491,8 +586,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Big O mocks a sad expression with his dog eyes. "Oh no, are you going to cry? A few people here met an undeserved fate. Isn\'t that something that happens _every_ _single_ _day?_ Normally, people suffer for idiotic reasons, such as greed and senseless war. In contrast, the folks down there are suffering for a good cause, even if they don\'t know it.\n', - isRaw: true); + 'Big O mocks a sad expression with his dog eyes. "Oh no, are you going to cry? A few people here met an undeserved fate. Isn\'t that something that happens _every_ _single_ _day?_ Normally, people suffer for idiotic reasons, such as greed and senseless war. In contrast, the folks down there are suffering for a good cause, even if they don\'t know it.\n', + isRaw: true, + ); }), ], ), @@ -508,7 +604,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Preservation.\n', isRaw: true); + s.add( + '"Preservation.\n', + isRaw: true, + ); }), ], ), @@ -520,8 +619,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The hard truth is that the ancients, in all their wisdom, allowed themselves to be wiped out. All that wisdom, all that power — wiped out."\n', - isRaw: true); + 'The hard truth is that the ancients, in all their wisdom, allowed themselves to be wiped out. All that wisdom, all that power — wiped out."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -532,8 +632,9 @@ final finalFightInkInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_1aaeebfe6 = c.playerIsAlone ? '''me''' : '''us'''; s.add( - 'Big O still walks in a wide circle around ${ifBlock_1aaeebfe6}. There\'s a spark in his eyes now.\n', - isRaw: true); + 'Big O still walks in a wide circle around ${ifBlock_1aaeebfe6}. There\'s a spark in his eyes now.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -543,8 +644,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"That can\'t happen again. I will not allow it." He places his free hand on his chest. "Humanity cannot lose knowledge if it\'s in the mind of an immortal. Civilization will not end if it\'s strong enough to withstand anything."\n', - isRaw: true); + '"That can\'t happen again. I will not allow it." He places his free hand on his chest. "Humanity cannot lose knowledge if it\'s in the mind of an immortal. Civilization will not end if it\'s strong enough to withstand anything."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -557,8 +659,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"To disrupt the status quo, you have to move fast and break things. At the other end of all this, we will have a much better version of society. Strong, efficient, everlasting. The tools — the orcs and goblins and giants — will help us get there. It\'s the only way."\n', - isRaw: true); + '"To disrupt the status quo, you have to move fast and break things. At the other end of all this, we will have a much better version of society. Strong, efficient, everlasting. The tools — the orcs and goblins and giants — will help us get there. It\'s the only way."\n', + isRaw: true, + ); }), ], ), @@ -572,8 +675,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"You\'re not looking far enough into the future, child. This place is just the beginning. It\'s the epicenter. My vision goes way beyond this valley." He points to the north, east and south. "We can build this empire again. But this time, we make it everlasting. Isn\'t it worth a few lives down below?"\n', - isRaw: true); + '"You\'re not looking far enough into the future, child. This place is just the beginning. It\'s the epicenter. My vision goes way beyond this valley." He points to the north, east and south. "We can build this empire again. But this time, we make it everlasting. Isn\'t it worth a few lives down below?"\n', + isRaw: true, + ); }), ], ), @@ -588,7 +692,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The fight begins.\n', isRaw: true); + s.add( + 'The fight begins.\n', + isRaw: true, + ); }), ], ), @@ -602,8 +709,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I don\'t, child," he says. "I don\'t _need_ anyone. But someone of your talents might be useful. My quakes have worked: the giants are coming. This place will soon be a lot busier than it is now."\n', - isRaw: true); + '"I don\'t, child," he says. "I don\'t _need_ anyone. But someone of your talents might be useful. My quakes have worked: the giants are coming. This place will soon be a lot busier than it is now."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -615,7 +723,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The fight begins.\n', isRaw: true); + s.add( + 'The fight begins.\n', + isRaw: true, + ); }), ], ), @@ -629,8 +740,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The knowledge that your life has some meaning. Power. Status. Immortality. Literally _everything_ that the human mind has ever wanted." Osiris smiles. "That\'s what I offer."\n', - isRaw: true); + '"The knowledge that your life has some meaning. Power. Status. Immortality. Literally _everything_ that the human mind has ever wanted." Osiris smiles. "That\'s what I offer."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -642,7 +754,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The fight begins.\n', isRaw: true); + s.add( + 'The fight begins.\n', + isRaw: true, + ); }), ], ), @@ -656,7 +771,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The fight begins.\n', isRaw: true); + s.add( + 'The fight begins.\n', + isRaw: true, + ); }), ], ), @@ -672,8 +790,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I kneel before Osiris and bow my head. When I look up, he smiles with satisfaction.\n', - isRaw: true); + 'I kneel before Osiris and bow my head. When I look up, he smiles with satisfaction.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -683,8 +802,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'In the following years, we work together to make San Francisco into the fortress that Osiris envisioned. The orcs make competent captains and warriors. Goblins and kobolds build palisades, traps, and pits. Giants work tirelessly on machines of war.\n', - isRaw: true); + 'In the following years, we work together to make San Francisco into the fortress that Osiris envisioned. The orcs make competent captains and warriors. Goblins and kobolds build palisades, traps, and pits. Giants work tirelessly on machines of war.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -694,8 +814,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Soon, the last vestiges of humanity leave the area. Osiris and I are free.\n', - isRaw: true); + 'Soon, the last vestiges of humanity leave the area. Osiris and I are free.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -705,8 +826,9 @@ final finalFightInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'As I overlook the Bay, my frail old hand resting on the ancient windowpane, watching the orcish warships sail out to plunder, do I wonder if I made the right choice? Of course I do.\n', - isRaw: true); + 'As I overlook the Bay, my frail old hand resting on the ancient windowpane, watching the orcish warships sail out to plunder, do I wonder if I made the right choice? Of course I do.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -715,7 +837,10 @@ final finalFightInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('But, alas, the fight is over.\n', isRaw: true); + s.add( + 'But, alas, the fight is over.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -746,9 +871,15 @@ class FinalFightInk extends RoamingAction { @override List get commandPathTemplate => ['N/A']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('start_bogus_location') != true) { return false; } @@ -756,7 +887,10 @@ class FinalFightInk extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -770,7 +904,10 @@ class FinalFightInk extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -781,63 +918,80 @@ class FinalFightInk extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room bigOObservatory = Room( - 'big_o_observatory', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateBigOFight, - null, - positionX: 26, - positionY: 16, - mapName: 'Observatory', - firstMapName: 'The Very Top', - hint: 'At the very top of the Pyramid, a sunlit, luxurious room.', - firstHint: 'A dark shaft with a ladder leads upwards to a sunlit space.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "big_o_end_ink_ink", - )); - }); + 'big_o_observatory', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateBigOFight, + null, + positionX: 26, + positionY: 16, + mapName: 'Observatory', + firstMapName: 'The Very Top', + hint: 'At the very top of the Pyramid, a sunlit, luxurious room.', + firstHint: 'A dark shaft with a ladder leads upwards to a sunlit space.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "big_o_end_ink_ink", + )); + }, +); final bigOEndInkInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -846,8 +1000,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I look at the dead necromancer. The tyrant is no more, and his sick experiment will no doubt crumble without his leadership.\n', - isRaw: true); + 'I look at the dead necromancer. The tyrant is no more, and his sick experiment will no doubt crumble without his leadership.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -857,8 +1012,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'It has started raining outside. The large raindrops drum on the windowpanes, and the air becomes sweeter.\n', - isRaw: true); + 'It has started raining outside. The large raindrops drum on the windowpanes, and the air becomes sweeter.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -868,8 +1024,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'An hour later, I\'m descending through the Pyramid. No one tries to stop me. Even the orcs move out of the way. They all look, mesmerized by what I hold in my hands.\n', - isRaw: true); + 'An hour later, I\'m descending through the Pyramid. No one tries to stop me. Even the orcs move out of the way. They all look, mesmerized by what I hold in my hands.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -879,8 +1036,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Down in the Bleeds, I wait for a crowd to form. We all stand in the rain. People don\'t complain. They know that what they are about to witness transcends this brief moment of discomfort. They all know what the thing in my hands means.\n', - isRaw: true); + 'Down in the Bleeds, I wait for a crowd to form. We all stand in the rain. People don\'t complain. They know that what they are about to witness transcends this brief moment of discomfort. They all know what the thing in my hands means.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -890,36 +1048,51 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; Ruleset( - Rule(948235391, 1, false, (ApplicabilityContext c) { + Rule( + 948235391, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evSavedSarn); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Sarn comes to the front. He looks much better now. The shaking is gone. In the rain it\'s hard to tell if those are tears on his cheeks, or just raindrops.\n\n"I do regret what I did, Aren," he says. "I left you and our father when you needed me most."\n\nI search for what to say, but all I can do is give a little nod. The tiniest of acknowledgements.\n\nSeeing this subtle movement, Sarn starts quietly sobbing. His face goes into pieces. His head slumps and he stays in that pose for a few heartbeats. But then he straightens and returns the nod.\n\nThe cold rain wipes off the new tears. "I am back," he says.\n', - isRaw: true); - }), - Rule(794016591, 0, false, (ApplicabilityContext c) { + 'Sarn comes to the front. He looks much better now. The shaking is gone. In the rain it\'s hard to tell if those are tears on his cheeks, or just raindrops.\n\n"I do regret what I did, Aren," he says. "I left you and our father when you needed me most."\n\nI search for what to say, but all I can do is give a little nod. The tiniest of acknowledgements.\n\nSeeing this subtle movement, Sarn starts quietly sobbing. His face goes into pieces. His head slumps and he stays in that pose for a few heartbeats. But then he straightens and returns the nod.\n\nThe cold rain wipes off the new tears. "I am back," he says.\n', + isRaw: true, + ); + }, + ), + Rule( + 794016591, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I think about Sarn. He died somewhere in the Pyramid, I am sure of it. He paid for the suffering he brought upon his own family. Good riddance.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + 'I think about Sarn. He died somewhere in the Pyramid, I am sure of it. He paid for the suffering he brought upon his own family. Good riddance.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), @@ -930,8 +1103,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'A crowd has formed. Two dozen men and women are soaking in the downpour, watching me in silence. I raise my possession for everyone to see.\n', - isRaw: true); + 'A crowd has formed. Two dozen men and women are soaking in the downpour, watching me in silence. I raise my possession for everyone to see.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -941,8 +1115,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '![Illustration of Big O\'s head in my arms. Before me, a group of people.](doghead.png)\n', - isRaw: true); + '![Illustration of Big O\'s head in my arms. Before me, a group of people.](doghead.png)\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -955,8 +1130,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am the one these people have been waiting for. The man with a dog\'s head. The savior of this damned place.\n', - isRaw: true); + 'I am the one these people have been waiting for. The man with a dog\'s head. The savior of this damned place.\n', + isRaw: true, + ); }), ], ), @@ -970,8 +1146,9 @@ final bigOEndInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I killed him. I removed the false myth and the tyrant behind it.\n', - isRaw: true); + 'I killed him. I removed the false myth and the tyrant behind it.\n', + isRaw: true, + ); }), ], ), @@ -983,7 +1160,10 @@ final bigOEndInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The fight is over.\n', isRaw: true); + s.add( + 'The fight is over.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1004,9 +1184,15 @@ class BigOEndInk extends RoamingAction { @override List get commandPathTemplate => ['N/A']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('start_bogus_location') != true) { return false; } @@ -1014,7 +1200,10 @@ class BigOEndInk extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1028,7 +1217,10 @@ class BigOEndInk extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1039,43 +1231,64 @@ class BigOEndInk extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Approach bigOAntechamberFromCrowdsource = - Approach('crowdsource', 'big_o_antechamber', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach bigOAntechamberFromTopOfClimb = - Approach('top_of_climb', 'big_o_antechamber', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); +final Approach bigOAntechamberFromCrowdsource = Approach( + 'crowdsource', + 'big_o_antechamber', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach bigOAntechamberFromTopOfClimb = Approach( + 'top_of_climb', + 'big_o_antechamber', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class ExamineAntechamberLock extends RoamingAction { @override @@ -1084,10 +1297,19 @@ class ExamineAntechamberLock extends RoamingAction { static final ExamineAntechamberLock singleton = ExamineAntechamberLock(); @override - List get commandPathTemplate => ['Lock mechanism', 'Examine']; + List get commandPathTemplate => [ + 'Lock mechanism', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('big_o_antechamber') != true) { return false; } @@ -1095,7 +1317,10 @@ class ExamineAntechamberLock extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1105,13 +1330,17 @@ class ExamineAntechamberLock extends RoamingAction { ? '''After a few moments, I realize the shape of the lock reminds me of something I have. The circular badge of the orc leader. It will fit.''' : ''''''; s.add( - 'The mechanism is complex and delicate. Not quite ancient but definitely the work of someone skillful.\n\nIn contrast to the intricate texture of the bulk of the mechanism, the center of the lock is simple. An elegant circle, about the size of my palm. This must be the equivalent of a key slit.\n\n${ifBlock_13a1b5365}\n', - isRaw: true); + 'The mechanism is complex and delicate. Not quite ancient but definitely the work of someone skillful.\n\nIn contrast to the intricate texture of the bulk of the mechanism, the center of the lock is simple. An elegant circle, about the size of my palm. This must be the equivalent of a key slit.\n\n${ifBlock_13a1b5365}\n', + isRaw: true, + ); return '${a.name} successfully performs ExamineAntechamberLock'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1122,23 +1351,36 @@ class ExamineAntechamberLock extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -1150,11 +1392,19 @@ class OpenAntechamberLock extends RoamingAction { static final OpenAntechamberLock singleton = OpenAntechamberLock(); @override - List get commandPathTemplate => - ['Lock mechanism', 'Open with the badge']; + List get commandPathTemplate => [ + 'Lock mechanism', + 'Open with the badge', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('big_o_antechamber') != true) { return false; } @@ -1166,20 +1416,27 @@ class OpenAntechamberLock extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I climb up the staircase and place the metal circle in the center of the mechanism. It fits perfectly. Something in the trap door clicks, and the door slowly opens, as if held by an invisible hand.\n\nA ladder leads upwards, through a dark shaft and into a sunlit space far above.\n', - isRaw: true); + 'I climb up the staircase and place the metal circle in the center of the mechanism. It fits perfectly. Something in the trap door clicks, and the door slowly opens, as if held by an invisible hand.\n\nA ladder leads upwards, through a dark shaft and into a sunlit space far above.\n', + isRaw: true, + ); return '${a.name} successfully performs OpenAntechamberLock'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1190,60 +1447,87 @@ class OpenAntechamberLock extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room bigOAntechamber = Room('big_o_antechamber', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room bigOAntechamber = Room( + 'big_o_antechamber', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'I come to a dark room without windows, at the very center of the 39th floor. A stone staircase leads up to a trap door in the ceiling.\n\nA curious lock mechanism guards the trap door from being opened.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 26, - positionY: 22, - mapName: 'Antechamber', - firstMapName: 'A Clean Chamber', - hint: - 'The room with the trap door in the ceiling and that curious lock mechanism.', - firstHint: - 'Far apart from most of the commotion, this part of the Pyramid clearly sees much less regular use. The corridors are empty and clean, and they all converge on this one silent room.'); -final Approach dargTentFromBarracks = - Approach('barracks', 'darg_tent', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 26, + positionY: 22, + mapName: 'Antechamber', + firstMapName: 'A Clean Chamber', + hint: + 'The room with the trap door in the ceiling and that curious lock mechanism.', + firstHint: + 'Far apart from most of the commotion, this part of the Pyramid clearly sees much less regular use. The corridors are empty and clean, and they all converge on this one silent room.', +); +final Approach dargTentFromBarracks = Approach( + 'barracks', + 'darg_tent', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class DargTentAttack extends RoamingAction { @override @@ -1252,10 +1536,19 @@ class DargTentAttack extends RoamingAction { static final DargTentAttack singleton = DargTentAttack(); @override - List get commandPathTemplate => ['Darg', 'Attack']; + List get commandPathTemplate => [ + 'Darg', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('darg_tent') != true) { return false; } @@ -1267,7 +1560,10 @@ class DargTentAttack extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1277,15 +1573,19 @@ class DargTentAttack extends RoamingAction { getWeOrI(a, sim, originalWorld, capitalized: true); final ifBlock_20579df5 = c.playerIsMale ? '''boy''' : '''girl'''; s.add( - '${weSubstitutionCapitalized} approach Darg\'s tent. Darg spots me and looks surprised at first, then amused.\n\n"A human child, here?" Darg says, readying his poleaxe. "Must have found a crawl space to get here." He grins. "Never mind, ${ifBlock_20579df5}. I\'ll dance on your bones."\n\n', - isRaw: true); + '${weSubstitutionCapitalized} approach Darg\'s tent. Darg spots me and looks surprised at first, then amused.\n\n"A human child, here?" Darg says, readying his poleaxe. "Must have found a crawl space to get here." He grins. "Never mind, ${ifBlock_20579df5}. I\'ll dance on your bones."\n\n', + isRaw: true, + ); c.startOptionalFight(); return '${a.name} successfully performs DargTentAttack'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1296,254 +1596,315 @@ class DargTentAttack extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } final Room dargTent = Room( - 'darg_tent', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateDargTentFight, - null, - fightIsOptional: true, - positionX: 33, - positionY: 23, - mapName: 'Orc Leader\'s Tent', - firstMapName: 'On Top of the Eastern Shaft', - hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', - firstHint: - 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', - isRaw: true); - c.markHappened(evKilledDarg); + 'darg_tent', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateDargTentFight, + null, + fightIsOptional: true, + positionX: 33, + positionY: 23, + mapName: 'Orc Leader\'s Tent', + firstMapName: 'On Top of the Eastern Shaft', + hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', + firstHint: + 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', + isRaw: true, + ); + c.markHappened(evKilledDarg); - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "darg_head_talk_ink_ink", - )); - }); + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "darg_head_talk_ink_ink", + )); + }, +); final Room dargTentAfterDargArrived = Room( - 'darg_tent_after_darg_arrived', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n\nAs I consider that, I see a large figure through the flaps of the tent. It is Darg, the orc leader I first saw in the Orcs’ Temple.\n\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateDargTentFight, - null, - parent: 'darg_tent', - prerequisite: Prerequisite(910482930, 1, true, (ApplicabilityContext c) { + 'darg_tent_after_darg_arrived', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n\nAs I consider that, I see a large figure through the flaps of the tent. It is Darg, the orc leader I first saw in the Orcs’ Temple.\n\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateDargTentFight, + null, + parent: 'darg_tent', + prerequisite: Prerequisite( + 910482930, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evDargLeftCrowdsource); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'Darg, the orc leader I first saw in the Orcs’ Temple, is here.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', - isRaw: true); - }, - fightIsOptional: true, - positionX: 33, - positionY: 23, - mapName: 'Orc Leader\'s Tent', - firstMapName: 'On Top of the Eastern Shaft', - hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', - firstHint: - 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', - isRaw: true); - c.markHappened(evKilledDarg); - - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "darg_head_talk_ink_ink", - )); - }); -final Room dargTentAfterDargKilled = Room( - 'darg_tent_after_darg_killed', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateDargTentFight, - null, - parent: 'darg_tent', - prerequisite: Prerequisite(831974385, 2, true, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evKilledDarg) && - !c.hasHappened(evDargLeftCrowdsource); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('Darg won\'t be needing this tent anymore.\n', isRaw: true); }, - fightIsOptional: true, - positionX: 33, - positionY: 23, - mapName: 'Orc Leader\'s Tent', - firstMapName: 'On Top of the Eastern Shaft', - hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', - firstHint: - 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', - isRaw: true); - c.markHappened(evKilledDarg); - - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "darg_head_talk_ink_ink", - )); - }); -final dargHeadTalkInkInk = InkAst([ - InkParagraphNode((ActionContext c) { + ), + variantUpdateDescribe: (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - final ifBlock_34cb16e65 = c.inRoomParent("crowdsource") - ? '''retreat back to the shadows''' - : '''leave'''; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - 'I am almost about to ${ifBlock_34cb16e65} when I hear a soft, gurgling sound. Darg\'s head opens its dead eyes, and an ugly, unnatural grin appears on the face.\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), - InkParagraphNode((ActionContext c) { + 'Darg, the orc leader I first saw in the Orcs’ Temple, is here.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', + isRaw: true, + ); + }, + fightIsOptional: true, + positionX: 33, + positionY: 23, + mapName: 'Orc Leader\'s Tent', + firstMapName: 'On Top of the Eastern Shaft', + hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', + firstHint: + 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', + afterMonstersCleared: (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - Ruleset( - Rule(48764348, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evKilledHope); - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; + s.add( + 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', + isRaw: true, + ); + c.markHappened(evKilledDarg); + + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "darg_head_talk_ink_ink", + )); + }, +); +final Room dargTentAfterDargKilled = Room( + 'darg_tent_after_darg_killed', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'This is a concrete platform sitting over six hundred feet above the redwood forest. I can clearly see the Bay from here, and the ancient bridge over it. The air is fresh, and I can hear the twitter of local birds again.\n\nA richly decorated tent sits at the center of the platform. I can see dagger and sabre motifs, painted in red on the off-white tent. Some important orc must be stationed here.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateDargTentFight, + null, + parent: 'darg_tent', + prerequisite: Prerequisite( + 831974385, + 2, + true, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evKilledDarg) && + !c.hasHappened(evDargLeftCrowdsource); + }, + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Darg won\'t be needing this tent anymore.\n', + isRaw: true, + ); + }, + fightIsOptional: true, + positionX: 33, + positionY: 23, + mapName: 'Orc Leader\'s Tent', + firstMapName: 'On Top of the Eastern Shaft', + hint: 'A tent placed on top of the eastern shaft, overlooking the Bay.', + firstHint: + 'There is access to the outside of the Pyramid here. The walls next to the ancient door are painted red and decorated with human teeth and other signs of orc power.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over. I look around, half-expecting a company of orcs. But not a single one has come. They probably didn\'t consider it necessary to post guards around this remote place, and the wind has swept away the sound of battle.\n\n', + isRaw: true, + ); + c.markHappened(evKilledDarg); + + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "darg_head_talk_ink_ink", + )); + }, +); +final dargHeadTalkInkInk = InkAst([ + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_34cb16e65 = c.inRoomParent("crowdsource") + ? '''retreat back to the shadows''' + : '''leave'''; + s.add( + 'I am almost about to ${ifBlock_34cb16e65} when I hear a soft, gurgling sound. Darg\'s head opens its dead eyes, and an ugly, unnatural grin appears on the face.\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + Ruleset( + Rule( + 48764348, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evKilledHope); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am reminded of my fight with Lady Hope. The necromancer is speaking through dead flesh again.\n', - isRaw: true); - }), - Rule(744619327, 0, false, (ApplicabilityContext c) { + 'I am reminded of my fight with Lady Hope. The necromancer is speaking through dead flesh again.\n', + isRaw: true, + ); + }, + ), + Rule( + 744619327, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am duly impressed. Someone must be puppeteering the body. A highly skilled necromancer, perhaps.\n\nI risk a quick look around. Nobody else is here. The necromancer must be doing this from afar. Even more impressive.\n\nBut then, Darg\'s undead lips start moving. He _speaks._\n\n"Welcome, young one." The voice is dry and labored, but nevertheless understandable. A talking corpse is something I\'ve never even considered before. This is obviously necromancy of some higher level.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + 'I am duly impressed. Someone must be puppeteering the body. A highly skilled necromancer, perhaps.\n\nI risk a quick look around. Nobody else is here. The necromancer must be doing this from afar. Even more impressive.\n\nBut then, Darg\'s undead lips start moving. He _speaks._\n\n"Welcome, young one." The voice is dry and labored, but nevertheless understandable. A talking corpse is something I\'ve never even considered before. This is obviously necromancy of some higher level.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), @@ -1554,8 +1915,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"You should know I hold no grudge against you. I respect your skill."\n', - isRaw: true); + '"You should know I hold no grudge against you. I respect your skill."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -1568,8 +1930,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Good," the head says. "You must understand, I seek nothing less than immortality. Not of myself, mind you. Immortality of civilization, of culture."\n', - isRaw: true); + '"Good," the head says. "You must understand, I seek nothing less than immortality. Not of myself, mind you. Immortality of civilization, of culture."\n', + isRaw: true, + ); }), ], ), @@ -1586,8 +1949,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Darg\'s dead gaze slowly slides toward the floor but the mouth keeps talking. "What happened to the ancients cannot happen to us. I will make sure of it."\n', - isRaw: true); + 'Darg\'s dead gaze slowly slides toward the floor but the mouth keeps talking. "What happened to the ancients cannot happen to us. I will make sure of it."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1597,8 +1961,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The muscles on Darg\'s head finally loosen and his tongue touches the ground.\n', - isRaw: true); + 'The muscles on Darg\'s head finally loosen and his tongue touches the ground.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1608,8 +1973,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I kneel down to inspect the dead body. Surely, the necromancer behind the talking must have used some kind of a device to make the corpse talk. He or she could have implanted it into the windpipe a long ago.\n', - isRaw: true); + 'I kneel down to inspect the dead body. Surely, the necromancer behind the talking must have used some kind of a device to make the corpse talk. He or she could have implanted it into the windpipe a long ago.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1619,8 +1985,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'But I find no such thing. Despite my instincts, I must assume that the necromancer is able to do all of this remotely, without the help of any device. I shudder. No human can possibly endure such concentration. Such pain.\n', - isRaw: true); + 'But I find no such thing. Despite my instincts, I must assume that the necromancer is able to do all of this remotely, without the help of any device. I shudder. No human can possibly endure such concentration. Such pain.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1630,8 +1997,9 @@ final dargHeadTalkInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'On Darg\'s chest, I find a circular iron badge. It has nothing embossed in it, but that simplicity somehow makes it even more impressive. I take it.\n', - isRaw: true); + 'On Darg\'s chest, I find a circular iron badge. It has nothing embossed in it, but that simplicity somehow makes it even more impressive. I take it.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1656,9 +2024,15 @@ class DargHeadTalkInk extends RoamingAction { @override List get commandPathTemplate => ['N/A']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('start_bogus_location') != true) { return false; } @@ -1666,7 +2040,10 @@ class DargHeadTalkInk extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1680,7 +2057,10 @@ class DargHeadTalkInk extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1691,35 +2071,52 @@ class DargHeadTalkInk extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Approach outlookFromTopOfClimb = - Approach('top_of_climb', 'outlook', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); +final Approach outlookFromTopOfClimb = Approach( + 'top_of_climb', + 'outlook', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final hawkmanExamineInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -1728,8 +2125,9 @@ final hawkmanExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I have seen hawkmen before. They are vicious creatures. Intelligent predators with fragile bodies but superhuman agility.\n', - isRaw: true); + 'I have seen hawkmen before. They are vicious creatures. Intelligent predators with fragile bodies but superhuman agility.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1739,8 +2137,9 @@ final hawkmanExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Hawkmen are often mercenaries. They are effective, ruthless, and expensive. Though most people think that at least part of their real motivation is the thrill of the battle and the kill.\n', - isRaw: true); + 'Hawkmen are often mercenaries. They are effective, ruthless, and expensive. Though most people think that at least part of their real motivation is the thrill of the battle and the kill.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1750,8 +2149,9 @@ final hawkmanExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'This particular hawkman seems to be one of the more successful ones. The suit and the sharp sickle are proof.\n', - isRaw: true); + 'This particular hawkman seems to be one of the more successful ones. The suit and the sharp sickle are proof.\n', + isRaw: true, + ); }), ]); final outlookAttackInk = InkAst([ @@ -1761,7 +2161,10 @@ final outlookAttackInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The hawkman gives me a condescending look.\n', isRaw: true); + s.add( + 'The hawkman gives me a condescending look.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -1771,8 +2174,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“So you finally decide to crawl out of your hole and face me, little human?” He swings his sickle in front of him and nods. “I am ready.”\n', - isRaw: true); + '“So you finally decide to crawl out of your hole and face me, little human?” He swings his sickle in front of him and nods. “I am ready.”\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -1785,8 +2189,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“There is nothing to talk about,” the hawkman says. “You trespass on my master’s tower, you die.” He\n', - isRaw: true); + '“There is nothing to talk about,” the hawkman says. “You trespass on my master’s tower, you die.” He\n', + isRaw: true, + ); }), ], ), @@ -1800,8 +2205,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Cute,” he says. “But you chose a bad place for your comedy. This is my master’s property, and you are trespassing.” The hawkman\n', - isRaw: true); + '“Cute,” he says. “But you chose a bad place for your comedy. This is my master’s property, and you are trespassing.” The hawkman\n', + isRaw: true, + ); }), ], ), @@ -1813,8 +2219,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'starts toward me. The high wind ruffles the feathers at the back of his head as he walks.\n', - isRaw: true); + 'starts toward me. The high wind ruffles the feathers at the back of his head as he walks.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -1831,8 +2238,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The hawkman lets out a short chuckle. “That’s good. You came all this way and you don’t know? The big dog at the top, of course,” he says, nodding towards the point of the Pyramid.\n', - isRaw: true); + 'The hawkman lets out a short chuckle. “That’s good. You came all this way and you don’t know? The big dog at the top, of course,” he says, nodding towards the point of the Pyramid.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -1845,8 +2253,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Coins, human," the hawkman says. "Also, this view isn’t half bad, don’t you think? I can see the giants over the water." He chuckles again. "They are coming, you know."\n', - isRaw: true); + '"Coins, human," the hawkman says. "Also, this view isn’t half bad, don’t you think? I can see the giants over the water." He chuckles again. "They are coming, you know."\n', + isRaw: true, + ); }), ], ), @@ -1860,8 +2269,9 @@ final outlookAttackInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Master’s realm, of course. This all will become a new, powerful civilization. Built on the shoulders of giants.” He chuckles again. “I can already see them, you know. The giants. They are coming here.”\n', - isRaw: true); + '“Master’s realm, of course. This all will become a new, powerful civilization. Built on the shoulders of giants.” He chuckles again. “I can already see them, you know. The giants. They are coming here.”\n', + isRaw: true, + ); }), ], ), @@ -1887,10 +2297,19 @@ class HawkmanExamine extends RoamingAction { static final HawkmanExamine singleton = HawkmanExamine(); @override - List get commandPathTemplate => ['Hawkman', 'Examine']; + List get commandPathTemplate => [ + 'Hawkman', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('outlook') != true) { return false; } @@ -1898,7 +2317,10 @@ class HawkmanExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1912,7 +2334,10 @@ class HawkmanExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1923,23 +2348,36 @@ class HawkmanExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -1951,10 +2389,19 @@ class OutlookAttack extends RoamingAction { static final OutlookAttack singleton = OutlookAttack(); @override - List get commandPathTemplate => ['Hawkman', 'Approach']; + List get commandPathTemplate => [ + 'Hawkman', + 'Approach', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('outlook') != true) { return false; } @@ -1962,7 +2409,10 @@ class OutlookAttack extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1976,7 +2426,10 @@ class OutlookAttack extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -1987,23 +2440,36 @@ class OutlookAttack extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } @@ -2015,10 +2481,19 @@ class StripDeadHawkman extends RoamingAction { static final StripDeadHawkman singleton = StripDeadHawkman(); @override - List get commandPathTemplate => ['Hawkman\'s suit', 'Take']; + List get commandPathTemplate => [ + 'Hawkman\'s suit', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(!c.getRoomRoaming().monstersAlive && !c.playerRoom.isSynthetic && c.playerRoom.isOnMap && @@ -2029,22 +2504,29 @@ class StripDeadHawkman extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I strip the hawkman of his suit and put it on. It fits well, and feels like no fabric I have touched before.\n\n', - isRaw: true); + 'I strip the hawkman of his suit and put it on. It fits well, and feels like no fabric I have touched before.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(hawkmanJacket); return '${a.name} successfully performs StripDeadHawkman'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2055,157 +2537,219 @@ class StripDeadHawkman extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room outlook = Room( - 'outlook', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'A small door opens to a platform overlooking the ruins of San Francisco. Cold wind hits me in the face, bringing with it tiny droplets of water.\n\nAt the other end of the platform, a solitary hawkman is looking into the distance. He probably saw me opening the door, but doesn\'t seem to care.\n\n![Illustration of a man with a hawk\'s head, dressed in an ancient suit, with a sickle for a weapon.](hawkman.png)\n\nHe is wearing an ancient suit, miraculously preserved.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateHawkmanFight, - null, - fightIsOptional: true, - positionX: 20, - positionY: 25, - mapName: 'Outlook', - firstMapName: 'On Top of the Western Shaft', - hint: 'A place for a sentry with excellent eyes.', - firstHint: - 'Something is on top of the shaft. The access to outside is well used, though it\'s unguarded.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The fight is over.\n\n', isRaw: true); - c.markHappened(evKilledHawkman); - }); -final Approach topOfClimbFromBarracks = - Approach('barracks', 'top_of_climb', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach topOfClimbFromBigOAntechamber = - Approach('big_o_antechamber', 'top_of_climb', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach topOfClimbFromConet = - Approach('conet', 'top_of_climb', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach topOfClimbFromKeepServants = - Approach('keep_servants', 'top_of_climb', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach topOfClimbFromOutlook = - Approach('outlook', 'top_of_climb', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room topOfClimb = Room('top_of_climb', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_22fbea428 = - c.world.visitHistory.getLatestOnly(a)!.parentRoomName == "keep_servants" - ? '''Orc language can be heard from behind the walls.''' - : ''''''; - s.add( + 'outlook', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'A small door opens to a platform overlooking the ruins of San Francisco. Cold wind hits me in the face, bringing with it tiny droplets of water.\n\nAt the other end of the platform, a solitary hawkman is looking into the distance. He probably saw me opening the door, but doesn\'t seem to care.\n\n![Illustration of a man with a hawk\'s head, dressed in an ancient suit, with a sickle for a weapon.](hawkman.png)\n\nHe is wearing an ancient suit, miraculously preserved.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateHawkmanFight, + null, + fightIsOptional: true, + positionX: 20, + positionY: 25, + mapName: 'Outlook', + firstMapName: 'On Top of the Western Shaft', + hint: 'A place for a sentry with excellent eyes.', + firstHint: + 'Something is on top of the shaft. The access to outside is well used, though it\'s unguarded.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over.\n\n', + isRaw: true, + ); + c.markHappened(evKilledHawkman); + }, +); +final Approach topOfClimbFromBarracks = Approach( + 'barracks', + 'top_of_climb', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach topOfClimbFromBigOAntechamber = Approach( + 'big_o_antechamber', + 'top_of_climb', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach topOfClimbFromConet = Approach( + 'conet', + 'top_of_climb', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach topOfClimbFromKeepServants = Approach( + 'keep_servants', + 'top_of_climb', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach topOfClimbFromOutlook = Approach( + 'outlook', + 'top_of_climb', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room topOfClimb = Room( + 'top_of_climb', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_22fbea428 = + c.world.visitHistory.getLatestOnly(a)!.parentRoomName == "keep_servants" + ? '''Orc language can be heard from behind the walls.''' + : ''''''; + s.add( 'A huge, dark pit. The bottom is unseen, in complete darkness.\n\n${ifBlock_22fbea428}\n\n', - isRaw: true); - c.learn(OrcsFacts.inPyramid); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 20, - positionY: 30, - mapName: 'Top of a Shaft', - hint: - 'A dark pit extends hundreds of feet toward the bottom of the Pyramid.'); -final Approach crowdsourceFromBarracks = - Approach('barracks', 'crowdsource', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach crowdsourceFromBigOAntechamber = - Approach('big_o_antechamber', 'crowdsource', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach crowdsourceFromConet = - Approach('conet', 'crowdsource', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + c.learn(OrcsFacts.inPyramid); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 20, + positionY: 30, + mapName: 'Top of a Shaft', + hint: 'A dark pit extends hundreds of feet toward the bottom of the Pyramid.', +); +final Approach crowdsourceFromBarracks = Approach( + 'barracks', + 'crowdsource', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach crowdsourceFromBigOAntechamber = Approach( + 'big_o_antechamber', + 'crowdsource', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach crowdsourceFromConet = Approach( + 'conet', + 'crowdsource', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final crowdsourceListenInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -2214,8 +2758,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Only you have the power," the shaman is saying to Darg. "Use it! Talk to him!"\n', - isRaw: true); + '"Only you have the power," the shaman is saying to Darg. "Use it! Talk to him!"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2225,8 +2770,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Darg takes a step back from her and shakes his head. He looks upward. "The Maker will call me. Before that, my hands are tied. A mouse does not ask to visit the cat."\n', - isRaw: true); + 'Darg takes a step back from her and shakes his head. He looks upward. "The Maker will call me. Before that, my hands are tied. A mouse does not ask to visit the cat."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2236,8 +2782,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The shaman sighs and takes a step toward Darg. Her hushed voice reverberates through the large space. "The Maker gave you the Null. Why else would he give it to you other than for you to use it?"\n', - isRaw: true); + 'The shaman sighs and takes a step toward Darg. Her hushed voice reverberates through the large space. "The Maker gave you the Null. Why else would he give it to you other than for you to use it?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -2250,8 +2797,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Darg lowers his voice, too. "You don\'t know him the way I do. He\'s no orc. No human. I have never seen his face but there\'s something in his voice." Darg pauses and lowers his voice even further. "He\'s terrifying."\n', - isRaw: true); + 'Darg lowers his voice, too. "You don\'t know him the way I do. He\'s no orc. No human. I have never seen his face but there\'s something in his voice." Darg pauses and lowers his voice even further. "He\'s terrifying."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2260,8 +2808,10 @@ final crowdsourceListenInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The shaman growls. "You\'re afraid," she says.\n', - isRaw: true); + s.add( + 'The shaman growls. "You\'re afraid," she says.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2271,8 +2821,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Darg\'s huge hand moves quickly and squeezes the back of the shaman\'s neck. His angry snarl fills the temple.\n', - isRaw: true); + 'Darg\'s huge hand moves quickly and squeezes the back of the shaman\'s neck. His angry snarl fills the temple.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2282,8 +2833,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I have a weakness for you, shaman," he says. "But say something like that one more time and I break you and dance on your bones." He glances around. "My guard is close, he could have heard."\n', - isRaw: true); + '"I have a weakness for you, shaman," he says. "But say something like that one more time and I break you and dance on your bones." He glances around. "My guard is close, he could have heard."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -2296,8 +2848,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'After a brief moment of silence, the shaman starts talking again. Her voice is softer now. "If we can\'t ask the Maker for permission, so be it. We can attack now, and ask him for forgiveness later."\n', - isRaw: true); + 'After a brief moment of silence, the shaman starts talking again. Her voice is softer now. "If we can\'t ask the Maker for permission, so be it. We can attack now, and ask him for forgiveness later."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2306,8 +2859,10 @@ final crowdsourceListenInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Darg shakes his head, but the shaman continues.\n', - isRaw: true); + s.add( + 'Darg shakes his head, but the shaman continues.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2317,8 +2872,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It will be an easy win and you know it. The crowd is ready. We can take the whole tower today. There will be no resistance."\n', - isRaw: true); + '"It will be an easy win and you know it. The crowd is ready. We can take the whole tower today. There will be no resistance."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -2331,8 +2887,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"You don\'t know that," Darg says and watches the shaman, once again, take a step toward him.\n', - isRaw: true); + '"You don\'t know that," Darg says and watches the shaman, once again, take a step toward him.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2342,8 +2899,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Of course I do, Darg," the shaman says. "Didn\'t you hear the hawk? He saw a company of Knights leaving the tower and traveling south. They\'ve abandoned this place."\n', - isRaw: true); + '"Of course I do, Darg," the shaman says. "Didn\'t you hear the hawk? He saw a company of Knights leaving the tower and traveling south. They\'ve abandoned this place."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2353,8 +2911,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It might have been only some of them," Darg says. "Others might be still inside."\n', - isRaw: true); + '"It might have been only some of them," Darg says. "Others might be still inside."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -2367,8 +2926,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"So what?" The shaman grins and places her hand on Darg\'s crotch. "We\'ll kill them."\n', - isRaw: true); + '"So what?" The shaman grins and places her hand on Darg\'s crotch. "We\'ll kill them."\n', + isRaw: true, + ); }), InkParagraphNode( (c) => c.outputStoryline.addParagraph()), @@ -2379,8 +2939,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Darg freezes, then slowly pulls away her hand. "We\'ll wait for the Maker\'s decision," he says. "The Maker\'s plan is larger than the tower itself. Attacking now seems obvious, but it can be a bad mistake."\n', - isRaw: true); + 'Darg freezes, then slowly pulls away her hand. "We\'ll wait for the Maker\'s decision," he says. "The Maker\'s plan is larger than the tower itself. Attacking now seems obvious, but it can be a bad mistake."\n', + isRaw: true, + ); }), InkParagraphNode( (c) => c.outputStoryline.addParagraph()), @@ -2391,8 +2952,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The shaman draws away from Darg but says nothing. I can hear her breathe.\n', - isRaw: true); + 'The shaman draws away from Darg but says nothing. I can hear her breathe.\n', + isRaw: true, + ); }), InkParagraphNode( (c) => c.outputStoryline.addParagraph()), @@ -2403,8 +2965,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Knowing to avoid bad mistakes like this is how I earned the Null," Darg says. "I know the crowd is only a small part of this machine, and I don\'t see where it fits." He gestures to encompass the room. "Now prepare for the daily."\n', - isRaw: true); + '"Knowing to avoid bad mistakes like this is how I earned the Null," Darg says. "I know the crowd is only a small part of this machine, and I don\'t see where it fits." He gestures to encompass the room. "Now prepare for the daily."\n', + isRaw: true, + ); }), InkParagraphNode( (c) => c.outputStoryline.addParagraph()), @@ -2415,8 +2978,9 @@ final crowdsourceListenInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The shaman frowns but moves away from Darg and starts preparing the temple for some kind of a ritual. Darg watches her work.\n', - isRaw: true); + 'The shaman frowns but moves away from Darg and starts preparing the temple for some kind of a ritual. Darg watches her work.\n', + isRaw: true, + ); }), ], ), @@ -2455,10 +3019,19 @@ class CrowdsourceAttack extends RoamingAction { static final CrowdsourceAttack singleton = CrowdsourceAttack(); @override - List get commandPathTemplate => ['Orcs', 'Attack']; + List get commandPathTemplate => [ + 'Orcs', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('crowdsource') != true) { return false; } @@ -2471,7 +3044,10 @@ class CrowdsourceAttack extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2480,15 +3056,19 @@ class CrowdsourceAttack extends RoamingAction { final weSubstitutionCapitalized = getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - '${weSubstitutionCapitalized} step from behind the pillars and approach the two orcs.\n\n"Humans?" the shaman says. "Here?"\n\n"Looks like a child," Darg says, readying his poleaxe. "Must have found a crawl space to get in here."\n\nThe shaman readies the ceremonial dagger from her side and takes position next to Darg. "Let\'s kill together, Darg. Like in Oak Land so many moons ago."\n\nDarg grins.\n\n', - isRaw: true); + '${weSubstitutionCapitalized} step from behind the pillars and approach the two orcs.\n\n"Humans?" the shaman says. "Here?"\n\n"Looks like a child," Darg says, readying his poleaxe. "Must have found a crawl space to get in here."\n\nThe shaman readies the ceremonial dagger from her side and takes position next to Darg. "Let\'s kill together, Darg. Like in Oak Land so many moons ago."\n\nDarg grins.\n\n', + isRaw: true, + ); c.startOptionalFight(); return '${a.name} successfully performs CrowdsourceAttack'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2499,23 +3079,36 @@ class CrowdsourceAttack extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } @@ -2527,10 +3120,19 @@ class CrowdsourceListen extends RoamingAction { static final CrowdsourceListen singleton = CrowdsourceListen(); @override - List get commandPathTemplate => ['Orcs', 'Listen']; + List get commandPathTemplate => [ + 'Orcs', + 'Listen', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('crowdsource') != true) { return false; } @@ -2542,7 +3144,10 @@ class CrowdsourceListen extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2556,7 +3161,10 @@ class CrowdsourceListen extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2567,218 +3175,289 @@ class CrowdsourceListen extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room crowdsource = Room( - 'crowdsource', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'This room serves as a temple for the orcs. It has no windows and is lit by torches. The darkness and the rows of pillars provide good opportunities to hide.\n\nI can only see two orcs here. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, a ceremonial dagger at her side. The shaman is talking with another orc, addressing him as Darg.\n\nDarg is larger and considerably more muscular than the shaman. He is the leader of this orc outpost. A large poleaxe made from ancient parts serves as both his weapon and his symbol of power.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateCrowdsourceFight, - null, - fightIsOptional: true, - positionX: 27, - positionY: 29, - mapName: 'Orcs’ Temple', - firstMapName: 'Religious Place', - hint: - 'A temple with no windows, lit by torches. The darkness and the rows of pillars provide good opportunities to hide.', - firstHint: 'Orc symbols indicate a temple, a sacrificial place, or both.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs\' complex.\n\n', - isRaw: true); - c.markHappened(evKilledDarg); - - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "darg_head_talk_ink_ink", - )); - }); -final Room crowdsourceAfterOrcsLeft = Room( - 'crowdsource_after_orcs_left', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'This room serves as a temple for the orcs. It has no windows and is lit by torches. The darkness and the rows of pillars provide good opportunities to hide.\n\nI can only see two orcs here. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, a ceremonial dagger at her side. The shaman is talking with another orc, addressing him as Darg.\n\nDarg is larger and considerably more muscular than the shaman. He is the leader of this orc outpost. A large poleaxe made from ancient parts serves as both his weapon and his symbol of power.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateCrowdsourceFight, - null, - parent: 'crowdsource', - prerequisite: Prerequisite(586291809, 2, true, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evDargLeftCrowdsource) && - !c.hasHappened(evKilledDarg); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The orcs are gone.\n', isRaw: true); - }, - fightIsOptional: true, - positionX: 27, - positionY: 29, - mapName: 'Orcs’ Temple', - firstMapName: 'Religious Place', - hint: - 'A temple with no windows, lit by torches. The darkness and the rows of pillars provide good opportunities to hide.', - firstHint: 'Orc symbols indicate a temple, a sacrificial place, or both.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs\' complex.\n\n', - isRaw: true); - c.markHappened(evKilledDarg); - - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "darg_head_talk_ink_ink", - )); - }); -final Room crowdsourceVestry = Room('crowdsource_vestry', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, positionX: 28, positionY: 30, mapName: 'Orcs’ Temple Vestry'); -final Approach barracksFromCrowdsource = - Approach('crowdsource', 'barracks', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach barracksFromDargTent = - Approach('darg_tent', 'barracks', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach barracksFromJunction = - Approach('junction', 'barracks', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach barracksFromTopOfClimb = - Approach('top_of_climb', 'barracks', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final barracksTakeBarbecuedBatInk = InkAst([ - InkParagraphNode((ActionContext c) { + 'crowdsource', + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - 'The bat has been broiled well. Maybe too well. But there\'s enough meat on it.\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), - InkParagraphNode((ActionContext c) { + 'This room serves as a temple for the orcs. It has no windows and is lit by torches. The darkness and the rows of pillars provide good opportunities to hide.\n\nI can only see two orcs here. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, a ceremonial dagger at her side. The shaman is talking with another orc, addressing him as Darg.\n\nDarg is larger and considerably more muscular than the shaman. He is the leader of this orc outpost. A large poleaxe made from ancient parts serves as both his weapon and his symbol of power.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', + isRaw: true, + ); + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - c.giveNewItemToPlayer(barbecuedBat); - }), -]); + s.add( + '', + isRaw: true, + ); + }, + generateCrowdsourceFight, + null, + fightIsOptional: true, + positionX: 27, + positionY: 29, + mapName: 'Orcs’ Temple', + firstMapName: 'Religious Place', + hint: + 'A temple with no windows, lit by torches. The darkness and the rows of pillars provide good opportunities to hide.', + firstHint: 'Orc symbols indicate a temple, a sacrificial place, or both.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over. I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs\' complex.\n\n', + isRaw: true, + ); + c.markHappened(evKilledDarg); -class BarracksTakeBarbecuedBat extends RoamingAction { + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "darg_head_talk_ink_ink", + )); + }, +); +final Room crowdsourceAfterOrcsLeft = Room( + 'crowdsource_after_orcs_left', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'This room serves as a temple for the orcs. It has no windows and is lit by torches. The darkness and the rows of pillars provide good opportunities to hide.\n\nI can only see two orcs here. One of them is a shaman: an old but muscular female orc, with a long chain of human teeth around her neck, a ceremonial dagger at her side. The shaman is talking with another orc, addressing him as Darg.\n\nDarg is larger and considerably more muscular than the shaman. He is the leader of this orc outpost. A large poleaxe made from ancient parts serves as both his weapon and his symbol of power.\n\n![Illustration of Darg, a huge orc with a weapon that resembles a battle axe.](darg.png)\n\n${weSubstitutionCapitalized} stay hidden.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateCrowdsourceFight, + null, + parent: 'crowdsource', + prerequisite: Prerequisite( + 586291809, + 2, + true, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evDargLeftCrowdsource) && + !c.hasHappened(evKilledDarg); + }, + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The orcs are gone.\n', + isRaw: true, + ); + }, + fightIsOptional: true, + positionX: 27, + positionY: 29, + mapName: 'Orcs’ Temple', + firstMapName: 'Religious Place', + hint: + 'A temple with no windows, lit by torches. The darkness and the rows of pillars provide good opportunities to hide.', + firstHint: 'Orc symbols indicate a temple, a sacrificial place, or both.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over. I look around and there are no more orcs. The corridors are silent. I am fortunate that the temple is so secluded from the rest of the orcs\' complex.\n\n', + isRaw: true, + ); + c.markHappened(evKilledDarg); + + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "darg_head_talk_ink_ink", + )); + }, +); +final Room crowdsourceVestry = Room( + 'crowdsource_vestry', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 28, + positionY: 30, + mapName: 'Orcs’ Temple Vestry', +); +final Approach barracksFromCrowdsource = Approach( + 'crowdsource', + 'barracks', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach barracksFromDargTent = Approach( + 'darg_tent', + 'barracks', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach barracksFromJunction = Approach( + 'junction', + 'barracks', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach barracksFromTopOfClimb = Approach( + 'top_of_climb', + 'barracks', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final barracksTakeBarbecuedBatInk = InkAst([ + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The bat has been broiled well. Maybe too well. But there\'s enough meat on it.\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.giveNewItemToPlayer(barbecuedBat); + }), +]); + +class BarracksTakeBarbecuedBat extends RoamingAction { @override final String name = 'barracks_take_barbecued_bat'; static final BarracksTakeBarbecuedBat singleton = BarracksTakeBarbecuedBat(); @override - List get commandPathTemplate => ['Barbecued bat', 'Take']; + List get commandPathTemplate => [ + 'Barbecued bat', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('barracks') != true) { return false; } @@ -2786,7 +3465,10 @@ class BarracksTakeBarbecuedBat extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2800,7 +3482,10 @@ class BarracksTakeBarbecuedBat extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -2811,104 +3496,152 @@ class BarracksTakeBarbecuedBat extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room barracks = Room('barracks', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( +final Room barracks = Room( + 'barracks', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( 'A large room taking up two floors. Bunk beds, and a dining area. ${weSubstitutionCapitalized} stay hidden.\n\n', - isRaw: true); - Ruleset( - Rule(289329998, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.playerHasAsthma; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + isRaw: true, + ); + Ruleset( + Rule( + 289329998, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.playerHasAsthma; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( ' As I duck to walk beneath a snuffed torch on the wall, I have to stop. My lungs suddenly feel as if on fire. I have a strong urge to cough. My asthma.\n\n There are orcs nearby that would surely hear me. I hold my breath and curl beneath the torch. Pain. Suffocation. Fear.\n\n After ten long heartbeats, I am able to swallow and the urge subsides. I wait a few more moments before breathing again. After that, I quickly scuttle to a more remote area, where I find a barbecued bat on a stool out of sight.\n\n I almost cry with happiness.\n', - isRaw: true); - }), - Rule(571428451, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add(' I find a barbecued bat on a stool out of sight.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 30, - positionY: 33, - mapName: 'Barracks', - firstMapName: 'Large Quiet Area', - hint: 'A large room taking up two floors with bunk beds and a dining area.', - firstHint: 'Sounds of orcs snoring.'); -final Approach conetFromCrowdsource = - Approach('crowdsource', 'conet', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach conetFromSmithy = - Approach('smithy', 'conet', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return !c.hasHappened(evSavedSarn) || c.hasHappened(evTookSarnToBleeds); -}); + isRaw: true, + ); + }, + ), + Rule( + 571428451, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' I find a barbecued bat on a stool out of sight.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 30, + positionY: 33, + mapName: 'Barracks', + firstMapName: 'Large Quiet Area', + hint: 'A large room taking up two floors with bunk beds and a dining area.', + firstHint: 'Sounds of orcs snoring.', +); +final Approach conetFromCrowdsource = Approach( + 'crowdsource', + 'conet', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach conetFromSmithy = Approach( + 'smithy', + 'conet', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return !c.hasHappened(evSavedSarn) || c.hasHappened(evTookSarnToBleeds); + }, +); final conetExamineInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -2917,8 +3650,9 @@ final conetExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The device occupies most of the room. It is made of massive redwood beams and concrete blocks, but also delicate machinery. The air smells of oiled wood and kobold sweat.\n', - isRaw: true); + 'The device occupies most of the room. It is made of massive redwood beams and concrete blocks, but also delicate machinery. The air smells of oiled wood and kobold sweat.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2931,8 +3665,9 @@ final conetExamineInk = InkAst([ ? '''This spring was being drawn by the kobold's turning of the wheel.''' : '''This spring is being drawn, very slowly, by the kobold's turning of the wheel.'''; s.add( - 'A large pillar of wood, concrete, and metal stands in the center. A large spring rolls around this pillar and vibrates with strange, anxious energy. ${ifBlock_5b399eb1d}\n', - isRaw: true); + 'A large pillar of wood, concrete, and metal stands in the center. A large spring rolls around this pillar and vibrates with strange, anxious energy. ${ifBlock_5b399eb1d}\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2942,8 +3677,9 @@ final conetExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Only after focusing on this centerpiece do I realize that there is a subtle symmetry in the room. Rings of cracks on the floor radiate from the pillar outward, getting fainter as they recede from the core.\n', - isRaw: true); + 'Only after focusing on this centerpiece do I realize that there is a subtle symmetry in the room. Rings of cracks on the floor radiate from the pillar outward, getting fainter as they recede from the core.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2952,8 +3688,10 @@ final conetExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('This is the source of the earthquakes. I am sure of it.\n', - isRaw: true); + s.add( + 'This is the source of the earthquakes. I am sure of it.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2972,8 +3710,10 @@ final conetKoboldExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The kobold is talking to himself as he\'s turning the wheel.\n', - isRaw: true); + s.add( + 'The kobold is talking to himself as he\'s turning the wheel.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2983,8 +3723,9 @@ final conetKoboldExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"How I wish I could be down there and fight," he says. "What I\'d give to be able to crack some skulls."\n', - isRaw: true); + '"How I wish I could be down there and fight," he says. "What I\'d give to be able to crack some skulls."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -2994,8 +3735,9 @@ final conetKoboldExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He swings his free hand as if holding a weapon. "You coming at me?" he says to an imaginary foe. "You coming at me? I\'m faster than you, you son of a—"\n', - isRaw: true); + 'He swings his free hand as if holding a weapon. "You coming at me?" he says to an imaginary foe. "You coming at me? I\'m faster than you, you son of a—"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3004,7 +3746,10 @@ final conetKoboldExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Another swing of a hand, and a grin.\n', isRaw: true); + s.add( + 'Another swing of a hand, and a grin.\n', + isRaw: true, + ); }), ]); @@ -3015,10 +3760,19 @@ class ConetAttack extends RoamingAction { static final ConetAttack singleton = ConetAttack(); @override - List get commandPathTemplate => ['Kobold', 'Attack']; + List get commandPathTemplate => [ + 'Kobold', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('conet') != true) { return false; } @@ -3026,7 +3780,10 @@ class ConetAttack extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3035,15 +3792,19 @@ class ConetAttack extends RoamingAction { final weSubstitutionCapitalized = getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - '${weSubstitutionCapitalized} step out of hiding. The kobold stops turning the wheel, briefly surprised. But then he jumps to the side and picks a big black wrench from a brown bag on the floor.\n\n"Oh, this is going to be good," he says. "A human child."\n\n', - isRaw: true); + '${weSubstitutionCapitalized} step out of hiding. The kobold stops turning the wheel, briefly surprised. But then he jumps to the side and picks a big black wrench from a brown bag on the floor.\n\n"Oh, this is going to be good," he says. "A human child."\n\n', + isRaw: true, + ); c.startOptionalFight(); return '${a.name} successfully performs ConetAttack'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3054,23 +3815,36 @@ class ConetAttack extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } @@ -3082,10 +3856,19 @@ class ConetExamine extends RoamingAction { static final ConetExamine singleton = ConetExamine(); @override - List get commandPathTemplate => ['Device', 'Examine']; + List get commandPathTemplate => [ + 'Device', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('conet') != true) { return false; } @@ -3093,7 +3876,10 @@ class ConetExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3107,7 +3893,10 @@ class ConetExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3118,23 +3907,36 @@ class ConetExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -3146,10 +3948,19 @@ class ConetKoboldExamine extends RoamingAction { static final ConetKoboldExamine singleton = ConetKoboldExamine(); @override - List get commandPathTemplate => ['Kobold', 'Examine']; + List get commandPathTemplate => [ + 'Kobold', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('conet') != true) { return false; } @@ -3160,7 +3971,10 @@ class ConetKoboldExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3174,7 +3988,10 @@ class ConetKoboldExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3185,128 +4002,171 @@ class ConetKoboldExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room conet = Room( - 'conet', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'A kobold is operating a large device. He is turning a huge wheel, drawing some kind of a spring.\n\nThere is writing on the entrance:\n\n![Illustration of a primitive writing on the wall, saying "Conet"](conet.png)\n\nA word I do not understand. ${weSubstitutionCapitalized} stay hidden.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateConetFight, - null, - fightIsOptional: true, - positionX: 19, - positionY: 38, - mapName: 'Conet', - firstMapName: 'Some Mechanism', - hint: 'A room filled with a large device.', - firstHint: - 'Something is making quiet chafing sounds. Reminds me of millstones.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The fight is over.\n\n', isRaw: true); - c.markHappened(evConetDestroyed); - }); + 'conet', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'A kobold is operating a large device. He is turning a huge wheel, drawing some kind of a spring.\n\nThere is writing on the entrance:\n\n![Illustration of a primitive writing on the wall, saying "Conet"](conet.png)\n\nA word I do not understand. ${weSubstitutionCapitalized} stay hidden.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateConetFight, + null, + fightIsOptional: true, + positionX: 19, + positionY: 38, + mapName: 'Conet', + firstMapName: 'Some Mechanism', + hint: 'A room filled with a large device.', + firstHint: + 'Something is making quiet chafing sounds. Reminds me of millstones.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over.\n\n', + isRaw: true, + ); + c.markHappened(evConetDestroyed); + }, +); final Room conetAfterClearing = Room( - 'conet_after_clearing', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The room is silent.\n', isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateConetFight, - null, - parent: 'conet', - prerequisite: Prerequisite(357396258, 1, true, (ApplicabilityContext c) { + 'conet_after_clearing', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The room is silent.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateConetFight, + null, + parent: 'conet', + prerequisite: Prerequisite( + 357396258, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evConetDestroyed); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('Now, the room is silent.\n', isRaw: true); }, - fightIsOptional: true, - positionX: 19, - positionY: 38, - mapName: 'Conet', - firstMapName: 'Some Mechanism', - hint: 'A room filled with a large device.', - firstHint: - 'Something is making quiet chafing sounds. Reminds me of millstones.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The fight is over.\n\n', isRaw: true); - c.markHappened(evConetDestroyed); - }); -final Approach maintenanceShaftFromElevator28 = - Approach('elevator_28', 'maintenance_shaft', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Now, the room is silent.\n', + isRaw: true, + ); + }, + fightIsOptional: true, + positionX: 19, + positionY: 38, + mapName: 'Conet', + firstMapName: 'Some Mechanism', + hint: 'A room filled with a large device.', + firstHint: + 'Something is making quiet chafing sounds. Reminds me of millstones.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over.\n\n', + isRaw: true, + ); + c.markHappened(evConetDestroyed); + }, +); +final Approach maintenanceShaftFromElevator28 = Approach( + 'elevator_28', + 'maintenance_shaft', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class KarlListenToGuards extends RoamingAction { @override @@ -3315,10 +4175,19 @@ class KarlListenToGuards extends RoamingAction { static final KarlListenToGuards singleton = KarlListenToGuards(); @override - List get commandPathTemplate => ['Guards', 'Listen']; + List get commandPathTemplate => [ + 'Guards', + 'Listen', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('maintenance_shaft') != true) { return false; } @@ -3329,20 +4198,27 @@ class KarlListenToGuards extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The two are laughing.\n\n"He ate him whole, didn\'t he?" the orc captain says. "I\'ve never seen Karl do that before."\n\n"We should feed him something even bigger next time," the berserker smirks. "A horse, maybe."\n\n"Get a horse carcass up here and we\'ll do it. The sucker is sleeping like a baby, and I think it\'s because of the size of the food."\n\nThe berserker nods. "Even better, it looks like we don\'t need to worry about chopping the carcasses from now on."\n\n"Yah. A whole hawkman in one swallow." The captain shakes his head. "Karl is full of surprises, isn\'t he?"\n\nIf I understand correctly, there\'s a corpse of a hawkman lying in some nearby creature\'s belly. That creature must be gigantic, whatever it is.\n', - isRaw: true); + 'The two are laughing.\n\n"He ate him whole, didn\'t he?" the orc captain says. "I\'ve never seen Karl do that before."\n\n"We should feed him something even bigger next time," the berserker smirks. "A horse, maybe."\n\n"Get a horse carcass up here and we\'ll do it. The sucker is sleeping like a baby, and I think it\'s because of the size of the food."\n\nThe berserker nods. "Even better, it looks like we don\'t need to worry about chopping the carcasses from now on."\n\n"Yah. A whole hawkman in one swallow." The captain shakes his head. "Karl is full of surprises, isn\'t he?"\n\nIf I understand correctly, there\'s a corpse of a hawkman lying in some nearby creature\'s belly. That creature must be gigantic, whatever it is.\n', + isRaw: true, + ); return '${a.name} successfully performs KarlListenToGuards'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3353,66 +4229,98 @@ class KarlListenToGuards extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room maintenanceShaft = Room('maintenance_shaft', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_2092aa1ea = !c.hasHappened(evKarlGuardsKilled) - ? '''two orcs below, guarding some kind of a large gate. A berserker and a captain.''' - : '''a room below, with a large gate.'''; - final ifBlock_17f129234 = !c.hasHappened(evKarlKilled) - ? '''Guttural breathing sounds come from beyond the gate. And something else. I sense a fresh corpse that way, too. Something strange.''' - : ''''''; - s.add( - 'Musty, dark place. Through cracks, I can see rooms under me.\n\nGoing to the end of the shaft, I can see ${ifBlock_2092aa1ea}\n\n${ifBlock_17f129234}\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 34, - positionY: 40, - mapName: 'Maintenance Shaft', - hint: 'A narrow crawl space above the 28th floor.'); - -class KarlUseNecromancy extends RoamingAction { +final Room maintenanceShaft = Room( + 'maintenance_shaft', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_2092aa1ea = !c.hasHappened(evKarlGuardsKilled) + ? '''two orcs below, guarding some kind of a large gate. A berserker and a captain.''' + : '''a room below, with a large gate.'''; + final ifBlock_17f129234 = !c.hasHappened(evKarlKilled) + ? '''Guttural breathing sounds come from beyond the gate. And something else. I sense a fresh corpse that way, too. Something strange.''' + : ''''''; + s.add( + 'Musty, dark place. Through cracks, I can see rooms under me.\n\nGoing to the end of the shaft, I can see ${ifBlock_2092aa1ea}\n\n${ifBlock_17f129234}\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 34, + positionY: 40, + mapName: 'Maintenance Shaft', + hint: 'A narrow crawl space above the 28th floor.', +); + +class KarlUseNecromancy extends RoamingAction { @override final String name = 'karl_use_necromancy'; static final KarlUseNecromancy singleton = KarlUseNecromancy(); @override - List get commandPathTemplate => ['Skills', 'Necromancy']; + List get commandPathTemplate => [ + 'Skills', + 'Necromancy', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('maintenance_shaft') != true) { return false; } @@ -3425,21 +4333,26 @@ class KarlUseNecromancy extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I perform necromancy. I feel I have awakened something human-sized but not entirely human. Then, a terrible roar and thrashing comes from beyond the gate.\n\n', - isRaw: true); + 'I perform necromancy. I feel I have awakened something human-sized but not entirely human. Then, a terrible roar and thrashing comes from beyond the gate.\n\n', + isRaw: true, + ); c.outputStoryline.addCustomElement(StatUpdate.sanity(c.actor.sanity, -1)); c.outputWorld.updateActorById(c.actor.id, (b) => b.sanity = b.sanity! - 1); s.add( - '\n"What\'s going on?" the berserker asks, picking up his battle axe. "What\'s going on with Karl?"\n\nThe two approach the large gate and open it to peek inside. Almost instantly, a giant hand pushes the door open so hard that it launches the berserker across the room. Hitting the wall snaps the beserker’s neck, and he does not move anymore.\n\nFrom my perspective above the room, it is hard to see the creature beyond the gate. But it is clearly a giant, and it is clearly out of its mind with pain. The guttural roar is deafening, and blood is filling the floor beneath its feet.\n\nThe orc captain starts backing up from the gate but the giant creature lunges forward and smashes the orc with the back of its hand. There isn\'t even time for a scream. The captain is dead instantly.\n\nThe creature does not stop. It takes a few steps forward, holding its belly with one hand. Then it trips, twists, and falls on its back. I can see the stomach, running with blood. Something is puncturing it from inside.\n\nI realize it is the undead I just raised. A bird-headed creature, a hawkman, is cutting its way out of the giant\'s belly with its beak. The undead\'s movements are mechanical, imprecise, but the beak is sharp enough. The giant is losing blood quickly.\n\nWhen the hawkman\'s head is finally out, the guttural roar gets louder. Using the last of its strength, the giant puts its hand on the hawkman, then yanks. The bird head rolls on the floor, dead again.\n\nSoon after, the giant stops moving.\n\nI wish I could raise this new corpse, but it is well beyond my capability.\n\n', - isRaw: true); + '\n"What\'s going on?" the berserker asks, picking up his battle axe. "What\'s going on with Karl?"\n\nThe two approach the large gate and open it to peek inside. Almost instantly, a giant hand pushes the door open so hard that it launches the berserker across the room. Hitting the wall snaps the beserker’s neck, and he does not move anymore.\n\nFrom my perspective above the room, it is hard to see the creature beyond the gate. But it is clearly a giant, and it is clearly out of its mind with pain. The guttural roar is deafening, and blood is filling the floor beneath its feet.\n\nThe orc captain starts backing up from the gate but the giant creature lunges forward and smashes the orc with the back of its hand. There isn\'t even time for a scream. The captain is dead instantly.\n\nThe creature does not stop. It takes a few steps forward, holding its belly with one hand. Then it trips, twists, and falls on its back. I can see the stomach, running with blood. Something is puncturing it from inside.\n\nI realize it is the undead I just raised. A bird-headed creature, a hawkman, is cutting its way out of the giant\'s belly with its beak. The undead\'s movements are mechanical, imprecise, but the beak is sharp enough. The giant is losing blood quickly.\n\nWhen the hawkman\'s head is finally out, the guttural roar gets louder. Using the last of its strength, the giant puts its hand on the hawkman, then yanks. The bird head rolls on the floor, dead again.\n\nSoon after, the giant stops moving.\n\nI wish I could raise this new corpse, but it is well beyond my capability.\n\n', + isRaw: true, + ); c.markHappened(evKarlGuardsKilled); w.updateActorById(orcBerserkerId, (b) => b.hitpoints = 0); w.recordCustom(CustomEvent.actorDeath, @@ -3454,7 +4367,10 @@ class KarlUseNecromancy extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3467,14 +4383,19 @@ class KarlUseNecromancy extends RoamingAction { ? '''My powers are not strong enough to hold two unliving minds, and I already have an undead follower.''' : ''''''; s.add( - 'I try to perform the necromantic incantation but I fail. ${ifBlock_6c782c6c}${ifBlock_4fd98517e} Nothing happens.\n\nIt is a shame. I feel an interesting, freshly dead body somewhere nearby.\n', - isRaw: true); + 'I try to perform the necromantic incantation but I fail. ${ifBlock_6c782c6c}${ifBlock_4fd98517e} Nothing happens.\n\nIt is a shame. I feel an interesting, freshly dead body somewhere nearby.\n', + isRaw: true, + ); return '${a.name} fails to perform KarlUseNecromancy'; } @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { final c = ApplicabilityContext(a, sim, w); if (a.sanity < 1 || isFollowedByUndeadActor(c, a) || @@ -3486,38 +4407,55 @@ class KarlUseNecromancy extends RoamingAction { @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => 'Raising the dead will make them fight for me. I do not know in advance which corpse will rise. I cannot do this if I am already followed by an undead. My powers are not strong enough to hold two unliving minds.'; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Approach smithyFromConet = - Approach('conet', 'smithy', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach smithyFromJunction = - Approach('junction', 'smithy', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); +final Approach smithyFromConet = Approach( + 'conet', + 'smithy', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach smithyFromJunction = Approach( + 'junction', + 'smithy', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class SaveSarn extends RoamingAction { @override @@ -3526,10 +4464,19 @@ class SaveSarn extends RoamingAction { static final SaveSarn singleton = SaveSarn(); @override - List get commandPathTemplate => ['Jailer', 'Attack']; + List get commandPathTemplate => [ + 'Jailer', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('smithy') != true) { return false; } @@ -3537,22 +4484,29 @@ class SaveSarn extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I drop down next to Sarn. He looks surprised, but there is no recognition in his eyes.\n\nThe orc jailer takes an iron mace and advances toward me.\n\n"Step back, weaponsmith," he says to Sarn. "Let me deal with this worm."\n\nThe orc pushes Sarn roughly to the side, and Sarn falls headfirst into a wall, then slumps to the floor.\n\n', - isRaw: true); + 'I drop down next to Sarn. He looks surprised, but there is no recognition in his eyes.\n\nThe orc jailer takes an iron mace and advances toward me.\n\n"Step back, weaponsmith," he says to Sarn. "Let me deal with this worm."\n\nThe orc pushes Sarn roughly to the side, and Sarn falls headfirst into a wall, then slumps to the floor.\n\n', + isRaw: true, + ); c.startOptionalFight(); return '${a.name} successfully performs SaveSarn'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -3563,131 +4517,162 @@ class SaveSarn extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } final Room smithy = Room( - 'smithy', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = - getWeOrI(a, sim, originalWorld, capitalized: false); - s.add( - 'There\'s an iron door here that is shut and locked but ${weSubstitution} find a way through a high ventilation shaft. The crawlspace is tight and full of rat droppings, but at least it allows an unseen approach.\n\nFinally, I am able to peek through a large hole in the shaft, and I look down on the room below.\n\nMy brother, Sarn, is forging a battle axe, using some piece of ancient metal equipment as a handle.\n\n', - isRaw: true); - c.learn(SarnFacts.seenPersonally); + 'smithy', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + s.add( + 'There\'s an iron door here that is shut and locked but ${weSubstitution} find a way through a high ventilation shaft. The crawlspace is tight and full of rat droppings, but at least it allows an unseen approach.\n\nFinally, I am able to peek through a large hole in the shaft, and I look down on the room below.\n\nMy brother, Sarn, is forging a battle axe, using some piece of ancient metal equipment as a handle.\n\n', + isRaw: true, + ); + c.learn(SarnFacts.seenPersonally); - s.add( - '\n![Illustration of Sarn, my brother, working with an anvil. An orc jailer is in the background.](sarn.png)\n\nHe is being guarded by an orc jailer.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateJailerFight, - null, - fightIsOptional: true, - positionX: 24, - positionY: 40, - mapName: 'Smithy', - firstMapName: 'Sounds of an Anvil', - hint: 'The involuntary workplace of my brother Sarn under the orc rule.', - firstHint: - 'A regular metallic beat and a smell of coal dust and hot steel.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.markHappened(evSavedSarn); - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "sarn_rescue_ink_ink", - )); - }); + s.add( + '\n![Illustration of Sarn, my brother, working with an anvil. An orc jailer is in the background.](sarn.png)\n\nHe is being guarded by an orc jailer.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateJailerFight, + null, + fightIsOptional: true, + positionX: 24, + positionY: 40, + mapName: 'Smithy', + firstMapName: 'Sounds of an Anvil', + hint: 'The involuntary workplace of my brother Sarn under the orc rule.', + firstHint: 'A regular metallic beat and a smell of coal dust and hot steel.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.markHappened(evSavedSarn); + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "sarn_rescue_ink_ink", + )); + }, +); final Room smithyAfterSarnSaved = Room( - 'smithy_after_sarn_saved', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The smithy is empty and silent.\n', isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateJailerFight, - null, - parent: 'smithy', - prerequisite: Prerequisite(476050921, 1, true, (ApplicabilityContext c) { + 'smithy_after_sarn_saved', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The smithy is empty and silent.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateJailerFight, + null, + parent: 'smithy', + prerequisite: Prerequisite( + 476050921, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evSavedSarn); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The smithy is empty and silent now.\n', isRaw: true); }, - fightIsOptional: true, - positionX: 24, - positionY: 40, - mapName: 'Smithy', - firstMapName: 'Sounds of an Anvil', - hint: 'The involuntary workplace of my brother Sarn under the orc rule.', - firstHint: - 'A regular metallic beat and a smell of coal dust and hot steel.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.markHappened(evSavedSarn); - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "sarn_rescue_ink_ink", - )); - }); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The smithy is empty and silent now.\n', + isRaw: true, + ); + }, + fightIsOptional: true, + positionX: 24, + positionY: 40, + mapName: 'Smithy', + firstMapName: 'Sounds of an Anvil', + hint: 'The involuntary workplace of my brother Sarn under the orc rule.', + firstHint: 'A regular metallic beat and a smell of coal dust and hot steel.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.markHappened(evSavedSarn); + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "sarn_rescue_ink_ink", + )); + }, +); final sarnRescueInkInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -3696,8 +4681,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The fight is over. I wheel around and turn to my brother, who is slowly coming to life after the rough fall. He looks at the dead jailer, then at me. Does he even recognize me?\n', - isRaw: true); + 'The fight is over. I wheel around and turn to my brother, who is slowly coming to life after the rough fall. He looks at the dead jailer, then at me. Does he even recognize me?\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -3709,7 +4695,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“For me,” Sarn says.\n', isRaw: true); + s.add( + '“For me,” Sarn says.\n', + isRaw: true, + ); }), ], ), @@ -3722,7 +4711,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“Aren,” he says.\n', isRaw: true); + s.add( + '“Aren,” he says.\n', + isRaw: true, + ); }), ], ), @@ -3734,8 +4726,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I wait, but there’s nothing more for a long time. Anger expands in my chest with each heartbeat.\n', - isRaw: true); + 'I wait, but there’s nothing more for a long time. Anger expands in my chest with each heartbeat.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3747,66 +4740,95 @@ final sarnRescueInkInk = InkAst([ final ifBlock_20579df5 = c.playerIsMale ? '''boy''' : '''girl'''; final ifBlock_2a347a8ff = c.playerIsMale ? '''son''' : '''daughter'''; Ruleset( - Rule(734185790, 1, false, (ApplicabilityContext c) { + Rule( + 734185790, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened("goal_deserves_punishment"); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I vowed to punish Sarn for his selfishness. For leaving a broken ${ifBlock_20579df5} and a broken father instead of helping them make ends meet and find their footing again.\n', - isRaw: true); - }), - Rule(861376907, 1, false, (ApplicabilityContext c) { + 'I vowed to punish Sarn for his selfishness. For leaving a broken ${ifBlock_20579df5} and a broken father instead of helping them make ends meet and find their footing again.\n', + isRaw: true, + ); + }, + ), + Rule( + 861376907, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened("goal_must_know"); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I vowed to — I _needed_ to — tell him what his act of selfishness meant. What life looked like for a father and young ${ifBlock_2a347a8ff} in Falling Rock after his departure. I wanted to tell him so badly.\n', - isRaw: true); - }), - Rule(240666744, 1, false, (ApplicabilityContext c) { + 'I vowed to — I _needed_ to — tell him what his act of selfishness meant. What life looked like for a father and young ${ifBlock_2a347a8ff} in Falling Rock after his departure. I wanted to tell him so badly.\n', + isRaw: true, + ); + }, + ), + Rule( + 240666744, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened("goal_revenge"); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I was looking forward to revenge. A beating, at least, but I admit I fantasized about blood as well. The pure selfishness with which Sarn left a broken ${ifBlock_20579df5} and a broken father instead of helping them make ends meet and find their footing again — there\'s only one answer to that. Violence.\n\nI would have given anything to have Sarn this close, to be able to shower him with blow after blow.\n', - isRaw: true); - }), - Rule(204204291, 0, false, (ApplicabilityContext c) { + 'I was looking forward to revenge. A beating, at least, but I admit I fantasized about blood as well. The pure selfishness with which Sarn left a broken ${ifBlock_20579df5} and a broken father instead of helping them make ends meet and find their footing again — there\'s only one answer to that. Violence.\n\nI would have given anything to have Sarn this close, to be able to shower him with blow after blow.\n', + isRaw: true, + ); + }, + ), + Rule( + 204204291, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I was looking forward to revenge. A beating, at least, but I admit I fantasized about blood as well. The pure selfishness with which Sarn left a broken ${ifBlock_20579df5} and a broken father instead of working with them to get the family back on track — there\'s only one answer to that. Violence.\n\nI would have given anything to have Sarn this close, to be able to shower him with blow after blow.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + 'I was looking forward to revenge. A beating, at least, but I admit I fantasized about blood as well. The pure selfishness with which Sarn left a broken ${ifBlock_20579df5} and a broken father instead of working with them to get the family back on track — there\'s only one answer to that. Violence.\n\nI would have given anything to have Sarn this close, to be able to shower him with blow after blow.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), @@ -3816,7 +4838,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('But how can I do that now?\n', isRaw: true); + s.add( + 'But how can I do that now?\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3827,8 +4852,9 @@ final sarnRescueInkInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_56c7cddbe = c.playerIsMale ? '''brother''' : '''sister'''; s.add( - 'Straining, Sarn looks into my eyes. "Thank you, ${ifBlock_56c7cddbe}."\n', - isRaw: true); + 'Straining, Sarn looks into my eyes. "Thank you, ${ifBlock_56c7cddbe}."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3838,8 +4864,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I almost break down and say “You’re welcome,” but then I remember my father’s face the morning we realized that Sarn was gone.\n', - isRaw: true); + 'I almost break down and say “You’re welcome,” but then I remember my father’s face the morning we realized that Sarn was gone.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -3851,7 +4878,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well, what do you expect?\n', isRaw: true); + s.add( + '"Well, what do you expect?\n', + isRaw: true, + ); }), ], ), @@ -3866,8 +4896,9 @@ final sarnRescueInkInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_20579df5 = c.playerIsMale ? '''boy''' : '''girl'''; s.add( - 'Sarn searches my face, looking for evidence of snark. "I didn\'t ask for your help, ${ifBlock_20579df5}. I thanked you. Did you expect a speech?\n', - isRaw: true); + 'Sarn searches my face, looking for evidence of snark. "I didn\'t ask for your help, ${ifBlock_20579df5}. I thanked you. Did you expect a speech?\n', + isRaw: true, + ); }), ], ), @@ -3879,8 +4910,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Should I shower you with gifts? I don\'t know if you noticed, but I don\'t have much to give here."\n', - isRaw: true); + 'Should I shower you with gifts? I don\'t know if you noticed, but I don\'t have much to give here."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -3892,7 +4924,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('He purses his lips and doesn\'t reply.\n', isRaw: true); + s.add( + 'He purses his lips and doesn\'t reply.\n', + isRaw: true, + ); }), ], ), @@ -3906,7 +4941,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('He sighs and bows his head. "Of course I do."\n', isRaw: true); + s.add( + 'He sighs and bows his head. "Of course I do."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3916,8 +4954,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I don\'t think he does. I don\'t think he realizes what happened next.\n', - isRaw: true); + 'I don\'t think he does. I don\'t think he realizes what happened next.\n', + isRaw: true, + ); }), ], ), @@ -3929,8 +4968,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I tell him about the freezing, sleepless nights up in Falling Rock. How I was hoping that he would show up after all. How I was sure it was all a big misunderstanding.\n', - isRaw: true); + 'I tell him about the freezing, sleepless nights up in Falling Rock. How I was hoping that he would show up after all. How I was sure it was all a big misunderstanding.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3944,8 +4984,9 @@ final sarnRescueInkInk = InkAst([ final ifBlock_487866e34 = c.playerHasBurntFace ? ''', still recovering from the burn''' : ''''''; s.add( - 'Because: how could anyone leave their family, I thought, at such a time? How could anyone abandon their father when he was so obviously broken? How could they desert their ${ifBlock_24ee97316}${ifBlock_4377667ba} sibling${ifBlock_487866e34}, too young and frail to make ends meet?\n', - isRaw: true); + 'Because: how could anyone leave their family, I thought, at such a time? How could anyone abandon their father when he was so obviously broken? How could they desert their ${ifBlock_24ee97316}${ifBlock_4377667ba} sibling${ifBlock_487866e34}, too young and frail to make ends meet?\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3955,8 +4996,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Stop it," Sarn says. "What I did wasn\'t fair to you or dad, I admit. But I was as broken by mom\'s death as he was, only in a different way. Dad was spending nights at her grave, repeating old conversations. I spent my nights planning. Preparing."\n', - isRaw: true); + '"Stop it," Sarn says. "What I did wasn\'t fair to you or dad, I admit. But I was as broken by mom\'s death as he was, only in a different way. Dad was spending nights at her grave, repeating old conversations. I spent my nights planning. Preparing."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3966,8 +5008,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He meets my eyes and points a finger at his head. "Dad was escaping by going into the past. I was escaping into the future." I notice his finger is shaking. Is it anger? Adrenaline? Pain?\n', - isRaw: true); + 'He meets my eyes and points a finger at his head. "Dad was escaping by going into the past. I was escaping into the future." I notice his finger is shaking. Is it anger? Adrenaline? Pain?\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -3977,8 +5020,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It wasn\'t fair to the family," he says. Both his hands are shaking uncontrollably now. "But I was following my passion. Didn\'t our mother teach us about following our passion?"\n', - isRaw: true); + '"It wasn\'t fair to the family," he says. Both his hands are shaking uncontrollably now. "But I was following my passion. Didn\'t our mother teach us about following our passion?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -3990,7 +5034,10 @@ final sarnRescueInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"I knew you wouldn\'t understand," he says.\n', isRaw: true); + s.add( + '"I knew you wouldn\'t understand," he says.\n', + isRaw: true, + ); }), ], ), @@ -4006,8 +5053,9 @@ final sarnRescueInkInk = InkAst([ final ifBlock_56c7cddbe = c.playerIsMale ? '''brother''' : '''sister'''; s.add( - '"Nothing\'s wrong with my hands, ${ifBlock_56c7cddbe}," he says.\n', - isRaw: true); + '"Nothing\'s wrong with my hands, ${ifBlock_56c7cddbe}," he says.\n', + isRaw: true, + ); }), ], ), @@ -4019,8 +5067,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He is clearly in pain now. I see it on his face. This isn\'t anger, it\'s something else. Sarn goes to his knees, gripping his head.\n', - isRaw: true); + 'He is clearly in pain now. I see it on his face. This isn\'t anger, it\'s something else. Sarn goes to his knees, gripping his head.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4030,8 +5079,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I hate you," he whispers, shaking. "You come all this way only to remind me of my failure."\n', - isRaw: true); + '"I hate you," he whispers, shaking. "You come all this way only to remind me of my failure."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -4044,8 +5094,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There is defeat in Sarn\'s face. He kneels and shakes, eyes closed.\n', - isRaw: true); + 'There is defeat in Sarn\'s face. He kneels and shakes, eyes closed.\n', + isRaw: true, + ); }), ], ), @@ -4059,8 +5110,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'It’s true. I had been planning for this journey from the day Sarn left until the day I was old enough to follow.\n', - isRaw: true); + 'It’s true. I had been planning for this journey from the day Sarn left until the day I was old enough to follow.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4070,8 +5122,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Enough!" Sarn roars. His whole body trembles and he closes his eyes.\n', - isRaw: true); + '"Enough!" Sarn roars. His whole body trembles and he closes his eyes.\n', + isRaw: true, + ); }), ], ), @@ -4085,8 +5138,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There\'s a subtle nod as Sarn closes his eyes and tries to control his trembling.\n', - isRaw: true); + 'There\'s a subtle nod as Sarn closes his eyes and tries to control his trembling.\n', + isRaw: true, + ); }), ], ), @@ -4099,8 +5153,9 @@ final sarnRescueInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I watch him for a few moments, then help him to his knees. We should get out of here.\n', - isRaw: true); + 'I watch him for a few moments, then help him to his knees. We should get out of here.\n', + isRaw: true, + ); }), ]); final takeSarnToBleedsInk = InkAst([ @@ -4111,8 +5166,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I usher Sarn out of the smithy and through the places I know, downwards. Sarn is obedient but slow to react. I can’t risk combat with him in tow.\n', - isRaw: true); + 'I usher Sarn out of the smithy and through the places I know, downwards. Sarn is obedient but slow to react. I can’t risk combat with him in tow.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4121,8 +5177,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('If anyone is to kill my brother, it is going to be me.\n', - isRaw: true); + s.add( + 'If anyone is to kill my brother, it is going to be me.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4132,8 +5190,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'As we make our way through the orcs\' territory, I keep a close watch on Sarn\'s face and hands. He is still trembling. His agony is only getting stronger, it seems, though he tries to conceal it. In a dark corner, I check his body for wounds, but find nothing.\n', - isRaw: true); + 'As we make our way through the orcs\' territory, I keep a close watch on Sarn\'s face and hands. He is still trembling. His agony is only getting stronger, it seems, though he tries to conceal it. In a dark corner, I check his body for wounds, but find nothing.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4142,7 +5201,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('A silent hour later, we arrive at the Bleeds.\n', isRaw: true); + s.add( + 'A silent hour later, we arrive at the Bleeds.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4160,41 +5222,57 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; Ruleset( - Rule(391059271, 1, false, (ApplicabilityContext c) { + Rule( + 391059271, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.knows(JisadFacts.name); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I look for a place to rest, and see Jisad’s porch. The blind man is sitting on his stool, listening to the sounds of the village.\n\n“Of course!” Jisad says after I ask for help. “Brother, you say? Bring out two chairs from my kitchen. You can sit beside me.”\n', - isRaw: true); - }), - Rule(984983665, 0, false, (ApplicabilityContext c) { + 'I look for a place to rest, and see Jisad’s porch. The blind man is sitting on his stool, listening to the sounds of the village.\n\n“Of course!” Jisad says after I ask for help. “Brother, you say? Bring out two chairs from my kitchen. You can sit beside me.”\n', + isRaw: true, + ); + }, + ), + Rule( + 984983665, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I look for a place to rest. The only dwelling that could be even remotely described as inviting is a little house with a porch and a man sitting outside.\n\nI approach him and realize that the man is blind.\n\n“I’m Jisad,” the man tells me. “Welcome to San Francisco.”\n\n', - isRaw: true); + 'I look for a place to rest. The only dwelling that could be even remotely described as inviting is a little house with a porch and a man sitting outside.\n\nI approach him and realize that the man is blind.\n\n“I’m Jisad,” the man tells me. “Welcome to San Francisco.”\n\n', + isRaw: true, + ); c.learn(JisadFacts.name); s.add( - '\nI ask if I can rest with my brother on his porch.\n\n“Of course!” Jisad says. “Brother, you say? Bring out two chairs from my kitchen. You can sit beside me.”\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + '\nI ask if I can rest with my brother on his porch.\n\n“Of course!” Jisad says. “Brother, you say? Bring out two chairs from my kitchen. You can sit beside me.”\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), InkParagraphNode((ActionContext c) { @@ -4204,8 +5282,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'In a moment, Sarn, Jisad and I are sitting on the porch, facing the center of the Bleeds. Briny wind ruffles our hair and chills our hands.\n', - isRaw: true); + 'In a moment, Sarn, Jisad and I are sitting on the porch, facing the center of the Bleeds. Briny wind ruffles our hair and chills our hands.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -4218,8 +5297,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Yes,” he says. But it’s a mechanical answer. He’s getting worse.\n', - isRaw: true); + '“Yes,” he says. But it’s a mechanical answer. He’s getting worse.\n', + isRaw: true, + ); }), ], ), @@ -4232,7 +5312,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('No response, of course.\n', isRaw: true); + s.add( + 'No response, of course.\n', + isRaw: true, + ); }), ], ), @@ -4244,8 +5327,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I realize that the scumbag is dying. Something in my brother is dying, and that makes me feel more pointless than ever before.\n', - isRaw: true); + 'I realize that the scumbag is dying. Something in my brother is dying, and that makes me feel more pointless than ever before.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4254,7 +5338,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“The fight is not over,” Jisad says.\n', isRaw: true); + s.add( + '“The fight is not over,” Jisad says.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4263,7 +5350,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I turn around in surprise.\n', isRaw: true); + s.add( + 'I turn around in surprise.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -4276,8 +5366,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“There are things larger than ourselves,” he says, straightening on the seat. “Larger than life. We can take what we want for ourselves, we can solve our own little problems.”\n', - isRaw: true); + '“There are things larger than ourselves,” he says, straightening on the seat. “Larger than life. We can take what we want for ourselves, we can solve our own little problems.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4286,7 +5377,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Jisad touches just below his missing eyes.\n', isRaw: true); + s.add( + 'Jisad touches just below his missing eyes.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4296,8 +5390,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“But that doesn’t mean the fight is over. The fight is not over.”\n', - isRaw: true); + '“But that doesn’t mean the fight is over. The fight is not over.”\n', + isRaw: true, + ); }), ], ), @@ -4311,8 +5406,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“You came here to accomplish something,” he says. “Everyone does. And you succeeded.”\n', - isRaw: true); + '“You came here to accomplish something,” he says. “Everyone does. And you succeeded.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4321,8 +5417,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('He turns to me, as if trying to make eye contact.\n', - isRaw: true); + s.add( + 'He turns to me, as if trying to make eye contact.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4331,7 +5429,10 @@ final takeSarnToBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“Congratulations.”\n', isRaw: true); + s.add( + '“Congratulations.”\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -4344,8 +5445,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Your brother,” Jisad says, and stops there. There’s a pause.\n', - isRaw: true); + '“Your brother,” Jisad says, and stops there. There’s a pause.\n', + isRaw: true, + ); }), ], ), @@ -4365,8 +5467,9 @@ final takeSarnToBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The real fight is larger," Jisad continues. "It carries on even after we die. If you take up _that_ fight, you become immortal."\n', - isRaw: true); + '"The real fight is larger," Jisad continues. "It carries on even after we die. If you take up _that_ fight, you become immortal."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -4387,9 +5490,15 @@ class SarnRescueInk extends RoamingAction { @override List get commandPathTemplate => ['N/A']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('start_bogus_location') != true) { return false; } @@ -4397,7 +5506,10 @@ class SarnRescueInk extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4411,7 +5523,10 @@ class SarnRescueInk extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4422,23 +5537,36 @@ class SarnRescueInk extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -4451,9 +5579,15 @@ class TakeSarnToBleeds extends RoamingAction { @override List get commandPathTemplate => ['Take Sarn to safety']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('smithy') != true) { return false; } @@ -4464,7 +5598,10 @@ class TakeSarnToBleeds extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4478,7 +5615,10 @@ class TakeSarnToBleeds extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4489,98 +5629,142 @@ class TakeSarnToBleeds extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Approach elevator28FromElevator12 = - Approach('elevator_12', 'elevator_28', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( +final Approach elevator28FromElevator12 = Approach( + 'elevator_12', + 'elevator_28', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( '${weSubstitutionCapitalized} climb up using an ancient rusty ladder.\n', - isRaw: true); -}); -final Approach elevator28FromGodsLair = - Approach('gods_lair', 'elevator_28', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach elevator28FromJunction = - Approach('junction', 'elevator_28', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach elevator28FromMaintenanceShaft = - Approach('maintenance_shaft', 'elevator_28', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room elevator28 = Room('elevator_28', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_753ddd0b = !c.hasHappened(evKarlGuardsKilled) - ? '''Brutal laughter from the east.''' - : ''''''; - s.add( + isRaw: true, + ); + }, +); +final Approach elevator28FromGodsLair = Approach( + 'gods_lair', + 'elevator_28', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach elevator28FromJunction = Approach( + 'junction', + 'elevator_28', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach elevator28FromMaintenanceShaft = Approach( + 'maintenance_shaft', + 'elevator_28', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room elevator28 = Room( + 'elevator_28', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_753ddd0b = !c.hasHappened(evKarlGuardsKilled) + ? '''Brutal laughter from the east.''' + : ''''''; + s.add( 'Orc noises from all around, but thankfully no orc in sight. ${ifBlock_753ddd0b}\n\n', - isRaw: true); - c.learn(OrcsFacts.inPyramid); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 32, - positionY: 42, - mapName: 'Elevator Shaft Entrance on 28th Floor', - hint: - 'The metal doors on the side of the dark vertical shaft are half-open here, letting some light in.'); -final Approach godsLairFromElevator28 = - Approach('elevator_28', 'gods_lair', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + c.learn(OrcsFacts.inPyramid); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 32, + positionY: 42, + mapName: 'Elevator Shaft Entrance on 28th Floor', + hint: + 'The metal doors on the side of the dark vertical shaft are half-open here, letting some light in.', +); +final Approach godsLairFromElevator28 = Approach( + 'elevator_28', + 'gods_lair', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class KarlExamineStar extends RoamingAction { @override @@ -4589,10 +5773,19 @@ class KarlExamineStar extends RoamingAction { static final KarlExamineStar singleton = KarlExamineStar(); @override - List get commandPathTemplate => ['Star decoration', 'Examine']; + List get commandPathTemplate => [ + 'Star decoration', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('gods_lair') != true) { return false; } @@ -4603,25 +5796,33 @@ class KarlExamineStar extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The star is small enough to fit into my palm. In the center of the star, there is an inscription in ancient, mangled type. It says "Lair of God" in bold lettering.\n\n![Illustration of a writing of the words "LAIR OF GOD", although it\'s clear that the inscription originally said "LAMB OF GOD."](artifact-star.png)\n\n', - isRaw: true); + 'The star is small enough to fit into my palm. In the center of the star, there is an inscription in ancient, mangled type. It says "Lair of God" in bold lettering.\n\n![Illustration of a writing of the words "LAIR OF GOD", although it\'s clear that the inscription originally said "LAMB OF GOD."](artifact-star.png)\n\n', + isRaw: true, + ); c.learn(ArtifactStarFacts.artifactStarSeen); s.add( - '\nThis artifact must be ancient, and of great value to those who revere the old gods.\n', - isRaw: true); + '\nThis artifact must be ancient, and of great value to those who revere the old gods.\n', + isRaw: true, + ); return '${a.name} successfully performs KarlExamineStar'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4632,23 +5833,36 @@ class KarlExamineStar extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -4660,10 +5874,19 @@ class KarlTakeStar extends RoamingAction { static final KarlTakeStar singleton = KarlTakeStar(); @override - List get commandPathTemplate => ['Artifact Star', 'Take']; + List get commandPathTemplate => [ + 'Artifact Star', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('gods_lair') != true) { return false; } @@ -4674,20 +5897,29 @@ class KarlTakeStar extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I take the star.\n\n', isRaw: true); + s.add( + 'I take the star.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(lairOfGodStar); return '${a.name} successfully performs KarlTakeStar'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -4698,286 +5930,374 @@ class KarlTakeStar extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room godsLair = Room( - 'gods_lair', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Two orcs, a berserker and a captain, watch me approach in amazement.\n\n"You!" the berserker bellows, readying his battle axe. "Stand still so I can chop off your head."\n\nThe captain readies a large, bone-decorated knife, and confidently starts toward me.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateGodsLairFight, - null, - isIdle: true, - positionX: 35, - positionY: 42, - mapName: 'God\'s Lair', - firstMapName: 'Guard Room', - hint: - 'A temple to the ancients, overtaken by the orcs some time ago. For the orcs, the space serves as a pen for a huge creature, Karl.', - firstHint: - 'An antechamber to a much bigger room, with a guard post and a huge, reinforced gate. At least two orcs are on guard.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. A grumbling from behind the gate. On the gate, a little star decoration.\n\n', - isRaw: true); - c.markHappened(evKarlGuardsKilled); - }); -final Room godsLairAfterNecromancy = Room( - 'gods_lair_after_necromancy', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The room is dominated by the giant\'s carcass and its open belly. The hawkman\'s head is lying nearby, still within the puddle of the giant\'s blood, and the bodies of the two orcs sprawl on opposing sides of the room.\n\nThe gate is open. On it, there is a small star decoration.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'gods_lair', - prerequisite: Prerequisite(727361369, 1, true, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evKarlKilledViaNecromancy); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The room is dominated by the giant\'s carcass and its open belly. The hawkman\'s head is lying nearby, still within the puddle of the giant\'s blood, and the bodies of the two orcs sprawl on opposing sides of the room.\n\nThe gate is open. On it, there is a small star decoration.\n\n', - isRaw: true); - assert(false, - "This should not happen: necromancy on the taheen cannot be performed after already visiting gods_lair."); - }, - isIdle: true, - positionX: 35, - positionY: 42, - mapName: 'God\'s Lair', - firstMapName: 'Guard Room', - hint: - 'A temple to the ancients, overtaken by the orcs some time ago. For the orcs, the space serves as a pen for a huge creature, Karl.', - firstHint: - 'An antechamber to a much bigger room, with a guard post and a huge, reinforced gate. At least two orcs are on guard.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over. A grumbling from behind the gate. On the gate, a little star decoration.\n\n', - isRaw: true); - c.markHappened(evKarlGuardsKilled); - }); -final Approach junctionFromBarracks = - Approach('barracks', 'junction', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach junctionFromCockroachFarm = - Approach('cockroach_farm', 'junction', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach junctionFromElevator28 = - Approach('elevator_28', 'junction', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach junctionFromReservoir = - Approach('reservoir', 'junction', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach junctionFromSmithy = - Approach('smithy', 'junction', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return !c.hasHappened(evSavedSarn) || c.hasHappened(evTookSarnToBleeds); -}); -final Room junction = Room('junction', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'This place is a traffic hub. Squads of orcs travel in every conceivable direction. Some are climbing rickety ladders upwards or downwards, others walk loudly across unkempt rooms. There are many paths through here, and many hiding spots.\n\n', - isRaw: true); - Ruleset( - Rule(516025655, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.playerHasWoodenFoot; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' As ${weSubstitution} scuttle from one dark corner to the next, my wooden foot gets stuck in a large crack in the concrete floor. My heart sinks. I am halfway between shadows, and I hear orc voices approaching.\n\n I jerk the leg but that only makes the wood drive deeper into the crack. Someone\'s shadow hits a nearby wall and I know I have only a few heartbeats left.\n\n I push off with my good foot, in the opposite direction than where I was headed. It works, and my wooden stump gets loose. As I retreat into the shadow, a group of four orcs swiftly crosses the corridor.\n\n One of them almost trips on that same crack in the floor.\n', - isRaw: true); - }), - Rule(221528414, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add(' ${weSubstitutionCapitalized} have no trouble staying unseen.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 27, - positionY: 45, - mapName: 'Traffic Hub on 26th Floor', - firstMapName: 'Increased Foot Traffic', - hint: - 'An area of increased foot traffic in the heart of the orcs’ outpost.', - firstHint: - 'In this direction, footsteps and orc voices are more frequent. But the area is also dark and full of debris. It won’t be hard to hide.'); -final Approach reservoirFromJunction = - Approach('junction', 'reservoir', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach reservoirFromTrainingGrounds = - Approach('training_grounds', 'reservoir', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final reservoirFollowFootprintsInk = InkAst([ - InkParagraphNode((ActionContext c) { + 'gods_lair', + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - '${weSubstitutionCapitalized} use the same ledge as the creature and follow the muddy footprints. After leaving the reservoir area, the footprints beeline to a tight crawl space out of sight. The creature must be as unwelcome among the orcs as any human.\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), - InkParagraphNode((ActionContext c) { + 'Two orcs, a berserker and a captain, watch me approach in amazement.\n\n"You!" the berserker bellows, readying his battle axe. "Stand still so I can chop off your head."\n\nThe captain readies a large, bone-decorated knife, and confidently starts toward me.\n', + isRaw: true, + ); + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The footprints continue downward. There is no wandering — the creature must know these parts well.\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), - InkParagraphNode((ActionContext c) { + '', + isRaw: true, + ); + }, + generateGodsLairFight, + null, + isIdle: true, + positionX: 35, + positionY: 42, + mapName: 'God\'s Lair', + firstMapName: 'Guard Room', + hint: + 'A temple to the ancients, overtaken by the orcs some time ago. For the orcs, the space serves as a pen for a huge creature, Karl.', + firstHint: + 'An antechamber to a much bigger room, with a guard post and a huge, reinforced gate. At least two orcs are on guard.', + afterMonstersCleared: (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'After a long while, the creature\'s trail leads me all the way to the enormous hole in the Pyramid and the foliage that fills the space.\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), + 'The fight is over. A grumbling from behind the gate. On the gate, a little star decoration.\n\n', + isRaw: true, + ); + c.markHappened(evKarlGuardsKilled); + }, +); +final Room godsLairAfterNecromancy = Room( + 'gods_lair_after_necromancy', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The room is dominated by the giant\'s carcass and its open belly. The hawkman\'s head is lying nearby, still within the puddle of the giant\'s blood, and the bodies of the two orcs sprawl on opposing sides of the room.\n\nThe gate is open. On it, there is a small star decoration.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'gods_lair', + prerequisite: Prerequisite( + 727361369, + 1, + true, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evKarlKilledViaNecromancy); + }, + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The room is dominated by the giant\'s carcass and its open belly. The hawkman\'s head is lying nearby, still within the puddle of the giant\'s blood, and the bodies of the two orcs sprawl on opposing sides of the room.\n\nThe gate is open. On it, there is a small star decoration.\n\n', + isRaw: true, + ); + assert(false, + "This should not happen: necromancy on the taheen cannot be performed after already visiting gods_lair."); + }, + isIdle: true, + positionX: 35, + positionY: 42, + mapName: 'God\'s Lair', + firstMapName: 'Guard Room', + hint: + 'A temple to the ancients, overtaken by the orcs some time ago. For the orcs, the space serves as a pen for a huge creature, Karl.', + firstHint: + 'An antechamber to a much bigger room, with a guard post and a huge, reinforced gate. At least two orcs are on guard.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over. A grumbling from behind the gate. On the gate, a little star decoration.\n\n', + isRaw: true, + ); + c.markHappened(evKarlGuardsKilled); + }, +); +final Approach junctionFromBarracks = Approach( + 'barracks', + 'junction', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach junctionFromCockroachFarm = Approach( + 'cockroach_farm', + 'junction', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach junctionFromElevator28 = Approach( + 'elevator_28', + 'junction', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach junctionFromReservoir = Approach( + 'reservoir', + 'junction', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach junctionFromSmithy = Approach( + 'smithy', + 'junction', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return !c.hasHappened(evSavedSarn) || c.hasHappened(evTookSarnToBleeds); + }, +); +final Room junction = Room( + 'junction', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'This place is a traffic hub. Squads of orcs travel in every conceivable direction. Some are climbing rickety ladders upwards or downwards, others walk loudly across unkempt rooms. There are many paths through here, and many hiding spots.\n\n', + isRaw: true, + ); + Ruleset( + Rule( + 516025655, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.playerHasWoodenFoot; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' As ${weSubstitution} scuttle from one dark corner to the next, my wooden foot gets stuck in a large crack in the concrete floor. My heart sinks. I am halfway between shadows, and I hear orc voices approaching.\n\n I jerk the leg but that only makes the wood drive deeper into the crack. Someone\'s shadow hits a nearby wall and I know I have only a few heartbeats left.\n\n I push off with my good foot, in the opposite direction than where I was headed. It works, and my wooden stump gets loose. As I retreat into the shadow, a group of four orcs swiftly crosses the corridor.\n\n One of them almost trips on that same crack in the floor.\n', + isRaw: true, + ); + }, + ), + Rule( + 221528414, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' ${weSubstitutionCapitalized} have no trouble staying unseen.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 27, + positionY: 45, + mapName: 'Traffic Hub on 26th Floor', + firstMapName: 'Increased Foot Traffic', + hint: 'An area of increased foot traffic in the heart of the orcs’ outpost.', + firstHint: + 'In this direction, footsteps and orc voices are more frequent. But the area is also dark and full of debris. It won’t be hard to hide.', +); +final Approach reservoirFromJunction = Approach( + 'junction', + 'reservoir', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach reservoirFromTrainingGrounds = Approach( + 'training_grounds', + 'reservoir', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final reservoirFollowFootprintsInk = InkAst([ + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + '${weSubstitutionCapitalized} use the same ledge as the creature and follow the muddy footprints. After leaving the reservoir area, the footprints beeline to a tight crawl space out of sight. The creature must be as unwelcome among the orcs as any human.\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The footprints continue downward. There is no wandering — the creature must know these parts well.\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'After a long while, the creature\'s trail leads me all the way to the enormous hole in the Pyramid and the foliage that fills the space.\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; @@ -4995,8 +6315,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am almost certain there is something moving just below the surface of the water. Something bigger than a fish. But the water is filthy and the room is dark.\n', - isRaw: true); + 'I am almost certain there is something moving just below the surface of the water. Something bigger than a fish. But the water is filthy and the room is dark.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -5009,8 +6330,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I crouch close to the water, keeping my head low in order to read the surface better. For a long while, nothing happens. In fact, the room seems to get quieter.\n', - isRaw: true); + 'I crouch close to the water, keeping my head low in order to read the surface better. For a long while, nothing happens. In fact, the room seems to get quieter.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5020,8 +6342,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Then, all of a sudden, something human-sized appears only a few feet away, still under the surface, making a large wave moving directly at me. The thing is unnaturally fast in the water.\n', - isRaw: true); + 'Then, all of a sudden, something human-sized appears only a few feet away, still under the surface, making a large wave moving directly at me. The thing is unnaturally fast in the water.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -5034,8 +6357,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I leap backwards and the thing in the water immediately changes direction and subsides, until there is no more wave. The reservoir becomes still again.\n', - isRaw: true); + 'I leap backwards and the thing in the water immediately changes direction and subsides, until there is no more wave. The reservoir becomes still again.\n', + isRaw: true, + ); }), ], ), @@ -5049,8 +6373,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The wave comes at me swiftly. Then, a slick reptilian head emerges surprisingly close to where I crouch, and something long and sharp pierces my {chest|neck}.\n', - isRaw: true); + 'The wave comes at me swiftly. Then, a slick reptilian head emerges surprisingly close to where I crouch, and something long and sharp pierces my {chest|neck}.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5060,8 +6385,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'It\'s a clean thrust, and I know then and there I have only a few heartbeats left in me. With sudden clarity, I see the creature leap out of the water, and pull its spear out easily from my body.\n', - isRaw: true); + 'It\'s a clean thrust, and I know then and there I have only a few heartbeats left in me. With sudden clarity, I see the creature leap out of the water, and pull its spear out easily from my body.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5071,8 +6397,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '![Illustration of a lizardman with a spear.](lizardman.png)\n', - isRaw: true); + '![Illustration of a lizardman with a spear.](lizardman.png)\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5099,8 +6426,9 @@ final reservoirWaterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The sensible thing to do with an unknown, large creature in its element.\n', - isRaw: true); + 'The sensible thing to do with an unknown, large creature in its element.\n', + isRaw: true, + ); }), ], ), @@ -5114,10 +6442,19 @@ class ReservoirDamExamine extends RoamingAction { static final ReservoirDamExamine singleton = ReservoirDamExamine(); @override - List get commandPathTemplate => ['Dam', 'Examine']; + List get commandPathTemplate => [ + 'Dam', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('reservoir') != true) { return false; } @@ -5125,20 +6462,27 @@ class ReservoirDamExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The low waves of the reservoir go up and down the face of the dam, producing an occasional splash where the dam meets with the solid, reinforced walls. The doors of the dam are almost all rust now, though they were probably white in the ancient times. At least that\'s what I gather from the small islands of white on the otherwise dark red surface.\n\nThe dam is topped with a little bridge. There\'s an iron wheel here which is connected to the dam beneath with a massive rod.\n', - isRaw: true); + 'The low waves of the reservoir go up and down the face of the dam, producing an occasional splash where the dam meets with the solid, reinforced walls. The doors of the dam are almost all rust now, though they were probably white in the ancient times. At least that\'s what I gather from the small islands of white on the otherwise dark red surface.\n\nThe dam is topped with a little bridge. There\'s an iron wheel here which is connected to the dam beneath with a massive rod.\n', + isRaw: true, + ); return '${a.name} successfully performs ReservoirDamExamine'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5149,23 +6493,36 @@ class ReservoirDamExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -5177,11 +6534,20 @@ class ReservoirDamWheelLeft extends RoamingAction { static final ReservoirDamWheelLeft singleton = ReservoirDamWheelLeft(); @override - List get commandPathTemplate => - ['Wheel', 'Turn', 'Counter-clockwise']; + List get commandPathTemplate => [ + 'Wheel', + 'Turn', + 'Counter-clockwise', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('reservoir') != true) { return false; } @@ -5193,21 +6559,28 @@ class ReservoirDamWheelLeft extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I lean on the wheel and push hard to the left. To my surprise, the wheel does move. Before I know it, the wheel turns easily, and the sound of rushing water fills the room.\n\nIn only a few moments, the reservoir empties. As it does, I think I can see a creature on the opposite side of the room. It jumps from the fast-subsiding water surface onto a ledge and quickly disappears in shadows. It leaves muddy footprints behind.\n', - isRaw: true); + 'I lean on the wheel and push hard to the left. To my surprise, the wheel does move. Before I know it, the wheel turns easily, and the sound of rushing water fills the room.\n\nIn only a few moments, the reservoir empties. As it does, I think I can see a creature on the opposite side of the room. It jumps from the fast-subsiding water surface onto a ledge and quickly disappears in shadows. It leaves muddy footprints behind.\n', + isRaw: true, + ); c.markHappened(evOpenedDam); return '${a.name} successfully performs ReservoirDamWheelLeft'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5216,8 +6589,9 @@ class ReservoirDamWheelLeft extends RoamingAction { final weSubstitutionCapitalized = getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - '${weSubstitutionCapitalized} lean on the wheel and push as hard as possible to the left, but it does not budge.\n', - isRaw: true); + '${weSubstitutionCapitalized} lean on the wheel and push as hard as possible to the left, but it does not budge.\n', + isRaw: true, + ); w.pushSituation( ReservoirDamWheelLeftRescueSituation.initialized(w.randomInt())); return '${a.name} fails to perform ReservoirDamWheelLeft'; @@ -5225,23 +6599,36 @@ class ReservoirDamWheelLeft extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return const ReasonedSuccessChance(0.4); } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -5267,43 +6654,63 @@ abstract class ReservoirDamWheelLeftRescueSituation extends Object static Serializer get serializer => _$reservoirDamWheelLeftRescueSituationSerializer; + @override List get actions { return [ SimpleAction( - 'reservoir_dam_wheel_left_rescue', - 'Try harder', - (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'After laboring over the wheel for some time, I get it to move. At first, it moves by only an inch and stops again. But something gives way then, and suddenly the wheel turns easily. The sound of rushing water fills the room.\n\nIn only a few moments, the reservoir empties. As it does, I think I can see a creature on the opposite side of the room. It jumps from the fast-subsiding water surface onto a ledge and quickly disappears in shadows. It leaves muddy footprints behind.', - isRaw: true); - w.popSituation(c); - w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); - c.markHappened(evOpenedDam); - return 'ReservoirDamWheelLeftRescueSituation resolved with rescue/continuation (Try harder)'; - }, - 'I still have some stamina left in me.', - isApplicableClosure: (ApplicabilityContext c, Actor a, Simulation sim, - WorldState w, self) { - return a.stamina > 0; - }), + 'reservoir_dam_wheel_left_rescue', + 'Try harder', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'After laboring over the wheel for some time, I get it to move. At first, it moves by only an inch and stops again. But something gives way then, and suddenly the wheel turns easily. The sound of rushing water fills the room.\n\nIn only a few moments, the reservoir empties. As it does, I think I can see a creature on the opposite side of the room. It jumps from the fast-subsiding water surface onto a ledge and quickly disappears in shadows. It leaves muddy footprints behind.', + isRaw: true, + ); + w.popSituation(c); + w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); + c.markHappened(evOpenedDam); + return 'ReservoirDamWheelLeftRescueSituation resolved with rescue/continuation (Try harder)'; + }, + 'I still have some stamina left in me.', + isApplicableClosure: ( + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + self, + ) { + return a.stamina > 0; + }, + ), SimpleAction( - 'reservoir_dam_wheel_left_continuation_of_failure', 'Give up', - (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('I shrug and let off the wheel.', isRaw: true); - w.popSituation(c); - return 'ReservoirDamWheelLeftRescueSituation resolved with rescue/continuation (Give up)'; - }, null) + 'reservoir_dam_wheel_left_continuation_of_failure', + 'Give up', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I shrug and let off the wheel.', + isRaw: true, + ); + w.popSituation(c); + return 'ReservoirDamWheelLeftRescueSituation resolved with rescue/continuation (Give up)'; + }, + null, + ), ]; } @@ -5320,15 +6727,25 @@ abstract class ReservoirDamWheelLeftRescueSituation extends Object Situation elapseTurn() => rebuild((b) { return b..turn = b.turn! + 1; }); + @override - ActorTurn getNextTurn(Simulation sim, WorldState w) { + ActorTurn getNextTurn( + Simulation sim, + WorldState w, + ) { if (turn != 0) return ActorTurn.never; var player = w.actors.singleWhere((a) => a.isPlayer); - return ActorTurn(player, w.time); + return ActorTurn( + player, + w.time, + ); } @override - Iterable getActors(Simulation sim, WorldState w) { + Iterable getActors( + Simulation sim, + WorldState w, + ) { return [ w.actors.singleWhere((Actor a) { return a.isPlayer; @@ -5344,10 +6761,20 @@ class ReservoirDamWheelRight extends RoamingAction { static final ReservoirDamWheelRight singleton = ReservoirDamWheelRight(); @override - List get commandPathTemplate => ['Wheel', 'Turn', 'Clockwise']; + List get commandPathTemplate => [ + 'Wheel', + 'Turn', + 'Clockwise', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('reservoir') != true) { return false; } @@ -5360,20 +6787,27 @@ class ReservoirDamWheelRight extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I lean on the wheel and push hard to the right. To my surprise, the wheel does move a bit but then immediately stops. A faint thud escapes from below.\n', - isRaw: true); + 'I lean on the wheel and push hard to the right. To my surprise, the wheel does move a bit but then immediately stops. A faint thud escapes from below.\n', + isRaw: true, + ); return '${a.name} successfully performs ReservoirDamWheelRight'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5382,8 +6816,9 @@ class ReservoirDamWheelRight extends RoamingAction { final weSubstitutionCapitalized = getWeOrI(a, sim, originalWorld, capitalized: true); s.add( - '${weSubstitutionCapitalized} lean on the wheel and push as hard as possible to the right, but it does not budge.\n', - isRaw: true); + '${weSubstitutionCapitalized} lean on the wheel and push as hard as possible to the right, but it does not budge.\n', + isRaw: true, + ); w.pushSituation( ReservoirDamWheelRightRescueSituation.initialized(w.randomInt())); return '${a.name} fails to perform ReservoirDamWheelRight'; @@ -5391,23 +6826,36 @@ class ReservoirDamWheelRight extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return const ReasonedSuccessChance(0.4); } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -5433,43 +6881,63 @@ abstract class ReservoirDamWheelRightRescueSituation extends Object static Serializer get serializer => _$reservoirDamWheelRightRescueSituationSerializer; + @override List get actions { return [ SimpleAction( - 'reservoir_dam_wheel_right_rescue', - 'Try harder', - (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'After laboring over the wheel for some time, I get it to move, but only a bit. It moves maybe an inch and then stops. A faint thud escapes from below.', - isRaw: true); - w.popSituation(c); - w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); - - return 'ReservoirDamWheelRightRescueSituation resolved with rescue/continuation (Try harder)'; - }, - 'I still have some stamina left in me.', - isApplicableClosure: (ApplicabilityContext c, Actor a, Simulation sim, - WorldState w, self) { - return a.stamina > 0; - }), + 'reservoir_dam_wheel_right_rescue', + 'Try harder', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'After laboring over the wheel for some time, I get it to move, but only a bit. It moves maybe an inch and then stops. A faint thud escapes from below.', + isRaw: true, + ); + w.popSituation(c); + w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); + + return 'ReservoirDamWheelRightRescueSituation resolved with rescue/continuation (Try harder)'; + }, + 'I still have some stamina left in me.', + isApplicableClosure: ( + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + self, + ) { + return a.stamina > 0; + }, + ), SimpleAction( - 'reservoir_dam_wheel_right_continuation_of_failure', 'Give up', - (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('I shrug and let off the wheel.', isRaw: true); - w.popSituation(c); - return 'ReservoirDamWheelRightRescueSituation resolved with rescue/continuation (Give up)'; - }, null) + 'reservoir_dam_wheel_right_continuation_of_failure', + 'Give up', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I shrug and let off the wheel.', + isRaw: true, + ); + w.popSituation(c); + return 'ReservoirDamWheelRightRescueSituation resolved with rescue/continuation (Give up)'; + }, + null, + ), ]; } @@ -5486,15 +6954,25 @@ abstract class ReservoirDamWheelRightRescueSituation extends Object Situation elapseTurn() => rebuild((b) { return b..turn = b.turn! + 1; }); + @override - ActorTurn getNextTurn(Simulation sim, WorldState w) { + ActorTurn getNextTurn( + Simulation sim, + WorldState w, + ) { if (turn != 0) return ActorTurn.never; var player = w.actors.singleWhere((a) => a.isPlayer); - return ActorTurn(player, w.time); + return ActorTurn( + player, + w.time, + ); } @override - Iterable getActors(Simulation sim, WorldState w) { + Iterable getActors( + Simulation sim, + WorldState w, + ) { return [ w.actors.singleWhere((Actor a) { return a.isPlayer; @@ -5511,10 +6989,19 @@ class ReservoirFollowFootprints extends RoamingAction { ReservoirFollowFootprints(); @override - List get commandPathTemplate => ['Footprints', 'Follow']; + List get commandPathTemplate => [ + 'Footprints', + 'Follow', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('reservoir') != true) { return false; } @@ -5525,7 +7012,10 @@ class ReservoirFollowFootprints extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5539,7 +7029,10 @@ class ReservoirFollowFootprints extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5550,23 +7043,36 @@ class ReservoirFollowFootprints extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -5578,10 +7084,19 @@ class ReservoirWaterExamine extends RoamingAction { static final ReservoirWaterExamine singleton = ReservoirWaterExamine(); @override - List get commandPathTemplate => ['Water', 'Observe']; + List get commandPathTemplate => [ + 'Water', + 'Observe', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('reservoir') != true) { return false; } @@ -5592,7 +7107,10 @@ class ReservoirWaterExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5606,7 +7124,10 @@ class ReservoirWaterExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5617,107 +7138,145 @@ class ReservoirWaterExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room reservoir = Room('reservoir', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room reservoir = Room( + 'reservoir', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'A large, filthy pool in the middle of the building, surrounded by a ledge and covered with a layer of green sludge. The reservoir was clearly built by the ancients, with their straight lines and craftsmanship of the highest quality. It would have been intended to distribute water to the upper floors, but I wouldn\'t want to taste what\'s collected there now. There\'s an iron dam here, preventing the water from spilling into the corridors of the Pyramid.\n\nEverything is wet, even the ceiling. Condensed water forms drops that land back on the water surface, making a hollow sound in the large room.\n\nSomething big just moved in the water.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 21, - positionY: 46, - mapName: 'Reservoir', - firstMapName: 'Damp Place', - hint: 'A large, filthy pool in the middle of the building.', - firstHint: - 'Corridors around this place smell of stale water. A faint splashing can be heard.'); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 21, + positionY: 46, + mapName: 'Reservoir', + firstMapName: 'Damp Place', + hint: 'A large, filthy pool in the middle of the building.', + firstHint: + 'Corridors around this place smell of stale water. A faint splashing can be heard.', +); final Room reservoirAfterOpenDam = Room( - 'reservoir_after_open_dam', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'A huge empty room, with the floor covered in sludge and slimy carcasses. There are orc and goblin corpses there, too.\n\nMuddy footprints lead away from the reservoir.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'reservoir', - prerequisite: Prerequisite(364228247, 1, true, (ApplicabilityContext c) { + 'reservoir_after_open_dam', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'A huge empty room, with the floor covered in sludge and slimy carcasses. There are orc and goblin corpses there, too.\n\nMuddy footprints lead away from the reservoir.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'reservoir', + prerequisite: Prerequisite( + 364228247, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOpenedDam); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'A huge empty room, with the floor covered in sludge and slimy carcasses. There are orc and goblin corpses there, too.\n\nMuddy footprints lead away from the reservoir.\n', - isRaw: true); }, - isIdle: true, - positionX: 21, - positionY: 46, - mapName: 'Reservoir', - firstMapName: 'Damp Place', - hint: 'A large, filthy pool in the middle of the building.', - firstHint: - 'Corridors around this place smell of stale water. A faint splashing can be heard.'); -final Approach cockroachFarmFromJunction = - Approach('junction', 'cockroach_farm', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'A huge empty room, with the floor covered in sludge and slimy carcasses. There are orc and goblin corpses there, too.\n\nMuddy footprints lead away from the reservoir.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 21, + positionY: 46, + mapName: 'Reservoir', + firstMapName: 'Damp Place', + hint: 'A large, filthy pool in the middle of the building.', + firstHint: + 'Corridors around this place smell of stale water. A faint splashing can be heard.', +); +final Approach cockroachFarmFromJunction = Approach( + 'junction', + 'cockroach_farm', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final cockroachCakeTakeInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -5726,8 +7285,9 @@ final cockroachCakeTakeInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I approach the disk and realize it\'s made of dead cockroach bodies, pressed together into some kind of a cake.\n', - isRaw: true); + 'I approach the disk and realize it\'s made of dead cockroach bodies, pressed together into some kind of a cake.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5737,8 +7297,9 @@ final cockroachCakeTakeInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Cockroaches are nutritious. At least that\'s what my father told me once. But, looking at the tangle of elytra and insect legs, I wonder if I\'d be able to put something like this in my stomach.\n', - isRaw: true); + 'Cockroaches are nutritious. At least that\'s what my father told me once. But, looking at the tangle of elytra and insect legs, I wonder if I\'d be able to put something like this in my stomach.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5747,7 +7308,10 @@ final cockroachCakeTakeInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I put the cake in my tunic.\n', isRaw: true); + s.add( + 'I put the cake in my tunic.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -5767,10 +7331,19 @@ class CockroachCakeTake extends RoamingAction { static final CockroachCakeTake singleton = CockroachCakeTake(); @override - List get commandPathTemplate => ['A disk on the ground', 'Pick up']; + List get commandPathTemplate => [ + 'A disk on the ground', + 'Pick up', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('ockroach_farm') != true) { return false; } @@ -5781,7 +7354,10 @@ class CockroachCakeTake extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5795,7 +7371,10 @@ class CockroachCakeTake extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -5806,319 +7385,408 @@ class CockroachCakeTake extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => 'There\'s a hand-sized disk on the ground here. It\'s brown and it gleams a little.'; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room cockroachFarm = Room('cockroach_farm', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I am in a maze of twisty little passages, all alike. All crawling with cockroaches.\n\nThe place smells awful. There is rotten food on the floor for the cockroaches to eat, and there is almost no air movement. This is some sort of a farm.\n\nThe orcs are letting the cockroaches multiply, feeding them with whatever they’ll eat. There are shovels and chests here, prepared for harvest. A harvest of cockroaches.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 30, - positionY: 48, - mapName: 'Cockroach Farm', - firstMapName: 'Smell of Rot', - hint: 'The main source of food for the orcs.', - firstHint: - 'The closer I am to this area, the more I can smell rotten food and flesh. No voices, though, and no footsteps.'); -final Room cockroachFarmAfterOpenDam = Room( - 'cockroach_farm_after_open_dam', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I am in a maze of twisty little passages, all alike. A few wet cockroaches are crawling around, but most of the place is empty.\n\nI quickly realize that this was a sort of a farm. The orcs were letting the cockroaches multiply, feeding them whatever they’d eat. There are shovels and chests here, prepared for harvest. A harvest of cockroaches. But most of the cockroaches have been swept away by water.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'cockroach_farm', - prerequisite: Prerequisite(743707558, 1, true, (ApplicabilityContext c) { +final Room cockroachFarm = Room( + 'cockroach_farm', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I am in a maze of twisty little passages, all alike. All crawling with cockroaches.\n\nThe place smells awful. There is rotten food on the floor for the cockroaches to eat, and there is almost no air movement. This is some sort of a farm.\n\nThe orcs are letting the cockroaches multiply, feeding them with whatever they’ll eat. There are shovels and chests here, prepared for harvest. A harvest of cockroaches.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 30, + positionY: 48, + mapName: 'Cockroach Farm', + firstMapName: 'Smell of Rot', + hint: 'The main source of food for the orcs.', + firstHint: + 'The closer I am to this area, the more I can smell rotten food and flesh. No voices, though, and no footsteps.', +); +final Room cockroachFarmAfterOpenDam = Room( + 'cockroach_farm_after_open_dam', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I am in a maze of twisty little passages, all alike. A few wet cockroaches are crawling around, but most of the place is empty.\n\nI quickly realize that this was a sort of a farm. The orcs were letting the cockroaches multiply, feeding them whatever they’d eat. There are shovels and chests here, prepared for harvest. A harvest of cockroaches. But most of the cockroaches have been swept away by water.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'cockroach_farm', + prerequisite: Prerequisite( + 743707558, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOpenedDam); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The whole area is wet. There are puddles of water everywhere, and a few cockroaches scurrying between them. The harvest has been swept away.\n', - isRaw: true); }, - positionX: 30, - positionY: 48, - mapName: 'Cockroach Farm', - firstMapName: 'Smell of Rot', - hint: 'The main source of food for the orcs.', - firstHint: - 'The closer I am to this area, the more I can smell rotten food and flesh. No voices, though, and no footsteps.'); -final Approach trainingGroundsFromBattlefield = - Approach('battlefield', 'training_grounds', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach trainingGroundsFromReservoir = - Approach('reservoir', 'training_grounds', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room trainingGrounds = Room('training_grounds', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The whole area is wet. There are puddles of water everywhere, and a few cockroaches scurrying between them. The harvest has been swept away.\n', + isRaw: true, + ); + }, + positionX: 30, + positionY: 48, + mapName: 'Cockroach Farm', + firstMapName: 'Smell of Rot', + hint: 'The main source of food for the orcs.', + firstHint: + 'The closer I am to this area, the more I can smell rotten food and flesh. No voices, though, and no footsteps.', +); +final Approach trainingGroundsFromBattlefield = Approach( + 'battlefield', + 'training_grounds', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach trainingGroundsFromReservoir = Approach( + 'reservoir', + 'training_grounds', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room trainingGrounds = Room( + 'training_grounds', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + s.add( 'A small army of orcs, goblins and kobolds, all training for war. Three floors are dedicated to weapon sparring and exercise. The rooms and corridors are almost bare except for wooden poles, crude targets, and the occasional number 65 written on the wall.\n\n', - isRaw: true); - c.learn(SixtyFiversFacts.numberSeen); + isRaw: true, + ); + c.learn(SixtyFiversFacts.numberSeen); - s.add( + s.add( '\nOver a hundred vile creatures grunt and sweat, striving in a singular focus to become better. Better at killing.\n\nThey are so absorbed in the training that ${weSubstitution} have no trouble staying unseen.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 23, - positionY: 51, - mapName: 'Training Grounds', - firstMapName: 'Grunts of Strain', - hint: 'A small army of orcs, goblins and kobolds, all training for war.', - firstHint: 'Loud grunts and clashes of steel. Orc laughter.'); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 23, + positionY: 51, + mapName: 'Training Grounds', + firstMapName: 'Grunts of Strain', + hint: 'A small army of orcs, goblins and kobolds, all training for war.', + firstHint: 'Loud grunts and clashes of steel. Orc laughter.', +); final Room trainingGroundsAfterDamOpened = Room( - 'training_grounds_after_dam_opened', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = - getWeOrI(a, sim, originalWorld, capitalized: false); - s.add( - 'A small army of orcs, goblins and kobolds, all training for war. Three floors are dedicated to weapon sparring and exercise. Over a hundred vile creatures grunt and sweat, striving in a singular focus to become better. Better at killing.\n\nThey are so absorbed in the training that ${weSubstitution} have no trouble staying unseen.\n\nThe training grounds are dripping wet.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'training_grounds', - prerequisite: Prerequisite(254551937, 1, true, (ApplicabilityContext c) { + 'training_grounds_after_dam_opened', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + s.add( + 'A small army of orcs, goblins and kobolds, all training for war. Three floors are dedicated to weapon sparring and exercise. Over a hundred vile creatures grunt and sweat, striving in a singular focus to become better. Better at killing.\n\nThey are so absorbed in the training that ${weSubstitution} have no trouble staying unseen.\n\nThe training grounds are dripping wet.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'training_grounds', + prerequisite: Prerequisite( + 254551937, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOpenedDam); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The training grounds are dripping wet.\n', isRaw: true); }, - positionX: 23, - positionY: 51, - mapName: 'Training Grounds', - firstMapName: 'Grunts of Strain', - hint: 'A small army of orcs, goblins and kobolds, all training for war.', - firstHint: 'Loud grunts and clashes of steel. Orc laughter.'); -final Approach battlefieldFromKnightsHqMain = - Approach('knights_hq_main', 'battlefield', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The training grounds are dripping wet.\n', + isRaw: true, + ); + }, + positionX: 23, + positionY: 51, + mapName: 'Training Grounds', + firstMapName: 'Grunts of Strain', + hint: 'A small army of orcs, goblins and kobolds, all training for war.', + firstHint: 'Loud grunts and clashes of steel. Orc laughter.', +); +final Approach battlefieldFromKnightsHqMain = Approach( + 'knights_hq_main', + 'battlefield', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( '${weSubstitutionCapitalized} climb up the stairs from the Knights’ Headquarters to the sixteenth floor.\n', - isRaw: true); -}); -final Approach battlefieldFromTrainingGrounds = - Approach('training_grounds', 'battlefield', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + }, +); +final Approach battlefieldFromTrainingGrounds = Approach( + 'training_grounds', + 'battlefield', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final Room battlefield = Room( - 'battlefield', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = - getWeOrI(a, sim, originalWorld, capitalized: false); - final ifBlock_422b84975 = c.playerIsMale ? '''him''' : '''her'''; - s.add( - 'It\'s very different from the other floors. There are no walls, and from the staircase opening one can see all the surviving windows. About a third of the floor has collapsed into the jungle below.\n\nThere are rows of concrete pillars and two larger structures housing the staircases and the elevator, but this is the closest the Pyramid has to an open field. There is a strange smell here that I can\'t quite place, not entirely unpleasant.\n\nAs soon as ${weSubstitution} climb the last stair and enter the floor proper, two warriors step out from behind the pillars. One of them is a huge orc with a fittingly large machete, and an ancient shield. The other is a goblin, wielding a bone hatchet.\n\n![Illustration of an orc and a goblin. The orc is wielding a huge machete and a shield with "Speed Limit 65" on it. The goblin is wielding a bone hatchet.](65ers.png)\n\nThe goblin\'s face contorts with hatred as soon as he sees me, but the orc just laughs.\n\n"Big mistake," the orc says with mock sadness. "Big mistake for you. This is no longer a place for human swine."\n\n"Big mistake for ${ifBlock_422b84975}," the goblin agrees. "But good news for us. Darg rewards human scalp."\n\nThe two attack.\n\n', - isRaw: true); - c.learn(OrcsFacts.inPyramid); - c.learn(SixtyFiversFacts.numberSeen); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateBattlefieldFight, - null, - positionX: 28, - positionY: 54, - mapName: 'Battlefield Floor', - firstMapName: 'Sixteenth Floor', - hint: 'The sixteenth floor, devoid of walls.', - firstHint: - 'The frontier between the humans at the bottom and the orcs at the top. Currently held and guarded by the orcs.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'The fight is over. ${weSubstitutionCapitalized} stand in the middle of this large room and I finally understand what that strange smell is. It is old, dried blood.\n\nThere are no old corpses here, but there must have been many. This was a battlefield. The orcs must have moved the bodies elsewhere, or maybe they just tossed them through the windows. The blood, though, they did not clear. And so death is here, filling the room, like steam fills a room after a hot bath.\n\nA glorious battle this was, I\'m sure. It became an enormous scab.\n\nWhatever the reason for this cleared space had been in the ancient times, I can imagine how the Knights preferred it for battle when they still had the numbers. There is no way to go past it, and the plan is so open you can conceivably use archers, and formations.\n\nSearching through the orc\'s possessions, I find a loaf of stale bread.\n\n', - isRaw: true); - c.giveNewItemToPlayer(staleBread); - }, - whereDescription: 'among the columns'); -final Approach oracleMainFromKnightsHqMain = - Approach('knights_hq_main', 'oracle_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room oracleMain = Room('oracle_main', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + 'battlefield', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + final ifBlock_422b84975 = c.playerIsMale ? '''him''' : '''her'''; + s.add( + 'It\'s very different from the other floors. There are no walls, and from the staircase opening one can see all the surviving windows. About a third of the floor has collapsed into the jungle below.\n\nThere are rows of concrete pillars and two larger structures housing the staircases and the elevator, but this is the closest the Pyramid has to an open field. There is a strange smell here that I can\'t quite place, not entirely unpleasant.\n\nAs soon as ${weSubstitution} climb the last stair and enter the floor proper, two warriors step out from behind the pillars. One of them is a huge orc with a fittingly large machete, and an ancient shield. The other is a goblin, wielding a bone hatchet.\n\n![Illustration of an orc and a goblin. The orc is wielding a huge machete and a shield with "Speed Limit 65" on it. The goblin is wielding a bone hatchet.](65ers.png)\n\nThe goblin\'s face contorts with hatred as soon as he sees me, but the orc just laughs.\n\n"Big mistake," the orc says with mock sadness. "Big mistake for you. This is no longer a place for human swine."\n\n"Big mistake for ${ifBlock_422b84975}," the goblin agrees. "But good news for us. Darg rewards human scalp."\n\nThe two attack.\n\n', + isRaw: true, + ); + c.learn(OrcsFacts.inPyramid); + c.learn(SixtyFiversFacts.numberSeen); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateBattlefieldFight, + null, + positionX: 28, + positionY: 54, + mapName: 'Battlefield Floor', + firstMapName: 'Sixteenth Floor', + hint: 'The sixteenth floor, devoid of walls.', + firstHint: + 'The frontier between the humans at the bottom and the orcs at the top. Currently held and guarded by the orcs.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'The fight is over. ${weSubstitutionCapitalized} stand in the middle of this large room and I finally understand what that strange smell is. It is old, dried blood.\n\nThere are no old corpses here, but there must have been many. This was a battlefield. The orcs must have moved the bodies elsewhere, or maybe they just tossed them through the windows. The blood, though, they did not clear. And so death is here, filling the room, like steam fills a room after a hot bath.\n\nA glorious battle this was, I\'m sure. It became an enormous scab.\n\nWhatever the reason for this cleared space had been in the ancient times, I can imagine how the Knights preferred it for battle when they still had the numbers. There is no way to go past it, and the plan is so open you can conceivably use archers, and formations.\n\nSearching through the orc\'s possessions, I find a loaf of stale bread.\n\n', + isRaw: true, + ); + c.giveNewItemToPlayer(staleBread); + }, + whereDescription: 'among the columns', +); +final Approach oracleMainFromKnightsHqMain = Approach( + 'knights_hq_main', + 'oracle_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room oracleMain = Room( + 'oracle_main', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'A woman is here. She seems deep in thought, walking up and down the room, over debris.\n\n![Illustration of an old woman with a staff.](oracle.png)\n\nA ridiculously red apple sits on the table.\n\n', - isRaw: true); - if (w.actionHasBeenPerformed("talk_to_oracle_greetings")) { - c.describeWorthiness( - who: oracle, - what: [ - akxeId, - compassId, - dragonEggId, - lairOfGodStarId, - northSkullId, - sixtyFiverShieldId, - hawkmanJacketId - ], - especially: [compassId, northSkullId], - how: "{approvingly|with respect}"); - } -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - if (w.actionHasBeenPerformed("talk_to_oracle_greetings")) { - c.describeWorthiness( - who: oracle, - what: [ - akxeId, - compassId, - dragonEggId, - lairOfGodStarId, - northSkullId, - sixtyFiverShieldId, - hawkmanJacketId - ], - especially: [compassId, northSkullId], - how: "{approvingly|with respect}"); - } -}, null, null, - isIdle: true, - positionX: 39, - positionY: 58, - mapName: 'Oracle\'s Study', - firstMapName: 'Someone\'s Study', - hint: 'A place full of books and the smell of coffee.', - firstHint: - 'A room with a good view of the forest and the San Francisco Bay.'); + isRaw: true, + ); + if (w.actionHasBeenPerformed("talk_to_oracle_greetings")) { + c.describeWorthiness( + who: oracle, + what: [ + akxeId, + compassId, + dragonEggId, + lairOfGodStarId, + northSkullId, + sixtyFiverShieldId, + hawkmanJacketId + ], + especially: [compassId, northSkullId], + how: "{approvingly|with respect}"); + } + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + if (w.actionHasBeenPerformed("talk_to_oracle_greetings")) { + c.describeWorthiness( + who: oracle, + what: [ + akxeId, + compassId, + dragonEggId, + lairOfGodStarId, + northSkullId, + sixtyFiverShieldId, + hawkmanJacketId + ], + especially: [compassId, northSkullId], + how: "{approvingly|with respect}"); + } + }, + null, + null, + isIdle: true, + positionX: 39, + positionY: 58, + mapName: 'Oracle\'s Study', + firstMapName: 'Someone\'s Study', + hint: 'A place full of books and the smell of coffee.', + firstHint: 'A room with a good view of the forest and the San Francisco Bay.', +); final askOracleAboutKeepInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -6127,8 +7795,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Ah, the Keep!” Oracle says. “I worked there as a kid. I sometimes miss those days.”\n', - isRaw: true); + '“Ah, the Keep!” Oracle says. “I worked there as a kid. I sometimes miss those days.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6138,8 +7807,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Corax raises his head from a bowl of seed. “You told me it was horrible! You told me the nobility treated you like garbage.”\n', - isRaw: true); + 'Corax raises his head from a bowl of seed. “You told me it was horrible! You told me the nobility treated you like garbage.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6149,8 +7819,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“That they did,” she says. “There was a lot of screaming, and quite a few beatings as well. I don’t miss _that._ I do miss being younger, though. And having access to all those books seemed magical at the time.”\n', - isRaw: true); + '“That they did,” she says. “There was a lot of screaming, and quite a few beatings as well. I don’t miss _that._ I do miss being younger, though. And having access to all those books seemed magical at the time.”\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6163,8 +7834,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“It was the seat of power,” Oracle says. “Back in those days, San Francisco wasn’t as lawless as it is today. There were no orcs, no goblins, nothing.”\n', - isRaw: true); + '“It was the seat of power,” Oracle says. “Back in those days, San Francisco wasn’t as lawless as it is today. There were no orcs, no goblins, nothing.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6174,8 +7846,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Paradise,” the bird says, and his claws make a little sound on the books.\n', - isRaw: true); + '“Paradise,” the bird says, and his claws make a little sound on the books.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6185,8 +7858,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Well,” Oracle says, “not quite. Anyway, the lords have been living in the Keep with their families for generations. By having their home in the Pyramid itself, they were close to the farmers: the ones who sent the most coin to their coffers. And of course, living in the highest tower in the world brings a measure of pride and stature.”\n', - isRaw: true); + '“Well,” Oracle says, “not quite. Anyway, the lords have been living in the Keep with their families for generations. By having their home in the Pyramid itself, they were close to the farmers: the ones who sent the most coin to their coffers. And of course, living in the highest tower in the world brings a measure of pride and stature.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6195,8 +7869,10 @@ final askOracleAboutKeepInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Corax nods and straightens, showing his black breast.\n', - isRaw: true); + s.add( + 'Corax nods and straightens, showing his black breast.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6206,8 +7882,9 @@ final askOracleAboutKeepInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“But of course, such pride cannot last forever. Now, they’re all dead. Even the one that still keeps watch over the place is dead.\n', - isRaw: true); + '“But of course, such pride cannot last forever. Now, they’re all dead. Even the one that still keeps watch over the place is dead.\n', + isRaw: true, + ); }), ], ), @@ -6220,7 +7897,10 @@ final askOracleAboutKeepInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“Death,” says Corax.\n', isRaw: true); + s.add( + '“Death,” says Corax.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6232,7 +7912,10 @@ final askOracleAboutKeepInk = InkAst([ final ifBlock_6bd25f800 = c.hasHappened(evKilledHope) ? '''”News travels fast in the Pyramid,” Oracle smiles. “We know you were able to kill ''' : '''”The nobility that ruled from the Keep are all dead, that’s true,” Oracle says. “But that doesn’t make the Keep safe. One of the dead is still walking: '''; - s.add('${ifBlock_6bd25f800}\n', isRaw: true); + s.add( + '${ifBlock_6bd25f800}\n', + isRaw: true, + ); }), ], ), @@ -6243,7 +7926,10 @@ final askOracleAboutKeepInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Lady Hope.”\n', isRaw: true); + s.add( + 'Lady Hope.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6264,8 +7950,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Oracle sees the device and immediately starts giggling with joy. "Well that is just incredible," she says. "Such an exquisite piece."\n', - isRaw: true); + 'Oracle sees the device and immediately starts giggling with joy. "Well that is just incredible," she says. "Such an exquisite piece."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6275,8 +7962,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She takes the skull gingerly in her hands and starts turning it around, examining it from all sides. "I will need to deactivate it, of course," she says.\n', - isRaw: true); + 'She takes the skull gingerly in her hands and starts turning it around, examining it from all sides. "I will need to deactivate it, of course," she says.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6286,8 +7974,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There is a rustle of feathers and Corax lands on Oracle\'s shoulder. He moves his head to point his right eye at the device. "What, you don\'t want to _invite_ the goblins here?"\n', - isRaw: true); + 'There is a rustle of feathers and Corax lands on Oracle\'s shoulder. He moves his head to point his right eye at the device. "What, you don\'t want to _invite_ the goblins here?"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6297,8 +7986,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Did you know, Corax," she says, "that sarcasm is the lowest form of wit?"\n', - isRaw: true); + '"Did you know, Corax," she says, "that sarcasm is the lowest form of wit?"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6308,8 +7998,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The bird takes off again and lands on a table. "That is _fascinating,"_ he says.\n', - isRaw: true); + 'The bird takes off again and lands on a table. "That is _fascinating,"_ he says.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6320,8 +8011,9 @@ final oracleGiveNorthSkullInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - 'Oracle smiles and nods at me. "Thank you, ${youngSirSubstitution}. You have provided me with a rare opportunity to study the enemy."\n', - isRaw: true); + 'Oracle smiles and nods at me. "Thank you, ${youngSirSubstitution}. You have provided me with a rare opportunity to study the enemy."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6343,8 +8035,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She points above. "Big O. I am doubtful the goblins or the orcs are clever enough to build a device like this. This is not ancient technology, but it is certainly _some_ technology. Or magic. Or both."\n', - isRaw: true); + 'She points above. "Big O. I am doubtful the goblins or the orcs are clever enough to build a device like this. This is not ancient technology, but it is certainly _some_ technology. Or magic. Or both."\n', + isRaw: true, + ); }), ], ), @@ -6358,8 +8051,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"How do you study anything?" she responds. "You take it apart."\n', - isRaw: true); + '"How do you study anything?" she responds. "You take it apart."\n', + isRaw: true, + ); }), ], ), @@ -6373,8 +8067,9 @@ final oracleGiveNorthSkullInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I have certainly never seen anything like this. The device seems to weld _some_ kind of technology with _some_ kind of magic. Combining two fields like that: such things are always powerful."\n', - isRaw: true); + '"I have certainly never seen anything like this. The device seems to weld _some_ kind of technology with _some_ kind of magic. Combining two fields like that: such things are always powerful."\n', + isRaw: true, + ); }), ], ), @@ -6388,8 +8083,9 @@ final talkToOracleDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"A cult," Corax says and does a little jump with his raven feet for emphasis.\n', - isRaw: true); + '"A cult," Corax says and does a little jump with his raven feet for emphasis.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6399,8 +8095,9 @@ final talkToOracleDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well," Oracle says, "they _are_ a cult. They worship the ancients, and all artifacts from them. They\'ve been here in the Pyramid for longer than the farmers, or the Knights, or the orcs."\n', - isRaw: true); + '"Well," Oracle says, "they _are_ a cult. They worship the ancients, and all artifacts from them. They\'ve been here in the Pyramid for longer than the farmers, or the Knights, or the orcs."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6422,8 +8119,9 @@ final talkToOracleDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"They used to inhabit a lot more of the Pyramid," she says. "These days, they live in a village in the part known as the jungle. It\'s the big hole in the building on the west side, overgrown with vegetation."\n', - isRaw: true); + '"They used to inhabit a lot more of the Pyramid," she says. "These days, they live in a village in the part known as the jungle. It\'s the big hole in the building on the west side, overgrown with vegetation."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6446,8 +8144,9 @@ final talkToOracleDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"They are not," she says. "I think they want to live forever but... who doesn\'t?"\n', - isRaw: true); + '"They are not," she says. "I think they want to live forever but... who doesn\'t?"\n', + isRaw: true, + ); }), ], ), @@ -6461,8 +8160,9 @@ final talkToOracleDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"There\'s an old ditty," Oracle says. "A head of a dog, a body of man, a better age for all began."\n', - isRaw: true); + '"There\'s an old ditty," Oracle says. "A head of a dog, a body of man, a better age for all began."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6472,8 +8172,9 @@ final talkToOracleDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She glances out the window, at the gray and the green. "The Pyramid was never an easy place," she says. "Never very inviting. Even before the orcs came, death and violence was common. The Knights have been stationed here for generations, but even a force such as that cannot fully prevent peril in a place like San Francisco."\n', - isRaw: true); + 'She glances out the window, at the gray and the green. "The Pyramid was never an easy place," she says. "Never very inviting. Even before the orcs came, death and violence was common. The Knights have been stationed here for generations, but even a force such as that cannot fully prevent peril in a place like San Francisco."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6492,8 +8193,9 @@ final talkToOracleDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Oracle extends her arm, as if to touch the forest below us. "The woods have been always crawling with vile creatures. The power of the Pyramid has always attracted the corrupt and the wicked. I think the villagers and the farmers clung to this tale. It gave them hope."\n', - isRaw: true); + 'Oracle extends her arm, as if to touch the forest below us. "The woods have been always crawling with vile creatures. The power of the Pyramid has always attracted the corrupt and the wicked. I think the villagers and the farmers clung to this tale. It gave them hope."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6503,8 +8205,9 @@ final talkToOracleDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She turns to me. "Now, with the orcs and Big O and goblins, the demand for such a tale is only getting stronger. That little rhyme about _a_ _head_ _of_ _a_ _dog,_ _a_ _body_ _of_ _man,_ it\'s on everyone\'s mind."\n', - isRaw: true); + 'She turns to me. "Now, with the orcs and Big O and goblins, the demand for such a tale is only getting stronger. That little rhyme about _a_ _head_ _of_ _a_ _dog,_ _a_ _body_ _of_ _man,_ it\'s on everyone\'s mind."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6524,8 +8227,9 @@ final talkToOracleDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"What can I tell you about the Dragon Egg? Ha! A small, powerful thing. An end to any dispute. Shame it\'s in the wrong hands."\n', - isRaw: true); + '"What can I tell you about the Dragon Egg? Ha! A small, powerful thing. An end to any dispute. Shame it\'s in the wrong hands."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6538,8 +8242,9 @@ final talkToOracleDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The Deathless! They have had it for generations. It\'s ancient, after all. But in a remarkably good shape, I\'ll tell you. Something about this place just makes ancient things last."\n', - isRaw: true); + '"The Deathless! They have had it for generations. It\'s ancient, after all. But in a remarkably good shape, I\'ll tell you. Something about this place just makes ancient things last."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6565,8 +8270,9 @@ final talkToOracleDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"They won\'t use it," Oracle says. "It\'s a relic for them."\n', - isRaw: true); + '"They won\'t use it," Oracle says. "It\'s a relic for them."\n', + isRaw: true, + ); }), ], ), @@ -6581,8 +8287,9 @@ final talkToOracleDragonEggInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Ha! You can\'t, ${youngSirSubstitution}. The Deathless have been using it as a holy symbol for generations. They won\'t just give it away to a random stranger."\n', - isRaw: true); + '"Ha! You can\'t, ${youngSirSubstitution}. The Deathless have been using it as a holy symbol for generations. They won\'t just give it away to a random stranger."\n', + isRaw: true, + ); }), ], ), @@ -6596,8 +8303,9 @@ final talkToOracleEarthquakesInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The quakes." She stomps her foot on the ground and grins. "The quakes are terrible. Terrible! Fascinating. I have a little theory."\n', - isRaw: true); + '"The quakes." She stomps her foot on the ground and grins. "The quakes are terrible. Terrible! Fascinating. I have a little theory."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6610,8 +8318,9 @@ final talkToOracleEarthquakesInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"A theory is when you have an explanation for something but can\'t prove it yet."\n', - isRaw: true); + '"A theory is when you have an explanation for something but can\'t prove it yet."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6625,8 +8334,9 @@ final talkToOracleEarthquakesInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Did you, now." Oracle looks at me with piercing eyes. "I guess you did, ${youngSirSubstitution}." She smiles.\n', - isRaw: true); + '"Did you, now." Oracle looks at me with piercing eyes. "I guess you did, ${youngSirSubstitution}." She smiles.\n', + isRaw: true, + ); }), ], ), @@ -6650,8 +8360,9 @@ final talkToOracleEarthquakesInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I think that Big O is behind the quakes. I think they\'re not earthquakes, really. I think that they\'re coming from the top of the Pyramid, not the ground."\n', - isRaw: true); + '"I think that Big O is behind the quakes. I think they\'re not earthquakes, really. I think that they\'re coming from the top of the Pyramid, not the ground."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6673,8 +8384,9 @@ final talkToOracleGreetingsInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '“Ah, greetings to you, too, ${youngSirSubstitution}. I am Oracle.” She takes me by the shoulder and looks me in the eye. “You are new here, you must be excited to learn about this place!”\n', - isRaw: true); + '“Ah, greetings to you, too, ${youngSirSubstitution}. I am Oracle.” She takes me by the shoulder and looks me in the eye. “You are new here, you must be excited to learn about this place!”\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6687,8 +8399,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She keeps looking into my eyes for an uncomfortably long while. She smells of coffee. “Okay,” she says, still smiling.\n', - isRaw: true); + 'She keeps looking into my eyes for an uncomfortably long while. She smells of coffee. “Okay,” she says, still smiling.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6698,8 +8411,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Something moves behind me. “Okay!” I wheel around and see a big dark bird perched on top of some books. “Okay!” it says again.\n', - isRaw: true); + 'Something moves behind me. “Okay!” I wheel around and see a big dark bird perched on top of some books. “Okay!” it says again.\n', + isRaw: true, + ); }), ], ), @@ -6713,8 +8427,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“You came to the right person, then.” She steps back, leaving a faint scent of coffee behind. “Welcome.”\n', - isRaw: true); + '“You came to the right person, then.” She steps back, leaving a faint scent of coffee behind. “Welcome.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6724,8 +8439,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Something moves behind me. “Welcome!” I wheel around and see a big dark bird perched on top of some books. “Welcome!” it says again.\n', - isRaw: true); + 'Something moves behind me. “Welcome!” I wheel around and see a big dark bird perched on top of some books. “Welcome!” it says again.\n', + isRaw: true, + ); }), ], ), @@ -6738,8 +8454,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“That’s Corax, my companion here.” Oracle nods toward the bird and the bird nods toward me.\n', - isRaw: true); + '“That’s Corax, my companion here.” Oracle nods toward the bird and the bird nods toward me.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6752,8 +8469,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Well,” Oracle says, “all ravens can talk if you teach them. It’s a trait they’ve had since the time of the ancients. But Corax doesn’t just repeat what he hears.”\n', - isRaw: true); + '“Well,” Oracle says, “all ravens can talk if you teach them. It’s a trait they’ve had since the time of the ancients. But Corax doesn’t just repeat what he hears.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6762,7 +8480,10 @@ final talkToOracleGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“No I don’t,” Corax says.\n', isRaw: true); + s.add( + '“No I don’t,” Corax says.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6771,7 +8492,10 @@ final talkToOracleGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Oracle smiles nervously.\n', isRaw: true); + s.add( + 'Oracle smiles nervously.\n', + isRaw: true, + ); }), ], ), @@ -6786,8 +8510,9 @@ final talkToOracleGreetingsInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '“Well met indeed, ${youngSirSubstitution},” Corax says with a nod.\n', - isRaw: true); + '“Well met indeed, ${youngSirSubstitution},” Corax says with a nod.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6797,8 +8522,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I think he likes you," Oracle tells me with a surprised smile.\n', - isRaw: true); + '"I think he likes you," Oracle tells me with a surprised smile.\n', + isRaw: true, + ); }), ], ), @@ -6810,8 +8536,9 @@ final talkToOracleGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '“Well, you must be bored by all this introductory talk. You’re in San Francisco! Young people don’t come to San Francisco to talk. They come here to slay.”\n', - isRaw: true); + '“Well, you must be bored by all this introductory talk. You’re in San Francisco! Young people don’t come to San Francisco to talk. They come here to slay.”\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6831,8 +8558,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"They have completely taken over the upside," she says. "After the sixteenth floor, it\'s all orc territory."\n', - isRaw: true); + '"They have completely taken over the upside," she says. "After the sixteenth floor, it\'s all orc territory."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6842,8 +8570,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Corax croaks. Oracle passes me to lean on a table, and I catch a whiff of the smell of coffee.\n', - isRaw: true); + 'Corax croaks. Oracle passes me to lean on a table, and I catch a whiff of the smell of coffee.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6856,8 +8585,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She smiles. "Yes, yes it is. A rare luxury from the south. Something the ancients drank in large cups. Guzzled, even. Gulped."\n', - isRaw: true); + 'She smiles. "Yes, yes it is. A rare luxury from the south. Something the ancients drank in large cups. Guzzled, even. Gulped."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6866,7 +8596,10 @@ final talkToOracleOrcsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Murdered," Corax says helpfully.\n', isRaw: true); + s.add( + '"Murdered," Corax says helpfully.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6876,8 +8609,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Anyway," she says, "it helps me think. Let\'s see. The orcs?\n', - isRaw: true); + '"Anyway," she says, "it helps me think. Let\'s see. The orcs?\n', + isRaw: true, + ); }), ], ), @@ -6890,7 +8624,10 @@ final talkToOracleOrcsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Oh, I was finished," she says. "Well.\n', isRaw: true); + s.add( + '"Oh, I was finished," she says. "Well.\n', + isRaw: true, + ); }), ], ), @@ -6902,8 +8639,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There are still things I\'d like to see again, up there. The Lair of God is one. It was a beautiful temple, two floors high, with spectacular views of the Bay. Built by the Deathless. It had an artifact in it, an ancient star."\n', - isRaw: true); + 'There are still things I\'d like to see again, up there. The Lair of God is one. It was a beautiful temple, two floors high, with spectacular views of the Bay. Built by the Deathless. It had an artifact in it, an ancient star."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6923,8 +8661,9 @@ final talkToOracleOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She sighs. "But it was taken over by the orcs, like everything else. And they have some creature there, in the shrine. Something big. I don\'t think the Lair of God looks anything like I remember these days."\n', - isRaw: true); + 'She sighs. "But it was taken over by the orcs, like everything else. And they have some creature there, in the shrine. Something big. I don\'t think the Lair of God looks anything like I remember these days."\n', + isRaw: true, + ); }), ]); final talkToOracleQuake1Ink = InkAst([ @@ -6934,7 +8673,10 @@ final talkToOracleQuake1Ink = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Ah yes, these happen quite often."\n', isRaw: true); + s.add( + '"Ah yes, these happen quite often."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6954,8 +8696,9 @@ final talkToOracleSixtyFiverInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"These are artifacts left by the ancients that puzzle the good and delight the evil. Why would the ancients, in their wisdom, leave behind such beautiful renditions of an evil number?"\n', - isRaw: true); + '"These are artifacts left by the ancients that puzzle the good and delight the evil. Why would the ancients, in their wisdom, leave behind such beautiful renditions of an evil number?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -6968,8 +8711,9 @@ final talkToOracleSixtyFiverInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"You know the Two Forces, Four Directions, Eight Gods, and so on? All the good things, all the true things, come in perfect numbers. Sixty-four is one of them. Sixty-four Callings."\n', - isRaw: true); + '"You know the Two Forces, Four Directions, Eight Gods, and so on? All the good things, all the true things, come in perfect numbers. Sixty-four is one of them. Sixty-four Callings."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6979,8 +8723,9 @@ final talkToOracleSixtyFiverInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Oracle runs her fingers through her hair. "Sixty-five is a spit in the face of truth. It\'s like taking a symbol of Tengri, but putting it upside down. We don\'t know why the ancients chose 65 as a number to be printed and shown, to be _obeyed._ They must have had their reason."\n', - isRaw: true); + 'Oracle runs her fingers through her hair. "Sixty-five is a spit in the face of truth. It\'s like taking a symbol of Tengri, but putting it upside down. We don\'t know why the ancients chose 65 as a number to be printed and shown, to be _obeyed._ They must have had their reason."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -6989,7 +8734,10 @@ final talkToOracleSixtyFiverInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Of _course,"_ Corax says.\n', isRaw: true); + s.add( + '"Of _course,"_ Corax says.\n', + isRaw: true, + ); }), ], ), @@ -7006,8 +8754,9 @@ final talkToOracleSixtyFiverInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I think the orcs love it," Oracle says. "It gives them a way to say: Look! The ancients had evil in them. The culture you so revere is a failed, evil empire. Something like that."\n', - isRaw: true); + '"I think the orcs love it," Oracle says. "It gives them a way to say: Look! The ancients had evil in them. The culture you so revere is a failed, evil empire. Something like that."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -7027,11 +8776,20 @@ class AskOracleAboutKeep extends RoamingAction { static final AskOracleAboutKeep singleton = AskOracleAboutKeep(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"What can you tell me about the Keep?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"What can you tell me about the Keep?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7043,7 +8801,10 @@ class AskOracleAboutKeep extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7057,7 +8818,10 @@ class AskOracleAboutKeep extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7068,23 +8832,36 @@ class AskOracleAboutKeep extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7096,11 +8873,20 @@ class AskOracleAboutKeepGate extends RoamingAction { static final AskOracleAboutKeepGate singleton = AskOracleAboutKeepGate(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"Can you help me open the Keep?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"Can you help me open the Keep?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7113,7 +8899,10 @@ class AskOracleAboutKeepGate extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7121,15 +8910,19 @@ class AskOracleAboutKeepGate extends RoamingAction { final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - 'Oracle describes a convoluted series of steps to open the gate, which she calls an "algorithm." It involves pushing seemingly decorative parts of the gate in a precise order.\n\n"At the very end, make sure you turn the crest _eight_ times," she says. "Not seven, not nine. _Eight._ Like the Eight Gods. Don\'t forget, ${youngSirSubstitution}."\n\n\n', - isRaw: true); + 'Oracle describes a convoluted series of steps to open the gate, which she calls an "algorithm." It involves pushing seemingly decorative parts of the gate in a precise order.\n\n"At the very end, make sure you turn the crest _eight_ times," she says. "Not seven, not nine. _Eight._ Like the Eight Gods. Don\'t forget, ${youngSirSubstitution}."\n\n\n', + isRaw: true, + ); c.learn(KeepGateFacts.keepGateUnlock); return '${a.name} successfully performs AskOracleAboutKeepGate'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7140,23 +8933,36 @@ class AskOracleAboutKeepGate extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7168,11 +8974,20 @@ class OracleGiveNorthSkull extends RoamingAction { static final OracleGiveNorthSkull singleton = OracleGiveNorthSkull(); @override - List get commandPathTemplate => - ['Inventory', 'North Skull', 'Give to Oracle']; + List get commandPathTemplate => [ + 'Inventory', + 'North Skull', + 'Give to Oracle', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7185,7 +9000,10 @@ class OracleGiveNorthSkull extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7199,7 +9017,10 @@ class OracleGiveNorthSkull extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7210,23 +9031,36 @@ class OracleGiveNorthSkull extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7238,11 +9072,20 @@ class TalkToOracleDeathless extends RoamingAction { static final TalkToOracleDeathless singleton = TalkToOracleDeathless(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"Who are the Deathless?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"Who are the Deathless?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7255,7 +9098,10 @@ class TalkToOracleDeathless extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7269,7 +9115,10 @@ class TalkToOracleDeathless extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7280,23 +9129,36 @@ class TalkToOracleDeathless extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7308,11 +9170,20 @@ class TalkToOracleDoghead extends RoamingAction { static final TalkToOracleDoghead singleton = TalkToOracleDoghead(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"Tell me about Doghead."']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"Tell me about Doghead."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7325,7 +9196,10 @@ class TalkToOracleDoghead extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7339,7 +9213,10 @@ class TalkToOracleDoghead extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7350,23 +9227,36 @@ class TalkToOracleDoghead extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7378,11 +9268,20 @@ class TalkToOracleDragonEgg extends RoamingAction { static final TalkToOracleDragonEgg singleton = TalkToOracleDragonEgg(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"What can you tell me about the Dragon Egg?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"What can you tell me about the Dragon Egg?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7396,7 +9295,10 @@ class TalkToOracleDragonEgg extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7410,7 +9312,10 @@ class TalkToOracleDragonEgg extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7421,23 +9326,36 @@ class TalkToOracleDragonEgg extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7449,11 +9367,20 @@ class TalkToOracleEarthquakes extends RoamingAction { static final TalkToOracleEarthquakes singleton = TalkToOracleEarthquakes(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"What can you tell me about the earthquakes here?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"What can you tell me about the earthquakes here?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7466,7 +9393,10 @@ class TalkToOracleEarthquakes extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7480,7 +9410,10 @@ class TalkToOracleEarthquakes extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7491,23 +9424,36 @@ class TalkToOracleEarthquakes extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7519,10 +9465,20 @@ class TalkToOracleGreetings extends RoamingAction { static final TalkToOracleGreetings singleton = TalkToOracleGreetings(); @override - List get commandPathTemplate => ['Woman', 'Talk', '"Greetings."']; + List get commandPathTemplate => [ + 'Woman', + 'Talk', + '"Greetings."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7533,7 +9489,10 @@ class TalkToOracleGreetings extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7547,7 +9506,10 @@ class TalkToOracleGreetings extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7558,23 +9520,36 @@ class TalkToOracleGreetings extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7586,11 +9561,20 @@ class TalkToOracleOrcs extends RoamingAction { static final TalkToOracleOrcs singleton = TalkToOracleOrcs(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"Tell me about the orcs."']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"Tell me about the orcs."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7604,7 +9588,10 @@ class TalkToOracleOrcs extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7618,7 +9605,10 @@ class TalkToOracleOrcs extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7629,23 +9619,36 @@ class TalkToOracleOrcs extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7657,11 +9660,20 @@ class TalkToOracleQuake1 extends RoamingAction { static final TalkToOracleQuake1 singleton = TalkToOracleQuake1(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"Was that an earthquake?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"Was that an earthquake?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7675,7 +9687,10 @@ class TalkToOracleQuake1 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7689,7 +9704,10 @@ class TalkToOracleQuake1 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7700,23 +9718,36 @@ class TalkToOracleQuake1 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7728,11 +9759,20 @@ class TalkToOracleSixtyFiver extends RoamingAction { static final TalkToOracleSixtyFiver singleton = TalkToOracleSixtyFiver(); @override - List get commandPathTemplate => - ['Oracle', 'Talk', '"What\'s the significance of ‘65’?"']; + List get commandPathTemplate => [ + 'Oracle', + 'Talk', + '"What\'s the significance of ‘65’?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7746,7 +9786,10 @@ class TalkToOracleSixtyFiver extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7760,7 +9803,10 @@ class TalkToOracleSixtyFiver extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7771,23 +9817,36 @@ class TalkToOracleSixtyFiver extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7800,8 +9859,9 @@ final oracleAppleExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The apple is one of the Fruits grown on the Slopes of the Pyramid. This one is especially large and extremely red.\n', - isRaw: true); + 'The apple is one of the Fruits grown on the Slopes of the Pyramid. This one is especially large and extremely red.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -7823,8 +9883,9 @@ final oracleAppleExamineInk = InkAst([ final ifBlock_29b04974c = c.playerHasAsthma ? ''' while I have a little coughing fit''' : ''''''; s.add( - '"You can have it if you want," ${ifBlock_1fb640d51} says${ifBlock_77cb64ee3}${ifBlock_4264b4dfa}${ifBlock_29b04974c}. "You need it more than I do."\n', - isRaw: true); + '"You can have it if you want," ${ifBlock_1fb640d51} says${ifBlock_77cb64ee3}${ifBlock_4264b4dfa}${ifBlock_29b04974c}. "You need it more than I do."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -7837,8 +9898,9 @@ final oracleAppleExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Only if you do something stupid with all the energy it gives you. The Fruits of the Pyramid are indeed miraculous."\n', - isRaw: true); + '"Only if you do something stupid with all the energy it gives you. The Fruits of the Pyramid are indeed miraculous."\n', + isRaw: true, + ); }), ], ), @@ -7851,8 +9913,10 @@ final oracleAppleExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"You\'re welcome. I have all the energy I need."\n', - isRaw: true); + s.add( + '"You\'re welcome. I have all the energy I need."\n', + isRaw: true, + ); }), ], ), @@ -7866,10 +9930,19 @@ class OracleAppleExamine extends RoamingAction { static final OracleAppleExamine singleton = OracleAppleExamine(); @override - List get commandPathTemplate => ['Red apple', 'Examine']; + List get commandPathTemplate => [ + 'Red apple', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7880,7 +9953,10 @@ class OracleAppleExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7894,7 +9970,10 @@ class OracleAppleExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7905,23 +9984,36 @@ class OracleAppleExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -7933,10 +10025,19 @@ class OracleAppleTake extends RoamingAction { static final OracleAppleTake singleton = OracleAppleTake(); @override - List get commandPathTemplate => ['Red apple', 'Take']; + List get commandPathTemplate => [ + 'Red apple', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('oracle_main') != true) { return false; } @@ -7948,20 +10049,29 @@ class OracleAppleTake extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('It feels strangely heavy in my palm.\n\n', isRaw: true); + s.add( + 'It feels strangely heavy in my palm.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(oracleApple); return '${a.name} successfully performs OracleAppleTake'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -7972,179 +10082,244 @@ class OracleAppleTake extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room oracleAfterOrcOffensive = Room( - 'oracle_after_orc_offensive', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The place was recently ruined. Blood is everywhere. An old woman lies dead, and next to her, a dead bird.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'oracle_main', - prerequisite: Prerequisite(584629209, 1, true, (ApplicabilityContext c) { + 'oracle_after_orc_offensive', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The place was recently ruined. Blood is everywhere. An old woman lies dead, and next to her, a dead bird.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'oracle_main', + prerequisite: Prerequisite( + 584629209, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOrcOffensive); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The place is ruined. Blood is everywhere. Oracle is dead, and so is the bird.\n\nSmell of coffee still lingers.\n', - isRaw: true); }, - isIdle: true, - positionX: 39, - positionY: 58, - mapName: 'Oracle\'s Study', - firstMapName: 'Someone\'s Study', - hint: 'A place full of books and the smell of coffee.', - firstHint: - 'A room with a good view of the forest and the San Francisco Bay.'); -final Approach jungleEntranceFromDeathlessVillage = - Approach('deathless_village', 'jungle_entrance', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach jungleEntranceFromPond = - Approach('pond', 'jungle_entrance', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach jungleEntranceFromStagingArea = - Approach('staging_area', 'jungle_entrance', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room jungleEntrance = Room('jungle_entrance', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The place is ruined. Blood is everywhere. Oracle is dead, and so is the bird.\n\nSmell of coffee still lingers.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 39, + positionY: 58, + mapName: 'Oracle\'s Study', + firstMapName: 'Someone\'s Study', + hint: 'A place full of books and the smell of coffee.', + firstHint: 'A room with a good view of the forest and the San Francisco Bay.', +); +final Approach jungleEntranceFromDeathlessVillage = Approach( + 'deathless_village', + 'jungle_entrance', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach jungleEntranceFromPond = Approach( + 'pond', + 'jungle_entrance', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach jungleEntranceFromStagingArea = Approach( + 'staging_area', + 'jungle_entrance', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room jungleEntrance = Room( + 'jungle_entrance', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'Corridors full of vegetation. Path through that, like a path in a forest, but indoors.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 20, - positionY: 68, - mapName: 'Jungle', - hint: - 'This is where the interior of the Pyramid opens into a large crater, covered in vegetation.'); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 20, + positionY: 68, + mapName: 'Jungle', + hint: + 'This is where the interior of the Pyramid opens into a large crater, covered in vegetation.', +); final Room jungleEntranceMuddyFootprints = Room( - 'jungle_entrance_muddy_footprints', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Corridors full of vegetation. Path through that, like a path in a forest, but indoors. Muddy footprints lead into the jungle, towards a body of water.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'jungle_entrance', - prerequisite: Prerequisite(330398558, 1, true, (ApplicabilityContext c) { + 'jungle_entrance_muddy_footprints', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Corridors full of vegetation. Path through that, like a path in a forest, but indoors. Muddy footprints lead into the jungle, towards a body of water.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'jungle_entrance', + prerequisite: Prerequisite( + 330398558, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOpenedDam); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('Muddy footprints lead into the jungle, towards a body of water.\n', - isRaw: true); }, - positionX: 20, - positionY: 68, - mapName: 'Jungle', - hint: - 'This is where the interior of the Pyramid opens into a large crater, covered in vegetation.'); -final Approach deathlessVillageFromDragonEggRoom = - Approach('dragon_egg_room', 'deathless_village', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach deathlessVillageFromJungleEntrance = - Approach('jungle_entrance', 'deathless_village', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Muddy footprints lead into the jungle, towards a body of water.\n', + isRaw: true, + ); + }, + positionX: 20, + positionY: 68, + mapName: 'Jungle', + hint: + 'This is where the interior of the Pyramid opens into a large crater, covered in vegetation.', +); +final Approach deathlessVillageFromDragonEggRoom = Approach( + 'dragon_egg_room', + 'deathless_village', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach deathlessVillageFromJungleEntrance = Approach( + 'jungle_entrance', + 'deathless_village', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class GiveLairOfGodStarToDeathless extends RoamingAction { @override @@ -8154,11 +10329,20 @@ class GiveLairOfGodStarToDeathless extends RoamingAction { GiveLairOfGodStarToDeathless(); @override - List get commandPathTemplate => - ['Inventory', 'Artifact Star', 'Give to the Deathless']; + List get commandPathTemplate => [ + 'Inventory', + 'Artifact Star', + 'Give to the Deathless', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('deathless_village') != true) { return false; } @@ -8169,48 +10353,70 @@ class GiveLairOfGodStarToDeathless extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I approach with the Artifact Star in hand. When the villagers realize I am offering the item to them, there is a brief moment of complete silence. Then, everybody moves at once.\n\n', - isRaw: true); + 'I approach with the Artifact Star in hand. When the villagers realize I am offering the item to them, there is a brief moment of complete silence. Then, everybody moves at once.\n\n', + isRaw: true, + ); Ruleset( - Rule(1025194301, 1, false, (ApplicabilityContext c) { + Rule( + 1025194301, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return w.actionHasBeenPerformed("argo_greet"); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add(' Argo stands before me.\n', isRaw: true); - }), - Rule(648784387, 0, false, (ApplicabilityContext c) { + s.add( + ' Argo stands before me.\n', + isRaw: true, + ); + }, + ), + Rule( + 648784387, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - ' In a few heartbeats, a child stands before me. I learn that her name is Argo and that she is the leader of the Deathless.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + ' In a few heartbeats, a child stands before me. I learn that her name is Argo and that she is the leader of the Deathless.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); s.add( - '\n"I kneel before your generosity," she says. And she kneels, and the rest of the villagers immediately follow suit.\n\nArgo smiles at me. "We have been hoping to win back the Artifact Star from the orcs for years. But we are not fighters. None of us have the talents required to stand up to the orcish host."\n\nShe opens her arms and stands up. "You do. And you chose to use your talents for good."\n\nWith ceremonial slowness, she takes the star from my hand. "You are now a friend of the Deathless. As such, you will command respect from each and every one of us." She speaks loudly, clearly. The rest of the villagers still kneel, watching me silently.\n\nArgo then turns around to her people. "The Star will be deposited in the Sacred Shrine, next to the Dragon Egg. And I think our friend deserves full access."\n\nI now have access to the shrine of the Deathless, not far from here.\n\n', - isRaw: true); + '\n"I kneel before your generosity," she says. And she kneels, and the rest of the villagers immediately follow suit.\n\nArgo smiles at me. "We have been hoping to win back the Artifact Star from the orcs for years. But we are not fighters. None of us have the talents required to stand up to the orcish host."\n\nShe opens her arms and stands up. "You do. And you chose to use your talents for good."\n\nWith ceremonial slowness, she takes the star from my hand. "You are now a friend of the Deathless. As such, you will command respect from each and every one of us." She speaks loudly, clearly. The rest of the villagers still kneel, watching me silently.\n\nArgo then turns around to her people. "The Star will be deposited in the Sacred Shrine, next to the Dragon Egg. And I think our friend deserves full access."\n\nI now have access to the shrine of the Deathless, not far from here.\n\n', + isRaw: true, + ); c.markHappened(evDeathlessRespectGained); c.removeItemFromPlayer(lairOfGodStarId); @@ -8218,7 +10424,10 @@ class GiveLairOfGodStarToDeathless extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8229,90 +10438,115 @@ class GiveLairOfGodStarToDeathless extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room deathlessVillage = Room('deathless_village', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room deathlessVillage = Room( + 'deathless_village', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\n', - isRaw: true); - c.learn(DeathlessFacts.sawDeathless); - - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } - - c.increaseSanityFromPeople(); -}, null, null, - positionX: 21, - positionY: 64, - mapName: 'Village of the Deathless', - firstMapName: 'Village in the Jungle', - hint: - 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', - firstHint: - 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.'); -final Approach dragonEggRoomFromDeathlessVillage = - Approach('deathless_village', 'dragon_egg_room', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evDeathlessRespectGained); -}); + isRaw: true, + ); + c.learn(DeathlessFacts.sawDeathless); + + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + + c.increaseSanityFromPeople(); + }, + null, + null, + positionX: 21, + positionY: 64, + mapName: 'Village of the Deathless', + firstMapName: 'Village in the Jungle', + hint: + 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', + firstHint: + 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.', +); +final Approach dragonEggRoomFromDeathlessVillage = Approach( + 'deathless_village', + 'dragon_egg_room', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evDeathlessRespectGained); + }, +); final dragonEggExamineInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -8321,8 +10555,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I slowly approach the pedestal. The Dragon Egg is clearly of ancient origin: it doesn\'t look like anything I have ever seen. It is also spectacularly well preserved.\n', - isRaw: true); + 'I slowly approach the pedestal. The Dragon Egg is clearly of ancient origin: it doesn\'t look like anything I have ever seen. It is also spectacularly well preserved.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -8335,8 +10570,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The Deathless who held the branch earlier shrugs. "We do not know, Friend of the Deathless. This place, the Pyramid, seems to have that effect."\n', - isRaw: true); + 'The Deathless who held the branch earlier shrugs. "We do not know, Friend of the Deathless. This place, the Pyramid, seems to have that effect."\n', + isRaw: true, + ); }), ], ), @@ -8350,8 +10586,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The Deathless who held the branch earlier speaks: "It was found near the pond, Friend of the Deathless. Down there in the jungle. A brother lost his life retrieving it."\n', - isRaw: true); + 'The Deathless who held the branch earlier speaks: "It was found near the pond, Friend of the Deathless. Down there in the jungle. A brother lost his life retrieving it."\n', + isRaw: true, + ); }), ], ), @@ -8364,8 +10601,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Something shuffles behind me and the Deathless bow their heads. I turn around and see that Argo has entered the clearing.\n', - isRaw: true); + 'Something shuffles behind me and the Deathless bow their heads. I turn around and see that Argo has entered the clearing.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8375,8 +10613,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The Dragon Egg has been the most sacred artifact of our people since we lost access to the Lair of God," she says. "But it is also a weapon."\n', - isRaw: true); + '"The Dragon Egg has been the most sacred artifact of our people since we lost access to the Lair of God," she says. "But it is also a weapon."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -8389,8 +10628,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Oracle told us," Argo says. "She knows these things. According to her,\n', - isRaw: true); + '"Oracle told us," Argo says. "She knows these things. According to her,\n', + isRaw: true, + ); }), ], ), @@ -8403,7 +10643,10 @@ final dragonEggExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"From what we understand,\n', isRaw: true); + s.add( + '"From what we understand,\n', + isRaw: true, + ); }), ], ), @@ -8415,8 +10658,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'it is a thrown weapon. You can only ever use it once, to devastating effect."\n', - isRaw: true); + 'it is a thrown weapon. You can only ever use it once, to devastating effect."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8426,8 +10670,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo slowly circles the pedestal and stops on the other side, facing me. "I think," she says, haltingly, "that it is in the spirit of our mission to offer the Dragon Egg to you."\n', - isRaw: true); + 'Argo slowly circles the pedestal and stops on the other side, facing me. "I think," she says, haltingly, "that it is in the spirit of our mission to offer the Dragon Egg to you."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -8440,8 +10685,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I mean," Argo says with sudden confidence, "that the Dragon Egg can be yours.\n', - isRaw: true); + '"I mean," Argo says with sudden confidence, "that the Dragon Egg can be yours.\n', + isRaw: true, + ); }), ], ), @@ -8454,8 +10700,10 @@ final dragonEggExamineInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Argo smiles with sudden confidence. "It\'s simple.\n', - isRaw: true); + s.add( + 'Argo smiles with sudden confidence. "It\'s simple.\n', + isRaw: true, + ); }), ], ), @@ -8467,8 +10715,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'You have shown strength and purpose. A holy weapon like the Dragon Egg befits you. It will aid in your fight."\n', - isRaw: true); + 'You have shown strength and purpose. A holy weapon like the Dragon Egg befits you. It will aid in your fight."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8479,8 +10728,9 @@ final dragonEggExamineInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_231c8aa07 = c.playerIsMale ? '''man''' : '''woman'''; s.add( - 'She turns to the onlooking villagers. "We now have the Artifact Star, a much more peaceful symbol of the ancients. I believe it is in our tribe\'s interest to provide the Dragon Egg to this noble ${ifBlock_231c8aa07}."\n', - isRaw: true); + 'She turns to the onlooking villagers. "We now have the Artifact Star, a much more peaceful symbol of the ancients. I believe it is in our tribe\'s interest to provide the Dragon Egg to this noble ${ifBlock_231c8aa07}."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8490,8 +10740,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The villagers bow their heads and Argo slowly lifts the Dragon Egg from its pedestal.\n', - isRaw: true); + 'The villagers bow their heads and Argo slowly lifts the Dragon Egg from its pedestal.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8501,8 +10752,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"This Dragon Egg is now yours, Friend of the Deathless," she says. "Use it in combat only, and only in the direst of situations. Remember: once it is used, it will disappear forever."\n', - isRaw: true); + '"This Dragon Egg is now yours, Friend of the Deathless," she says. "Use it in combat only, and only in the direst of situations. Remember: once it is used, it will disappear forever."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8512,8 +10764,9 @@ final dragonEggExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I take the Dragon Egg in my hands. It is surprisingly heavy and cold. The lever and the pin at the top, I learn, are what sets the device in motion. Carefully, I place the egg in a pocket on my chest.\n', - isRaw: true); + 'I take the Dragon Egg in my hands. It is surprisingly heavy and cold. The lever and the pin at the top, I learn, are what sets the device in motion. Carefully, I place the egg in a pocket on my chest.\n', + isRaw: true, + ); }), ]); @@ -8524,10 +10777,19 @@ class DragonEggExamine extends RoamingAction { static final DragonEggExamine singleton = DragonEggExamine(); @override - List get commandPathTemplate => ['Dragon Egg', 'Examine']; + List get commandPathTemplate => [ + 'Dragon Egg', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('dragon_egg_room') != true) { return false; } @@ -8535,7 +10797,10 @@ class DragonEggExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8549,7 +10814,10 @@ class DragonEggExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8560,23 +10828,36 @@ class DragonEggExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -8588,10 +10869,20 @@ class DragonEggUse extends RoamingAction { static final DragonEggUse singleton = DragonEggUse(); @override - List get commandPathTemplate => ['Inventory', 'Dragon Egg', 'use']; + List get commandPathTemplate => [ + 'Inventory', + 'Dragon Egg', + 'use', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.hasItem(dragonEggId) && !c.playerRoom.isSynthetic && c.playerRoom.isOnMap && @@ -8602,15 +10893,19 @@ class DragonEggUse extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I take the Dragon Egg out and turn it in my hand. The shape is mesmerizing. Beautiful. A true artifact of the ancients.\n\nArgo warned me only to use it in combat. I shake my head. No, this is too good to be thrown away at the enemy. I remove the pin, just as she told me, and release the lever. There\'s an audible click inside the egg as I do so.\n\nThe lever comes off, so I now hold the lever in my left hand and the egg in my right hand. The device looks more like an actual egg now, without the lever. I enjoy the symmetry.\n\nNothing seems to be happening. I put the egg closer to my ear in case there are any more clicks to be heard. Nothing. Not a s—\n\n', - isRaw: true); + 'I take the Dragon Egg out and turn it in my hand. The shape is mesmerizing. Beautiful. A true artifact of the ancients.\n\nArgo warned me only to use it in combat. I shake my head. No, this is too good to be thrown away at the enemy. I remove the pin, just as she told me, and release the lever. There\'s an audible click inside the egg as I do so.\n\nThe lever comes off, so I now hold the lever in my left hand and the egg in my right hand. The device looks more like an actual egg now, without the lever. I enjoy the symmetry.\n\nNothing seems to be happening. I put the egg closer to my ear in case there are any more clicks to be heard. Nothing. Not a s—\n\n', + isRaw: true, + ); w.updateActorById(playerId, (b) => b.hitpoints = 0); w.recordCustom(CustomEvent.actorDeath, actor: c.player); @@ -8618,7 +10913,10 @@ class DragonEggUse extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8629,70 +10927,101 @@ class DragonEggUse extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => 'Argo said the egg is to be used in combat. But it\'s tempting to try and use it now.'; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room dragonEggRoom = Room('dragon_egg_room', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room dragonEggRoom = Room( + 'dragon_egg_room', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'The Deathless lead me through thick foliage and across narrow beams high above the jungle. A single misstep would mean a long fall, and certain death.\n\nSoon, though, the hidden path takes a turn and leads into a small clearing. One of the Deathless holds a branch so it doesn\'t hit me, announcing: "The Sacred Shrine."\n\nThere\'s a pedestal here, illuminated by rays of sunlight. Only one thing lies on the top of the pedestal: a dark green oval shape. The ancient Dragon Egg.\n\n![Illustration of a pedestal with "Ovum Draconis" written on it. On the pedestal, there is a frag grenade.](dragonegg.png)\n\n', - isRaw: true); - c.giveNewItemToPlayer(dragonEgg); - c.markHappened(evReceivedDragonEgg); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 22, - positionY: 58, - mapName: 'Sacred Shrine', - firstMapName: 'Sacred Shrine', - hint: 'The place with the Dragon Egg.', - firstHint: - 'A well-hidden place of worship near the village of the Deathless.'); -final Approach pondFromJungleEntrance = - Approach('jungle_entrance', 'pond', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach pondFromPondLizardRock = - Approach('pond_lizard_rock', 'pond', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + c.giveNewItemToPlayer(dragonEgg); + c.markHappened(evReceivedDragonEgg); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 22, + positionY: 58, + mapName: 'Sacred Shrine', + firstMapName: 'Sacred Shrine', + hint: 'The place with the Dragon Egg.', + firstHint: + 'A well-hidden place of worship near the village of the Deathless.', +); +final Approach pondFromJungleEntrance = Approach( + 'jungle_entrance', + 'pond', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach pondFromPondLizardRock = Approach( + 'pond_lizard_rock', + 'pond', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final pondHelicopterExamineInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -8701,8 +11030,9 @@ final pondHelicopterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The object is dark green, and larger than any animal, but made from metal. It has some windows in the front but it is not a house. It is deformed and scorched, broken. Long dark prongs extend from its back to the sides, like a firefly\'s wings.\n', - isRaw: true); + 'The object is dark green, and larger than any animal, but made from metal. It has some windows in the front but it is not a house. It is deformed and scorched, broken. Long dark prongs extend from its back to the sides, like a firefly\'s wings.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8712,8 +11042,9 @@ final pondHelicopterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The color and proportions are different, but after a few moments I recognize the vehicle. It is the same that can be found miles above Falling Rock, in the permanent snow. That one is white and red, and it still has ancient people in it, preserved by the cold. The elders call it Hell Compter. No one is to touch it or go anywhere near it.\n', - isRaw: true); + 'The color and proportions are different, but after a few moments I recognize the vehicle. It is the same that can be found miles above Falling Rock, in the permanent snow. That one is white and red, and it still has ancient people in it, preserved by the cold. The elders call it Hell Compter. No one is to touch it or go anywhere near it.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -8726,8 +11057,9 @@ final pondHelicopterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The vehicle sits above the calm surface of the pond, and it almost blends in with the surrounding vegetation. It looks like it was destroyed in the ancient times, when things like it could still fly. I can see the path it took, all those centuries ago, through the structure of the Pyramid. Its demise made room for this jungle.\n', - isRaw: true); + 'The vehicle sits above the calm surface of the pond, and it almost blends in with the surrounding vegetation. It looks like it was destroyed in the ancient times, when things like it could still fly. I can see the path it took, all those centuries ago, through the structure of the Pyramid. Its demise made room for this jungle.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -8737,8 +11069,9 @@ final pondHelicopterExamineInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There are fresh flowers and burned out candles on top of its metal nose.\n', - isRaw: true); + 'There are fresh flowers and burned out candles on top of its metal nose.\n', + isRaw: true, + ); }), ], ), @@ -8756,10 +11089,19 @@ class AttackLizardNearPond extends RoamingAction { static final AttackLizardNearPond singleton = AttackLizardNearPond(); @override - List get commandPathTemplate => ['Lizardman', 'Attack']; + List get commandPathTemplate => [ + 'Lizardman', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pond') != true) { return false; } @@ -8770,7 +11112,10 @@ class AttackLizardNearPond extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8782,7 +11127,10 @@ class AttackLizardNearPond extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8793,23 +11141,36 @@ class AttackLizardNearPond extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -8821,10 +11182,19 @@ class PondHelicopterExamine extends RoamingAction { static final PondHelicopterExamine singleton = PondHelicopterExamine(); @override - List get commandPathTemplate => ['Object', 'Examine']; + List get commandPathTemplate => [ + 'Object', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pond') != true) { return false; } @@ -8832,7 +11202,10 @@ class PondHelicopterExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8846,7 +11219,10 @@ class PondHelicopterExamine extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -8857,148 +11233,193 @@ class PondHelicopterExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room pond = Room('pond', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( +final Room pond = Room( + 'pond', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( '${weSubstitutionCapitalized} follow a narrow path through the foliage, smelling the crispness of pine needles and the smell of fresh, cold air. The path leads toward a clearing with a pond. A strange, big, ancient object is suspended above the pond, held above the ground by twisted iron beams.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - positionX: 14, - positionY: 70, - mapName: 'Pond', - hint: 'A small body of water at the bottom of the crater.'); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + positionX: 14, + positionY: 70, + mapName: 'Pond', + hint: 'A small body of water at the bottom of the crater.', +); final Room pondWithLizardman = Room( - 'pond_with_lizardman', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - '${weSubstitutionCapitalized} follow a narrow path through the foliage, smelling the crispness of pine needles and the smell of fresh, cold air. The path leads toward a clearing with a pond. A strange, big, ancient object is suspended above the pond, held above the ground by twisted iron beams.\n\nOn one side of the pond, in plain sight but outside my immediate reach, a lizardman.\n\n![Illustration of a lizardman with a spear.](lizardman.png)\n\nHe watches me, motionless, holding a flat trident in front of him.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'pond', - prerequisite: Prerequisite(984337484, 1, true, (ApplicabilityContext c) { + 'pond_with_lizardman', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + '${weSubstitutionCapitalized} follow a narrow path through the foliage, smelling the crispness of pine needles and the smell of fresh, cold air. The path leads toward a clearing with a pond. A strange, big, ancient object is suspended above the pond, held above the ground by twisted iron beams.\n\nOn one side of the pond, in plain sight but outside my immediate reach, a lizardman.\n\n![Illustration of a lizardman with a spear.](lizardman.png)\n\nHe watches me, motionless, holding a flat trident in front of him.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'pond', + prerequisite: Prerequisite( + 984337484, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOpenedDam); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'On one side of the pond, in plain sight but outside my immediate reach, a lizardman.\n\n![Illustration of a lizardman with a spear.](lizardman.png)\n\nHe watches me, motionless, holding a flat trident in front of him.\n', - isRaw: true); }, - positionX: 14, - positionY: 70, - mapName: 'Pond', - hint: 'A small body of water at the bottom of the crater.'); -final Approach pondLizardRockFromPond = - Approach('pond', 'pond_lizard_rock', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.playerHasVisited("pond_lizard_rock"); -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'On one side of the pond, in plain sight but outside my immediate reach, a lizardman.\n\n![Illustration of a lizardman with a spear.](lizardman.png)\n\nHe watches me, motionless, holding a flat trident in front of him.\n', + isRaw: true, + ); + }, + positionX: 14, + positionY: 70, + mapName: 'Pond', + hint: 'A small body of water at the bottom of the crater.', +); +final Approach pondLizardRockFromPond = Approach( + 'pond', + 'pond_lizard_rock', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.playerHasVisited("pond_lizard_rock"); + }, +); final Room pondLizardRock = Room( - 'pond_lizard_rock', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - '${weSubstitutionCapitalized} circle the pond and climb on a concrete platform that appears to be the lizardman\'s new base. I notice a half-eaten human leg lying on the ground here.\n\nThe lizardman watches me approach and readies his shield. He motions with his trident at my weapon.\n\n"Fffood should not fight," he says. I remember my struggles with eating a local delicacy — the squirming sannakji octopus of Oak Land — and I must agree with the lizardman. Food should not fight. Then again, I don\'t consider myself food.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateLizardmanFight, - null, - positionX: 13, - positionY: 72, - mapName: 'Lizardman\'s Rock', - hint: - 'A concrete platform near the pond that serves as the lizardman\'s new base.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The monster is dead. I look around for treasure but don\'t see anything except for a few bones. One can be perfectly happy with a life spent eating, it seems. No treasure or purpose was needed for the lizardman.\n\n', - isRaw: true); - c.markHappened(evKilledLizardman); - }); + 'pond_lizard_rock', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + '${weSubstitutionCapitalized} circle the pond and climb on a concrete platform that appears to be the lizardman\'s new base. I notice a half-eaten human leg lying on the ground here.\n\nThe lizardman watches me approach and readies his shield. He motions with his trident at my weapon.\n\n"Fffood should not fight," he says. I remember my struggles with eating a local delicacy — the squirming sannakji octopus of Oak Land — and I must agree with the lizardman. Food should not fight. Then again, I don\'t consider myself food.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateLizardmanFight, + null, + positionX: 13, + positionY: 72, + mapName: 'Lizardman\'s Rock', + hint: + 'A concrete platform near the pond that serves as the lizardman\'s new base.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The monster is dead. I look around for treasure but don\'t see anything except for a few bones. One can be perfectly happy with a life spent eating, it seems. No treasure or purpose was needed for the lizardman.\n\n', + isRaw: true, + ); + c.markHappened(evKilledLizardman); + }, +); final argoAskDeathlessInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -9007,8 +11428,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo bows. She wears a perfume, and her motion sends its floral scent toward me. "I am delighted. Most people think of us as a cult, and few take the time to ask us directly."\n', - isRaw: true); + 'Argo bows. She wears a perfume, and her motion sends its floral scent toward me. "I am delighted. Most people think of us as a cult, and few take the time to ask us directly."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9018,8 +11440,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She opens her arms and invites me to take a look at the village. "Do we look like cultists to you?"\n', - isRaw: true); + 'She opens her arms and invites me to take a look at the village. "Do we look like cultists to you?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9032,8 +11455,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo laughs, smiles, and waves her hand dismissively. "True. And the same goes for words. Words can be deceiving, too." She pauses, looking at the concrete floor.\n', - isRaw: true); + 'Argo laughs, smiles, and waves her hand dismissively. "True. And the same goes for words. Words can be deceiving, too." She pauses, looking at the concrete floor.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9043,8 +11467,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Cult," she recites after a moment. "A relatively small group of people having religious beliefs or practices regarded by others as strange or sinister."\n', - isRaw: true); + '"Cult," she recites after a moment. "A relatively small group of people having religious beliefs or practices regarded by others as strange or sinister."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9054,8 +11479,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She nods a little, then shrugs. "Cult isn\'t a real thing. It\'s just a word.\n', - isRaw: true); + 'She nods a little, then shrugs. "Cult isn\'t a real thing. It\'s just a word.\n', + isRaw: true, + ); }), ], ), @@ -9069,8 +11495,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo puts her arms back down. "Thank you," she says, visibly relieved. "I am glad.\n', - isRaw: true); + 'Argo puts her arms back down. "Thank you," she says, visibly relieved. "I am glad.\n', + isRaw: true, + ); }), ], ), @@ -9083,8 +11510,10 @@ final argoAskDeathlessInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Argo lets her arms fall back down. "That is unfortunate.\n', - isRaw: true); + s.add( + 'Argo lets her arms fall back down. "That is unfortunate.\n', + isRaw: true, + ); }), ], ), @@ -9095,7 +11524,10 @@ final argoAskDeathlessInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Do you know what we worship?"\n', isRaw: true); + s.add( + 'Do you know what we worship?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9108,8 +11540,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo shakes her head, smiling again. "Incorrect," she says. "We worship the Eight Gods. Just like everyone else." She looks to the ceiling. "Well, almost everyone else. As for the ancients, we do not worship them. We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', - isRaw: true); + 'Argo shakes her head, smiling again. "Incorrect," she says. "We worship the Eight Gods. Just like everyone else." She looks to the ceiling. "Well, almost everyone else. As for the ancients, we do not worship them. We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9119,8 +11552,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', - isRaw: true); + 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', + isRaw: true, + ); }), ], ), @@ -9134,8 +11568,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo shakes her head, smiling again. "Incorrect," she says. "We worship the Eight Gods. Just like everyone else." She looks to the ceiling. "Well, almost everyone else. As for the Pyramid, we do not worship it. We do admire the people that built it. The ancients. Just imagine: those people could erect a hundred places like this building."\n', - isRaw: true); + 'Argo shakes her head, smiling again. "Incorrect," she says. "We worship the Eight Gods. Just like everyone else." She looks to the ceiling. "Well, almost everyone else. As for the Pyramid, we do not worship it. We do admire the people that built it. The ancients. Just imagine: those people could erect a hundred places like this building."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9145,8 +11580,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', - isRaw: true); + 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', + isRaw: true, + ); }), ], ), @@ -9160,8 +11596,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo smiles again. "That is correct. The Eight Gods and the Sixteen Truths. Just like everyone else." She looks to the ceiling. "Well, almost everyone else."\n', - isRaw: true); + 'Argo smiles again. "That is correct. The Eight Gods and the Sixteen Truths. Just like everyone else." She looks to the ceiling. "Well, almost everyone else."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9174,8 +11611,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well, we do admire the ancients," she says. "We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', - isRaw: true); + '"Well, we do admire the ancients," she says. "We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', + isRaw: true, + ); }), ], ), @@ -9189,8 +11627,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well, this place was built by the ancients," she says. "We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', - isRaw: true); + '"Well, this place was built by the ancients," she says. "We know they weren\'t gods. Only people. But they were people who could erect places like the Pyramid."\n', + isRaw: true, + ); }), ], ), @@ -9203,8 +11642,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', - isRaw: true); + 'She stomps on the floor. "This. They were able to build it. The ancients must have been a lot closer to the Eight Gods than we are."\n', + isRaw: true, + ); }), ], ), @@ -9224,8 +11664,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Unlikely," Argo says. "They did a lot more than just build. Don\'t forget who put the goddess Iss in the sky. The ancients."\n', - isRaw: true); + '"Unlikely," Argo says. "They did a lot more than just build. Don\'t forget who put the goddess Iss in the sky. The ancients."\n', + isRaw: true, + ); }), ], ), @@ -9238,8 +11679,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo bows again, this time towards the center of the Pyramid. "We are Deathless. We want to learn from the ancients. We want to ensure their memory never dies. We want to ensure their legacy outlives our own. We are Deathless."\n', - isRaw: true); + 'Argo bows again, this time towards the center of the Pyramid. "We are Deathless. We want to learn from the ancients. We want to ensure their memory never dies. We want to ensure their legacy outlives our own. We are Deathless."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9252,8 +11694,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The Pyramid, for example," she says. "We also collect artifacts, small and large. The Deathless have existed for generations, and so our collection is considerable."\n', - isRaw: true); + '"The Pyramid, for example," she says. "We also collect artifacts, small and large. The Deathless have existed for generations, and so our collection is considerable."\n', + isRaw: true, + ); }), ], ), @@ -9267,8 +11710,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The ancients didn\'t leave a lot of paper behind," she says. "The books they left are of a different kind. Smaller, unopenable. Black glossy objects that refuse to give out even a hint of information. We know they contain it. We just cannot access it. At least not yet."\n', - isRaw: true); + '"The ancients didn\'t leave a lot of paper behind," she says. "The books they left are of a different kind. Smaller, unopenable. Black glossy objects that refuse to give out even a hint of information. We know they contain it. We just cannot access it. At least not yet."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9278,8 +11722,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo raises eyebrows. "Have you met Oracle? She does have quite a few of the ancient books that are on paper. We even lend her some of our own books. She can read in them better than anyone here in the village."\n', - isRaw: true); + 'Argo raises eyebrows. "Have you met Oracle? She does have quite a few of the ancient books that are on paper. We even lend her some of our own books. She can read in them better than anyone here in the village."\n', + isRaw: true, + ); }), ], ), @@ -9292,8 +11737,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She sighs. "There\'s only one thing the Deathless regret. The Lair of God, our original place of worship, was taken by the orcs long before I was born. They now use it as some kind of a prison, or a sty. Disgusting."\n', - isRaw: true); + 'She sighs. "There\'s only one thing the Deathless regret. The Lair of God, our original place of worship, was taken by the orcs long before I was born. They now use it as some kind of a prison, or a sty. Disgusting."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9303,8 +11749,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Argo pretends to spit on the floor. With her size and age, her pretend anger looks almost adorable. "But the temple had an artifact in it, a star made in the age of the ancients, and we think it\'s still there."\n', - isRaw: true); + 'Argo pretends to spit on the floor. With her size and age, her pretend anger looks almost adorable. "But the temple had an artifact in it, a star made in the age of the ancients, and we think it\'s still there."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9314,8 +11761,9 @@ final argoAskDeathlessInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She straightens, assuming a queenly posture. "That star means a lot to our people. Our Founder had it a hundred years ago, and it inspired her to bring the community to this place, to start the Deathless movement, and to build the Lair of God."\n', - isRaw: true); + 'She straightens, assuming a queenly posture. "That star means a lot to our people. Our Founder had it a hundred years ago, and it inspired her to bring the community to this place, to start the Deathless movement, and to build the Lair of God."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9336,8 +11784,9 @@ final argoAskDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The child named Argo tries to conceal her pride. She says: "We do have the holy artifact you speak of. The Dragon Egg. We know many want it, for unholy reasons, so we keep it hidden."\n', - isRaw: true); + 'The child named Argo tries to conceal her pride. She says: "We do have the holy artifact you speak of. The Dragon Egg. We know many want it, for unholy reasons, so we keep it hidden."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9349,7 +11798,10 @@ final argoAskDragonEggInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Argo nods.\n', isRaw: true); + s.add( + 'Argo nods.\n', + isRaw: true, + ); }), ], ), @@ -9364,8 +11816,9 @@ final argoAskDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Not unless it\'s absolutely necessary. And not unless we find a warrior worthy of such a terrible power."\n', - isRaw: true); + '"Not unless it\'s absolutely necessary. And not unless we find a warrior worthy of such a terrible power."\n', + isRaw: true, + ); }), ], ), @@ -9379,8 +11832,9 @@ final argoAskQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The Deathless are not afraid of quaking earth. The ancients weren\'t, either. They built this holy place here for a reason."\n', - isRaw: true); + '"The Deathless are not afraid of quaking earth. The ancients weren\'t, either. They built this holy place here for a reason."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9393,8 +11847,9 @@ final argoAskQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It would be false to claim that. The quakes are getting frequent in the recent months.\n', - isRaw: true); + '"It would be false to claim that. The quakes are getting frequent in the recent months.\n', + isRaw: true, + ); }), ], ), @@ -9408,8 +11863,9 @@ final argoAskQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"True. It is an incredible force. And it is coming on an almost daily basis these past few months. I have become accustomed to it.\n', - isRaw: true); + '"True. It is an incredible force. And it is coming on an almost daily basis these past few months. I have become accustomed to it.\n', + isRaw: true, + ); }), ], ), @@ -9421,8 +11877,9 @@ final argoAskQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Some of the older members remember quieter times. Of course, we are only people. We are afraid when bigger things happen to us. But we can trust the wisdom of the ancients."\n', - isRaw: true); + 'Some of the older members remember quieter times. Of course, we are only people. We are afraid when bigger things happen to us. But we can trust the wisdom of the ancients."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -9442,8 +11899,9 @@ final argoGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Greetings, traveler. My name is Argo. I am of this tribe that calls itself the Deathless." The child is younger than me, and she has to look up when speaking to me. Nevertheless, she holds herself as a queen.\n', - isRaw: true); + '"Greetings, traveler. My name is Argo. I am of this tribe that calls itself the Deathless." The child is younger than me, and she has to look up when speaking to me. Nevertheless, she holds herself as a queen.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9455,7 +11913,10 @@ final argoGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('She nods. "And what is\n', isRaw: true); + s.add( + 'She nods. "And what is\n', + isRaw: true, + ); }), ], ), @@ -9469,8 +11930,9 @@ final argoGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There\'s a murmur among the onlookers of the tribe. "You seem to think I am your lesser because of my age and my height. That is not how the Deathless think. Now, please will you tell me\n', - isRaw: true); + 'There\'s a murmur among the onlookers of the tribe. "You seem to think I am your lesser because of my age and my height. That is not how the Deathless think. Now, please will you tell me\n', + isRaw: true, + ); }), ], ), @@ -9481,7 +11943,10 @@ final argoGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('your name?"\n', isRaw: true); + s.add( + 'your name?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -9493,7 +11958,10 @@ final argoGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well met, Aren."\n', isRaw: true); + s.add( + '"Well met, Aren."\n', + isRaw: true, + ); }), ], ), @@ -9507,7 +11975,10 @@ final argoGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; final ifBlock_69ff6b352 = c.playerIsMale ? '''sir''' : '''lady'''; - s.add('She smiles. "Well met, ${ifBlock_69ff6b352}."\n', isRaw: true); + s.add( + 'She smiles. "Well met, ${ifBlock_69ff6b352}."\n', + isRaw: true, + ); }), ], ), @@ -9522,7 +11993,10 @@ final argoGreetInk = InkAst([ final ifBlock_121bab35a = c.hasItem(lairOfGodStarId) ? '''She points at the Artifact Star. "Did you bring us the holy item?"''' : ''''''; - s.add('${ifBlock_121bab35a}\n', isRaw: true); + s.add( + '${ifBlock_121bab35a}\n', + isRaw: true, + ); }), ]); @@ -9533,11 +12007,20 @@ class ArgoAskDeathless extends RoamingAction { static final ArgoAskDeathless singleton = ArgoAskDeathless(); @override - List get commandPathTemplate => - ['Argo', 'Talk', '“Who are the Deathless?”']; + List get commandPathTemplate => [ + 'Argo', + 'Talk', + '“Who are the Deathless?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('deathless_village') != true) { return false; } @@ -9548,7 +12031,10 @@ class ArgoAskDeathless extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9562,7 +12048,10 @@ class ArgoAskDeathless extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9573,23 +12062,36 @@ class ArgoAskDeathless extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -9601,11 +12103,20 @@ class ArgoAskDragonEgg extends RoamingAction { static final ArgoAskDragonEgg singleton = ArgoAskDragonEgg(); @override - List get commandPathTemplate => - ['Argo', 'Talk', '“You have the Dragon Egg?”']; + List get commandPathTemplate => [ + 'Argo', + 'Talk', + '“You have the Dragon Egg?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('deathless_village') != true) { return false; } @@ -9618,7 +12129,10 @@ class ArgoAskDragonEgg extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9632,7 +12146,10 @@ class ArgoAskDragonEgg extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9643,23 +12160,36 @@ class ArgoAskDragonEgg extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -9671,11 +12201,20 @@ class ArgoAskQuake1 extends RoamingAction { static final ArgoAskQuake1 singleton = ArgoAskQuake1(); @override - List get commandPathTemplate => - ['Argo', 'Talk', '“Was that an earthquake?”']; + List get commandPathTemplate => [ + 'Argo', + 'Talk', + '“Was that an earthquake?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('deathless_village') != true) { return false; } @@ -9688,7 +12227,10 @@ class ArgoAskQuake1 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9702,7 +12244,10 @@ class ArgoAskQuake1 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9713,23 +12258,36 @@ class ArgoAskQuake1 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -9741,10 +12299,20 @@ class ArgoGreet extends RoamingAction { static final ArgoGreet singleton = ArgoGreet(); @override - List get commandPathTemplate => ['Child', 'Talk', '“Greetings!”']; + List get commandPathTemplate => [ + 'Child', + 'Talk', + '“Greetings!”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('deathless_village') != true) { return false; } @@ -9752,7 +12320,10 @@ class ArgoGreet extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9766,7 +12337,10 @@ class ArgoGreet extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -9777,358 +12351,425 @@ class ArgoGreet extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room deathlessVillageOrcOffensive = Room( - 'deathless_village_orc_offensive', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; + 'deathless_village_orc_offensive', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThe tribe is in a state of disarray. They wield the few weapons that they have, and they seem to be preparing for a siege.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { s.add( - 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThe tribe is in a state of disarray. They wield the few weapons that they have, and they seem to be preparing for a siege.\n\n', + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } + } - c.increaseSanityFromPeople(); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'deathless_village', - prerequisite: Prerequisite(218483559, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'deathless_village', + prerequisite: Prerequisite( + 218483559, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOrcOffensive) && !c.hasHappened(evQuake3); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The tribe is in a state of disarray. They wield the few weapons that they have, and they seem to be preparing for a siege.\n\n', - isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } - - c.increaseSanityFromPeople(); }, - positionX: 21, - positionY: 64, - mapName: 'Village of the Deathless', - firstMapName: 'Village in the Jungle', - hint: - 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', - firstHint: - 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.'); -final Room deathlessVillageQuake2 = Room( - 'deathless_village_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The tribe is in a state of disarray. They wield the few weapons that they have, and they seem to be preparing for a siege.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { s.add( - 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThey are freaked out by the most recent quake.\n\n', + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } - - c.increaseSanityFromPeople(); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); + } - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } + c.increaseSanityFromPeople(); + }, + positionX: 21, + positionY: 64, + mapName: 'Village of the Deathless', + firstMapName: 'Village in the Jungle', + hint: + 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', + firstHint: + 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.', +); +final Room deathlessVillageQuake2 = Room( + 'deathless_village_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThey are freaked out by the most recent quake.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'deathless_village', - prerequisite: Prerequisite(272717691, 2, true, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The cultists are freaked out by the most recent quake.\n\n', + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); + } - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - positionX: 21, - positionY: 64, - mapName: 'Village of the Deathless', - firstMapName: 'Village in the Jungle', - hint: - 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', - firstHint: - 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.'); -final Room deathlessVillageQuake3 = Room( - 'deathless_village_quake3', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; + if (c.hasItem(lairOfGodStarId)) { s.add( - 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThe village is seriously damaged.\n\n', + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } - - c.increaseSanityFromPeople(); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } + } - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'deathless_village', - prerequisite: Prerequisite(1025683774, 1, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'deathless_village', + prerequisite: Prerequisite( + 272717691, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; - return c.hasHappened(evQuake3); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The village has been seriously damaged by the latest quake.\n\n', - isRaw: true); - c.describeWorthiness( - who: cultists, - what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], - especially: [lairOfGodStarId, hawkmanJacketId], - how: "{approvingly|with respect}"); - - if (c.hasItem(lairOfGodStarId)) { - s.add( - """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, - isRaw: true); - } - - c.increaseSanityFromPeople(); + return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); }, - positionX: 21, - positionY: 64, - mapName: 'Village of the Deathless', - firstMapName: 'Village in the Jungle', - hint: - 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', - firstHint: - 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.'); -final Approach knightsHqMainFromBattlefield = - Approach('battlefield', 'knights_hq_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach knightsHqMainFromElevator12 = - Approach('elevator_12', 'knights_hq_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach knightsHqMainFromOracleMain = - Approach('oracle_main', 'knights_hq_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach knightsHqMainFromStagingArea = - Approach('staging_area', 'knights_hq_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room knightsHqMain = Room('knights_hq_main', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks where a few of the Knights are sleeping.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 37, - positionY: 65, - mapName: 'Knights’ Headquarters', - hint: - 'This is the original center of operations of the Knights of San Francisco.'); -final talkToMiguelAboutDesertingInk = InkAst([ - InkParagraphNode((ActionContext c) { + ), + variantUpdateDescribe: (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I can\'t just guard down there," Miguel says. "What am I, an onlooker? I have to change things."\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), - InkParagraphNode((ActionContext c) { + 'The cultists are freaked out by the most recent quake.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + + c.increaseSanityFromPeople(); + }, + positionX: 21, + positionY: 64, + mapName: 'Village of the Deathless', + firstMapName: 'Village in the Jungle', + hint: + 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', + firstHint: + 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.', +); +final Room deathlessVillageQuake3 = Room( + 'deathless_village_quake3', + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He looks around and lowers his voice. "The Knights of San Francisco are no more, as far as I\'m concerned. Look, if you are in the business of hurting the orcs, take me with you."\n', - isRaw: true); - }), - InkParagraphNode((c) => c.outputStoryline.addParagraph()), + 'On a ledge of the Pyramid overlooking the jungle, a village of cultists. They call themselves the Deathless, and they are said to worship the ancients. Their leader is a child.\n\nThe village is seriously damaged.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'deathless_village', + prerequisite: Prerequisite( + 1025683774, + 1, + true, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evQuake3); + }, + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The village has been seriously damaged by the latest quake.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: cultists, + what: [lairOfGodStarId, akxeId, sixtyFiverShieldId, hawkmanJacketId], + especially: [lairOfGodStarId, hawkmanJacketId], + how: "{approvingly|with respect}"); + + if (c.hasItem(lairOfGodStarId)) { + s.add( + """One of the villagers points to the Artifact Star. "Did you bring us that holy item, oh noble one?" """, + isRaw: true); + } + + c.increaseSanityFromPeople(); + }, + positionX: 21, + positionY: 64, + mapName: 'Village of the Deathless', + firstMapName: 'Village in the Jungle', + hint: + 'A village of cultists positioned on a ledge of the Pyramid overlooking the jungle.', + firstHint: + 'I can see some buildings through the canopy of leaves. The buildings are placed on a ledge of the Pyramid overlooking the crater.', +); +final Approach knightsHqMainFromBattlefield = Approach( + 'battlefield', + 'knights_hq_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach knightsHqMainFromElevator12 = Approach( + 'elevator_12', + 'knights_hq_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach knightsHqMainFromOracleMain = Approach( + 'oracle_main', + 'knights_hq_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach knightsHqMainFromStagingArea = Approach( + 'staging_area', + 'knights_hq_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room knightsHqMain = Room( + 'knights_hq_main', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks where a few of the Knights are sleeping.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 37, + positionY: 65, + mapName: 'Knights’ Headquarters', + hint: + 'This is the original center of operations of the Knights of San Francisco.', +); +final talkToMiguelAboutDesertingInk = InkAst([ + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '"I can\'t just guard down there," Miguel says. "What am I, an onlooker? I have to change things."\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), + InkParagraphNode((ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'He looks around and lowers his voice. "The Knights of San Francisco are no more, as far as I\'m concerned. Look, if you are in the business of hurting the orcs, take me with you."\n', + isRaw: true, + ); + }), + InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; @@ -10151,11 +12792,20 @@ class TalkToMiguelAboutDeserting extends RoamingAction { TalkToMiguelAboutDeserting(); @override - List get commandPathTemplate => - ['Miguel, the guardsman', 'Talk', '"What are you doing here?"']; + List get commandPathTemplate => [ + 'Miguel, the guardsman', + 'Talk', + '"What are you doing here?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('knights_hq_main') != true) { return false; } @@ -10168,7 +12818,10 @@ class TalkToMiguelAboutDeserting extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -10182,7 +12835,10 @@ class TalkToMiguelAboutDeserting extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -10193,321 +12849,426 @@ class TalkToMiguelAboutDeserting extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room knightsHqCaravanDeparture = Room( - 'knights_hq_caravan_departure', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError( - "Player should have been here, as the rule above stipulates."); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'knights_hq_main', - prerequisite: Prerequisite(294899248, 3, true, (ApplicabilityContext c) { + 'knights_hq_caravan_departure', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError( + "Player should have been here, as the rule above stipulates."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'knights_hq_main', + prerequisite: Prerequisite( + 294899248, + 3, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evCaravanDeparted) && !c.hasHappened(evOrcOffensive) && c.playerHasVisited("knights_hq_quake2"); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The circle of women and men is no longer here.\n', isRaw: true); }, - isIdle: true, - positionX: 37, - positionY: 65, - mapName: 'Knights’ Headquarters', - hint: - 'This is the original center of operations of the Knights of San Francisco.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The circle of women and men is no longer here.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 37, + positionY: 65, + mapName: 'Knights’ Headquarters', + hint: + 'This is the original center of operations of the Knights of San Francisco.', +); final Room knightsHqOrcOffensive = Room( - 'knights_hq_orc_offensive', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks.\n\nThere are a handful of wounded Knights here, tended by a pair of servants.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'knights_hq_main', - prerequisite: Prerequisite(879699967, 2, true, (ApplicabilityContext c) { + 'knights_hq_orc_offensive', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks.\n\nThere are a handful of wounded Knights here, tended by a pair of servants.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'knights_hq_main', + prerequisite: Prerequisite( + 879699967, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOrcOffensive) && !c.hasHappened(evQuake3); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('A handful of wounded Knights are tended by a pair of servants.\n', - isRaw: true); }, - isIdle: true, - positionX: 37, - positionY: 65, - mapName: 'Knights’ Headquarters', - hint: - 'This is the original center of operations of the Knights of San Francisco.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'A handful of wounded Knights are tended by a pair of servants.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 37, + positionY: 65, + mapName: 'Knights’ Headquarters', + hint: + 'This is the original center of operations of the Knights of San Francisco.', +); final Room knightsHqQuake2 = Room( - 'knights_hq_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks where a few of the Knights are sleeping.\n\nThere\'s a small circle of armed men and women talking excitedly in the middle of the room.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'knights_hq_main', - prerequisite: Prerequisite(617622573, 2, true, (ApplicabilityContext c) { + 'knights_hq_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the bunks where a few of the Knights are sleeping.\n\nThere\'s a small circle of armed men and women talking excitedly in the middle of the room.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'knights_hq_main', + prerequisite: Prerequisite( + 617622573, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'There\'s a small circle of armed men and women talking excitedly in the middle of the room.\n', - isRaw: true); }, - isIdle: true, - positionX: 37, - positionY: 65, - mapName: 'Knights’ Headquarters', - hint: - 'This is the original center of operations of the Knights of San Francisco.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'There\'s a small circle of armed men and women talking excitedly in the middle of the room.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 37, + positionY: 65, + mapName: 'Knights’ Headquarters', + hint: + 'This is the original center of operations of the Knights of San Francisco.', +); final Room knightsHqQuake3 = Room( - 'knights_hq_quake3', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the deserted bunks of the Knights of San Francisco.\n\nThere is nobody here.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'knights_hq_main', - prerequisite: Prerequisite(1010227962, 1, true, (ApplicabilityContext c) { + 'knights_hq_quake3', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I come to the Knights’ Headquarters. A large room overlooking the Bay. Latrines on the right hang out of the window frames, providing fertilizer to the Slopes below. To the left, as far from the latrines as possible, the deserted bunks of the Knights of San Francisco.\n\nThere is nobody here.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'knights_hq_main', + prerequisite: Prerequisite( + 1010227962, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake3); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('Silence. The Knights have left.\n', isRaw: true); }, - isIdle: true, - positionX: 37, - positionY: 65, - mapName: 'Knights’ Headquarters', - hint: - 'This is the original center of operations of the Knights of San Francisco.'); -final Approach elevator12FromElevator28 = - Approach('elevator_28', 'elevator_12', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Silence. The Knights have left.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 37, + positionY: 65, + mapName: 'Knights’ Headquarters', + hint: + 'This is the original center of operations of the Knights of San Francisco.', +); +final Approach elevator12FromElevator28 = Approach( + 'elevator_28', + 'elevator_12', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( '${weSubstitutionCapitalized} climb down using an ancient rusty ladder.\n', - isRaw: true); -}); -final Approach elevator12FromKnightsHqMain = - Approach('knights_hq_main', 'elevator_12', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room elevator12 = Room('elevator_12', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + isRaw: true, + ); + }, +); +final Approach elevator12FromKnightsHqMain = Approach( + 'knights_hq_main', + 'elevator_12', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room elevator12 = Room( + 'elevator_12', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'Darkness shrouds most of the vertical shaft, except for a single bright slit many floors above. Down here on the 12th floor, only a narrow passage connects the elevator shaft with the corridors surrounding it.\n\nI smell oil and metal, and everything sounds like the inside of a cave.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 32, - positionY: 67, - mapName: 'Elevator Shaft Entrance on the 12th Floor', - hint: 'A rare access point to the ancient elevator shaft.'); -final Approach slopesFromFarmersVillage = - Approach('farmers_village', 'slopes', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room slopes = Room('slopes', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 32, + positionY: 67, + mapName: 'Elevator Shaft Entrance on the 12th Floor', + hint: 'A rare access point to the ancient elevator shaft.', +); +final Approach slopesFromFarmersVillage = Approach( + 'farmers_village', + 'slopes', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room slopes = Room( + 'slopes', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'The steep slope of the Pyramid is covered in vines from this point down. Young men and women are picking Fruit.\n\nLarge writing on the wall reads, "Doghead will come."\n\n', - isRaw: true); - c.learn(DogheadFacts.somethingCalledDoghead); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 44, - positionY: 74, - mapName: 'The Slopes', - hint: 'The farmland on the outer wall of the Pyramid.'); + isRaw: true, + ); + c.learn(DogheadFacts.somethingCalledDoghead); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 44, + positionY: 74, + mapName: 'The Slopes', + hint: 'The farmland on the outer wall of the Pyramid.', +); final Room slopesQuake1 = Room( - 'slopes_quake1', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The steep slope of the Pyramid is covered in vines from this point down. Young men and women are picking Fruit.\n\nSome of them are talking about how the quakes are getting more frequent.\n\nIn the distance, a large group is traveling on the main road, toward the Pyramid.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'slopes', - prerequisite: Prerequisite(867577495, 2, true, (ApplicabilityContext c) { + 'slopes_quake1', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The steep slope of the Pyramid is covered in vines from this point down. Young men and women are picking Fruit.\n\nSome of them are talking about how the quakes are getting more frequent.\n\nIn the distance, a large group is traveling on the main road, toward the Pyramid.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'slopes', + prerequisite: Prerequisite( + 867577495, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake1) && !c.hasHappened(evCaravanArrived); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'There is talk among the young men and women about how the quakes are getting more frequent.\n\nIn the distance, a large group is traveling on the main road, toward the Pyramid.\n', - isRaw: true); }, - isIdle: true, - positionX: 44, - positionY: 74, - mapName: 'The Slopes', - hint: 'The farmland on the outer wall of the Pyramid.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'There is talk among the young men and women about how the quakes are getting more frequent.\n\nIn the distance, a large group is traveling on the main road, toward the Pyramid.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 44, + positionY: 74, + mapName: 'The Slopes', + hint: 'The farmland on the outer wall of the Pyramid.', +); final talkToGreenWomanAboutSlopesDeathInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -10516,8 +13277,9 @@ final talkToGreenWomanAboutSlopesDeathInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She clicks her tongue. "They should have been more careful, that\'s what happened."\n', - isRaw: true); + 'She clicks her tongue. "They should have been more careful, that\'s what happened."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -10539,7 +13301,10 @@ final talkToGreenWomanAboutSlopesDeathInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Maybe."\n', isRaw: true); + s.add( + '"Maybe."\n', + isRaw: true, + ); }), ]); @@ -10551,11 +13316,20 @@ class TalkToGreenWomanAboutSlopesDeath extends RoamingAction { TalkToGreenWomanAboutSlopesDeath(); @override - List get commandPathTemplate => - ['Green woman', 'Talk', '"What happened here?"']; + List get commandPathTemplate => [ + 'Green woman', + 'Talk', + '"What happened here?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('slopes') != true) { return false; } @@ -10566,7 +13340,10 @@ class TalkToGreenWomanAboutSlopesDeath extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -10580,7 +13357,10 @@ class TalkToGreenWomanAboutSlopesDeath extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -10591,174 +13371,240 @@ class TalkToGreenWomanAboutSlopesDeath extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room slopesQuake2 = Room( - 'slopes_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The steep slope of the Pyramid is covered in vines from this point down. Young men and women who would normally be picking Fruit on the Slopes are all at the base of the Pyramid, gathered around a dead body.\n\nA woman dressed in green is standing next to me, looking down.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - null, - null, - parent: 'slopes', - prerequisite: Prerequisite(25414194, 2, true, (ApplicabilityContext c) { + 'slopes_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The steep slope of the Pyramid is covered in vines from this point down. Young men and women who would normally be picking Fruit on the Slopes are all at the base of the Pyramid, gathered around a dead body.\n\nA woman dressed in green is standing next to me, looking down.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + parent: 'slopes', + prerequisite: Prerequisite( + 25414194, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The young men and women are all at the base of the Pyramid, gathered around a dead body.\n\nA woman dressed in green is standing next to me, looking down.\n', - isRaw: true); }, - isIdle: true, - positionX: 44, - positionY: 74, - mapName: 'The Slopes', - hint: 'The farmland on the outer wall of the Pyramid.'); -final Approach stagingAreaFromFarmersVillage = - Approach('farmers_village', 'staging_area', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach stagingAreaFromJungleEntrance = - Approach('jungle_entrance', 'staging_area', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach stagingAreaFromKeepGate = - Approach('keep_gate', 'staging_area', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach stagingAreaFromKnightsHqMain = - Approach('knights_hq_main', 'staging_area', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach stagingAreaFromPyramidEntrance = - Approach('pyramid_entrance', 'staging_area', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_10b0445b4 = c.knows(DogheadFacts.somethingCalledDoghead) - ? '''Doghead.''' - : '''a "Doghead."'''; - Ruleset( - Rule(1005559119, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return !c.playerHasVisited("staging_area"); - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The young men and women are all at the base of the Pyramid, gathered around a dead body.\n\nA woman dressed in green is standing next to me, looking down.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 44, + positionY: 74, + mapName: 'The Slopes', + hint: 'The farmland on the outer wall of the Pyramid.', +); +final Approach stagingAreaFromFarmersVillage = Approach( + 'farmers_village', + 'staging_area', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach stagingAreaFromJungleEntrance = Approach( + 'jungle_entrance', + 'staging_area', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach stagingAreaFromKeepGate = Approach( + 'keep_gate', + 'staging_area', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach stagingAreaFromKnightsHqMain = Approach( + 'knights_hq_main', + 'staging_area', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach stagingAreaFromPyramidEntrance = Approach( + 'pyramid_entrance', + 'staging_area', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_10b0445b4 = c.knows(DogheadFacts.somethingCalledDoghead) + ? '''Doghead.''' + : '''a "Doghead."'''; + Ruleset( + Rule( + 1005559119, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return !c.playerHasVisited("staging_area"); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( ' As I climb the Infinite Staircase, I read the writings on the wall. Many of them refer to ${ifBlock_10b0445b4}\n\n ![An inartistic writing on a wall saying Doghead](graffiti.png)\n\n Messages like "Where is Doghead?" and "Doghead save us" are on almost every step.\n\n', - isRaw: true); - c.learn(DogheadFacts.somethingCalledDoghead); + isRaw: true, + ); + c.learn(DogheadFacts.somethingCalledDoghead); - s.add( + s.add( '\n Finally I reach a point where the stairs are too damaged to continue up. There\'s a doorway, and I go through it.\n', - isRaw: true); - }), - Rule(257575313, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); -}); -final Room stagingArea = Room('staging_area', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + isRaw: true, + ); + }, + ), + Rule( + 257575313, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + }, +); +final Room stagingArea = Room( + 'staging_area', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'This is a large room without windows. It is teeming with Knights and their servants, who are carrying in chests, bedding, and furniture from the upper floors. All these items are being lined up against the north wall, and an officer with a large book is walking left and right, making notes.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.increaseSanityFromPeople(); -}, null, null, - isIdle: true, - positionX: 26, - positionY: 76, - mapName: 'The Staging Area', - firstMapName: 'Up the Stairs', - hint: - 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', - firstHint: - 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.'); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.increaseSanityFromPeople(); + }, + null, + null, + isIdle: true, + positionX: 26, + positionY: 76, + mapName: 'The Staging Area', + firstMapName: 'Up the Stairs', + hint: + 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', + firstHint: + 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.', +); final talkToHorsemanWhiteAboutOracleInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -10767,8 +13613,9 @@ final talkToHorsemanWhiteAboutOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"An old woman with books. She insists on living on the fifteenth floor. I told her several times she\'s practically asking to be killed by a rogue orc skirmisher, living that close to them." He waves his hand. "Bah."\n', - isRaw: true); + '"An old woman with books. She insists on living on the fifteenth floor. I told her several times she\'s practically asking to be killed by a rogue orc skirmisher, living that close to them." He waves his hand. "Bah."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -10787,8 +13634,10 @@ final talkToHorsemanWhiteDogheadInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Horseman White seems offended. "Why are you asking me this?"\n', - isRaw: true); + s.add( + 'Horseman White seems offended. "Why are you asking me this?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -10800,7 +13649,10 @@ final talkToHorsemanWhiteDogheadInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Not written by me, or any other Knight.\n', isRaw: true); + s.add( + '"Not written by me, or any other Knight.\n', + isRaw: true, + ); }), ], ), @@ -10814,8 +13666,9 @@ final talkToHorsemanWhiteDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Horseman White smirks. "Well done, kid. You might yet have a future in leadership.\n', - isRaw: true); + 'Horseman White smirks. "Well done, kid. You might yet have a future in leadership.\n', + isRaw: true, + ); }), ], ), @@ -10827,8 +13680,9 @@ final talkToHorsemanWhiteDogheadInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Doghead is a local myth. A creature with a dog\'s head and a human\'s body. He or she is supposed to come and save the day at some point. Just turn up and solve everyone\'s problems. Classic magical thinking. Bullshit from generations ago. Go ask Oracle."\n', - isRaw: true); + 'Doghead is a local myth. A creature with a dog\'s head and a human\'s body. He or she is supposed to come and save the day at some point. Just turn up and solve everyone\'s problems. Classic magical thinking. Bullshit from generations ago. Go ask Oracle."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -10853,8 +13707,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final ifBlock_7c207f126 = c.playerHasBurntFace ? ''', especially at my face''' : ''''''; s.add( - '"Greetings. What\'s your business here?" The officer takes a second good look at me${ifBlock_5f310b46e}${ifBlock_7c207f126}. "You look far from home."\n', - isRaw: true); + '"Greetings. What\'s your business here?" The officer takes a second good look at me${ifBlock_5f310b46e}${ifBlock_7c207f126}. "You look far from home."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -10867,8 +13722,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Let me guess, a backwater place somewhere to the east?" He snickers. "No matter. Why are you here?"\n', - isRaw: true); + '"Let me guess, a backwater place somewhere to the east?" He snickers. "No matter. Why are you here?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -10893,8 +13749,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The officer shakes his head. "Why would this Sarn of Falling Rock be here, of all places? Any thinking man would go as far away from here as possible."\n', - isRaw: true); + 'The officer shakes his head. "Why would this Sarn of Falling Rock be here, of all places? Any thinking man would go as far away from here as possible."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -10907,8 +13764,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I wouldn\'t be a very good Knight if I fled from my company, would I? But if you ask me... Wait." The officer shouts some commands at the servants, makes a short note in his book, and continues. "If you ask me, the withdrawal from here cannot come fast enough. I will not flee myself, but I will gladly withdraw with the rest. And you, you should leave as soon as possible if you want to live."\n', - isRaw: true); + '"I wouldn\'t be a very good Knight if I fled from my company, would I? But if you ask me... Wait." The officer shouts some commands at the servants, makes a short note in his book, and continues. "If you ask me, the withdrawal from here cannot come fast enough. I will not flee myself, but I will gladly withdraw with the rest. And you, you should leave as soon as possible if you want to live."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -10931,8 +13789,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The officer looks at me for a long while. Is he considering using that sword that sways by his side? But then he merely smirks. "Whatever your story is, kid, you should really be leaving." He turns and shouts some commands at the servants.\nWhen he is done and sees I\'m still there, he shakes his head. "I will not flee myself, but I will gladly withdraw with the rest. And you, you should leave as soon as possible if you want to live."\n', - isRaw: true); + 'The officer looks at me for a long while. Is he considering using that sword that sways by his side? But then he merely smirks. "Whatever your story is, kid, you should really be leaving." He turns and shouts some commands at the servants.\nWhen he is done and sees I\'m still there, he shakes his head. "I will not flee myself, but I will gladly withdraw with the rest. And you, you should leave as soon as possible if you want to live."\n', + isRaw: true, + ); }), ], ), @@ -10948,8 +13807,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Bah! How old is this brother of yours? Can’t he take care of himself?"\n', - isRaw: true); + '"Bah! How old is this brother of yours? Can’t he take care of himself?"\n', + isRaw: true, + ); }), ], ), @@ -10965,8 +13825,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"So what? He\'s not your responsibility, kid. People think that, but that\'s not how the world works. People don\'t owe each other anything." He pauses. "Which brings me to the fact that\n', - isRaw: true); + '"So what? He\'s not your responsibility, kid. People think that, but that\'s not how the world works. People don\'t owe each other anything." He pauses. "Which brings me to the fact that\n', + isRaw: true, + ); }), ], ), @@ -10979,8 +13840,10 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"A revenge, then?" He chuckles. "Amusing. Nevertheless,\n', - isRaw: true); + s.add( + '"A revenge, then?" He chuckles. "Amusing. Nevertheless,\n', + isRaw: true, + ); }), ], ), @@ -10993,8 +13856,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_46055ee7b = c.playerHasAsthma ? '''Stop coughing.''' : ''''''; s.add( - 'I can\'t help you. I don\'t know anyone called Sarn. Or maybe I do but I don\'t remember. ${ifBlock_46055ee7b} I am busy, as you can see."\n', - isRaw: true); + 'I can\'t help you. I don\'t know anyone called Sarn. Or maybe I do but I don\'t remember. ${ifBlock_46055ee7b} I am busy, as you can see."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11007,8 +13871,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The officer\'s face reddens, but he swallows a retort and flips through the pages.\n', - isRaw: true); + 'The officer\'s face reddens, but he swallows a retort and flips through the pages.\n', + isRaw: true, + ); }), ], ), @@ -11022,8 +13887,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Look, kid. There are hundreds of Knights in this place. They come and go. I can\'t know all of them." He scratches his nose. Then he looks down at his book and opens it to a page in the back.\n', - isRaw: true); + '"Look, kid. There are hundreds of Knights in this place. They come and go. I can\'t know all of them." He scratches his nose. Then he looks down at his book and opens it to a page in the back.\n', + isRaw: true, + ); }), ], ), @@ -11035,8 +13901,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Sarn? Of Falling Rock? Yes." He pauses with his finger on the page. "I\'m afraid he\'s in here. He\'s marked as... captured."\n', - isRaw: true); + '"Sarn? Of Falling Rock? Yes." He pauses with his finger on the page. "I\'m afraid he\'s in here. He\'s marked as... captured."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11048,7 +13915,10 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"The orcs, of course."\n', isRaw: true); + s.add( + '"The orcs, of course."\n', + isRaw: true, + ); }), ], ), @@ -11062,8 +13932,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"He probably is. We just mark him as captured because that\'s what we know for sure. But the orcs, they don\'t seem the sort that take good care of their prisoners, if you know what I mean."\n', - isRaw: true); + '"He probably is. We just mark him as captured because that\'s what we know for sure. But the orcs, they don\'t seem the sort that take good care of their prisoners, if you know what I mean."\n', + isRaw: true, + ); }), ], ), @@ -11077,8 +13948,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I don\'t know. There were a lot of skirmishes with the orcs lately. Looks like your Sarn of Falling Rock was unlucky enough to be caught in one of them."\n', - isRaw: true); + '"I don\'t know. There were a lot of skirmishes with the orcs lately. Looks like your Sarn of Falling Rock was unlucky enough to be caught in one of them."\n', + isRaw: true, + ); }), ], ), @@ -11100,8 +13972,9 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The officer sighs, and his expression softens. "Look, kid. This is the kind of thing I have to say to people every day. Someone died. You cared about them. That\'s the bullshit we live in. The sooner we all get out of here, the better." He extends a hand to shake. "I am White. Horseman White."\n', - isRaw: true); + 'The officer sighs, and his expression softens. "Look, kid. This is the kind of thing I have to say to people every day. Someone died. You cared about them. That\'s the bullshit we live in. The sooner we all get out of here, the better." He extends a hand to shake. "I am White. Horseman White."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11113,7 +13986,10 @@ final talkToHorsemanWhiteGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Okay."\n', isRaw: true); + s.add( + '"Okay."\n', + isRaw: true, + ); }), ], ), @@ -11127,8 +14003,9 @@ final talkToHorsemanWhiteQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I don\'t think so, kid. Where I come from, there are earthquakes. I remember a few. A few, you hear? Maybe ten, in my whole life. Not an earthquake a day, sometimes more, like here."\n', - isRaw: true); + '"I don\'t think so, kid. Where I come from, there are earthquakes. I remember a few. A few, you hear? Maybe ten, in my whole life. Not an earthquake a day, sometimes more, like here."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11148,8 +14025,9 @@ final talkToHorsemanWhiteRetreatInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Take your pick, child." He starts counting with fingers. "The horde of orcs at the upper floors? The wizard, Big O, at the very top? The goblins everywhere? The earthquakes, or whatever they are?" He wiggles the four fingers. "There\'s probably more I\'m forgetting. The point is, the Knights of San Francisco were meant as a force to provide safety, to keep an occasional bandit or such in check."\n', - isRaw: true); + '"Take your pick, child." He starts counting with fingers. "The horde of orcs at the upper floors? The wizard, Big O, at the very top? The goblins everywhere? The earthquakes, or whatever they are?" He wiggles the four fingers. "There\'s probably more I\'m forgetting. The point is, the Knights of San Francisco were meant as a force to provide safety, to keep an occasional bandit or such in check."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11159,8 +14037,9 @@ final talkToHorsemanWhiteRetreatInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He pounds his chest. "We are not meant to be slaughtered like pigs."\n', - isRaw: true); + 'He pounds his chest. "We are not meant to be slaughtered like pigs."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11185,11 +14064,17 @@ class TalkToHorsemanWhiteAboutDevling extends RoamingAction { List get commandPathTemplate => [ 'Horseman White', 'Talk', - '“Any advice for someone delving in the Pyramid?”' + '“Any advice for someone delving in the Pyramid?”', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11200,18 +14085,27 @@ class TalkToHorsemanWhiteAboutDevling extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"No."\n', isRaw: true); + s.add( + '"No."\n', + isRaw: true, + ); return '${a.name} successfully performs TalkToHorsemanWhiteAboutDevling'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11222,23 +14116,36 @@ class TalkToHorsemanWhiteAboutDevling extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -11251,11 +14158,20 @@ class TalkToHorsemanWhiteAboutOracle extends RoamingAction { TalkToHorsemanWhiteAboutOracle(); @override - List get commandPathTemplate => - ['Horseman White', 'Talk', '“Who is Oracle?”']; + List get commandPathTemplate => [ + 'Horseman White', + 'Talk', + '“Who is Oracle?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11268,7 +14184,10 @@ class TalkToHorsemanWhiteAboutOracle extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11282,7 +14201,10 @@ class TalkToHorsemanWhiteAboutOracle extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11293,23 +14215,36 @@ class TalkToHorsemanWhiteAboutOracle extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -11322,11 +14257,20 @@ class TalkToHorsemanWhiteDoghead extends RoamingAction { TalkToHorsemanWhiteDoghead(); @override - List get commandPathTemplate => - ['Horseman White', 'Talk', '"Who is Doghead?"']; + List get commandPathTemplate => [ + 'Horseman White', + 'Talk', + '"Who is Doghead?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11338,7 +14282,10 @@ class TalkToHorsemanWhiteDoghead extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11352,7 +14299,10 @@ class TalkToHorsemanWhiteDoghead extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11363,23 +14313,36 @@ class TalkToHorsemanWhiteDoghead extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -11392,10 +14355,20 @@ class TalkToHorsemanWhiteGreetings extends RoamingAction { TalkToHorsemanWhiteGreetings(); @override - List get commandPathTemplate => ['Officer', 'Talk', '"Greetings."']; + List get commandPathTemplate => [ + 'Officer', + 'Talk', + '"Greetings."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11406,7 +14379,10 @@ class TalkToHorsemanWhiteGreetings extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11420,7 +14396,10 @@ class TalkToHorsemanWhiteGreetings extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11431,23 +14410,36 @@ class TalkToHorsemanWhiteGreetings extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -11460,11 +14452,20 @@ class TalkToHorsemanWhiteQuake1 extends RoamingAction { TalkToHorsemanWhiteQuake1(); @override - List get commandPathTemplate => - ['Horseman White', 'Talk', '"Was that an earthquake?"']; + List get commandPathTemplate => [ + 'Horseman White', + 'Talk', + '"Was that an earthquake?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11477,7 +14478,10 @@ class TalkToHorsemanWhiteQuake1 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11491,7 +14495,10 @@ class TalkToHorsemanWhiteQuake1 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11502,23 +14509,36 @@ class TalkToHorsemanWhiteQuake1 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -11531,11 +14551,20 @@ class TalkToHorsemanWhiteRetreat extends RoamingAction { TalkToHorsemanWhiteRetreat(); @override - List get commandPathTemplate => - ['Horseman White', 'Talk', '"What are you retreating from?"']; + List get commandPathTemplate => [ + 'Horseman White', + 'Talk', + '"What are you retreating from?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('staging_area') != true) { return false; } @@ -11547,7 +14576,10 @@ class TalkToHorsemanWhiteRetreat extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11561,7 +14593,10 @@ class TalkToHorsemanWhiteRetreat extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -11572,194 +14607,238 @@ class TalkToHorsemanWhiteRetreat extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room stagingAreaQuake1 = Room( - 'staging_area_quake1', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'This is a large room without windows. It is teeming with Knights and their servants, who are carrying in chests, bedding, and furniture from the upper floors. All these items are being lined up against the north wall, and an officer with a large book is walking left and right, making notes.\n\nThe quake has evidently toppled some of the furniture next to the wall, and a few Knights are putting it back in order again.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'staging_area', - prerequisite: Prerequisite(291483367, 2, true, (ApplicabilityContext c) { + 'staging_area_quake1', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'This is a large room without windows. It is teeming with Knights and their servants, who are carrying in chests, bedding, and furniture from the upper floors. All these items are being lined up against the north wall, and an officer with a large book is walking left and right, making notes.\n\nThe quake has evidently toppled some of the furniture next to the wall, and a few Knights are putting it back in order again.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'staging_area', + prerequisite: Prerequisite( + 291483367, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake1) && !c.hasHappened(evCaravanArrived); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Some of the furniture has been toppled by the quake, and the Knights are putting it back in order again, frustrated, looking for damage.\n', - isRaw: true); }, - isIdle: true, - positionX: 26, - positionY: 76, - mapName: 'The Staging Area', - firstMapName: 'Up the Stairs', - hint: - 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', - firstHint: - 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Some of the furniture has been toppled by the quake, and the Knights are putting it back in order again, frustrated, looking for damage.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 26, + positionY: 76, + mapName: 'The Staging Area', + firstMapName: 'Up the Stairs', + hint: + 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', + firstHint: + 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.', +); final Room stagingAreaQuake2 = Room( - 'staging_area_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'This is a large room without windows. It is teeming with Knights and their servants, who are carrying in chests, bedding, and furniture from the upper floors. All these items are being lined up against the north wall, and an officer with a large book is walking left and right, making notes.\n\nThe new quake has toppled quite a few things. Nobody seems to care anymore. People just try to get out.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'staging_area', - prerequisite: Prerequisite(600200113, 2, true, (ApplicabilityContext c) { + 'staging_area_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'This is a large room without windows. It is teeming with Knights and their servants, who are carrying in chests, bedding, and furniture from the upper floors. All these items are being lined up against the north wall, and an officer with a large book is walking left and right, making notes.\n\nThe new quake has toppled quite a few things. Nobody seems to care anymore. People just try to get out.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'staging_area', + prerequisite: Prerequisite( + 600200113, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The new quake has toppled quite a few things. Nobody seems to care anymore. People just try to get out.\n', - isRaw: true); }, - isIdle: true, - positionX: 26, - positionY: 76, - mapName: 'The Staging Area', - firstMapName: 'Up the Stairs', - hint: - 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', - firstHint: - 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.'); -final Approach farmersVillageFromSlopes = - Approach('slopes', 'farmers_village', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach farmersVillageFromStagingArea = - Approach('staging_area', 'farmers_village', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Room farmersVillage = Room('farmers_village', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The new quake has toppled quite a few things. Nobody seems to care anymore. People just try to get out.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 26, + positionY: 76, + mapName: 'The Staging Area', + firstMapName: 'Up the Stairs', + hint: + 'This is a large room without windows that the Knights of San Francisco are using as the base for their retreat.', + firstHint: + 'The entrance leads directly to what the locals call the Infinite Staircase. Sound travels from a few floors above — I can hear simple commands spoken in bored voices, and loud shuffling.', +); +final Approach farmersVillageFromSlopes = Approach( + 'slopes', + 'farmers_village', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach farmersVillageFromStagingArea = Approach( + 'staging_area', + 'farmers_village', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Room farmersVillage = Room( + 'farmers_village', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'The corridors here look more like streets. Painted walls on either side, with wooden windows in them, and doors. Well-dressed people go about their business. Polite nods in my direction.\n\nAn old woman is whittling a little dog-headed figure from wood.\n\n', - isRaw: true); - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); -}, null, null, - isIdle: true, - positionX: 38, - positionY: 78, - mapName: 'Farmers\' Village', - firstMapName: 'Settled Area', - hint: - 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', - firstHint: - 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.'); + isRaw: true, + ); + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + null, + null, + isIdle: true, + positionX: 38, + positionY: 78, + mapName: 'Farmers\' Village', + firstMapName: 'Settled Area', + hint: + 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', + firstHint: + 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.', +); final talkToAdaAboutDelvingInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -11768,8 +14847,9 @@ final talkToAdaAboutDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Oh, please don\'t put yourself into more danger than you absolutely must. This building is full of dangers."\n', - isRaw: true); + '"Oh, please don\'t put yourself into more danger than you absolutely must. This building is full of dangers."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11782,8 +14862,9 @@ final talkToAdaAboutDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Orcs, monsters. Bad magic, from Big O at the very top. One person just cannot face it all alone. You should\n', - isRaw: true); + '"Orcs, monsters. Bad magic, from Big O at the very top. One person just cannot face it all alone. You should\n', + isRaw: true, + ); }), InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -11805,8 +14886,9 @@ final talkToAdaAboutDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"If you _must_ go further, you mean? I hope you need not. But if you do,\n', - isRaw: true); + '"If you _must_ go further, you mean? I hope you need not. But if you do,\n', + isRaw: true, + ); }), ], ), @@ -11818,8 +14900,9 @@ final talkToAdaAboutDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'seek help from others. The Deathless have been friendly to us farmers. Oracle is a beautiful person. The Knights are leaving, but they are good people, too."\n', - isRaw: true); + 'seek help from others. The Deathless have been friendly to us farmers. Oracle is a beautiful person. The Knights are leaving, but they are good people, too."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11839,8 +14922,9 @@ final talkToAdaAboutDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"And remember to equip yourself," Ada says, looking at my tunic and gear. "There are different weapons to be found, even here in the downside of the Pyramid. A good weapon can be the difference between life and death. A _great_ weapon can decide a conflict without the need for a fight. I\'ve heard the Dragon Egg is that sort of weapon."\n', - isRaw: true); + '"And remember to equip yourself," Ada says, looking at my tunic and gear. "There are different weapons to be found, even here in the downside of the Pyramid. A good weapon can be the difference between life and death. A _great_ weapon can decide a conflict without the need for a fight. I\'ve heard the Dragon Egg is that sort of weapon."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11861,8 +14945,9 @@ final talkToAdaAboutDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Oh, you should not ask an old woman about such things," she says. "I know it\'s a device of war. I know it\'s powerful. People claim it\'s somewhere in the Pyramid. But where? And what it is, exactly? I don\'t know."\n', - isRaw: true); + '"Oh, you should not ask an old woman about such things," she says. "I know it\'s a device of war. I know it\'s powerful. People claim it\'s somewhere in the Pyramid. But where? And what it is, exactly? I don\'t know."\n', + isRaw: true, + ); }), ]); final talkToAdaAboutOracleInk = InkAst([ @@ -11873,8 +14958,9 @@ final talkToAdaAboutOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"She\'s the wisest person I know," Ada says, with something like pride. "Lives in a room many floors above us. Up above the Knights’ Headquarters, even, just below the Battlefield floor."\n', - isRaw: true); + '"She\'s the wisest person I know," Ada says, with something like pride. "Lives in a room many floors above us. Up above the Knights’ Headquarters, even, just below the Battlefield floor."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11884,8 +14970,9 @@ final talkToAdaAboutOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She chuckles. "As high as possible without being quartered by the orcs. She likes the view."\n', - isRaw: true); + 'She chuckles. "As high as possible without being quartered by the orcs. She likes the view."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11904,8 +14991,9 @@ final talkToAdaAboutOracleInk = InkAst([ final Storyline s = c.outputStoryline; final ifBlock_4f06a29a4 = c.playerHasWoodenFoot ? '''crippled ''' : ''''''; s.add( - 'Ada\'s little wooden figure gets another cut and a wooden chip flies past my ${ifBlock_4f06a29a4}leg. "Oracle never had a kid, you know. Had all that time to invest in learning and experiencing. Not that I envy her, no. I could not live without kids. Just explaining how she knows as much as she does."\n', - isRaw: true); + 'Ada\'s little wooden figure gets another cut and a wooden chip flies past my ${ifBlock_4f06a29a4}leg. "Oracle never had a kid, you know. Had all that time to invest in learning and experiencing. Not that I envy her, no. I could not live without kids. Just explaining how she knows as much as she does."\n', + isRaw: true, + ); }), ]); final talkToAdaBigOInk = InkAst([ @@ -11917,8 +15005,9 @@ final talkToAdaBigOInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"As much as anyone here, ${youngSirSubstitution}," Ada says. "When I was younger, we called him Osiris. Big O is a nickname that people gave him. He\'s a constant presence, even though we don\'t ever see him."\n', - isRaw: true); + '"As much as anyone here, ${youngSirSubstitution}," Ada says. "When I was younger, we called him Osiris. Big O is a nickname that people gave him. He\'s a constant presence, even though we don\'t ever see him."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11931,8 +15020,9 @@ final talkToAdaBigOInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Ada shrugs and puts her whittling knife to the figure. "People say different things. At night, we can see the lights change. Dark red and bright violet, what have you. There are sounds and screams sometimes, and they don\'t seem to be coming from the orcs. I don\'t know\n', - isRaw: true); + 'Ada shrugs and puts her whittling knife to the figure. "People say different things. At night, we can see the lights change. Dark red and bright violet, what have you. There are sounds and screams sometimes, and they don\'t seem to be coming from the orcs. I don\'t know\n', + isRaw: true, + ); }), ], ), @@ -11946,8 +15036,9 @@ final talkToAdaBigOInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"He\'s up there, at the very top," Ada says, pointing with her whittling knife to the ceiling. "He never goes down, never shows. He\'s been locked up there for decades now, and nobody knows\n', - isRaw: true); + '"He\'s up there, at the very top," Ada says, pointing with her whittling knife to the ceiling. "He never goes down, never shows. He\'s been locked up there for decades now, and nobody knows\n', + isRaw: true, + ); }), ], ), @@ -11959,8 +15050,9 @@ final talkToAdaBigOInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'what dark magic he\'s doing up there. I try not to think about it, to be honest."\n', - isRaw: true); + 'what dark magic he\'s doing up there. I try not to think about it, to be honest."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -11980,8 +15072,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Ah, this?" She lifts the item to her eye level and I can smell the wood. "That\'s Doghead, of course. People in the Pyramid believe a creature with a human body and a dog\'s head will come and save us in our direst moment."\n', - isRaw: true); + '"Ah, this?" She lifts the item to her eye level and I can smell the wood. "That\'s Doghead, of course. People in the Pyramid believe a creature with a human body and a dog\'s head will come and save us in our direst moment."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -11994,8 +15087,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I have never seen one. I know of hawkmen, of course, and lizardmen. I have never seen or heard of any tale of a dog-headed person, though. Except for this one." She shows me the wooden figure. "I can\'t know if it\'s true.\n', - isRaw: true); + '"I have never seen one. I know of hawkmen, of course, and lizardmen. I have never seen or heard of any tale of a dog-headed person, though. Except for this one." She shows me the wooden figure. "I can\'t know if it\'s true.\n', + isRaw: true, + ); }), ], ), @@ -12009,8 +15103,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It\'s not a religion. Doghead is not a god. A hero, yes, but not a god. If you\'re asking me where the tale came from, I can\'t tell.\n', - isRaw: true); + '"It\'s not a religion. Doghead is not a god. A hero, yes, but not a god. If you\'re asking me where the tale came from, I can\'t tell.\n', + isRaw: true, + ); }), ], ), @@ -12022,8 +15117,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'All I know is that this has been said for generations. My mother taught me about Doghead."\n', - isRaw: true); + 'All I know is that this has been said for generations. My mother taught me about Doghead."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12041,8 +15137,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Ada looks around. "I think people need Doghead more today than ever before in my life."\n', - isRaw: true); + 'Ada looks around. "I think people need Doghead more today than ever before in my life."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -12055,8 +15152,9 @@ final talkToAdaDogheadFigureInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The Knights are leaving. Big O at the top is growing in power. Orcs are getting bolder. There are goblins crawling all around the Pyramid. And the quakes are getting more frequent." Ada shakes her head. "This is our direst moment."\n', - isRaw: true); + '"The Knights are leaving. Big O at the top is growing in power. Orcs are getting bolder. There are goblins crawling all around the Pyramid. And the quakes are getting more frequent." Ada shakes her head. "This is our direst moment."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12079,7 +15177,10 @@ final talkToAdaDogheadFigureInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Ada nods.\n', isRaw: true); + s.add( + 'Ada nods.\n', + isRaw: true, + ); }), ], ), @@ -12094,8 +15195,9 @@ final talkToAdaGreetingsInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Greetings to you, too, ${youngSirSubstitution}. What\'s your name?"\n', - isRaw: true); + '"Greetings to you, too, ${youngSirSubstitution}. What\'s your name?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -12110,7 +15212,10 @@ final talkToAdaGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Good to meet you, Aren. My name is Ada."\n', isRaw: true); + s.add( + '"Good to meet you, Aren. My name is Ada."\n', + isRaw: true, + ); }), ]); final talkToAdaQuake1Ink = InkAst([ @@ -12122,8 +15227,9 @@ final talkToAdaQuake1Ink = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Don\'t you worry, ${youngSirSubstitution}, this is quite normal here. These past months there is seldom a single day when we don\'t have a quake."\n', - isRaw: true); + '"Don\'t you worry, ${youngSirSubstitution}, this is quite normal here. These past months there is seldom a single day when we don\'t have a quake."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12145,8 +15251,9 @@ final talkToAdaQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'She shrugs. "This one was stronger than most, but people will repair the damage."\n', - isRaw: true); + 'She shrugs. "This one was stronger than most, but people will repair the damage."\n', + isRaw: true, + ); }), ], ), @@ -12163,8 +15270,9 @@ final talkToAdaQuake1Ink = InkAst([ ? '''She's very knowledgeable, Oracle. She knows a lot about this place. She reads books, you know.''' : '''She was very knowledgeable, you know.'''; s.add( - '"Oracle once told me that this area has been prone to earthquakes since at least the time of the ancients. ${ifBlock_23e6b75e}"\n', - isRaw: true); + '"Oracle once told me that this area has been prone to earthquakes since at least the time of the ancients. ${ifBlock_23e6b75e}"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12187,11 +15295,20 @@ class TalkToAdaAboutDelving extends RoamingAction { static final TalkToAdaAboutDelving singleton = TalkToAdaAboutDelving(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"Any advice for someone delving in the Pyramid?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"Any advice for someone delving in the Pyramid?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12202,7 +15319,10 @@ class TalkToAdaAboutDelving extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12216,7 +15336,10 @@ class TalkToAdaAboutDelving extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12227,23 +15350,36 @@ class TalkToAdaAboutDelving extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12255,11 +15391,20 @@ class TalkToAdaAboutDragonEgg extends RoamingAction { static final TalkToAdaAboutDragonEgg singleton = TalkToAdaAboutDragonEgg(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"What do you know about the Dragon Egg?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"What do you know about the Dragon Egg?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12271,7 +15416,10 @@ class TalkToAdaAboutDragonEgg extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12285,7 +15433,10 @@ class TalkToAdaAboutDragonEgg extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12296,23 +15447,36 @@ class TalkToAdaAboutDragonEgg extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12324,10 +15488,20 @@ class TalkToAdaAboutOracle extends RoamingAction { static final TalkToAdaAboutOracle singleton = TalkToAdaAboutOracle(); @override - List get commandPathTemplate => ['Ada', 'Talk', '"Who\'s Oracle?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"Who\'s Oracle?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12341,7 +15515,10 @@ class TalkToAdaAboutOracle extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12355,7 +15532,10 @@ class TalkToAdaAboutOracle extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12366,23 +15546,36 @@ class TalkToAdaAboutOracle extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12394,11 +15587,20 @@ class TalkToAdaBigO extends RoamingAction { static final TalkToAdaBigO singleton = TalkToAdaBigO(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"Do you know anything about Big O?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"Do you know anything about Big O?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12410,7 +15612,10 @@ class TalkToAdaBigO extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12424,7 +15629,10 @@ class TalkToAdaBigO extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12435,23 +15643,36 @@ class TalkToAdaBigO extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12463,11 +15684,20 @@ class TalkToAdaDogheadFigure extends RoamingAction { static final TalkToAdaDogheadFigure singleton = TalkToAdaDogheadFigure(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"What\'s that dog-headed figure?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"What\'s that dog-headed figure?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12478,7 +15708,10 @@ class TalkToAdaDogheadFigure extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12492,7 +15725,10 @@ class TalkToAdaDogheadFigure extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12503,23 +15739,36 @@ class TalkToAdaDogheadFigure extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12531,10 +15780,20 @@ class TalkToAdaGreetings extends RoamingAction { static final TalkToAdaGreetings singleton = TalkToAdaGreetings(); @override - List get commandPathTemplate => ['Old woman', 'Talk', '"Greetings."']; + List get commandPathTemplate => [ + 'Old woman', + 'Talk', + '"Greetings."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12542,7 +15801,10 @@ class TalkToAdaGreetings extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12556,7 +15818,10 @@ class TalkToAdaGreetings extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12567,23 +15832,36 @@ class TalkToAdaGreetings extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -12595,11 +15873,20 @@ class TalkToAdaQuake1 extends RoamingAction { static final TalkToAdaQuake1 singleton = TalkToAdaQuake1(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"Was that an earthquake?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"Was that an earthquake?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12612,7 +15899,10 @@ class TalkToAdaQuake1 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12626,7 +15916,10 @@ class TalkToAdaQuake1 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12637,119 +15930,140 @@ class TalkToAdaQuake1 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room farmersVillageQuake1 = Room( - 'farmers_village_quake1', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The corridors here look more like streets. Painted walls on either side, with wooden windows in them, and doors. Well-dressed people run around, trying to repair the damage of the quake, repairing doors, cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\nAn old woman is whittling a little dog-headed figure from wood.\n\n', - isRaw: true); - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); + 'farmers_village_quake1', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The corridors here look more like streets. Painted walls on either side, with wooden windows in them, and doors. Well-dressed people run around, trying to repair the damage of the quake, repairing doors, cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\nAn old woman is whittling a little dog-headed figure from wood.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'farmers_village', - prerequisite: Prerequisite(829538554, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'farmers_village', + prerequisite: Prerequisite( + 829538554, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake1) && !c.hasHappened(evCaravanArrived); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The farmers look a bit more stressed. No more polite nods. Someone\'s repairing a damaged door, others are cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\n', - isRaw: true); - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); }, - isIdle: true, - positionX: 38, - positionY: 78, - mapName: 'Farmers\' Village', - firstMapName: 'Settled Area', - hint: - 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', - firstHint: - 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The farmers look a bit more stressed. No more polite nods. Someone\'s repairing a damaged door, others are cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 38, + positionY: 78, + mapName: 'Farmers\' Village', + firstMapName: 'Settled Area', + hint: + 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', + firstHint: + 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.', +); final talkToAdaAfterQuake2Ink = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -12759,8 +16073,9 @@ final talkToAdaAfterQuake2Ink = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - 'Ada shakes her head. "I\'ll be frank with you, ${youngSirSubstitution}. I don\'t think I have ever seen people this frightened. Seeing the Knights leave like that..." She pauses. "I think it finally hits."\n', - isRaw: true); + 'Ada shakes her head. "I\'ll be frank with you, ${youngSirSubstitution}. I don\'t think I have ever seen people this frightened. Seeing the Knights leave like that..." She pauses. "I think it finally hits."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12771,8 +16086,9 @@ final talkToAdaAfterQuake2Ink = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - 'Ada\'s hand goes through her hair, and she sighs. "Please, ${youngSirSubstitution}, help."\n', - isRaw: true); + 'Ada\'s hand goes through her hair, and she sighs. "Please, ${youngSirSubstitution}, help."\n', + isRaw: true, + ); }), ]); @@ -12783,11 +16099,20 @@ class TalkToAdaAfterQuake2 extends RoamingAction { static final TalkToAdaAfterQuake2 singleton = TalkToAdaAfterQuake2(); @override - List get commandPathTemplate => - ['Ada', 'Talk', '"How are people coping?"']; + List get commandPathTemplate => [ + 'Ada', + 'Talk', + '"How are people coping?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('farmers_village') != true) { return false; } @@ -12799,7 +16124,10 @@ class TalkToAdaAfterQuake2 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12813,7 +16141,10 @@ class TalkToAdaAfterQuake2 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -12824,139 +16155,171 @@ class TalkToAdaAfterQuake2 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room farmersVillageQuake2 = Room( - 'farmers_village_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The corridors here look more like streets. Painted walls on either side, with wooden windows in them, and doors. Well-dressed people run around, trying to repair the damage of the quake, repairing doors, cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\nThe farmers are in full panic. Someone\'s crying about a person on the Slopes.\n\nAmong all this, an old woman is whittling a little dog-headed figure from wood.\n\n', - isRaw: true); - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); + 'farmers_village_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The corridors here look more like streets. Painted walls on either side, with wooden windows in them, and doors. Well-dressed people run around, trying to repair the damage of the quake, repairing doors, cleaning debris. Yet others seem to ignore all that, instead focusing on packing.\n\nThe farmers are in full panic. Someone\'s crying about a person on the Slopes.\n\nAmong all this, an old woman is whittling a little dog-headed figure from wood.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); + c.increaseSanityFromPeople(); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'farmers_village', - prerequisite: Prerequisite(876562067, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'farmers_village', + prerequisite: Prerequisite( + 876562067, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The farmers are in full panic. Someone\'s crying about a person on the Slopes.\n\n', - isRaw: true); - c.describeWorthiness( - who: farmers, - what: [ - akxeId, - dragonEggId, - katanaId, - lairOfGodStarId, - sixtyFiverShieldId, - sixtyFiverSwordId, - hawkmanJacketId - ], - especially: [katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted); }, - isIdle: true, - positionX: 38, - positionY: 78, - mapName: 'Farmers\' Village', - firstMapName: 'Settled Area', - hint: - 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', - firstHint: - 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.'); -final Approach keepGateFromKeepBedroom = - Approach('keep_bedroom', 'keep_gate', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_78dfcecc6 = !c.playerHasVisited('keep_gate') - ? '''I open a massive door and walk through it into a corridor that looks a lot less ornamented than anything in the Keep. I turn around to behold the entrance to this aristocratic home.''' - : ''''''; - s.add('${ifBlock_78dfcecc6}\n', isRaw: true); -}); -final Approach keepGateFromStagingArea = - Approach('staging_area', 'keep_gate', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The farmers are in full panic. Someone\'s crying about a person on the Slopes.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: farmers, + what: [ + akxeId, + dragonEggId, + katanaId, + lairOfGodStarId, + sixtyFiverShieldId, + sixtyFiverSwordId, + hawkmanJacketId + ], + especially: [katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 38, + positionY: 78, + mapName: 'Farmers\' Village', + firstMapName: 'Settled Area', + hint: + 'A settlement of people who farm the vines that grow on the outside of the Pyramid.', + firstHint: + 'From the outside, this part of the Pyramid is covered with vines, and there are clear signs of settlement in the windows.', +); +final Approach keepGateFromKeepBedroom = Approach( + 'keep_bedroom', + 'keep_gate', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_78dfcecc6 = !c.playerHasVisited('keep_gate') + ? '''I open a massive door and walk through it into a corridor that looks a lot less ornamented than anything in the Keep. I turn around to behold the entrance to this aristocratic home.''' + : ''''''; + s.add( + '${ifBlock_78dfcecc6}\n', + isRaw: true, + ); + }, +); +final Approach keepGateFromStagingArea = Approach( + 'staging_area', + 'keep_gate', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final openGateUnlockInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -12965,8 +16328,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I start following the steps I learned. It is quite easy to find the decorative parts that I need to push, turn, or pull: they seem more polished than the rest of the gate. They are polished by fingers performing the ritual over and over again, for decades.\n', - isRaw: true); + 'I start following the steps I learned. It is quite easy to find the decorative parts that I need to push, turn, or pull: they seem more polished than the rest of the gate. They are polished by fingers performing the ritual over and over again, for decades.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -12976,8 +16340,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Finally, I am at the very end of the "algorithm." All that\'s left is to turn the crest in the middle of the gate.\n', - isRaw: true); + 'Finally, I am at the very end of the "algorithm." All that\'s left is to turn the crest in the middle of the gate.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -12990,8 +16355,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am pretty sure it was seven times, a lucky number. When I\'m done with the seventh revolution, I step back. The gate stands still for a while, then something clicks inside.\n', - isRaw: true); + 'I am pretty sure it was seven times, a lucky number. When I\'m done with the seventh revolution, I step back. The gate stands still for a while, then something clicks inside.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13001,8 +16367,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am showered by countless little darts, shooting diagonally from the ceiling. A curtain of blood covers my eyes, and the view of the gate fades to eternal black.\n', - isRaw: true); + 'I am showered by countless little darts, shooting diagonally from the ceiling. A curtain of blood covers my eyes, and the view of the gate fades to eternal black.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13026,8 +16393,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Eight times, like the Eight Gods. When I\'ve finished the eighth revolution, I step back. The gate stands still for a while, then something clicks inside.\nThe wings of the gate open and reveal a beautifully decorated passage into the Keep.\n', - isRaw: true); + 'Eight times, like the Eight Gods. When I\'ve finished the eighth revolution, I step back. The gate stands still for a while, then something clicks inside.\nThe wings of the gate open and reveal a beautifully decorated passage into the Keep.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13050,8 +16418,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am pretty sure it was nine times, nine like cat lives. When I\'m done with the ninth revolution, I step back. The gate stands still for a while, then something clicks inside.\n', - isRaw: true); + 'I am pretty sure it was nine times, nine like cat lives. When I\'m done with the ninth revolution, I step back. The gate stands still for a while, then something clicks inside.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13061,8 +16430,9 @@ final openGateUnlockInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am showered by countless little darts, shooting diagonally from the ceiling. A curtain of blood covers my eyes, and the view of the gate fades to eternal black.\n', - isRaw: true); + 'I am showered by countless little darts, shooting diagonally from the ceiling. A curtain of blood covers my eyes, and the view of the gate fades to eternal black.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13086,10 +16456,19 @@ class AttemptOpenGate extends RoamingAction { static final AttemptOpenGate singleton = AttemptOpenGate(); @override - List get commandPathTemplate => ['Gate', 'Open']; + List get commandPathTemplate => [ + 'Gate', + 'Open', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_gate') != true) { return false; } @@ -13102,20 +16481,27 @@ class AttemptOpenGate extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I attempt to open the gate but it\'s closed tight. Maybe there\'s a trick to unlocking it using some of the intricate woodwork, but my random mashing of various ornaments does nothing.\n\nI could also bring it down using an axe. It\'s wood, after all.\n', - isRaw: true); + 'I attempt to open the gate but it\'s closed tight. Maybe there\'s a trick to unlocking it using some of the intricate woodwork, but my random mashing of various ornaments does nothing.\n\nI could also bring it down using an axe. It\'s wood, after all.\n', + isRaw: true, + ); return '${a.name} successfully performs AttemptOpenGate'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13126,23 +16512,36 @@ class AttemptOpenGate extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13154,10 +16553,19 @@ class DestroyGateWithAxe extends RoamingAction { static final DestroyGateWithAxe singleton = DestroyGateWithAxe(); @override - List get commandPathTemplate => ['Gate', 'Destroy']; + List get commandPathTemplate => [ + 'Gate', + 'Destroy', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_gate') != true) { return false; } @@ -13170,7 +16578,10 @@ class DestroyGateWithAxe extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13183,13 +16594,18 @@ class DestroyGateWithAxe extends RoamingAction { w.recordCustom(evKeepDestroyedGate); - s.add('\nThis reveals a beautifully decorated passage into the Keep.\n', - isRaw: true); + s.add( + '\nThis reveals a beautifully decorated passage into the Keep.\n', + isRaw: true, + ); return '${a.name} successfully performs DestroyGateWithAxe'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13200,23 +16616,36 @@ class DestroyGateWithAxe extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13228,10 +16657,19 @@ class ExamineGate extends RoamingAction { static final ExamineGate singleton = ExamineGate(); @override - List get commandPathTemplate => ['Gate', 'Examine']; + List get commandPathTemplate => [ + 'Gate', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_gate') != true) { return false; } @@ -13239,52 +16677,74 @@ class ExamineGate extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; Ruleset( - Rule(77061314, 1, false, (ApplicabilityContext c) { + Rule( + 77061314, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened('destroy_gate_with_axe'); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - ' The strict simplicity of the ancient building gives way to Nortonian redwood panels. A fine piece of carpentry. Obviously expensive to build. A shame that I had to destroy it.\n', - isRaw: true); - }), - Rule(355928282, 0, false, (ApplicabilityContext c) { + ' The strict simplicity of the ancient building gives way to Nortonian redwood panels. A fine piece of carpentry. Obviously expensive to build. A shame that I had to destroy it.\n', + isRaw: true, + ); + }, + ), + Rule( + 355928282, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - ' The strict simplicity of the ancient building gives way to Nortonian redwood panels. A fine piece of carpentry. Obviously expensive to build.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + ' The strict simplicity of the ancient building gives way to Nortonian redwood panels. A fine piece of carpentry. Obviously expensive to build.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); s.add( - '\nA big warning sign on the wall says "HAUNTED." Below the paint, there is an older, fainter sign. It says "eat the rich."\n', - isRaw: true); + '\nA big warning sign on the wall says "HAUNTED." Below the paint, there is an older, fainter sign. It says "eat the rich."\n', + isRaw: true, + ); return '${a.name} successfully performs ExamineGate'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13295,23 +16755,36 @@ class ExamineGate extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13323,10 +16796,19 @@ class OpenGateUnlock extends RoamingAction { static final OpenGateUnlock singleton = OpenGateUnlock(); @override - List get commandPathTemplate => ['Gate', 'Open']; + List get commandPathTemplate => [ + 'Gate', + 'Open', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_gate') != true) { return false; } @@ -13339,7 +16821,10 @@ class OpenGateUnlock extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13353,7 +16838,10 @@ class OpenGateUnlock extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13364,84 +16852,120 @@ class OpenGateUnlock extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room keepGate = Room('keep_gate', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room keepGate = Room( + 'keep_gate', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'The plain, ancient geometry of the Pyramid\'s hallways is disrupted by a massive gate. The gate is made from dark, richly ornamented redwood, and a rich wet scent fills the space in front of it.\n\nThis is a lord\'s home, except it doesn\'t stand on top of a hill or next to a lake. Instead, it was fashioned from some of the more well-preserved rooms in the ancient building.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 20, - positionY: 81, - mapName: 'The Keep\'s Gate', - firstMapName: 'The Keep', - hint: - 'The entrance to the abandoned aristocratic residence within the Pyramid.', - firstHint: - 'This part of the Pyramid seems to have been rebuilt at some point into an aristocratic residence. This is the floor where I saw the lady with the katana.'); -final Approach keepBedroomFromKeepDining = - Approach('keep_dining', 'keep_bedroom', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach keepBedroomFromKeepGate = - Approach('keep_gate', 'keep_bedroom', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evKeepUnlockedGate) || - c.hasHappened(evKeepDestroyedGate) || - c.playerHasVisited("keep_bedroom"); -}); -final Approach keepBedroomFromKeepServants = - Approach('keep_servants', 'keep_bedroom', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 20, + positionY: 81, + mapName: 'The Keep\'s Gate', + firstMapName: 'The Keep', + hint: + 'The entrance to the abandoned aristocratic residence within the Pyramid.', + firstHint: + 'This part of the Pyramid seems to have been rebuilt at some point into an aristocratic residence. This is the floor where I saw the lady with the katana.', +); +final Approach keepBedroomFromKeepDining = Approach( + 'keep_dining', + 'keep_bedroom', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach keepBedroomFromKeepGate = Approach( + 'keep_gate', + 'keep_bedroom', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evKeepUnlockedGate) || + c.hasHappened(evKeepDestroyedGate) || + c.playerHasVisited("keep_bedroom"); + }, +); +final Approach keepBedroomFromKeepServants = Approach( + 'keep_servants', + 'keep_bedroom', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class ExamineFamilyPortrait extends RoamingAction { @override @@ -13450,10 +16974,19 @@ class ExamineFamilyPortrait extends RoamingAction { static final ExamineFamilyPortrait singleton = ExamineFamilyPortrait(); @override - List get commandPathTemplate => ['Family portrait', 'Examine']; + List get commandPathTemplate => [ + 'Family portrait', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_bedroom') != true) { return false; } @@ -13464,22 +16997,29 @@ class ExamineFamilyPortrait extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The portrait depicts an aristocratic family. Handsome people.\n\nA young, striking lady stands in the front. Her expression is fashionably bored. It is clear the portrait was meant for her, as a memento for her later years. An inscription reads, "For our beloved Lady Hope."\n\n', - isRaw: true); + 'The portrait depicts an aristocratic family. Handsome people.\n\nA young, striking lady stands in the front. Her expression is fashionably bored. It is clear the portrait was meant for her, as a memento for her later years. An inscription reads, "For our beloved Lady Hope."\n\n', + isRaw: true, + ); c.learn(LadyHopeFacts.ladyHopeName); return '${a.name} successfully performs ExamineFamilyPortrait'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13490,23 +17030,36 @@ class ExamineFamilyPortrait extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13518,10 +17071,19 @@ class SearchBedroom extends RoamingAction { static final SearchBedroom singleton = SearchBedroom(); @override - List get commandPathTemplate => ['Furniture', 'Search']; + List get commandPathTemplate => [ + 'Furniture', + 'Search', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_bedroom') != true) { return false; } @@ -13529,20 +17091,27 @@ class SearchBedroom extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Everything is gone. Except: a family portrait. The painting leans against the wall, in clear sight. The looters didn\'t touch it - superstition?\n', - isRaw: true); + 'Everything is gone. Except: a family portrait. The painting leans against the wall, in clear sight. The looters didn\'t touch it - superstition?\n', + isRaw: true, + ); return '${a.name} successfully performs SearchBedroom'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13553,23 +17122,36 @@ class SearchBedroom extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13581,10 +17163,19 @@ class TakeFamilyPortrait extends RoamingAction { static final TakeFamilyPortrait singleton = TakeFamilyPortrait(); @override - List get commandPathTemplate => ['Family portrait', 'Take']; + List get commandPathTemplate => [ + 'Family portrait', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_bedroom') != true) { return false; } @@ -13595,22 +17186,29 @@ class TakeFamilyPortrait extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I take the family portrait. It\'s kind of unwieldy and awkward to hold, so I keep it in front of me.\n\n', - isRaw: true); + 'I take the family portrait. It\'s kind of unwieldy and awkward to hold, so I keep it in front of me.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(familyPortrait); return '${a.name} successfully performs TakeFamilyPortrait'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13621,177 +17219,238 @@ class TakeFamilyPortrait extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room keepBedroom = Room('keep_bedroom', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room keepBedroom = Room( + 'keep_bedroom', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'Redwood parquetry — the wooden flooring of the rich — creaks underfoot.\n\nThis is where the aristocracy lived: the Lord\'s Quarters. The place has been ransacked, and it is mostly covered in dust and spiderwebs. But there is some sign of activity. Smallish footprints, with scratch marks.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 15, - positionY: 82, - mapName: 'Lord\'s Quarters', - hint: 'Though derelict, these are still the nicest parts of the Keep.'); -final Approach keepDiningFromKeepBedroom = - Approach('keep_bedroom', 'keep_dining', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 15, + positionY: 82, + mapName: 'Lord\'s Quarters', + hint: 'Though derelict, these are still the nicest parts of the Keep.', +); +final Approach keepDiningFromKeepBedroom = Approach( + 'keep_bedroom', + 'keep_dining', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final Room keepDining = Room( - 'keep_dining', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_1d766ac55 = c.knows(LadyHopeFacts.ladyHopeName) - ? '''Lady Hope faces me and prepares for battle.''' - : '''An undead woman faces me and prepares for battle. Later, I find out her name is Lady Hope.'''; - s.add('${ifBlock_1d766ac55} I wonder if she’s seen my brother.\n\n', - isRaw: true); - c.learn(LadyHopeFacts.ladyHopeName); + 'keep_dining', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_1d766ac55 = c.knows(LadyHopeFacts.ladyHopeName) + ? '''Lady Hope faces me and prepares for battle.''' + : '''An undead woman faces me and prepares for battle. Later, I find out her name is Lady Hope.'''; + s.add( + '${ifBlock_1d766ac55} I wonder if she’s seen my brother.\n\n', + isRaw: true, + ); + c.learn(LadyHopeFacts.ladyHopeName); + s.add( + '\n![Illustration of Lady Hope, an undead woman with a katana.](hope.png)\n\n', + isRaw: true, + ); + Ruleset( + Rule( + 777155909, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened(evKilledDarg); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' As I approach, a forced, unnatural smile distorts the undead face. I am reminded of my fight with Darg. The necromancer is speaking through dead flesh again.\n', + isRaw: true, + ); + }, + ), + Rule( + 238775476, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' As I approach, a forced, unnatural smile distorts the undead face. I am duly impressed. Someone must be puppeteering the body. A highly skilled necromancer, perhaps.\n\n I risk a quick look around the room. Nobody else is here. The necromancer must be doing this from afar. Even more impressive.\n\n But then, Lady Hope\'s undead lips start moving. She _speaks._\n\n "Welcome, young one." The voice is dry and labored, but nevertheless understandable. A talking corpse is something I\'ve never even considered before. This is obviously necromancy of some higher level.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + s.add( + '\n"You made it rather far, I admit." The body starts walking toward me. "But now you die."\n\n', + isRaw: true, + ); + if (c.hasItem(familyPortraitId)) { s.add( - '\n![Illustration of Lady Hope, an undead woman with a katana.](hope.png)\n\n', - isRaw: true); - Ruleset( - Rule(777155909, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened(evKilledDarg); - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' As I approach, a forced, unnatural smile distorts the undead face. I am reminded of my fight with Darg. The necromancer is speaking through dead flesh again.\n', - isRaw: true); - }), - Rule(238775476, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' As I approach, a forced, unnatural smile distorts the undead face. I am duly impressed. Someone must be puppeteering the body. A highly skilled necromancer, perhaps.\n\n I risk a quick look around the room. Nobody else is here. The necromancer must be doing this from afar. Even more impressive.\n\n But then, Lady Hope\'s undead lips start moving. She _speaks._\n\n "Welcome, young one." The voice is dry and labored, but nevertheless understandable. A talking corpse is something I\'ve never even considered before. This is obviously necromancy of some higher level.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); - s.add( - '\n"You made it rather far, I admit." The body starts walking toward me. "But now you die."\n\n', - isRaw: true); - if (c.hasItem(familyPortraitId)) { - s.add( - 'As she approaches, Lady Hope seems taken aback by the portrait I have with me. This gives me initiative. ', - isRaw: true); - - w.updateActorById( - ladyHopeId, - (b) => b - ..initiative = 0 - ..dexterity = b.dexterity! ~/ 2); - } - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateLadyHopeFight, - null, - isIdle: true, - positionX: 9, - positionY: 81, - mapName: 'Dining Room', - firstMapName: 'Dining Room', - hint: - 'The place where the Lord of the Keep dined with his family. A place with a good view of the redwoods outside.', - firstHint: - 'I can see a female figure silhouetted against a tall window. She is not moving, but I can feel she\'s alive, or at the very least undead. She waits.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Lady Hope is defeated, but her head is still talking.\n\n"I see you, young friend," the head says. "I see your ambition. I see your talents. I see your brutality, which I like most of all."\n\nA barren approximation of a laugh leaves the throat.\n\n"Too many young people limit themselves," the head continues. "They limit their effect on the world. You don\'t. But I warn you: you\'re not to cross me. You\'re not to ascend to the top. If you do, you die. You are not Doghead. It is not your fate to save this place. And that means, if you cross me, your fate is to die."\n\nAnd then, as if to illustrate the point, Lady Hope\'s face goes to rigor mortis, her features suddenly aging and wrinkling, and she talks no more.\n\n', + 'As she approaches, Lady Hope seems taken aback by the portrait I have with me. This gives me initiative. ', isRaw: true); - c.learn(DogheadFacts.somethingCalledDoghead); - c.markHappened(evKilledHope); - }); -final Approach keepServantsFromKeepBedroom = - Approach('keep_bedroom', 'keep_servants', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.knows(kbKeepServantsLocation); -}); -final Approach keepServantsFromTopOfClimb = - Approach('top_of_climb', 'keep_servants', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + + w.updateActorById( + ladyHopeId, + (b) => b + ..initiative = 0 + ..dexterity = b.dexterity! ~/ 2); + } + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateLadyHopeFight, + null, + isIdle: true, + positionX: 9, + positionY: 81, + mapName: 'Dining Room', + firstMapName: 'Dining Room', + hint: + 'The place where the Lord of the Keep dined with his family. A place with a good view of the redwoods outside.', + firstHint: + 'I can see a female figure silhouetted against a tall window. She is not moving, but I can feel she\'s alive, or at the very least undead. She waits.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Lady Hope is defeated, but her head is still talking.\n\n"I see you, young friend," the head says. "I see your ambition. I see your talents. I see your brutality, which I like most of all."\n\nA barren approximation of a laugh leaves the throat.\n\n"Too many young people limit themselves," the head continues. "They limit their effect on the world. You don\'t. But I warn you: you\'re not to cross me. You\'re not to ascend to the top. If you do, you die. You are not Doghead. It is not your fate to save this place. And that means, if you cross me, your fate is to die."\n\nAnd then, as if to illustrate the point, Lady Hope\'s face goes to rigor mortis, her features suddenly aging and wrinkling, and she talks no more.\n\n', + isRaw: true, + ); + c.learn(DogheadFacts.somethingCalledDoghead); + c.markHappened(evKilledHope); + }, +); +final Approach keepServantsFromKeepBedroom = Approach( + 'keep_bedroom', + 'keep_servants', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.knows(kbKeepServantsLocation); + }, +); +final Approach keepServantsFromTopOfClimb = Approach( + 'top_of_climb', + 'keep_servants', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'I climb down the elevator shaft. All the exits are shut except for one almost at the very bottom of the tower. It leads to a narrow passage paneled with wood, and then into a cramped room inside the Keep.\n', - isRaw: true); -}); + isRaw: true, + ); + }, +); class NorthSkullExamine extends RoamingAction { @override @@ -13800,10 +17459,19 @@ class NorthSkullExamine extends RoamingAction { static final NorthSkullExamine singleton = NorthSkullExamine(); @override - List get commandPathTemplate => ['Device', 'Examine']; + List get commandPathTemplate => [ + 'Device', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_servants') != true) { return false; } @@ -13814,7 +17482,10 @@ class NorthSkullExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13828,13 +17499,17 @@ class NorthSkullExamine extends RoamingAction { ? '''I reach into my pocket and pull out the compass. As I circle the "North Skull," the device always points directly at it.''' : ''''''; s.add( - 'This is a human skull made into a device.\n\n![Illustration of some kind of device inset in a human skull.](northskull.png)\n\nNext to it, crude goblin-tongue writing says "YOU FOUND NORTH SKULL STUPID! GO UP NOW." An arrow points to ${ifBlock_3d15c1ad0}.\n\n${ifBlock_23496a9a8}\n', - isRaw: true); + 'This is a human skull made into a device.\n\n![Illustration of some kind of device inset in a human skull.](northskull.png)\n\nNext to it, crude goblin-tongue writing says "YOU FOUND NORTH SKULL STUPID! GO UP NOW." An arrow points to ${ifBlock_3d15c1ad0}.\n\n${ifBlock_23496a9a8}\n', + isRaw: true, + ); return '${a.name} successfully performs NorthSkullExamine'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13845,23 +17520,36 @@ class NorthSkullExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -13873,10 +17561,19 @@ class NorthSkullTake extends RoamingAction { static final NorthSkullTake singleton = NorthSkullTake(); @override - List get commandPathTemplate => ['North Skull', 'Take']; + List get commandPathTemplate => [ + 'North Skull', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('keep_servants') != true) { return false; } @@ -13887,22 +17584,29 @@ class NorthSkullTake extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I take the North Skull. As I straighten up, my heart stops. Something is moving in the corner of the room. But then I realize it was only my shadow.\n\n', - isRaw: true); + 'I take the North Skull. As I straighten up, my heart stops. Something is moving in the corner of the room. But then I realize it was only my shadow.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(northSkull); return '${a.name} successfully performs NorthSkullTake'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -13913,67 +17617,98 @@ class NorthSkullTake extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room keepServants = Room('keep_servants', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( +final Room keepServants = Room( + 'keep_servants', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'Clear signs of goblin activity: scratches on the floor, a pile of bones in one of the corners, and the stench of goblin excrement. A curious skull-shaped device sits in the middle of the room.\n\n', - isRaw: true); - c.learn(kbKeepServantsLocation); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); -}, null, null, - isIdle: true, - positionX: 19, - positionY: 84, - mapName: 'Servants\' Quarters', - hint: - 'The cramped rooms where the servants of the Keep\'s owner once lived and worked.'); -final Approach pyramidEntranceFromBleedsMain = - Approach('bleeds_main', 'pyramid_entrance', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach pyramidEntranceFromStagingArea = - Approach('staging_area', 'pyramid_entrance', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + isRaw: true, + ); + c.learn(kbKeepServantsLocation); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + null, + null, + isIdle: true, + positionX: 19, + positionY: 84, + mapName: 'Servants\' Quarters', + hint: + 'The cramped rooms where the servants of the Keep\'s owner once lived and worked.', +); +final Approach pyramidEntranceFromBleedsMain = Approach( + 'bleeds_main', + 'pyramid_entrance', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach pyramidEntranceFromStagingArea = Approach( + 'staging_area', + 'pyramid_entrance', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final observeKnightsInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -13982,8 +17717,9 @@ final observeKnightsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'It\'s the only visible entrance to the Pyramid. A recently-added redwood frame decorates the ancient opening. Some lord probably thought that the original shape was too simple, too blunt, too unnatural. Perfect rectangles like that just don\'t feel like a real part of this world.\n', - isRaw: true); + 'It\'s the only visible entrance to the Pyramid. A recently-added redwood frame decorates the ancient opening. Some lord probably thought that the original shape was too simple, too blunt, too unnatural. Perfect rectangles like that just don\'t feel like a real part of this world.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -13992,7 +17728,10 @@ final observeKnightsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('A few paces to the right, an ancient bronze plaque.\n', isRaw: true); + s.add( + 'A few paces to the right, an ancient bronze plaque.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14005,8 +17744,9 @@ final observeKnightsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The bronze tablet is set in a concrete block, overgrown with dark green vines. "Transamerica Pyramid," it says. "Built in 1972." That\'s more than a thousand years ago.\n', - isRaw: true); + 'The bronze tablet is set in a concrete block, overgrown with dark green vines. "Transamerica Pyramid," it says. "Built in 1972." That\'s more than a thousand years ago.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14015,7 +17755,10 @@ final observeKnightsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I look back at the entrance and the Knights.\n', isRaw: true); + s.add( + 'I look back at the entrance and the Knights.\n', + isRaw: true, + ); }), ], ), @@ -14028,7 +17771,10 @@ final observeKnightsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I look at the Knights.\n', isRaw: true); + s.add( + 'I look at the Knights.\n', + isRaw: true, + ); }), ], ), @@ -14040,8 +17786,9 @@ final observeKnightsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Both wear the same uniform, though their helmets differ slightly. They don\'t speak, opting instead to look directly at me or scan the surroundings.\n', - isRaw: true); + 'Both wear the same uniform, though their helmets differ slightly. They don\'t speak, opting instead to look directly at me or scan the surroundings.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14051,8 +17798,9 @@ final observeKnightsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I wonder how it must be, having to spend so much time with a single person, idly waiting together. Do they grow to love each other? Or hate? Both?\n', - isRaw: true); + 'I wonder how it must be, having to spend so much time with a single person, idly waiting together. Do they grow to love each other? Or hate? Both?\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14069,8 +17817,9 @@ final observeKnightsInk = InkAst([ ? '''Miguel''' : '''the man'''; s.add( - 'I see ${ifBlock_7187bc575} secretly looking at ${ifBlock_6d6326fdf}, shaking her head, smiling.\n', - isRaw: true); + 'I see ${ifBlock_7187bc575} secretly looking at ${ifBlock_6d6326fdf}, shaking her head, smiling.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14079,7 +17828,10 @@ final observeKnightsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Both, then. Love _and_ hate.\n', isRaw: true); + s.add( + 'Both, then. Love _and_ hate.\n', + isRaw: true, + ); }), ]); @@ -14090,10 +17842,19 @@ class ObserveKnights extends RoamingAction { static final ObserveKnights singleton = ObserveKnights(); @override - List get commandPathTemplate => ['Entrance', 'Observe']; + List get commandPathTemplate => [ + 'Entrance', + 'Observe', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -14104,7 +17865,10 @@ class ObserveKnights extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14118,7 +17882,10 @@ class ObserveKnights extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14129,62 +17896,81 @@ class ObserveKnights extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room pyramidEntrance = Room('pyramid_entrance', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); - s.add( - 'As ${weSubstitution} approach, I can\'t stop looking up at the structure. The wind changes here, and it brings a musty smell from the vines that envelop the bottom of the building. From this perspective, the Pyramid is especially massive.\n\nTwo Knights, a woman and a man, are on guard.\n\n![Illustration of two Knights: a woman with a sword and a man with a halberd](guards.png)\n\nThe man has been crying, judging from his eyes.\n\nFour stories above, in a corner room of the Pyramid, an eerily motionless woman stands, looking out. She is armed with a gleaming, ancient sword. A katana, from the looks of it.\n\n', - isRaw: true); - c.learn(LadyHopeFacts.ladyInKeep); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - if (c.inRoomWith(miguelId) && - w.actionHasBeenPerformed("talk_to_miguel_greetings")) { - c.describeWorthiness( - who: w.getActorById(miguelId), - what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], - especially: [sixtyFiverShieldId], - how: "{approvingly|with respect}"); - } -}, null, null, - isIdle: true, - positionX: 26, - positionY: 94, - mapName: 'Pyramid Entrance', - firstMapName: 'The Pyramid', - hint: - 'This is the only side of the Pyramid that allows access from outside.', - firstHint: - 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.'); +final Room pyramidEntrance = Room( + 'pyramid_entrance', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + s.add( + 'As ${weSubstitution} approach, I can\'t stop looking up at the structure. The wind changes here, and it brings a musty smell from the vines that envelop the bottom of the building. From this perspective, the Pyramid is especially massive.\n\nTwo Knights, a woman and a man, are on guard.\n\n![Illustration of two Knights: a woman with a sword and a man with a halberd](guards.png)\n\nThe man has been crying, judging from his eyes.\n\nFour stories above, in a corner room of the Pyramid, an eerily motionless woman stands, looking out. She is armed with a gleaming, ancient sword. A katana, from the looks of it.\n\n', + isRaw: true, + ); + c.learn(LadyHopeFacts.ladyInKeep); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + if (c.inRoomWith(miguelId) && + w.actionHasBeenPerformed("talk_to_miguel_greetings")) { + c.describeWorthiness( + who: w.getActorById(miguelId), + what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], + especially: [sixtyFiverShieldId], + how: "{approvingly|with respect}"); + } + }, + null, + null, + isIdle: true, + positionX: 26, + positionY: 94, + mapName: 'Pyramid Entrance', + firstMapName: 'The Pyramid', + hint: 'This is the only side of the Pyramid that allows access from outside.', + firstHint: + 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.', +); final talkToKatAboutDevlingInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -14193,8 +17979,9 @@ final talkToKatAboutDevlingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Kat raises her eyebrows and looks me up and down. "Don\'t underestimate it," she says. "There\'s a reason the Knights are leaving, and it\'s not because we are cowards. The orcs in the Pyramid are well armed, numerous, and bolder every day."\n', - isRaw: true); + 'Kat raises her eyebrows and looks me up and down. "Don\'t underestimate it," she says. "There\'s a reason the Knights are leaving, and it\'s not because we are cowards. The orcs in the Pyramid are well armed, numerous, and bolder every day."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14213,8 +18000,9 @@ final talkToKatAboutDevlingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Does she know about any specific parts of the Pyramid I should avoid? Not really. "You would do well to ask the locals," she says. "There\'s so much I don\'t know about this place."\n', - isRaw: true); + 'Does she know about any specific parts of the Pyramid I should avoid? Not really. "You would do well to ask the locals," she says. "There\'s so much I don\'t know about this place."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14233,7 +18021,10 @@ final talkToKatAboutLadyInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"That\'s Lady Hope. Our local ghost."\n', isRaw: true); + s.add( + '"That\'s Lady Hope. Our local ghost."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14245,7 +18036,10 @@ final talkToKatAboutLadyInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well, I should say\n', isRaw: true); + s.add( + '"Well, I should say\n', + isRaw: true, + ); }), ], ), @@ -14258,7 +18052,10 @@ final talkToKatAboutLadyInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"They don\'t? How are you so sure?"\n', isRaw: true); + s.add( + '"They don\'t? How are you so sure?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14273,8 +18070,9 @@ final talkToKatAboutLadyInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"True, they become meat and bone. I guess you\'d know, even in your young age. Let me correct myself, then. Lady Hope is\n', - isRaw: true); + '"True, they become meat and bone. I guess you\'d know, even in your young age. Let me correct myself, then. Lady Hope is\n', + isRaw: true, + ); }), ], ), @@ -14287,8 +18085,10 @@ final talkToKatAboutLadyInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well, okay then. I\'m going to say Lady Hope is\n', - isRaw: true); + s.add( + '"Well, okay then. I\'m going to say Lady Hope is\n', + isRaw: true, + ); }), ], ), @@ -14303,8 +18103,9 @@ final talkToKatAboutLadyInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'an undead aristocrat. In life, she was a powerful young lady in these parts. A daughter of a lord. Today, she\'s just standing there, watching night and day, with that katana of hers."\n', - isRaw: true); + 'an undead aristocrat. In life, she was a powerful young lady in these parts. A daughter of a lord. Today, she\'s just standing there, watching night and day, with that katana of hers."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14327,8 +18128,9 @@ final talkToKatGreetingsInk = InkAst([ ? ''', though she flinches a bit when she sees my face.''' : ''''''; s.add( - '"Greetings to you!" The woman smiles${ifBlock_303e21bc7}. "My name is Kat."\n', - isRaw: true); + '"Greetings to you!" The woman smiles${ifBlock_303e21bc7}. "My name is Kat."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14341,8 +18143,9 @@ final talkToKatGreetingsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The woman\'s face sharpens. "Kat, yes. That\'s my name. What\'s yours?"\n', - isRaw: true); + 'The woman\'s face sharpens. "Kat, yes. That\'s my name. What\'s yours?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14358,8 +18161,10 @@ final talkToKatGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Yes. But don\'t call me that. And your name is..."\n', - isRaw: true); + s.add( + '"Yes. But don\'t call me that. And your name is..."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14384,7 +18189,10 @@ final talkToKatGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Good to meet you, Aren."\n', isRaw: true); + s.add( + '"Good to meet you, Aren."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14412,11 +18220,17 @@ class TalkToKatAboutBrother extends RoamingAction { List get commandPathTemplate => [ 'Kat, the guardswoman', 'Talk', - '"I\'m looking for a Sarn of Falling Rock."' + '"I\'m looking for a Sarn of Falling Rock."', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -14428,7 +18242,10 @@ class TalkToKatAboutBrother extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14438,15 +18255,19 @@ class TalkToKatAboutBrother extends RoamingAction { final ifBlock_bbc234dd = c.playerHasBrownHair ? '''brown''' : ''''''; final ifBlock_7c7d9c11 = c.playerHasBlondHair ? '''blond''' : ''''''; s.add( - '"Sarn of Falling Rock," she repeats. "I don\'t think I remember that name."\n\nShe looks closer at me. "But those eyes. They look familiar." She nods. "And the ${ifBlock_528a0209b}${ifBlock_bbc234dd}${ifBlock_7c7d9c11} hair. Your brother? Yes, I think I\'ve seen him around here. But that\'s as much as I can tell you, unfortunately."\n\n', - isRaw: true); + '"Sarn of Falling Rock," she repeats. "I don\'t think I remember that name."\n\nShe looks closer at me. "But those eyes. They look familiar." She nods. "And the ${ifBlock_528a0209b}${ifBlock_bbc234dd}${ifBlock_7c7d9c11} hair. Your brother? Yes, I think I\'ve seen him around here. But that\'s as much as I can tell you, unfortunately."\n\n', + isRaw: true, + ); c.learn(SarnFacts.wasHere); return '${a.name} successfully performs TalkToKatAboutBrother'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14457,23 +18278,36 @@ class TalkToKatAboutBrother extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -14488,11 +18322,17 @@ class TalkToKatAboutDevling extends RoamingAction { List get commandPathTemplate => [ 'Kat, the guardswoman', 'Talk', - '“Any advice for someone delving in the Pyramid?”' + '“Any advice for someone delving in the Pyramid?”', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -14504,7 +18344,10 @@ class TalkToKatAboutDevling extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14518,7 +18361,10 @@ class TalkToKatAboutDevling extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14529,23 +18375,36 @@ class TalkToKatAboutDevling extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -14557,11 +18416,20 @@ class TalkToKatAboutLady extends RoamingAction { static final TalkToKatAboutLady singleton = TalkToKatAboutLady(); @override - List get commandPathTemplate => - ['Kat, the guardswoman', 'Talk', '“Who\'s that lady up there?”']; + List get commandPathTemplate => [ + 'Kat, the guardswoman', + 'Talk', + '“Who\'s that lady up there?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -14576,7 +18444,10 @@ class TalkToKatAboutLady extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14590,7 +18461,10 @@ class TalkToKatAboutLady extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14601,23 +18475,36 @@ class TalkToKatAboutLady extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -14630,11 +18517,20 @@ class TalkToKatAboutMiguelMissing extends RoamingAction { TalkToKatAboutMiguelMissing(); @override - List get commandPathTemplate => - ['Kat, the guardswoman', 'Talk', '"Why isn\'t Miguel here?"']; + List get commandPathTemplate => [ + 'Kat, the guardswoman', + 'Talk', + '"Why isn\'t Miguel here?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -14649,18 +18545,27 @@ class TalkToKatAboutMiguelMissing extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('She shakes her head. "Left his post. Went inside."\n', isRaw: true); + s.add( + 'She shakes her head. "Left his post. Went inside."\n', + isRaw: true, + ); return '${a.name} successfully performs TalkToKatAboutMiguelMissing'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14671,23 +18576,36 @@ class TalkToKatAboutMiguelMissing extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -14699,11 +18617,20 @@ class TalkToKatGreetings extends RoamingAction { static final TalkToKatGreetings singleton = TalkToKatGreetings(); @override - List get commandPathTemplate => - ['Guardswoman', 'Talk', '"Greetings."']; + List get commandPathTemplate => [ + 'Guardswoman', + 'Talk', + '"Greetings."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.inRoomWith(katId))) { return false; } @@ -14711,7 +18638,10 @@ class TalkToKatGreetings extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14725,7 +18655,10 @@ class TalkToKatGreetings extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -14736,23 +18669,36 @@ class TalkToKatGreetings extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -14764,7 +18710,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Sarn? Doesn\'t ring a bell. Who is he?"\n', isRaw: true); + s.add( + '"Sarn? Doesn\'t ring a bell. Who is he?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14776,8 +18725,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Miguel looks surprised. "He\'s a warrior, then?"\n', - isRaw: true); + s.add( + 'Miguel looks surprised. "He\'s a warrior, then?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14789,8 +18740,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Ah. He\'s a mender with the Knights," he says.\n', - isRaw: true); + s.add( + '"Ah. He\'s a mender with the Knights," he says.\n', + isRaw: true, + ); }), ], ), @@ -14807,8 +18760,9 @@ final talkToMiguelAboutBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"There are no blacksmiths here." Miguel gestures around, toward the ruins and the forest.\n', - isRaw: true); + '"There are no blacksmiths here." Miguel gestures around, toward the ruins and the forest.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14821,8 +18775,9 @@ final talkToMiguelAboutBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Her?" He looks at his sword and pats it. "She\'s not from here. I bought her in Lywood, years ago, for more coins that I will admit." He smiles for the first time since we met.\n', - isRaw: true); + '"Her?" He looks at his sword and pats it. "She\'s not from here. I bought her in Lywood, years ago, for more coins that I will admit." He smiles for the first time since we met.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -14835,8 +18790,9 @@ final talkToMiguelAboutBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Miguel\'s smile widens. "You get what you pay for. And I\'m taking good care of her, taking her to ..." Miguel stops. "Oh!" He shakes his head, still smiling.\n', - isRaw: true); + 'Miguel\'s smile widens. "You get what you pay for. And I\'m taking good care of her, taking her to ..." Miguel stops. "Oh!" He shakes his head, still smiling.\n', + isRaw: true, + ); }), ], ), @@ -14851,7 +18807,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Oh!" he says.\n', isRaw: true); + s.add( + '"Oh!" he says.\n', + isRaw: true, + ); }), ], ), @@ -14864,8 +18823,9 @@ final talkToMiguelAboutBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I know what you\'re driving at. You mean a _mender._ Your Sarn is a mender with the Knights." He nods.\n', - isRaw: true); + '"I know what you\'re driving at. You mean a _mender._ Your Sarn is a mender with the Knights." He nods.\n', + isRaw: true, + ); }), ], ), @@ -14878,7 +18838,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Oh, you mean a mender," he says.\n', isRaw: true); + s.add( + '"Oh, you mean a mender," he says.\n', + isRaw: true, + ); }), ], ), @@ -14892,7 +18855,10 @@ final talkToMiguelAboutBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well, I don\'t know of a mender called Sarn."\n', isRaw: true); + s.add( + '"Well, I don\'t know of a mender called Sarn."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14902,33 +18868,47 @@ final talkToMiguelAboutBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; Ruleset( - Rule(1015144832, 2, false, (ApplicabilityContext c) { + Rule( + 1015144832, + 2, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.inRoomParent('pyramid_entrance') && c.inRoomWith(katId); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Miguel looks over his shoulder at the Pyramid, then back at me. "Even if he is in there, you would not want to get in. You would want to get out."\n\nThe woman looks at him with a mix of puzzlement and exasperation, then she turns to me.\n\n"This place is no longer safe. Orcs, goblins. Unless you have business with one of the farmers, you shouldn\'t go in."\n', - isRaw: true); - }), - Rule(389695249, 0, false, (ApplicabilityContext c) { + 'Miguel looks over his shoulder at the Pyramid, then back at me. "Even if he is in there, you would not want to get in. You would want to get out."\n\nThe woman looks at him with a mix of puzzlement and exasperation, then she turns to me.\n\n"This place is no longer safe. Orcs, goblins. Unless you have business with one of the farmers, you shouldn\'t go in."\n', + isRaw: true, + ); + }, + ), + Rule( + 389695249, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - })).apply(ActionContext.updatedFrom(c)); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); }), ]); @@ -14948,8 +18928,9 @@ final talkToMiguelAboutDevlingInk = InkAst([ ? '''I've heard locals talk of a device of war called the Dragon Egg.''' : '''the Dragon Egg is worth pursuing for someone like you.'''; s.add( - '"${ifBlock_55fca3a2f} ${ifBlock_c48d1a8b} If I were you, no offense, I\'d try to find any advantage possible against the orcs and the other creatures of the upside."\n', - isRaw: true); + '"${ifBlock_55fca3a2f} ${ifBlock_c48d1a8b} If I were you, no offense, I\'d try to find any advantage possible against the orcs and the other creatures of the upside."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -14972,8 +18953,9 @@ final talkToMiguelAboutDragonEggInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"It\'s an ancient device of war, somewhere in the Pyramid." He shrugs. "No one knows if it\'s good or bad, just that it\'s powerful. If I knew more, I\'d go find it myself, ${youngSirSubstitution}."\n', - isRaw: true); + '"It\'s an ancient device of war, somewhere in the Pyramid." He shrugs. "No one knows if it\'s good or bad, just that it\'s powerful. If I knew more, I\'d go find it myself, ${youngSirSubstitution}."\n', + isRaw: true, + ); }), ]); final talkToMiguelAboutKilledLadyInk = InkAst([ @@ -14983,8 +18965,10 @@ final talkToMiguelAboutKilledLadyInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Miguel nods with respect. "So," he says, "you killed Hope?"\n', - isRaw: true); + s.add( + 'Miguel nods with respect. "So," he says, "you killed Hope?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -15001,8 +18985,9 @@ final talkToMiguelAboutKilledLadyInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Fair point. You have more in you than meets the eye, ${youngSirSubstitution}."\n', - isRaw: true); + '"Fair point. You have more in you than meets the eye, ${youngSirSubstitution}."\n', + isRaw: true, + ); }), ]); final talkToMiguelAboutLadyInk = InkAst([ @@ -15013,8 +18998,9 @@ final talkToMiguelAboutLadyInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Lady Hope," he says. "Our local undead. Just stands there with that sweet katana at the ready."\n', - isRaw: true); + '"Lady Hope," he says. "Our local undead. Just stands there with that sweet katana at the ready."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -15036,8 +19022,9 @@ final talkToMiguelAboutLadyInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well, she sure _looks_ dangerous, doesn\'t she? But that place she\'s standing in is the dining room of the old Keep. Nobody goes near that place."\n', - isRaw: true); + '"Well, she sure _looks_ dangerous, doesn\'t she? But that place she\'s standing in is the dining room of the old Keep. Nobody goes near that place."\n', + isRaw: true, + ); }), ], ), @@ -15051,8 +19038,9 @@ final talkToMiguelAboutLadyInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He smiles. "Didn\'t you notice? She wields the sword like she\'s always ready to slash someone in half. Beautiful weapon."\n', - isRaw: true); + 'He smiles. "Didn\'t you notice? She wields the sword like she\'s always ready to slash someone in half. Beautiful weapon."\n', + isRaw: true, + ); }), ], ), @@ -15065,7 +19053,10 @@ final talkToMiguelGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The Knight nods.\n', isRaw: true); + s.add( + 'The Knight nods.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -15074,8 +19065,10 @@ final talkToMiguelGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Welcome," he says, and there is a bit of sarcasm in his voice.\n', - isRaw: true); + s.add( + '"Welcome," he says, and there is a bit of sarcasm in his voice.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -15094,7 +19087,10 @@ final talkToMiguelGreetingsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Miguel."\n', isRaw: true); + s.add( + '"Miguel."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -15122,11 +19118,17 @@ class TalkToMiguelAboutBrother extends RoamingAction { List get commandPathTemplate => [ 'Miguel, the guardsman', 'Talk', - '"I\'m looking for a Sarn of Falling Rock."' + '"I\'m looking for a Sarn of Falling Rock."', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.inRoomWith(miguelId) && w.actionHasBeenPerformed("talk_to_miguel_greetings") && w.actionNeverUsed("talk_to_kat_about_brother"))) { @@ -15136,7 +19138,10 @@ class TalkToMiguelAboutBrother extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15150,7 +19155,10 @@ class TalkToMiguelAboutBrother extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15161,23 +19169,36 @@ class TalkToMiguelAboutBrother extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -15192,11 +19213,17 @@ class TalkToMiguelAboutDevling extends RoamingAction { List get commandPathTemplate => [ 'Miguel, the guardsman', 'Talk', - '“Any advice for someone delving in the Pyramid?”' + '“Any advice for someone delving in the Pyramid?”', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.inRoomWith(miguelId) && c.inRoomWith(katId) && w.actionHasBeenPerformed("talk_to_miguel_greetings"))) { @@ -15206,7 +19233,10 @@ class TalkToMiguelAboutDevling extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15220,7 +19250,10 @@ class TalkToMiguelAboutDevling extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15231,23 +19264,36 @@ class TalkToMiguelAboutDevling extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -15263,11 +19309,17 @@ class TalkToMiguelAboutDragonEgg extends RoamingAction { List get commandPathTemplate => [ 'Miguel, the guardsman', 'Talk', - '“What do you know about the Dragon Egg?”' + '“What do you know about the Dragon Egg?”', ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.inRoomWith(miguelId) && w.actionHasBeenPerformed("talk_to_miguel_greetings") && c.knows(DragonEggFacts.anAncientWeapon))) { @@ -15277,7 +19329,10 @@ class TalkToMiguelAboutDragonEgg extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15291,7 +19346,10 @@ class TalkToMiguelAboutDragonEgg extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15302,23 +19360,36 @@ class TalkToMiguelAboutDragonEgg extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -15331,11 +19402,20 @@ class TalkToMiguelAboutKilledLady extends RoamingAction { TalkToMiguelAboutKilledLady(); @override - List get commandPathTemplate => - ['Miguel, the guardsman', 'Talk', '"I took care of Lady Hope."']; + List get commandPathTemplate => [ + 'Miguel, the guardsman', + 'Talk', + '"I took care of Lady Hope."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -15349,7 +19429,10 @@ class TalkToMiguelAboutKilledLady extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15363,7 +19446,10 @@ class TalkToMiguelAboutKilledLady extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15374,23 +19460,36 @@ class TalkToMiguelAboutKilledLady extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -15402,11 +19501,20 @@ class TalkToMiguelAboutLady extends RoamingAction { static final TalkToMiguelAboutLady singleton = TalkToMiguelAboutLady(); @override - List get commandPathTemplate => - ['Miguel, the guardsman', 'Talk', '“Who\'s that lady up there?”']; + List get commandPathTemplate => [ + 'Miguel, the guardsman', + 'Talk', + '“Who\'s that lady up there?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -15421,7 +19529,10 @@ class TalkToMiguelAboutLady extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15435,7 +19546,10 @@ class TalkToMiguelAboutLady extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15446,23 +19560,36 @@ class TalkToMiguelAboutLady extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -15474,10 +19601,20 @@ class TalkToMiguelGreetings extends RoamingAction { static final TalkToMiguelGreetings singleton = TalkToMiguelGreetings(); @override - List get commandPathTemplate => ['Guardsman', 'Talk', '"Greetings."']; + List get commandPathTemplate => [ + 'Guardsman', + 'Talk', + '"Greetings."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.inRoomWith(miguelId))) { return false; } @@ -15485,7 +19622,10 @@ class TalkToMiguelGreetings extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15499,7 +19639,10 @@ class TalkToMiguelGreetings extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15510,83 +19653,102 @@ class TalkToMiguelGreetings extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room pyramidEntranceDuringCaravan = Room( - 'pyramid_entrance_during_caravan', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError( - "Player should have been here, as the rule above stipulates."); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - if (c.inRoomWith(miguelId) && - w.actionHasBeenPerformed("talk_to_miguel_greetings")) { - c.describeWorthiness( - who: w.getActorById(miguelId), - what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], - especially: [sixtyFiverShieldId], - how: "{approvingly|with respect}"); - } - }, - null, - null, - parent: 'pyramid_entrance', - prerequisite: Prerequisite(230852794, 3, true, (ApplicabilityContext c) { + 'pyramid_entrance_during_caravan', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError( + "Player should have been here, as the rule above stipulates."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + if (c.inRoomWith(miguelId) && + w.actionHasBeenPerformed("talk_to_miguel_greetings")) { + c.describeWorthiness( + who: w.getActorById(miguelId), + what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], + especially: [sixtyFiverShieldId], + how: "{approvingly|with respect}"); + } + }, + null, + null, + parent: 'pyramid_entrance', + prerequisite: Prerequisite( + 230852794, + 3, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evCaravanArrived) && !c.hasHappened(evCaravanDeparted) && c.playerHasVisited('pyramid_entrance', includeVariants: true); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Beasts of burden can be seen (and smelled) from here. The Bleeds is overflowing with them.\n', - isRaw: true); }, - isIdle: true, - positionX: 26, - positionY: 94, - mapName: 'Pyramid Entrance', - firstMapName: 'The Pyramid', - hint: - 'This is the only side of the Pyramid that allows access from outside.', - firstHint: - 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Beasts of burden can be seen (and smelled) from here. The Bleeds is overflowing with them.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 26, + positionY: 94, + mapName: 'Pyramid Entrance', + firstMapName: 'The Pyramid', + hint: 'This is the only side of the Pyramid that allows access from outside.', + firstHint: + 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.', +); final talkToKatAfterOrcOffensiveInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -15595,8 +19757,9 @@ final talkToKatAfterOrcOffensiveInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It\'s the orcs. They attacked. They took over Oracle\'s observatory, threatened to bring the fight to the farmers. Miguel was right. I cannot leave it be. If you want my help, I\'ll follow you."\n', - isRaw: true); + '"It\'s the orcs. They attacked. They took over Oracle\'s observatory, threatened to bring the fight to the farmers. Miguel was right. I cannot leave it be. If you want my help, I\'ll follow you."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -15621,11 +19784,20 @@ class TalkToKatAfterOrcOffensive extends RoamingAction { TalkToKatAfterOrcOffensive(); @override - List get commandPathTemplate => - ['Kat, the guardswoman', 'Talk', '"What are you doing?"']; + List get commandPathTemplate => [ + 'Kat, the guardswoman', + 'Talk', + '"What are you doing?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('pyramid_entrance') != true) { return false; } @@ -15638,7 +19810,10 @@ class TalkToKatAfterOrcOffensive extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15652,7 +19827,10 @@ class TalkToKatAfterOrcOffensive extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15663,110 +19841,133 @@ class TalkToKatAfterOrcOffensive extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room pyramidEntranceAfterOrcOffensive = Room( - 'pyramid_entrance_after_orc_offensive', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError("Player should have been here."); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - if (c.inRoomWith(miguelId) && - w.actionHasBeenPerformed("talk_to_miguel_greetings")) { - c.describeWorthiness( - who: w.getActorById(miguelId), - what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], - especially: [sixtyFiverShieldId], - how: "{approvingly|with respect}"); - } - }, - null, - null, - parent: 'pyramid_entrance', - prerequisite: Prerequisite(1038023870, 1, true, (ApplicabilityContext c) { + 'pyramid_entrance_after_orc_offensive', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError("Player should have been here."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + if (c.inRoomWith(miguelId) && + w.actionHasBeenPerformed("talk_to_miguel_greetings")) { + c.describeWorthiness( + who: w.getActorById(miguelId), + what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], + especially: [sixtyFiverShieldId], + how: "{approvingly|with respect}"); + } + }, + null, + null, + parent: 'pyramid_entrance', + prerequisite: Prerequisite( + 1038023870, + 1, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evOrcOffensive); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The guardswoman is no longer standing in front of the entrance. She is sitting down on a nearby rock, checking her weapon.\n', - isRaw: true); }, - isIdle: true, - positionX: 26, - positionY: 94, - mapName: 'Pyramid Entrance', - firstMapName: 'The Pyramid', - hint: - 'This is the only side of the Pyramid that allows access from outside.', - firstHint: - 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The guardswoman is no longer standing in front of the entrance. She is sitting down on a nearby rock, checking her weapon.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 26, + positionY: 94, + mapName: 'Pyramid Entrance', + firstMapName: 'The Pyramid', + hint: 'This is the only side of the Pyramid that allows access from outside.', + firstHint: + 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.', +); final Room pyramidEntranceAfterQuake2 = Room( - 'pyramid_entrance_after_quake2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError( - "Player should have been here. Quake 2 only happens after player is in the Pyramid, and this is the only entrance."); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - if (c.inRoomWith(miguelId) && - w.actionHasBeenPerformed("talk_to_miguel_greetings")) { - c.describeWorthiness( - who: w.getActorById(miguelId), - what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], - especially: [sixtyFiverShieldId], - how: "{approvingly|with respect}"); - } - }, - null, - null, - parent: 'pyramid_entrance', - prerequisite: Prerequisite(609066949, 4, true, (ApplicabilityContext c) { + 'pyramid_entrance_after_quake2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError( + "Player should have been here. Quake 2 only happens after player is in the Pyramid, and this is the only entrance."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + if (c.inRoomWith(miguelId) && + w.actionHasBeenPerformed("talk_to_miguel_greetings")) { + c.describeWorthiness( + who: w.getActorById(miguelId), + what: [dragonEggId, katanaId, sixtyFiverShieldId, hawkmanJacketId], + especially: [sixtyFiverShieldId], + how: "{approvingly|with respect}"); + } + }, + null, + null, + parent: 'pyramid_entrance', + prerequisite: Prerequisite( + 609066949, + 4, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15774,61 +19975,82 @@ final Room pyramidEntranceAfterQuake2 = Room( !c.hasHappened(evCaravanDeparted) && true && true; - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The guardswoman is alone. Her companion has left.\n', isRaw: true); }, - isIdle: true, - positionX: 26, - positionY: 94, - mapName: 'Pyramid Entrance', - firstMapName: 'The Pyramid', - hint: - 'This is the only side of the Pyramid that allows access from outside.', - firstHint: - 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.'); -final Approach bleedsMainFromBleedsTraderHut = - Approach('bleeds_trader_hut', 'bleeds_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach bleedsMainFromGoblinSkirmishPatrol = - Approach('goblin_skirmish_patrol', 'bleeds_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach bleedsMainFromMeadowFight = - Approach('meadow_fight', 'bleeds_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.playerHasVisited('bleeds_main'); -}); -final Approach bleedsMainFromPyramidEntrance = - Approach('pyramid_entrance', 'bleeds_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The guardswoman is alone. Her companion has left.\n', + isRaw: true, + ); + }, + isIdle: true, + positionX: 26, + positionY: 94, + mapName: 'Pyramid Entrance', + firstMapName: 'The Pyramid', + hint: 'This is the only side of the Pyramid that allows access from outside.', + firstHint: + 'This is the place. The legendary structure built by the ancients, still upright after centuries. The rest of San Francisco is a wild forest.', +); +final Approach bleedsMainFromBleedsTraderHut = Approach( + 'bleeds_trader_hut', + 'bleeds_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach bleedsMainFromGoblinSkirmishPatrol = Approach( + 'goblin_skirmish_patrol', + 'bleeds_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach bleedsMainFromMeadowFight = Approach( + 'meadow_fight', + 'bleeds_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.playerHasVisited('bleeds_main'); + }, +); +final Approach bleedsMainFromPyramidEntrance = Approach( + 'pyramid_entrance', + 'bleeds_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class BleedsMainObserveVillage extends RoamingAction { @override @@ -15837,10 +20059,19 @@ class BleedsMainObserveVillage extends RoamingAction { static final BleedsMainObserveVillage singleton = BleedsMainObserveVillage(); @override - List get commandPathTemplate => ['Village', 'observe']; + List get commandPathTemplate => [ + 'Village', + 'observe', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -15848,7 +20079,10 @@ class BleedsMainObserveVillage extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15863,37 +20097,52 @@ class BleedsMainObserveVillage extends RoamingAction { ? '''Jisad sits outside on a stool.''' : '''A blind man sits outside on a stool, wearing a coat.'''; Ruleset( - Rule(934960039, 2, false, (ApplicabilityContext c) { + Rule( + 934960039, + 2, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evCaravanArrived) && !c.hasHappened(evCaravanDeparted); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'With the caravan, the village is lively. The villagers have their doors open, talking with each other and with the arrivals.\n\nThe talking and commotion is especially vivid near the local trader\'s building. On the other end of the liveliness spectrum, there\'s a small dwelling with a porch here that most people ignore. ${ifBlock_473d070da}\n', - isRaw: true); - }), - Rule(21078918, 0, false, (ApplicabilityContext c) { + 'With the caravan, the village is lively. The villagers have their doors open, talking with each other and with the arrivals.\n\nThe talking and commotion is especially vivid near the local trader\'s building. On the other end of the liveliness spectrum, there\'s a small dwelling with a porch here that most people ignore. ${ifBlock_473d070da}\n', + isRaw: true, + ); + }, + ), + Rule( + 21078918, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Whichever direction I look, I can see at least a few villagers going about their business. They all walk fast and seldom talk to each other. ${ifBlock_646ab8e51}\n\nEvery door is shut except for two. One is the entrance into the trader\'s shop. The second open door belongs to a small dwelling with a porch. ${ifBlock_2464a34ed}\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + 'Whichever direction I look, I can see at least a few villagers going about their business. They all walk fast and seldom talk to each other. ${ifBlock_646ab8e51}\n\nEvery door is shut except for two. One is the entrance into the trader\'s shop. The second open door belongs to a small dwelling with a porch. ${ifBlock_2464a34ed}\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); c.learn(JisadFacts.blindPerson); @@ -15901,7 +20150,10 @@ class BleedsMainObserveVillage extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -15912,84 +20164,109 @@ class BleedsMainObserveVillage extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room bleedsMain = Room('bleeds_main', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', - isRaw: true); - c.learn(kbTrader); - c.learn(kbGoblinCampSmoke); - - takeInventory(c); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); -}, null, null, - isIdle: true, - positionX: 37, - positionY: 98, - mapName: 'The Bleeds', - firstMapName: 'Some Buildings', - hint: 'This is a small village close to the entrance to the Pyramid.', - firstHint: - 'There seems to be a village or at least a homestead next to the Pyramid.'); -final Approach bleedsTraderHutFromBleedsMain = - Approach('bleeds_main', 'bleeds_trader_hut', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.knows(kbTrader); -}); +final Room bleedsMain = Room( + 'bleeds_main', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', + isRaw: true, + ); + c.learn(kbTrader); + c.learn(kbGoblinCampSmoke); + + takeInventory(c); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + null, + null, + isIdle: true, + positionX: 37, + positionY: 98, + mapName: 'The Bleeds', + firstMapName: 'Some Buildings', + hint: 'This is a small village close to the entrance to the Pyramid.', + firstHint: + 'There seems to be a village or at least a homestead next to the Pyramid.', +); +final Approach bleedsTraderHutFromBleedsMain = Approach( + 'bleeds_main', + 'bleeds_trader_hut', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.knows(kbTrader); + }, +); final bleedsTraderGreetInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -15997,7 +20274,10 @@ final bleedsTraderGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The trader shrugs.\n', isRaw: true); + s.add( + 'The trader shrugs.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16007,8 +20287,9 @@ final bleedsTraderGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It\'s terrible. Everyone is afraid, nobody buys anything. Well, except for travel gear. But we\'re out of that until the next caravan." He glides his hand over the counter to suggest that there is nothing left.\n', - isRaw: true); + '"It\'s terrible. Everyone is afraid, nobody buys anything. Well, except for travel gear. But we\'re out of that until the next caravan." He glides his hand over the counter to suggest that there is nothing left.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16022,8 +20303,9 @@ final bleedsTraderGreetInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Orcs, goblins, kobolds, you name it," he says. "And I get it, ${youngSirSubstitution}. I get it. San Francisco is getting more dangerous every day. But is it _so_ dangerous we all have to leave?\n', - isRaw: true); + '"Orcs, goblins, kobolds, you name it," he says. "And I get it, ${youngSirSubstitution}. I get it. San Francisco is getting more dangerous every day. But is it _so_ dangerous we all have to leave?\n', + isRaw: true, + ); }), ], ), @@ -16036,7 +20318,10 @@ final bleedsTraderGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"People are leaving.\n', isRaw: true); + s.add( + '"People are leaving.\n', + isRaw: true, + ); }), ], ), @@ -16047,7 +20332,10 @@ final bleedsTraderGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Even _he_ wants to leave."\n', isRaw: true); + s.add( + 'Even _he_ wants to leave."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16057,8 +20345,9 @@ final bleedsTraderGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'This is the first time I notice a person sitting in one corner of the room, quietly {polishing a strip of leather|sewing two strips of leather together|pinching holes into a strip of leather}. The man introduces himself as Leroy. He is the trader\'s son.\n', - isRaw: true); + 'This is the first time I notice a person sitting in one corner of the room, quietly {polishing a strip of leather|sewing two strips of leather together|pinching holes into a strip of leather}. The man introduces himself as Leroy. He is the trader\'s son.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16068,8 +20357,9 @@ final bleedsTraderGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well why wouldn\'t I leave, father? We all should. What awaits us here? It\'s just... it\'s just..."\n', - isRaw: true); + '"Well why wouldn\'t I leave, father? We all should. What awaits us here? It\'s just... it\'s just..."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16079,8 +20369,9 @@ final bleedsTraderGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The trader shakes his head and interjects, "What awaits us anywhere else?"\n', - isRaw: true); + 'The trader shakes his head and interjects, "What awaits us anywhere else?"\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16090,8 +20381,9 @@ final bleedsTraderGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"... death or slavery." Leroy deems his point made, ignoring his father\'s interjection. He goes back to his work.\n', - isRaw: true); + '"... death or slavery." Leroy deems his point made, ignoring his father\'s interjection. He goes back to his work.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16111,11 +20403,19 @@ class BleedsTraderGoblinSmoke extends RoamingAction { static final BleedsTraderGoblinSmoke singleton = BleedsTraderGoblinSmoke(); @override - List get commandPathTemplate => - ['Leroy', '“Can you tell me more about that goblin camp?”']; + List get commandPathTemplate => [ + 'Leroy', + '“Can you tell me more about that goblin camp?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_trader_hut') != true) { return false; } @@ -16129,7 +20429,10 @@ class BleedsTraderGoblinSmoke extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16139,23 +20442,29 @@ class BleedsTraderGoblinSmoke extends RoamingAction { assert(c.inRoomWith(leroyId)); s.add( - '\n"It\'s to the west. It doesn\'t seem like there are a lot of goblins there. We thought the Knights would get rid of them for sure."\n\n"But the Knights are leaving," says the trader. He looks at me for reaction and when he doesn\'t get any, he turns back to his son. "The Knights are leaving," he repeats.\n\n', - isRaw: true); + '\n"It\'s to the west. It doesn\'t seem like there are a lot of goblins there. We thought the Knights would get rid of them for sure."\n\n"But the Knights are leaving," says the trader. He looks at me for reaction and when he doesn\'t get any, he turns back to his son. "The Knights are leaving," he repeats.\n\n', + isRaw: true, + ); c.learn(KnightsFacts.knightsAreLeaving); s.add( - '\n"Well," says Leroy, "if we aren\'t leaving this place like they are, it looks like we\'ll have to learn how to live here, without the Knights. We could take up the fight ourselves."\n\nThe trader groans. "Don\'t be stupid, Leroy."\n\n"I mean it! ${ifBlock_191880c16}, you seem to be an adventurous soul. If you ever want my help, just ask." Leroy points to a chest near where he sits. "I have a long dagger and a decent shield, and I can use both."\n\n', - isRaw: true); + '\n"Well," says Leroy, "if we aren\'t leaving this place like they are, it looks like we\'ll have to learn how to live here, without the Knights. We could take up the fight ourselves."\n\nThe trader groans. "Don\'t be stupid, Leroy."\n\n"I mean it! ${ifBlock_191880c16}, you seem to be an adventurous soul. If you ever want my help, just ask." Leroy points to a chest near where he sits. "I have a long dagger and a decent shield, and I can use both."\n\n', + isRaw: true, + ); w.updateActorById(leroyId, (b) => b.npc.isHireable = true); s.add( - '\n"The hell you can! You\'re a trader, Leroy! You\'re no fighter." Leroy\'s father is shaking. When he remembers that I\'m there with them, he apologizes, then turns back to Leroy. "Son, I forget that you are a grown man now. But... it is my wish that you don\'t go."\n', - isRaw: true); + '\n"The hell you can! You\'re a trader, Leroy! You\'re no fighter." Leroy\'s father is shaking. When he remembers that I\'m there with them, he apologizes, then turns back to Leroy. "Son, I forget that you are a grown man now. But... it is my wish that you don\'t go."\n', + isRaw: true, + ); return '${a.name} successfully performs BleedsTraderGoblinSmoke'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16166,23 +20475,36 @@ class BleedsTraderGoblinSmoke extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -16194,11 +20516,19 @@ class BleedsTraderGoblins extends RoamingAction { static final BleedsTraderGoblins singleton = BleedsTraderGoblins(); @override - List get commandPathTemplate => - ['Trader', '“What\'s with all the goblins around here?”']; + List get commandPathTemplate => [ + 'Trader', + '“What\'s with all the goblins around here?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_trader_hut') != true) { return false; } @@ -16211,27 +20541,35 @@ class BleedsTraderGoblins extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The trader bangs on the wooden counter, immediately angry. "Goblins! The suckers are getting cockier and cockier. Among all the problems we have, they\'re the worst. I fear we won\'t get a caravan anytime soon because of them. No caravan means no goods. No goods mean no trade."\n\n', - isRaw: true); + 'The trader bangs on the wooden counter, immediately angry. "Goblins! The suckers are getting cockier and cockier. Among all the problems we have, they\'re the worst. I fear we won\'t get a caravan anytime soon because of them. No caravan means no goods. No goods mean no trade."\n\n', + isRaw: true, + ); assert(c.inRoomWith(leroyId)); s.add( - '\nLeroy smiles wryly. "No trade means no money."\n\nHis father looks at him, annoyed. "No money means no food."\n\nLeroy looks as if he wants to add something, but thinks better of it.\n\nThe trader, obviously satisfied, turns back to me. "The suckers are closing in from all sides. A few months ago they wouldn\'t dare approach the Pyramid. But lately, they come much closer."\n\n"I could see the smoke from one of their camps a while back." Leroy talks to his leather strip.\n\n"What smoke?" the trader says.\n\n"There\'s a camp to the west," Leroy says. "Less than a mile from here."\n\n"There\'s a goblin camp _less_ _than_ _a_ _mile_ from the Bleeds? How do I not know this?"\n\nLeroy seems genuinely surprised. "I thought you knew. Everyone knows."\n\n', - isRaw: true); + '\nLeroy smiles wryly. "No trade means no money."\n\nHis father looks at him, annoyed. "No money means no food."\n\nLeroy looks as if he wants to add something, but thinks better of it.\n\nThe trader, obviously satisfied, turns back to me. "The suckers are closing in from all sides. A few months ago they wouldn\'t dare approach the Pyramid. But lately, they come much closer."\n\n"I could see the smoke from one of their camps a while back." Leroy talks to his leather strip.\n\n"What smoke?" the trader says.\n\n"There\'s a camp to the west," Leroy says. "Less than a mile from here."\n\n"There\'s a goblin camp _less_ _than_ _a_ _mile_ from the Bleeds? How do I not know this?"\n\nLeroy seems genuinely surprised. "I thought you knew. Everyone knows."\n\n', + isRaw: true, + ); c.learn(kbLeroyKnowsGoblinSmoke); return '${a.name} successfully performs BleedsTraderGoblins'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16242,23 +20580,36 @@ class BleedsTraderGoblins extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -16270,10 +20621,19 @@ class BleedsTraderGreet extends RoamingAction { static final BleedsTraderGreet singleton = BleedsTraderGreet(); @override - List get commandPathTemplate => ['Trader', '“How is business?”']; + List get commandPathTemplate => [ + 'Trader', + '“How is business?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_trader_hut') != true) { return false; } @@ -16284,7 +20644,10 @@ class BleedsTraderGreet extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16298,7 +20661,10 @@ class BleedsTraderGreet extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16309,23 +20675,36 @@ class BleedsTraderGreet extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -16338,11 +20717,19 @@ class BleedsTraderTellAboutClearedCamp extends RoamingAction { BleedsTraderTellAboutClearedCamp(); @override - List get commandPathTemplate => - ['Trader', '“No need to worry about that camp anymore.”']; + List get commandPathTemplate => [ + 'Trader', + '“No need to worry about that camp anymore.”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_trader_hut') != true) { return false; } @@ -16354,18 +20741,27 @@ class BleedsTraderTellAboutClearedCamp extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('“What happened?”\n\nI describe the battle to him.\n', isRaw: true); + s.add( + '“What happened?”\n\nI describe the battle to him.\n', + isRaw: true, + ); return '${a.name} successfully performs BleedsTraderTellAboutClearedCamp'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -16376,66 +20772,87 @@ class BleedsTraderTellAboutClearedCamp extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room bleedsTraderHut = Room('bleeds_trader_hut', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( +final Room bleedsTraderHut = Room( + 'bleeds_trader_hut', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( '${weSubstitutionCapitalized} enter a small building made of stone. It\'s dark in here but cozy.\nA gray-haired trader greets me and gestures around.\n\n"Everything is for sale. And for a good price, too."\n\nI don\'t really have any money, so I just nod and smile.\n', - isRaw: true); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); - s.add( + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + s.add( 'The trader {nods|pretends to smile} as ${weSubstitution} enter his shop.\n\n', - isRaw: true); - if (c.inRoomWith(leroyId) && - w.getActorById(leroyId).anatomy.isUndead && - !c.hasHappened(evJisadSeesUndeadLeroy)) { - s.add( - 'He then takes a second look at his son, and freezes. After a long while of silence, he turns to me. "Please have mercy on the soul of this young boy," he says, his eyes wet. "Please release him from... this. Please give him back his death." He looks back at Leroy, and then down on the wooden counter.', - wholeSentence: true); - w.recordCustom(evJisadSeesUndeadLeroy); - } -}, null, null, - isIdle: true, - positionX: 41, - positionY: 96, - mapName: 'Trader\'s Shop', - firstMapName: 'Trader\'s Shop', - hint: - 'The shop of the local trader and his son, Leroy. Sells basic items for the inhabitants of the Bleeds and for the farmers of the Pyramid.', - firstHint: - 'A mossy, stone building without a porch. The sign "Trader" is written above a window in simple graffiti letters.'); + isRaw: true, + ); + if (c.inRoomWith(leroyId) && + w.getActorById(leroyId).anatomy.isUndead && + !c.hasHappened(evJisadSeesUndeadLeroy)) { + s.add( + 'He then takes a second look at his son, and freezes. After a long while of silence, he turns to me. "Please have mercy on the soul of this young boy," he says, his eyes wet. "Please release him from... this. Please give him back his death." He looks back at Leroy, and then down on the wooden counter.', + wholeSentence: true); + w.recordCustom(evJisadSeesUndeadLeroy); + } + }, + null, + null, + isIdle: true, + positionX: 41, + positionY: 96, + mapName: 'Trader\'s Shop', + firstMapName: 'Trader\'s Shop', + hint: + 'The shop of the local trader and his son, Leroy. Sells basic items for the inhabitants of the Bleeds and for the farmers of the Pyramid.', + firstHint: + 'A mossy, stone building without a porch. The sign "Trader" is written above a window in simple graffiti letters.', +); final bleedsBlindGuideBigOInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -16444,8 +20861,9 @@ final bleedsBlindGuideBigOInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Jisad points to the top of the Pyramid, or at least where he thinks it is. He\'s not too far off, considering his blindness. "The wizard." He puts his hand down and spits. "Or at least that\'s what everyone assumes."\n', - isRaw: true); + 'Jisad points to the top of the Pyramid, or at least where he thinks it is. He\'s not too far off, considering his blindness. "The wizard." He puts his hand down and spits. "Or at least that\'s what everyone assumes."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16466,7 +20884,10 @@ final bleedsBlindGuideBigOInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Yeah, well, he\'s a secretive fella. All we\n', isRaw: true); + s.add( + '"Yeah, well, he\'s a secretive fella. All we\n', + isRaw: true, + ); }), ], ), @@ -16481,8 +20902,9 @@ final bleedsBlindGuideBigOInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"He\'s all the way up there, ${youngSirSubstitution}. It\'s not like we can pay him a visit, and he has not come down my entire life. All I\n', - isRaw: true); + '"He\'s all the way up there, ${youngSirSubstitution}. It\'s not like we can pay him a visit, and he has not come down my entire life. All I\n', + isRaw: true, + ); }), ], ), @@ -16494,8 +20916,9 @@ final bleedsBlindGuideBigOInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'know is that there\'s someone up there, above the orcs. People say there are strange lights coming out of those top floors some nights."\n', - isRaw: true); + 'know is that there\'s someone up there, above the orcs. People say there are strange lights coming out of those top floors some nights."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16514,8 +20937,10 @@ final bleedsBlindGuideBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"I don\'t think I\'ve met the fella. Sorry. Ask around."\n', - isRaw: true); + s.add( + '"I don\'t think I\'ve met the fella. Sorry. Ask around."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16527,7 +20952,10 @@ final bleedsBlindGuideBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"That depends. What was he doing here?"\n', isRaw: true); + s.add( + '"That depends. What was he doing here?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16540,8 +20968,9 @@ final bleedsBlindGuideBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Well, then, ask the Knights. Most of them are still here, though the lot are trying to leave as we speak." Jisad shrugs.\n', - isRaw: true); + '"Well, then, ask the Knights. Most of them are still here, though the lot are trying to leave as we speak." Jisad shrugs.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16558,7 +20987,10 @@ final bleedsBlindGuideBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"You can also always\n', isRaw: true); + s.add( + '"You can also always\n', + isRaw: true, + ); }), ], ), @@ -16572,8 +21004,9 @@ final bleedsBlindGuideBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Jisad nods solemnly. "Well then, you will have to ask everybody, won\'t you? Or, of course, if you make it that far, you can\n', - isRaw: true); + 'Jisad nods solemnly. "Well then, you will have to ask everybody, won\'t you? Or, of course, if you make it that far, you can\n', + isRaw: true, + ); }), ], ), @@ -16584,8 +21017,10 @@ final bleedsBlindGuideBrotherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('ask Oracle. She\'s the most knowledgeable of us all."\n', - isRaw: true); + s.add( + 'ask Oracle. She\'s the most knowledgeable of us all."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16608,8 +21043,9 @@ final bleedsBlindGuideBrotherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Finding anyone in this mess is tough. If you make it that far, you should ask Oracle. She\'s the one who makes it her job to _know_ things."\n', - isRaw: true); + '"Finding anyone in this mess is tough. If you make it that far, you should ask Oracle. She\'s the one who makes it her job to _know_ things."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16632,8 +21068,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Oh, you\'re still here? The first and foremost piece of advice I give to anyone who asks about being in this place: don\'t. Turn around. Be somewhere else."\n', - isRaw: true); + '"Oh, you\'re still here? The first and foremost piece of advice I give to anyone who asks about being in this place: don\'t. Turn around. Be somewhere else."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16645,7 +21082,10 @@ final bleedsBlindGuideDelvingInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Goodbye."\n', isRaw: true); + s.add( + '"Goodbye."\n', + isRaw: true, + ); }), ], ), @@ -16659,8 +21099,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Jisad sighs. "Know your limits. There are orcs on the higher floors. They are dangerous. They are well equipped, well fed, and well organized." He purses his lips and starts nodding.\n', - isRaw: true); + 'Jisad sighs. "Know your limits. There are orcs on the higher floors. They are dangerous. They are well equipped, well fed, and well organized." He purses his lips and starts nodding.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16674,8 +21115,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"I wasn\'t finished, ${youngSirSubstitution}. Goblins are dangerous, sure, but you\'re unlikely to find them in the Pyramid.\n', - isRaw: true); + '"I wasn\'t finished, ${youngSirSubstitution}. Goblins are dangerous, sure, but you\'re unlikely to find them in the Pyramid.\n', + isRaw: true, + ); }), ], ), @@ -16689,8 +21131,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I\'d tell you if you let me finish. Eight Gods, I like young enthusiasm but sometimes... Anyway.\n', - isRaw: true); + '"I\'d tell you if you let me finish. Eight Gods, I like young enthusiasm but sometimes... Anyway.\n', + isRaw: true, + ); }), ], ), @@ -16702,8 +21145,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'You are unlikely to beat the orcs alone, with whatever weapons you have brought. As always, it\'s best to find friends, allies. There are powerful devices of war to be had in the Pyramid, like the Dragon Egg or a katana."\n', - isRaw: true); + 'You are unlikely to beat the orcs alone, with whatever weapons you have brought. As always, it\'s best to find friends, allies. There are powerful devices of war to be had in the Pyramid, like the Dragon Egg or a katana."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16712,8 +21156,10 @@ final bleedsBlindGuideDelvingInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('He scratches just under one of his unseeing eyes.\n', - isRaw: true); + s.add( + 'He scratches just under one of his unseeing eyes.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16723,8 +21169,9 @@ final bleedsBlindGuideDelvingInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"And remember, you can always just turn around and run away from here."\n', - isRaw: true); + '"And remember, you can always just turn around and run away from here."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16748,8 +21195,9 @@ final bleedsBlindGuideDragonEggInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It\'s supposed to be a powerful device of war. Not sure where it is, but I don\'t think anyone has it, or we\'d know about it, I\'m sure. Maybe it\'s lost somewhere. I kind of hope it is."\n', - isRaw: true); + '"It\'s supposed to be a powerful device of war. Not sure where it is, but I don\'t think anyone has it, or we\'d know about it, I\'m sure. Maybe it\'s lost somewhere. I kind of hope it is."\n', + isRaw: true, + ); }), ]); final bleedsBlindGuideGoblinsInk = InkAst([ @@ -16760,8 +21208,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Not completely, of course. There were always raiders. But not like this." The man shakes his head. "It\'s like the goblins are being drawn here."\n', - isRaw: true); + '"Not completely, of course. There were always raiders. But not like this." The man shakes his head. "It\'s like the goblins are being drawn here."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16774,8 +21223,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"They\'re goblins. They want to raid. They want steel and slaves." He thinks for a while. "But it\'s strange. They come in larger numbers than you would think makes sense. They\'d get more slaves and more steel elsewhere."\n', - isRaw: true); + '"They\'re goblins. They want to raid. They want steel and slaves." He thinks for a while. "But it\'s strange. They come in larger numbers than you would think makes sense. They\'d get more slaves and more steel elsewhere."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16788,8 +21238,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Nonsense. Goblins fear these kinds of things. Even if they didn\'t, they\'d probably get slaughtered by the orcs. Oh, that\'s something I\'d like to see." He absentmindedly touches his face just under the left eye.\n', - isRaw: true); + '"Nonsense. Goblins fear these kinds of things. Even if they didn\'t, they\'d probably get slaughtered by the orcs. Oh, that\'s something I\'d like to see." He absentmindedly touches his face just under the left eye.\n', + isRaw: true, + ); }), ], ), @@ -16803,8 +21254,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"No. Well, I suspect there\'s some magic at play." He sighs.\n', - isRaw: true); + '"No. Well, I suspect there\'s some magic at play." He sighs.\n', + isRaw: true, + ); }), ], ), @@ -16824,8 +21276,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Anyway. The goblins _are_ getting awfully bold. I\'ve heard a band has made their camp not far from here. So close that people can see their campfire\'s smoke sometimes." He shudders. "Can you see it?"\n', - isRaw: true); + '"Anyway. The goblins _are_ getting awfully bold. I\'ve heard a band has made their camp not far from here. So close that people can see their campfire\'s smoke sometimes." He shudders. "Can you see it?"\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16838,8 +21291,9 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"It must be a harrowing sight. A herald of our own future, possibly."\n', - isRaw: true); + '"It must be a harrowing sight. A herald of our own future, possibly."\n', + isRaw: true, + ); }), ], ), @@ -16852,7 +21306,10 @@ final bleedsBlindGuideGoblinsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"Well, that\'s good to know."\n', isRaw: true); + s.add( + '"Well, that\'s good to know."\n', + isRaw: true, + ); }), ], ), @@ -16866,8 +21323,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Hello there. Nice to meet you! I am Jisad, the blind guide." He smiles.\n', - isRaw: true); + '"Hello there. Nice to meet you! I am Jisad, the blind guide." He smiles.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16889,8 +21347,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I know a lot about this place, and because I am — you know — blind, everyone around here calls me the blind guide." He smiles and leans over, lowering his voice. "I think they find it funny."\n', - isRaw: true); + '"I know a lot about this place, and because I am — you know — blind, everyone around here calls me the blind guide." He smiles and leans over, lowering his voice. "I think they find it funny."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16905,8 +21364,10 @@ final bleedsBlindGuideGreetInk = InkAst([ final ifBlock_3c961d43e = c.playerHasWoodenFoot ? '''I'm guessing you've heard your share of jokes like that, and worse, judging from the sound one of your feet makes. ''' : ''''''; - s.add('He nods. "${ifBlock_3c961d43e}And your name?"\n', - isRaw: true); + s.add( + 'He nods. "${ifBlock_3c961d43e}And your name?"\n', + isRaw: true, + ); }), ], ), @@ -16920,8 +21381,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He shrugs. "I don\'t mind it. At least they acknowledge I\'m useful. I wouldn\'t trade nicknames with {Flatfoot Herman|Ham Fist Felix} over there, for example." He nods in the general direction of the center of the village and laughs. "What\'s your name?"\n', - isRaw: true); + 'He shrugs. "I don\'t mind it. At least they acknowledge I\'m useful. I wouldn\'t trade nicknames with {Flatfoot Herman|Ham Fist Felix} over there, for example." He nods in the general direction of the center of the village and laughs. "What\'s your name?"\n', + isRaw: true, + ); }), ], ), @@ -16949,7 +21411,10 @@ final bleedsBlindGuideGreetInk = InkAst([ final ifBlock_4f472a646 = c.playerHasBurntFace ? '''It is so nice to talk to someone who does not see my face.''' : ''''''; - s.add('${ifBlock_68f52de56}${ifBlock_4f472a646}\n', isRaw: true); + s.add( + '${ifBlock_68f52de56}${ifBlock_4f472a646}\n', + isRaw: true, + ); }), ], ), @@ -16962,8 +21427,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Welcome to San Francisco, Aren." Jisad spreads his arms and pretends to look around with his unseeing eyes. "Beautiful, no?" He grins. I take in the ruins, overgrown with redwood trees, and the shacks of the Bleeds nestled among them.\n', - isRaw: true); + '"Welcome to San Francisco, Aren." Jisad spreads his arms and pretends to look around with his unseeing eyes. "Beautiful, no?" He grins. I take in the ruins, overgrown with redwood trees, and the shacks of the Bleeds nestled among them.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -16973,8 +21439,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"You just arrived. Must be tired. I\'ll give you this." He pulls up a green apple. "It\'s a Fruit grown on the Slopes of the Pyramid."\n', - isRaw: true); + '"You just arrived. Must be tired. I\'ll give you this." He pulls up a green apple. "It\'s a Fruit grown on the Slopes of the Pyramid."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -16987,8 +21454,9 @@ final bleedsBlindGuideGreetInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He laughs. "And it isn\'t! Much more invigorating than a normal fruit, you\'ll find."\n', - isRaw: true); + 'He laughs. "And it isn\'t! Much more invigorating than a normal fruit, you\'ll find."\n', + isRaw: true, + ); }), ], ), @@ -17001,7 +21469,10 @@ final bleedsBlindGuideGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"You are welcome."\n', isRaw: true); + s.add( + '"You are welcome."\n', + isRaw: true, + ); }), ], ), @@ -17013,7 +21484,10 @@ final bleedsBlindGuideGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I take the apple.\n', isRaw: true); + s.add( + 'I take the apple.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17030,7 +21504,10 @@ final bleedsBlindGuideGreetInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('"The next one will not be for free, Aren."\n', isRaw: true); + s.add( + '"The next one will not be for free, Aren."\n', + isRaw: true, + ); }), ]); final bleedsBlindGuideOracleInk = InkAst([ @@ -17042,8 +21519,9 @@ final bleedsBlindGuideOracleInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"What, you\'re still here? Damn, ${youngSirSubstitution}, you\'re persistent." Jisad clicks with his tongue. "Oracle. She\'s not been here as long as I, but she knows more about this place than anyone."\n', - isRaw: true); + '"What, you\'re still here? Damn, ${youngSirSubstitution}, you\'re persistent." Jisad clicks with his tongue. "Oracle. She\'s not been here as long as I, but she knows more about this place than anyone."\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -17056,8 +21534,9 @@ final bleedsBlindGuideOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Books." Jisad shrugs and points at where his eyes once were. "She reads them. And then she trades that information for even more information from others."\n', - isRaw: true); + '"Books." Jisad shrugs and points at where his eyes once were. "She reads them. And then she trades that information for even more information from others."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17066,7 +21545,10 @@ final bleedsBlindGuideOracleInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('He sighs. "You\'ll find her\n', isRaw: true); + s.add( + 'He sighs. "You\'ll find her\n', + isRaw: true, + ); }), ], ), @@ -17080,8 +21562,9 @@ final bleedsBlindGuideOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"No," he chuckles. "She came as a young woman, working as a servant in the Keep on the fifth floor. But, I\'m at least as old as she is, and I was born here."\n', - isRaw: true); + '"No," he chuckles. "She came as a young woman, working as a servant in the Keep on the fifth floor. But, I\'m at least as old as she is, and I was born here."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17091,8 +21574,9 @@ final bleedsBlindGuideOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He shifts. "I remember more. But, the books she reads remember yet more. She trades that information, and other news she acquires,\n', - isRaw: true); + 'He shifts. "I remember more. But, the books she reads remember yet more. She trades that information, and other news she acquires,\n', + isRaw: true, + ); }), ], ), @@ -17104,8 +21588,9 @@ final bleedsBlindGuideOracleInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'on the east side of the Pyramid. She has a room just below the Battlefield floor. Quite dangerous, this close to the orcs. But the height gives her an advantage. A better view of the surroundings."\n', - isRaw: true); + 'on the east side of the Pyramid. She has a room just below the Battlefield floor. Quite dangerous, this close to the orcs. But the height gives her an advantage. A better view of the surroundings."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17125,8 +21610,9 @@ final bleedsBlindGuideOrcsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"I was here when the orcs first came, when they took over the very top of the Pyramid. I think they came with Big O, or at least their coming woke Big O to activity." He sniffs. "The orcs later pushed down, taking the Lair of God, desecrating it with some vile creature."\n', - isRaw: true); + '"I was here when the orcs first came, when they took over the very top of the Pyramid. I think they came with Big O, or at least their coming woke Big O to activity." He sniffs. "The orcs later pushed down, taking the Lair of God, desecrating it with some vile creature."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17135,7 +21621,10 @@ final bleedsBlindGuideOrcsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Jisad shakes his head.\n', isRaw: true); + s.add( + 'Jisad shakes his head.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17146,8 +21635,9 @@ final bleedsBlindGuideOrcsInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"I have been here for a long time, ${youngSirSubstitution}. But I don\'t know why they came or what they are doing."\n', - isRaw: true); + '"I have been here for a long time, ${youngSirSubstitution}. But I don\'t know why they came or what they are doing."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17169,8 +21659,9 @@ final bleedsBlindGuideQuake1Ink = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"Yes, ${youngSirSubstitution}. We have these quite often, at least one a day. They don\'t seem to be too serious, thank the Eight Gods."\n', - isRaw: true); + '"Yes, ${youngSirSubstitution}. We have these quite often, at least one a day. They don\'t seem to be too serious, thank the Eight Gods."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17192,8 +21683,9 @@ final bleedsBlindGuideQuake1Ink = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Why does anything happen? Why is the wind blowing, ruffling our hair? Why is the sea full of salt and hatred? Why are birds singing, instead of just yelling like the other animals?" He shrugs. "These are questions for the gods, not for a blind man."\n', - isRaw: true); + '"Why does anything happen? Why is the wind blowing, ruffling our hair? Why is the sea full of salt and hatred? Why are birds singing, instead of just yelling like the other animals?" He shrugs. "These are questions for the gods, not for a blind man."\n', + isRaw: true, + ); }), ], ), @@ -17206,7 +21698,10 @@ final bleedsBlindGuideQuake1Ink = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Jisad nods.\n', isRaw: true); + s.add( + 'Jisad nods.\n', + isRaw: true, + ); }), ], ), @@ -17220,8 +21715,9 @@ final bleedsBlindGuideWhatsWrongInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Oh!" Jisad slaps his knee. "Everything! I was born and raised in these ancient ruins. It was always a little bit crazy here but never like this. The Knights are leaving. The orcs at the upper floors are getting bolder every day. There are bands of goblins closing in on this place."\n', - isRaw: true); + '"Oh!" Jisad slaps his knee. "Everything! I was born and raised in these ancient ruins. It was always a little bit crazy here but never like this. The Knights are leaving. The orcs at the upper floors are getting bolder every day. There are bands of goblins closing in on this place."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17244,8 +21740,9 @@ final bleedsBlindGuideWhatsWrongInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Because magic is power, and power corrupts. This place is _infused_ with magic. And the world has noticed."\n', - isRaw: true); + '"Because magic is power, and power corrupts. This place is _infused_ with magic. And the world has noticed."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -17255,8 +21752,9 @@ final bleedsBlindGuideWhatsWrongInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The man turns his unseeing face almost precisely at me. "Go away. Leave this place. Forgo the magic and keep your life."\n', - isRaw: true); + 'The man turns his unseeing face almost precisely at me. "Go away. Leave this place. Forgo the magic and keep your life."\n', + isRaw: true, + ); }), ], ), @@ -17270,8 +21768,9 @@ final bleedsBlindGuideWhatsWrongInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The blind man sighs. "Where would I go?" he says. "What would I do? No. However bad this place gets, I\'ll stay. The Pyramid gave me everything I have — good or bad. I will see this love-hate relationship to the bitter end."\n', - isRaw: true); + 'The blind man sighs. "Where would I go?" he says. "What would I do? No. However bad this place gets, I\'ll stay. The Pyramid gave me everything I have — good or bad. I will see this love-hate relationship to the bitter end."\n', + isRaw: true, + ); }), ], ), @@ -17285,10 +21784,20 @@ class BleedsBlindGuideBigO extends RoamingAction { static final BleedsBlindGuideBigO singleton = BleedsBlindGuideBigO(); @override - List get commandPathTemplate => ['Jisad', 'Talk', '“Who is Big O?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“Who is Big O?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17301,7 +21810,10 @@ class BleedsBlindGuideBigO extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17315,7 +21827,10 @@ class BleedsBlindGuideBigO extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17326,23 +21841,36 @@ class BleedsBlindGuideBigO extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17354,11 +21882,20 @@ class BleedsBlindGuideBrother extends RoamingAction { static final BleedsBlindGuideBrother singleton = BleedsBlindGuideBrother(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '"I\'m looking for a Sarn of Falling Rock."']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '"I\'m looking for a Sarn of Falling Rock."', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17370,7 +21907,10 @@ class BleedsBlindGuideBrother extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17384,7 +21924,10 @@ class BleedsBlindGuideBrother extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17395,23 +21938,36 @@ class BleedsBlindGuideBrother extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17423,11 +21979,20 @@ class BleedsBlindGuideDelving extends RoamingAction { static final BleedsBlindGuideDelving singleton = BleedsBlindGuideDelving(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“Any advice for someone delving in the Pyramid?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“Any advice for someone delving in the Pyramid?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17438,7 +22003,10 @@ class BleedsBlindGuideDelving extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17452,7 +22020,10 @@ class BleedsBlindGuideDelving extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17463,23 +22034,36 @@ class BleedsBlindGuideDelving extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17492,11 +22076,20 @@ class BleedsBlindGuideDragonEgg extends RoamingAction { BleedsBlindGuideDragonEgg(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“What do you know about the Dragon Egg?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“What do you know about the Dragon Egg?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17508,7 +22101,10 @@ class BleedsBlindGuideDragonEgg extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17522,7 +22118,10 @@ class BleedsBlindGuideDragonEgg extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17533,23 +22132,36 @@ class BleedsBlindGuideDragonEgg extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17561,11 +22173,20 @@ class BleedsBlindGuideGoblins extends RoamingAction { static final BleedsBlindGuideGoblins singleton = BleedsBlindGuideGoblins(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“The goblins are new here?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“The goblins are new here?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17576,7 +22197,10 @@ class BleedsBlindGuideGoblins extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17590,7 +22214,10 @@ class BleedsBlindGuideGoblins extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17601,23 +22228,36 @@ class BleedsBlindGuideGoblins extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17629,10 +22269,19 @@ class BleedsBlindGuideGreet extends RoamingAction { static final BleedsBlindGuideGreet singleton = BleedsBlindGuideGreet(); @override - List get commandPathTemplate => ['Blind man', '“Greetings.”']; + List get commandPathTemplate => [ + 'Blind man', + '“Greetings.”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17643,7 +22292,10 @@ class BleedsBlindGuideGreet extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17657,7 +22309,10 @@ class BleedsBlindGuideGreet extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17668,23 +22323,36 @@ class BleedsBlindGuideGreet extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17696,10 +22364,20 @@ class BleedsBlindGuideOracle extends RoamingAction { static final BleedsBlindGuideOracle singleton = BleedsBlindGuideOracle(); @override - List get commandPathTemplate => ['Jisad', 'Talk', '"Who\'s Oracle?"']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '"Who\'s Oracle?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17712,7 +22390,10 @@ class BleedsBlindGuideOracle extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17726,7 +22407,10 @@ class BleedsBlindGuideOracle extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17737,23 +22421,36 @@ class BleedsBlindGuideOracle extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17765,11 +22462,20 @@ class BleedsBlindGuideOrcs extends RoamingAction { static final BleedsBlindGuideOrcs singleton = BleedsBlindGuideOrcs(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“What are the orcs doing in the Pyramid?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“What are the orcs doing in the Pyramid?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17781,7 +22487,10 @@ class BleedsBlindGuideOrcs extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17795,7 +22504,10 @@ class BleedsBlindGuideOrcs extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17806,23 +22518,36 @@ class BleedsBlindGuideOrcs extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17834,11 +22559,20 @@ class BleedsBlindGuideQuake1 extends RoamingAction { static final BleedsBlindGuideQuake1 singleton = BleedsBlindGuideQuake1(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“Was that an earthquake?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“Was that an earthquake?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17851,7 +22585,10 @@ class BleedsBlindGuideQuake1 extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17865,7 +22602,10 @@ class BleedsBlindGuideQuake1 extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17876,23 +22616,36 @@ class BleedsBlindGuideQuake1 extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17905,11 +22658,20 @@ class BleedsBlindGuideWhatsWrong extends RoamingAction { BleedsBlindGuideWhatsWrong(); @override - List get commandPathTemplate => - ['Jisad', 'Talk', '“What\'s wrong here?”']; + List get commandPathTemplate => [ + 'Jisad', + 'Talk', + '“What\'s wrong here?”', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -17920,7 +22682,10 @@ class BleedsBlindGuideWhatsWrong extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17934,7 +22699,10 @@ class BleedsBlindGuideWhatsWrong extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -17945,23 +22713,36 @@ class BleedsBlindGuideWhatsWrong extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -17974,8 +22755,9 @@ final sarnTalkInBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Sarn doesn\'t answer. He rocks back and forth and doesn\'t even look up.\n', - isRaw: true); + 'Sarn doesn\'t answer. He rocks back and forth and doesn\'t even look up.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -17988,8 +22770,9 @@ final sarnTalkInBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Sarn nods, almost imperceptibly. But the rocking continues, and\n', - isRaw: true); + 'Sarn nods, almost imperceptibly. But the rocking continues, and\n', + isRaw: true, + ); }), ], ), @@ -18002,7 +22785,10 @@ final sarnTalkInBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Sarn continues rocking, and\n', isRaw: true); + s.add( + 'Sarn continues rocking, and\n', + isRaw: true, + ); }), ], ), @@ -18013,7 +22799,10 @@ final sarnTalkInBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('he keeps staring into distance.\n', isRaw: true); + s.add( + 'he keeps staring into distance.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -18032,8 +22821,9 @@ final sarnTalkInBleedsInk = InkAst([ ? '''My right hand touches the burnt side of my face.''' : ''''''; s.add( - 'Did I travel all this way, did I go through all this, for nothing? ${ifBlock_2bc5a45df}${ifBlock_62228cd9f}${ifBlock_3528db50c}\n', - isRaw: true); + 'Did I travel all this way, did I go through all this, for nothing? ${ifBlock_2bc5a45df}${ifBlock_62228cd9f}${ifBlock_3528db50c}\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -18043,8 +22833,9 @@ final sarnTalkInBleedsInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I have to finish this. My brother left to seek his adventure, leaving my father and me in poverty and misery. I don\'t owe him anything. But the people living here, under the tyranny of whoever it is at the top, deserve my help.\n', - isRaw: true); + 'I have to finish this. My brother left to seek his adventure, leaving my father and me in poverty and misery. I don\'t owe him anything. But the people living here, under the tyranny of whoever it is at the top, deserve my help.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -18053,8 +22844,10 @@ final sarnTalkInBleedsInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I will show my brother what it is to be a decent human being.\n', - isRaw: true); + s.add( + 'I will show my brother what it is to be a decent human being.\n', + isRaw: true, + ); }), ]); @@ -18065,10 +22858,19 @@ class SarnExamineHisHammer extends RoamingAction { static final SarnExamineHisHammer singleton = SarnExamineHisHammer(); @override - List get commandPathTemplate => ['Sarn\'s hammer', 'Examine']; + List get commandPathTemplate => [ + 'Sarn\'s hammer', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -18080,18 +22882,27 @@ class SarnExamineHisHammer extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The hammer is extremely well made and menacing.\n', isRaw: true); + s.add( + 'The hammer is extremely well made and menacing.\n', + isRaw: true, + ); return '${a.name} successfully performs SarnExamineHisHammer'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18102,23 +22913,36 @@ class SarnExamineHisHammer extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18130,11 +22954,20 @@ class SarnReadLetter extends RoamingAction { static final SarnReadLetter singleton = SarnReadLetter(); @override - List get commandPathTemplate => - ['Inventory', 'Letter from my father', 'Read to Sarn']; + List get commandPathTemplate => [ + 'Inventory', + 'Letter from my father', + 'Read to Sarn', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -18145,20 +22978,27 @@ class SarnReadLetter extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I hope father\'s handwriting and his talk of "dull mountains" might bring Sarn\'s mind back from wherever it is.\n\nHe listens intently. There seems to be a little bit of recognition in his face. By the time I finish reading, he looks happier.\n\nBut, moments later, his face wipes again, and he continues rocking back and forth.\n', - isRaw: true); + 'I hope father\'s handwriting and his talk of "dull mountains" might bring Sarn\'s mind back from wherever it is.\n\nHe listens intently. There seems to be a little bit of recognition in his face. By the time I finish reading, he looks happier.\n\nBut, moments later, his face wipes again, and he continues rocking back and forth.\n', + isRaw: true, + ); return '${a.name} successfully performs SarnReadLetter'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18169,23 +23009,36 @@ class SarnReadLetter extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18197,10 +23050,19 @@ class SarnTakeHisHammer extends RoamingAction { static final SarnTakeHisHammer singleton = SarnTakeHisHammer(); @override - List get commandPathTemplate => ['Sarn\'s hammer', 'Take']; + List get commandPathTemplate => [ + 'Sarn\'s hammer', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -18211,20 +23073,29 @@ class SarnTakeHisHammer extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I take the hammer.\n\n', isRaw: true); + s.add( + 'I take the hammer.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(sarnHammer); return '${a.name} successfully performs SarnTakeHisHammer'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18235,23 +23106,36 @@ class SarnTakeHisHammer extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18263,11 +23147,20 @@ class SarnTalkInBleeds extends RoamingAction { static final SarnTalkInBleeds singleton = SarnTalkInBleeds(); @override - List get commandPathTemplate => - ['Sarn', 'Talk', '"What happened up there?"']; + List get commandPathTemplate => [ + 'Sarn', + 'Talk', + '"What happened up there?"', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('bleeds_main') != true) { return false; } @@ -18278,7 +23171,10 @@ class SarnTalkInBleeds extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18292,7 +23188,10 @@ class SarnTalkInBleeds extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18303,411 +23202,470 @@ class SarnTalkInBleeds extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room bleedsMainDuringCaravan = Room( - 'bleeds_main_during_caravan', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError("Player should have been to the Bleeds already."); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); + 'bleeds_main_during_caravan', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError("Player should have been to the Bleeds already."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'bleeds_main', - prerequisite: Prerequisite(1072163588, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'bleeds_main', + prerequisite: Prerequisite( + 1072163588, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evCaravanArrived) && !c.hasHappened(evCaravanDeparted); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The road that leads from the Pyramid entrance into the forest of San Francisco, passing through the Bleeds, is full of wagons, bulls, and new people. A caravan has arrived. They\'re clearly not stopping for long. The bulls are still in their harnesses, the people are not sitting down, and there is nobody setting up tents.\n\nThere is some commotion around the trader\'s shop, not surprisingly. People are moving goods through the back.\n\n', - isRaw: true); - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); - }, - isIdle: true, - positionX: 37, - positionY: 98, - mapName: 'The Bleeds', - firstMapName: 'Some Buildings', - hint: 'This is a small village close to the entrance to the Pyramid.', - firstHint: - 'There seems to be a village or at least a homestead next to the Pyramid.'); -final Room bleedsMainAfterCaravan = Room( - 'bleeds_main_after_caravan', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError("Player should have been to the Bleeds already."); }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The road that leads from the Pyramid entrance into the forest of San Francisco, passing through the Bleeds, is full of wagons, bulls, and new people. A caravan has arrived. They\'re clearly not stopping for long. The bulls are still in their harnesses, the people are not sitting down, and there is nobody setting up tents.\n\nThere is some commotion around the trader\'s shop, not surprisingly. People are moving goods through the back.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'bleeds_main', - prerequisite: Prerequisite(497066215, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 37, + positionY: 98, + mapName: 'The Bleeds', + firstMapName: 'Some Buildings', + hint: 'This is a small village close to the entrance to the Pyramid.', + firstHint: + 'There seems to be a village or at least a homestead next to the Pyramid.', +); +final Room bleedsMainAfterCaravan = Room( + 'bleeds_main_after_caravan', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError("Player should have been to the Bleeds already."); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'bleeds_main', + prerequisite: Prerequisite( + 497066215, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evCaravanDeparted) && !c.hasHappened(evOrcOffensive); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final ifBlock_370faf1ba = c.playerHasVisited("bleeds_main_during_caravan") - ? '''The caravan has left.''' - : ''''''; - s.add( - 'The road is covered in recent footprints and hoofprints. The air faintly smells of bulls. ${ifBlock_370faf1ba}\n\n', - isRaw: true); - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); }, - isIdle: true, - positionX: 37, - positionY: 98, - mapName: 'The Bleeds', - firstMapName: 'Some Buildings', - hint: 'This is a small village close to the entrance to the Pyramid.', - firstHint: - 'There seems to be a village or at least a homestead next to the Pyramid.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final ifBlock_370faf1ba = c.playerHasVisited("bleeds_main_during_caravan") + ? '''The caravan has left.''' + : ''''''; + s.add( + 'The road is covered in recent footprints and hoofprints. The air faintly smells of bulls. ${ifBlock_370faf1ba}\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 37, + positionY: 98, + mapName: 'The Bleeds', + firstMapName: 'Some Buildings', + hint: 'This is a small village close to the entrance to the Pyramid.', + firstHint: + 'There seems to be a village or at least a homestead next to the Pyramid.', +); final Room bleedsMainAfterQuake1 = Room( - 'bleeds_main_after_quake_1', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', - isRaw: true); - c.learn(kbTrader); - c.learn(kbGoblinCampSmoke); + 'bleeds_main_after_quake_1', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', + isRaw: true, + ); + c.learn(kbTrader); + c.learn(kbGoblinCampSmoke); - takeInventory(c); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); + takeInventory(c); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'bleeds_main', - prerequisite: Prerequisite(477348122, 2, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'bleeds_main', + prerequisite: Prerequisite( + 477348122, + 2, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake1) && !c.hasHappened(evCaravanArrived); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'Small damage after the quake. But locals seem to take it in stride. Is this normal here?\n\n', - isRaw: true); - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); }, - isIdle: true, - positionX: 37, - positionY: 98, - mapName: 'The Bleeds', - firstMapName: 'Some Buildings', - hint: 'This is a small village close to the entrance to the Pyramid.', - firstHint: - 'There seems to be a village or at least a homestead next to the Pyramid.'); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'Small damage after the quake. But locals seem to take it in stride. Is this normal here?\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 37, + positionY: 98, + mapName: 'The Bleeds', + firstMapName: 'Some Buildings', + hint: 'This is a small village close to the entrance to the Pyramid.', + firstHint: + 'There seems to be a village or at least a homestead next to the Pyramid.', +); final Room bleedsMainAfterQuake2 = Room( - 'bleeds_main_after_quake_2', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', - isRaw: true); - c.learn(kbTrader); - c.learn(kbGoblinCampSmoke); + 'bleeds_main_after_quake_2', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'I finally see it. The Pyramid.\n\n![Illustration of a skyscraper with a huge hole in it, but still standing.](pyramid.png)\n\nThe highest tower in the known world, by far. Built ages ago, it still stands — unnaturally well-preserved — above the overgrown rubble that once was a prosperous city of the ancients.\n\nBelow the Pyramid there\'s a small village. Its buildings cluster around the entrance to the towering structure. Later, I learn the locals call the settlement “the Bleeds.”\n\nThere is a trader\'s shop here. A mile to the west, I see a pillar of black smoke rising to the sky.\n\n', + isRaw: true, + ); + c.learn(kbTrader); + c.learn(kbGoblinCampSmoke); - takeInventory(c); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); + takeInventory(c); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); - c.increaseSanityFromPeople(); - }, - null, - null, - parent: 'bleeds_main', - prerequisite: Prerequisite(580504930, 3, true, (ApplicabilityContext c) { + c.increaseSanityFromPeople(); + }, + null, + null, + parent: 'bleeds_main', + prerequisite: Prerequisite( + 580504930, + 3, + true, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return c.hasHappened(evQuake2) && !c.hasHappened(evCaravanDeparted) && c.playerHasVisited("bleeds_main_during_caravan"); - }), - variantUpdateDescribe: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The people are quite a bit more nervous than before. There is talk about a farmer falling to his death on the Slopes.\n\n', - isRaw: true); - c.describeWorthiness( - who: bleedsVillagers, - what: [ - lairOfGodStarId, - akxeId, - sixtyFiverShieldId, - hawkmanJacketId, - dragonEggId, - familyPortraitId, - katanaId, - compassId - ], - especially: [hawkmanJacketId, dragonEggId, katanaId], - how: "{approvingly|with respect}"); - - c.increaseSanityFromPeople(); }, - isIdle: true, - positionX: 37, - positionY: 98, - mapName: 'The Bleeds', - firstMapName: 'Some Buildings', - hint: 'This is a small village close to the entrance to the Pyramid.', - firstHint: - 'There seems to be a village or at least a homestead next to the Pyramid.'); -final Approach goblinSkirmishPatrolFromBleedsMain = - Approach('bleeds_main', 'goblin_skirmish_patrol', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, isApplicable: (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.knows(kbGoblinCampSmoke); -}); + ), + variantUpdateDescribe: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The people are quite a bit more nervous than before. There is talk about a farmer falling to his death on the Slopes.\n\n', + isRaw: true, + ); + c.describeWorthiness( + who: bleedsVillagers, + what: [ + lairOfGodStarId, + akxeId, + sixtyFiverShieldId, + hawkmanJacketId, + dragonEggId, + familyPortraitId, + katanaId, + compassId + ], + especially: [hawkmanJacketId, dragonEggId, katanaId], + how: "{approvingly|with respect}"); + + c.increaseSanityFromPeople(); + }, + isIdle: true, + positionX: 37, + positionY: 98, + mapName: 'The Bleeds', + firstMapName: 'Some Buildings', + hint: 'This is a small village close to the entrance to the Pyramid.', + firstHint: + 'There seems to be a village or at least a homestead next to the Pyramid.', +); +final Approach goblinSkirmishPatrolFromBleedsMain = Approach( + 'bleeds_main', + 'goblin_skirmish_patrol', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + isApplicable: (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.knows(kbGoblinCampSmoke); + }, +); final Approach goblinSkirmishPatrolFromGoblinSkirmishMain = Approach( - 'goblin_skirmish_main', 'goblin_skirmish_patrol', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + 'goblin_skirmish_main', + 'goblin_skirmish_patrol', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final Room goblinSkirmishPatrol = Room( - 'goblin_skirmish_patrol', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitution = - getWeOrI(a, sim, originalWorld, capitalized: false); - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'There is no path in the direction of the smoke. ${weSubstitutionCapitalized} go through the brush and step over logs and ancient rubble.\n\nWhen ${weSubstitution} come out of a particularly nasty shrub, I hear a short, guttural sound. I look up and see a lone goblin with a gray spear. The goblin is completely white — even his eyebrows are unpigmented.\n\n"You lost, peasant?"\n\nHe doesn\'t wait for an answer and readies a spear. The spear is painted white: as white as the albino\'s skin.\n\nThe goblin is starting to advance toward me.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateBleedsGoblinSkirmishPatrol, - null, - positionX: 15, - positionY: 97, - mapName: 'Wilderness near the Bleeds', - firstMapName: 'Smoke', - hint: 'It\'s the place where I met the albino goblin.', - firstHint: - 'The smoke is as black as death but the pillar is narrow. Looks like nothing more than a campfire. Someone is not afraid to be found.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('The fight is over.\n', isRaw: true); - }); + 'goblin_skirmish_patrol', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'There is no path in the direction of the smoke. ${weSubstitutionCapitalized} go through the brush and step over logs and ancient rubble.\n\nWhen ${weSubstitution} come out of a particularly nasty shrub, I hear a short, guttural sound. I look up and see a lone goblin with a gray spear. The goblin is completely white — even his eyebrows are unpigmented.\n\n"You lost, peasant?"\n\nHe doesn\'t wait for an answer and readies a spear. The spear is painted white: as white as the albino\'s skin.\n\nThe goblin is starting to advance toward me.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateBleedsGoblinSkirmishPatrol, + null, + positionX: 15, + positionY: 97, + mapName: 'Wilderness near the Bleeds', + firstMapName: 'Smoke', + hint: 'It\'s the place where I met the albino goblin.', + firstHint: + 'The smoke is as black as death but the pillar is narrow. Looks like nothing more than a campfire. Someone is not afraid to be found.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over.\n', + isRaw: true, + ); + }, +); class ListenContinue extends RoamingAction { @override @@ -18716,10 +23674,19 @@ class ListenContinue extends RoamingAction { static final ListenContinue singleton = ListenContinue(); @override - List get commandPathTemplate => ['Goblins', 'Continue listening']; + List get commandPathTemplate => [ + 'Goblins', + 'Continue listening', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -18731,20 +23698,27 @@ class ListenContinue extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"The only reason we are here, flathead, is the graytower." This is the lower voice of the higher rank. "Look at the device."\n\nThe lower rank starts to growl but apparently thinks better of it. "The come-pass is just a stupid piece of metal. Its maker wants us here, _around_ the graytower. Not _in_ it."\n\n"Oh, you know what the maker wants, do you?"\n', - isRaw: true); + '"The only reason we are here, flathead, is the graytower." This is the lower voice of the higher rank. "Look at the device."\n\nThe lower rank starts to growl but apparently thinks better of it. "The come-pass is just a stupid piece of metal. Its maker wants us here, _around_ the graytower. Not _in_ it."\n\n"Oh, you know what the maker wants, do you?"\n', + isRaw: true, + ); return '${a.name} successfully performs ListenContinue'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18755,23 +23729,36 @@ class ListenContinue extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18783,10 +23770,19 @@ class ListenMore extends RoamingAction { static final ListenMore singleton = ListenMore(); @override - List get commandPathTemplate => ['Goblins', 'Continue listening']; + List get commandPathTemplate => [ + 'Goblins', + 'Continue listening', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -18798,18 +23794,27 @@ class ListenMore extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The two goblins say no more.\n', isRaw: true); + s.add( + 'The two goblins say no more.\n', + isRaw: true, + ); return '${a.name} successfully performs ListenMore'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18820,23 +23825,36 @@ class ListenMore extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18848,10 +23866,19 @@ class ListenToThemArguing extends RoamingAction { static final ListenToThemArguing singleton = ListenToThemArguing(); @override - List get commandPathTemplate => ['Goblins', 'Listen']; + List get commandPathTemplate => [ + 'Goblins', + 'Listen', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -18862,20 +23889,27 @@ class ListenToThemArguing extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '"Why not go now?" a goblin says in a screeching voice. "They are weak. It will be an easy take."\n\n"How do you know they are weak?" This other goblin\'s voice is lower. That tells me he is ranked above the first one. "They can have a platoon of guards."\n\n"Amak was there. He saw no guards!"\n\n"Amak is a fool, and so are you," the higher rank says. "The guards can be in the graytower." He means the Pyramid.\n\n"Another reason not to go to the big building. Let\'s raid instead!"\n', - isRaw: true); + '"Why not go now?" a goblin says in a screeching voice. "They are weak. It will be an easy take."\n\n"How do you know they are weak?" This other goblin\'s voice is lower. That tells me he is ranked above the first one. "They can have a platoon of guards."\n\n"Amak was there. He saw no guards!"\n\n"Amak is a fool, and so are you," the higher rank says. "The guards can be in the graytower." He means the Pyramid.\n\n"Another reason not to go to the big building. Let\'s raid instead!"\n', + isRaw: true, + ); return '${a.name} successfully performs ListenToThemArguing'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18886,23 +23920,36 @@ class ListenToThemArguing extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -18914,10 +23961,19 @@ class ObserveGoblinCamp extends RoamingAction { static final ObserveGoblinCamp singleton = ObserveGoblinCamp(); @override - List get commandPathTemplate => ['Goblins', 'Peek']; + List get commandPathTemplate => [ + 'Goblins', + 'Peek', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -18928,7 +23984,10 @@ class ObserveGoblinCamp extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18936,13 +23995,17 @@ class ObserveGoblinCamp extends RoamingAction { final Storyline s = c.outputStoryline; final weSubstitution = getWeOrI(a, sim, originalWorld, capitalized: false); s.add( - 'I gingerly look over the tree stump and see a campground with a fire pit and a small shelter made of some animal\'s hide. There are three goblins, not two. The third goblin is sleeping. There may be more that I don\'t see, but looking at the size of the campground, it\'s not likely.\n\nThis will not be an easy fight if I choose to attack. But ${weSubstitution} do have the element of surprise.\n', - isRaw: true); + 'I gingerly look over the tree stump and see a campground with a fire pit and a small shelter made of some animal\'s hide. There are three goblins, not two. The third goblin is sleeping. There may be more that I don\'t see, but looking at the size of the campground, it\'s not likely.\n\nThis will not be an easy fight if I choose to attack. But ${weSubstitution} do have the element of surprise.\n', + isRaw: true, + ); return '${a.name} successfully performs ObserveGoblinCamp'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -18953,35 +24016,52 @@ class ObserveGoblinCamp extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Approach goblinSkirmishMainFromGoblinSkirmishPatrol = Approach( - 'goblin_skirmish_patrol', 'goblin_skirmish_main', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + 'goblin_skirmish_patrol', + 'goblin_skirmish_main', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class BarbecuedSquirrelExamine extends RoamingAction { @override @@ -18990,10 +24070,19 @@ class BarbecuedSquirrelExamine extends RoamingAction { static final BarbecuedSquirrelExamine singleton = BarbecuedSquirrelExamine(); @override - List get commandPathTemplate => ['Barbecued squirrel', 'Examine']; + List get commandPathTemplate => [ + 'Barbecued squirrel', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -19004,20 +24093,27 @@ class BarbecuedSquirrelExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'It\'s a meaty squirrel, western gray from the looks of it, thoroughly barbecued and impaled with a thin wooden stick. No one has touched it yet.\n', - isRaw: true); + 'It\'s a meaty squirrel, western gray from the looks of it, thoroughly barbecued and impaled with a thin wooden stick. No one has touched it yet.\n', + isRaw: true, + ); return '${a.name} successfully performs BarbecuedSquirrelExamine'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19028,23 +24124,36 @@ class BarbecuedSquirrelExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -19056,10 +24165,19 @@ class BarbecuedSquirrelTake extends RoamingAction { static final BarbecuedSquirrelTake singleton = BarbecuedSquirrelTake(); @override - List get commandPathTemplate => ['Barbecued Squirrel', 'Take']; + List get commandPathTemplate => [ + 'Barbecued Squirrel', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -19071,20 +24189,29 @@ class BarbecuedSquirrelTake extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I put it in my bag. It smells great.\n\n', isRaw: true); + s.add( + 'I put it in my bag. It smells great.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(barbecuedSquirrel); return '${a.name} successfully performs BarbecuedSquirrelTake'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19095,23 +24222,36 @@ class BarbecuedSquirrelTake extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -19123,10 +24263,19 @@ class CompassExamine extends RoamingAction { static final CompassExamine singleton = CompassExamine(); @override - List get commandPathTemplate => ['Device', 'Examine']; + List get commandPathTemplate => [ + 'Device', + 'Examine', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -19137,20 +24286,27 @@ class CompassExamine extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'A curious, crude device. Round as a pebble, slightly translucent, with a dark spot that moves as I rotate the device. The dark spot always points to one direction. It\'s like a compass. It currently points slightly upwards and toward the Pyramid.\n', - isRaw: true); + 'A curious, crude device. Round as a pebble, slightly translucent, with a dark spot that moves as I rotate the device. The dark spot always points to one direction. It\'s like a compass. It currently points slightly upwards and toward the Pyramid.\n', + isRaw: true, + ); return '${a.name} successfully performs CompassExamine'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19161,23 +24317,36 @@ class CompassExamine extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -19189,10 +24358,19 @@ class CompassTake extends RoamingAction { static final CompassTake singleton = CompassTake(); @override - List get commandPathTemplate => ['Compass', 'Take']; + List get commandPathTemplate => [ + 'Compass', + 'Take', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -19204,21 +24382,29 @@ class CompassTake extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I take the compass and add it to the items I carry.\n\n', - isRaw: true); + s.add( + 'I take the compass and add it to the items I carry.\n\n', + isRaw: true, + ); c.giveNewItemToPlayer(compass); return '${a.name} successfully performs CompassTake'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19229,23 +24415,36 @@ class CompassTake extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -19257,10 +24456,19 @@ class GoblinCampAttack extends RoamingAction { static final GoblinCampAttack singleton = GoblinCampAttack(); @override - List get commandPathTemplate => ['Goblins', 'Attack']; + List get commandPathTemplate => [ + 'Goblins', + 'Attack', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('goblin_skirmish_main') != true) { return false; } @@ -19268,7 +24476,10 @@ class GoblinCampAttack extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19277,47 +24488,66 @@ class GoblinCampAttack extends RoamingAction { final weSubstitutionCapitalized = getWeOrI(a, sim, originalWorld, capitalized: true); Ruleset( - Rule(209276019, 1, false, (ApplicabilityContext c) { + Rule( + 209276019, + 1, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return w.actionHasBeenPerformed("observe_goblin_camp"); - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - ' ${weSubstitutionCapitalized} leap from hiding and charge the goblins. I run past the sleeping goblin and easily kill him as he\'s waking up.\n', - isRaw: true); - }), - Rule(21199514, 0, false, (ApplicabilityContext c) { + ' ${weSubstitutionCapitalized} leap from hiding and charge the goblins. I run past the sleeping goblin and easily kill him as he\'s waking up.\n', + isRaw: true, + ); + }, + ), + Rule( + 21199514, + 0, + false, + (ApplicabilityContext c) { final WorldState w = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; return true; - }, (ActionContext c) { + }, + (ActionContext c) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - ' ${weSubstitutionCapitalized} leap from hiding and charge the goblins. The two I heard arguing sit next to a fire pit. There is another one, sleeping on the ground, close to where I start my attack. I run past him and easily kill him as he\'s waking up.\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); + ' ${weSubstitutionCapitalized} leap from hiding and charge the goblins. The two I heard arguing sit next to a fire pit. There is another one, sleeping on the ground, close to where I start my attack. I run past him and easily kill him as he\'s waking up.\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); s.addParagraph(); s.add( - '\nThe goblins near the fire pit stand up. One of them, I realize, is almost naked and doesn\'t have a weapon near him. He grabs a branch from the fire.\n\nThe other one, the one I decide looks like the leader of the group, readies a razor-sharp, evil-looking hatchet. An ugly scar slants through his face.\n\n"Amak, you f—" he starts saying, but then I am already on him.\n\n', - isRaw: true); + '\nThe goblins near the fire pit stand up. One of them, I realize, is almost naked and doesn\'t have a weapon near him. He grabs a branch from the fire.\n\nThe other one, the one I decide looks like the leader of the group, readies a razor-sharp, evil-looking hatchet. An ugly scar slants through his face.\n\n"Amak, you f—" he starts saying, but then I am already on him.\n\n', + isRaw: true, + ); c.startOptionalFight(); return '${a.name} successfully performs GoblinCampAttack'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19328,78 +24558,101 @@ class GoblinCampAttack extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => true; } final Room goblinSkirmishMain = Room( - 'goblin_skirmish_main', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final weSubstitutionCapitalized = - getWeOrI(a, sim, originalWorld, capitalized: true); - s.add( - 'Suddenly, I hear voices ahead. Two goblins are arguing about something. ${weSubstitutionCapitalized} find a hiding spot behind a tree stump and lay low.\n', - isRaw: true); - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateGoblinCampFight, - null, - fightIsOptional: true, - positionX: 7, - positionY: 95, - mapName: 'Goblin Camp', - firstMapName: 'Closer to the Smoke Stack', - hint: 'A shared place of rest for the goblins who travel through here.', - firstHint: 'Not too far to the source of the smoke now.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'The fight is over, and now I have time to look the camp over. It has clearly been used before: the ground is compacted near the fire, and there are old squirrel bones all over the place. (The killed goblins were about to add another set of bones to the disarray: there\'s a barbecued squirrel on a stick next to the fire.)\n\nThis must be a shared place of rest for the goblins who travel through here. But on what journey?\n\nThere\'s a bag on the ground, and peeking out of it, a curious device.\n\n', - isRaw: true); - c.markHappened(evGoblinCampCleared); - }, - whereDescription: 'near the campfire'); -final Approach startFromPreStartBook = - Approach('pre_start_book', 'start', r'$IMPLICIT', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); + 'goblin_skirmish_main', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final weSubstitutionCapitalized = + getWeOrI(a, sim, originalWorld, capitalized: true); + s.add( + 'Suddenly, I hear voices ahead. Two goblins are arguing about something. ${weSubstitutionCapitalized} find a hiding spot behind a tree stump and lay low.\n', + isRaw: true, + ); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateGoblinCampFight, + null, + fightIsOptional: true, + positionX: 7, + positionY: 95, + mapName: 'Goblin Camp', + firstMapName: 'Closer to the Smoke Stack', + hint: 'A shared place of rest for the goblins who travel through here.', + firstHint: 'Not too far to the source of the smoke now.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'The fight is over, and now I have time to look the camp over. It has clearly been used before: the ground is compacted near the fire, and there are old squirrel bones all over the place. (The killed goblins were about to add another set of bones to the disarray: there\'s a barbecued squirrel on a stick next to the fire.)\n\nThis must be a shared place of rest for the goblins who travel through here. But on what journey?\n\nThere\'s a bag on the ground, and peeking out of it, a curious device.\n\n', + isRaw: true, + ); + c.markHappened(evGoblinCampCleared); + }, + whereDescription: 'near the campfire', +); +final Approach startFromPreStartBook = Approach( + 'pre_start_book', + 'start', + r'$IMPLICIT', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); final startInkInk = InkAst([ InkParagraphNode((ActionContext c) { final WorldState originalWorld = c.world; @@ -19408,8 +24661,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am finally here, in the ancient ruins of San Francisco. I have reached my destination at last. My brother is here, somewhere in this dense forest, among fragments of a long-lost civilization.\n', - isRaw: true); + 'I am finally here, in the ancient ruins of San Francisco. I have reached my destination at last. My brother is here, somewhere in this dense forest, among fragments of a long-lost civilization.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -19691,8 +24945,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am also a necromancer. I can raise the dead, although not very well yet.\n', - isRaw: true); + 'I am also a necromancer. I can raise the dead, although not very well yet.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19709,8 +24964,9 @@ final startInkInk = InkAst([ ? '''his''' : '''her'''; s.add( - 'I am here with Tamara, the deserter. She is the hired sword for my expedition. It is unwise for a young necromancer to be traveling on ${ifBlock_a78affd5} own.\n', - isRaw: true); + 'I am here with Tamara, the deserter. She is the hired sword for my expedition. It is unwise for a young necromancer to be traveling on ${ifBlock_a78affd5} own.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19720,8 +24976,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Tamara has just finished telling me, for the hundredth time, what a stupid idea it was to come here. I tell her there\'s nothing to worry about. The tales about goblins and orcs in the forests of San Francisco are exaggerated.\n', - isRaw: true); + 'Tamara has just finished telling me, for the hundredth time, what a stupid idea it was to come here. I tell her there\'s nothing to worry about. The tales about goblins and orcs in the forests of San Francisco are exaggerated.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19730,7 +24987,10 @@ final startInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('Then of course, a moment later, I\'m proven wrong.\n', isRaw: true); + s.add( + 'Then of course, a moment later, I\'m proven wrong.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19740,8 +25000,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '![Illustration of a ferocious goblin is stepping out of a bush, holding a sword](goblin.png)\n', - isRaw: true); + '![Illustration of a ferocious goblin is stepping out of a bush, holding a sword](goblin.png)\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19751,8 +25012,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'A goblin, bloodlust in his eyes, emerges from his hiding place to stand a few paces in front of us. I look around to see if there are more, but no. He is alone.\n', - isRaw: true); + 'A goblin, bloodlust in his eyes, emerges from his hiding place to stand a few paces in front of us. I look around to see if there are more, but no. He is alone.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -19770,8 +25032,9 @@ final startInkInk = InkAst([ ? '''My wooden stump doesn't help.''' : ''''''; s.add( - 'Tamara seems pleased with this course of action at first. But the agile goblin runs faster through the overgrowth. ${ifBlock_549bd7b58} A few heartbeats later, he\'s almost on us.\n', - isRaw: true); + 'Tamara seems pleased with this course of action at first. But the agile goblin runs faster through the overgrowth. ${ifBlock_549bd7b58} A few heartbeats later, he\'s almost on us.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19784,8 +25047,9 @@ final startInkInk = InkAst([ ? '''I wheeze and cough. The damn asthma.''' : ''''''; s.add( - 'He slashes Tamara\'s leg and she goes down. There is no more running now. ${ifBlock_72e7100f8} But I am able to pick up a solid branch from the ground and I have the initiative now.\n', - isRaw: true); + 'He slashes Tamara\'s leg and she goes down. There is no more running now. ${ifBlock_72e7100f8} But I am able to pick up a solid branch from the ground and I have the initiative now.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19811,8 +25075,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The goblin growls like a wolf, standing above Tamara. She\'s had time to draw her battered sword but not much else. The goblin\n', - isRaw: true); + 'The goblin growls like a wolf, standing above Tamara. She\'s had time to draw her battered sword but not much else. The goblin\n', + isRaw: true, + ); }), ], ), @@ -19829,8 +25094,9 @@ final startInkInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - '"I escape war only to be dragged into _this_ mess?" Tamara says through gritted teeth. But she moves forward, pointing her battered sword at the goblin. With her other hand, she hands me her dagger. "You\'ll need it, ${youngSirSubstitution}."\n', - isRaw: true); + '"I escape war only to be dragged into _this_ mess?" Tamara says through gritted teeth. But she moves forward, pointing her battered sword at the goblin. With her other hand, she hands me her dagger. "You\'ll need it, ${youngSirSubstitution}."\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19850,8 +25116,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The goblin is out of the brush and ready to fight. He gnashes his teeth and snarls. He\n', - isRaw: true); + 'The goblin is out of the brush and ready to fight. He gnashes his teeth and snarls. He\n', + isRaw: true, + ); }), ], ), @@ -19868,8 +25135,9 @@ final startInkInk = InkAst([ final Storyline s = c.outputStoryline; final youngSirSubstitution = c.playerSalutation; s.add( - 'Tamara nods. She points her battered sword at the goblin but doesn\'t move. "Take my dagger, ${youngSirSubstitution}," she says and holds the dagger out toward me, handle-first.\n', - isRaw: true); + 'Tamara nods. She points her battered sword at the goblin but doesn\'t move. "Take my dagger, ${youngSirSubstitution}," she says and holds the dagger out toward me, handle-first.\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -19891,8 +25159,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I take the dagger and point it at the goblin. It\'s surprisingly heavy but well balanced.\n', - isRaw: true); + 'I take the dagger and point it at the goblin. It\'s surprisingly heavy but well balanced.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -19901,8 +25170,10 @@ final startInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('The goblin attacks. As he runs toward us, he\n', - isRaw: true); + s.add( + 'The goblin attacks. As he runs toward us, he\n', + isRaw: true, + ); }), ], ), @@ -19927,8 +25198,9 @@ final startInkInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I pick up a mossy rock that sits right next to my right foot. It\'s hard and heavy in my palm. As soon as I straighten with the rock in my hand, the goblin attacks. As he runs toward us, he\n', - isRaw: true); + 'I pick up a mossy rock that sits right next to my right foot. It\'s hard and heavy in my palm. As soon as I straighten with the rock in my hand, the goblin attacks. As he runs toward us, he\n', + isRaw: true, + ); }), ], ), @@ -19942,7 +25214,10 @@ final startInkInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('aims his rusty sword, grinning.\n', isRaw: true); + s.add( + 'aims his rusty sword, grinning.\n', + isRaw: true, + ); }), ]); @@ -19954,9 +25229,15 @@ class StartInk extends RoamingAction { @override List get commandPathTemplate => ['N/A']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('start_bogus_location') != true) { return false; } @@ -19964,7 +25245,10 @@ class StartInk extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19978,7 +25262,10 @@ class StartInk extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -19989,60 +25276,87 @@ class StartInk extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } -final Room start = Room('start', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - w.pushSituation(InkSituation.initialized( - w.randomInt(), - "start_ink_ink", - )); -}, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}, null, null); -final Approach meadowFightFromBleedsMain = - Approach('bleeds_main', 'meadow_fight', '', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); -final Approach meadowFightFromStart = - Approach('start', 'meadow_fight', r'$IMPLICIT', (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; -}); +final Room start = Room( + 'start', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + w.pushSituation(InkSituation.initialized( + w.randomInt(), + "start_ink_ink", + )); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + null, + null, +); +final Approach meadowFightFromBleedsMain = Approach( + 'bleeds_main', + 'meadow_fight', + '', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); +final Approach meadowFightFromStart = Approach( + 'start', + 'meadow_fight', + r'$IMPLICIT', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, +); class FirstPyramidApproach extends RoamingAction { @override @@ -20051,10 +25365,19 @@ class FirstPyramidApproach extends RoamingAction { static final FirstPyramidApproach singleton = FirstPyramidApproach(); @override - List get commandPathTemplate => ['Path', 'Press onwards']; + List get commandPathTemplate => [ + 'Path', + 'Press onwards', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('meadow_fight') != true) { return false; } @@ -20065,7 +25388,10 @@ class FirstPyramidApproach extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20077,7 +25403,10 @@ class FirstPyramidApproach extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20088,181 +25417,241 @@ class FirstPyramidApproach extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } final Room meadowFight = Room( - 'meadow_fight', - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - }, - (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add('', isRaw: true); - }, - generateStartFight, - null, - positionX: 49, - positionY: 99, - mapName: 'Forest Clearing', - hint: - 'The clearing in the forest of San Francisco where Tamara and I were ambushed.', - afterMonstersCleared: (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - final youngSirSubstitution = c.playerSalutation; - final ifBlock_6592bc33a = c.isHurt(tamaraId) - ? '''Tamara is sitting on the ground now and tending to her wounds. I give her the sword back. "This place is not for me, ${youngSirSubstitution}," she declares. "And I say it's not for you, either." She winces, and looks at me.''' - : '''Tamara checks her gear and sheathes the sword that I give back to her. Then she looks at me.'''; - final ifBlock_519842faa = c.isHurt(tamaraId) - ? '''Tamara is sitting on the ground now and tending to her wounds. "This place is not for me, ${youngSirSubstitution}," she declares. "And I say it's not for you, either." She winces, and looks at me.''' - : '''Tamara checks her gear and sheathes her sword. Then she looks at me.'''; - final ifBlock_781966055 = - c.isHurt(tamaraId) ? '''She slowly stands up, and shrugs.''' : ''''''; - w.updateActorById(firstGoblinId, (b) => b.initiative = 10); + 'meadow_fight', + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + '', + isRaw: true, + ); + }, + generateStartFight, + null, + positionX: 49, + positionY: 99, + mapName: 'Forest Clearing', + hint: + 'The clearing in the forest of San Francisco where Tamara and I were ambushed.', + afterMonstersCleared: (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + final youngSirSubstitution = c.playerSalutation; + final ifBlock_6592bc33a = c.isHurt(tamaraId) + ? '''Tamara is sitting on the ground now and tending to her wounds. I give her the sword back. "This place is not for me, ${youngSirSubstitution}," she declares. "And I say it's not for you, either." She winces, and looks at me.''' + : '''Tamara checks her gear and sheathes the sword that I give back to her. Then she looks at me.'''; + final ifBlock_519842faa = c.isHurt(tamaraId) + ? '''Tamara is sitting on the ground now and tending to her wounds. "This place is not for me, ${youngSirSubstitution}," she declares. "And I say it's not for you, either." She winces, and looks at me.''' + : '''Tamara checks her gear and sheathes her sword. Then she looks at me.'''; + final ifBlock_781966055 = + c.isHurt(tamaraId) ? '''She slowly stands up, and shrugs.''' : ''''''; + w.updateActorById(firstGoblinId, (b) => b.initiative = 10); - s.add( - '\nMy hands are shaking and I put them on the sides of my neck to stop the shudder. As a necromancer, I am used to death. The long, unmoving part of it, mostly.\n\nBut this, this was something different entirely. Fast. Violent. Messy. This was the savage face of death that I had not seen before. My hands are still shaking.\n\n\nThe fight is over.\n\n', - isRaw: true); - if (!originalWorld.wasKilled(tamaraId)) { - if (c.hasItem(tamaraSwordId)) { - final sword = c.player.inventory.items - .singleWhere((item) => item.id == tamaraSwordId); - c.removeItemFromPlayer(tamaraSwordId); - w.updateActorById(tamaraId, (b) => b..inventory.add(sword)); - w.recordCustom('gives_sword_back_to_tamara'); - } + s.add( + '\nMy hands are shaking and I put them on the sides of my neck to stop the shudder. As a necromancer, I am used to death. The long, unmoving part of it, mostly.\n\nBut this, this was something different entirely. Fast. Violent. Messy. This was the savage face of death that I had not seen before. My hands are still shaking.\n\n\nThe fight is over.\n\n', + isRaw: true, + ); + if (!originalWorld.wasKilled(tamaraId)) { + if (c.hasItem(tamaraSwordId)) { + final sword = c.player.inventory.items + .singleWhere((item) => item.id == tamaraSwordId); + c.removeItemFromPlayer(tamaraSwordId); + w.updateActorById(tamaraId, (b) => b..inventory.add(sword)); + w.recordCustom('gives_sword_back_to_tamara'); } + } - Ruleset( - Rule(1026182239, 2, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return w.wasKilled(tamaraId) && - !w.getActorById(tamaraId).isAnimated; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' "Sorry, Tamara." I kneel next to her and put her in the position of a proper warrior death, with back to the ground and arms crossed over the body.\n\n No time to be sentimental. Despite the death and the danger, I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n', - isRaw: true); - }), - Rule(267137291, 2, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return w.wasKilled(tamaraId) && - w.getActorById(tamaraId).anatomy.isUndead; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' I look into Tamara\'s undead eyes.\n\n "I\'m sorry."\n\n She doesn\'t respond, so I nod, and tell her corpse to follow me. No time to be sentimental. Despite the death and the danger, I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n', - isRaw: true); - }), - Rule(120969454, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return !w.wasKilled(tamaraId); - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - Ruleset( - Rule(491089880, 1, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return c.hasHappened('gives_sword_back_to_tamara'); - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' ${ifBlock_6592bc33a} "You are welcome to tag along with me back to safety. I\'ll give you a discount on my services for the way back."\n', - isRaw: true); - }), - Rule(492770307, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - ' ${ifBlock_519842faa} "You are welcome to tag along with me back to safety. I\'ll give you a discount on my services for the way back."\n', - isRaw: true); - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); - s.add( - '\n I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n\n Tamara understands. ${ifBlock_781966055} "I will leave you to it, then. My work here is done." In a few moments, she disappears among the trees and the bushes to the south.\n\n', - isRaw: true); - w.updateActorById(tamaraId, (b) => b.isActive = false); - }), - Rule(991926294, 0, false, (ApplicabilityContext c) { - final WorldState w = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - return true; - }, (ActionContext c) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - throw StateError( - "Tamara's state wasn't planned for: ${w.getActorById(tamaraId)}"); - })).apply(ActionContext.updatedFrom(c)); - s.addParagraph(); - c.giveNewItemToPlayer(letterFromFather); - }, - whereDescription: 'among the trees', - groundMaterial: '{earth|dirt}'); + Ruleset( + Rule( + 1026182239, + 2, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return w.wasKilled(tamaraId) && !w.getActorById(tamaraId).isAnimated; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' "Sorry, Tamara." I kneel next to her and put her in the position of a proper warrior death, with back to the ground and arms crossed over the body.\n\n No time to be sentimental. Despite the death and the danger, I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n', + isRaw: true, + ); + }, + ), + Rule( + 267137291, + 2, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return w.wasKilled(tamaraId) && + w.getActorById(tamaraId).anatomy.isUndead; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' I look into Tamara\'s undead eyes.\n\n "I\'m sorry."\n\n She doesn\'t respond, so I nod, and tell her corpse to follow me. No time to be sentimental. Despite the death and the danger, I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n', + isRaw: true, + ); + }, + ), + Rule( + 120969454, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return !w.wasKilled(tamaraId); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + Ruleset( + Rule( + 491089880, + 1, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return c.hasHappened('gives_sword_back_to_tamara'); + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' ${ifBlock_6592bc33a} "You are welcome to tag along with me back to safety. I\'ll give you a discount on my services for the way back."\n', + isRaw: true, + ); + }, + ), + Rule( + 492770307, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + ' ${ifBlock_519842faa} "You are welcome to tag along with me back to safety. I\'ll give you a discount on my services for the way back."\n', + isRaw: true, + ); + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + s.add( + '\n I remember my brother. The reason I came all this way. I lift my head to look at the white building, my destination, now showing through the redwoods to the north.\n\n Tamara understands. ${ifBlock_781966055} "I will leave you to it, then. My work here is done." In a few moments, she disappears among the trees and the bushes to the south.\n\n', + isRaw: true, + ); + w.updateActorById(tamaraId, (b) => b.isActive = false); + }, + ), + Rule( + 991926294, + 0, + false, + (ApplicabilityContext c) { + final WorldState w = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + return true; + }, + (ActionContext c) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + throw StateError( + "Tamara's state wasn't planned for: ${w.getActorById(tamaraId)}"); + }, + ), + ).apply(ActionContext.updatedFrom(c)); + s.addParagraph(); + c.giveNewItemToPlayer(letterFromFather); + }, + whereDescription: 'among the trees', + groundMaterial: '{earth|dirt}', +); class CompassUse extends RoamingAction { @override @@ -20271,10 +25660,20 @@ class CompassUse extends RoamingAction { static final CompassUse singleton = CompassUse(); @override - List get commandPathTemplate => ['Inventory', 'compass', 'use']; + List get commandPathTemplate => [ + 'Inventory', + 'compass', + 'use', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.hasItem(compassId) && !c.playerRoom.isSynthetic && c.playerRoom.isOnMap && @@ -20285,7 +25684,10 @@ class CompassUse extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20297,7 +25699,10 @@ class CompassUse extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20308,23 +25713,36 @@ class CompassUse extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -20337,10 +25755,19 @@ class PerformNecromancyElsewhere extends RoamingAction { PerformNecromancyElsewhere(); @override - List get commandPathTemplate => ['Skills', 'Necromancy']; + List get commandPathTemplate => [ + 'Skills', + 'Necromancy', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(!c.getRoomRoaming().monstersAlive && !c.playerRoom.isSynthetic && c.playerRoom.isOnMap && @@ -20351,7 +25778,10 @@ class PerformNecromancyElsewhere extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20365,7 +25795,10 @@ class PerformNecromancyElsewhere extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20378,14 +25811,19 @@ class PerformNecromancyElsewhere extends RoamingAction { ? '''My powers are not strong enough to hold two unliving minds, and I already have an undead follower.''' : ''''''; s.add( - 'I try to perform the necromantic incantation but I fail. ${ifBlock_6c782c6c}${ifBlock_4fd98517e} Nothing happens.\n', - isRaw: true); + 'I try to perform the necromantic incantation but I fail. ${ifBlock_6c782c6c}${ifBlock_4fd98517e} Nothing happens.\n', + isRaw: true, + ); return '${a.name} fails to perform PerformNecromancyElsewhere'; } @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { final c = ApplicabilityContext(a, sim, w); if (a.sanity < 1 || isFollowedByUndeadActor(c, a) || @@ -20397,18 +25835,27 @@ class PerformNecromancyElsewhere extends RoamingAction { @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => 'Raising the dead will make them fight for me. I do not know in advance which corpse will rise. I cannot do this if I am already followed by an undead. My powers are not strong enough to hold two unliving minds.'; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -20420,7 +25867,10 @@ final readLetterFromFatherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('I take the letter from my pocket and read it.\n', isRaw: true); + s.add( + 'I take the letter from my pocket and read it.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20430,7 +25880,10 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; final ifBlock_1561e0ee8 = c.playerIsMale ? '''Son''' : '''Daughter'''; - s.add('${ifBlock_1561e0ee8},\n', isRaw: true); + s.add( + '${ifBlock_1561e0ee8},\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20440,8 +25893,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I learned about your plans from a family friend. Although I hope you don\'t mean to execute them, I am writing this letter.\n', - isRaw: true); + 'I learned about your plans from a family friend. Although I hope you don\'t mean to execute them, I am writing this letter.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20451,8 +25905,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'There is a good life for you in Falling Rock, despite everything. The mountains may seem dull and remote to your young heart, but they are safe.\n', - isRaw: true); + 'There is a good life for you in Falling Rock, despite everything. The mountains may seem dull and remote to your young heart, but they are safe.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20462,8 +25917,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I am surprised by the brash move. From you, of all people. Remember your health. Stay home. Don\'t follow your brother\'s footsteps. Don\'t make my heart break for the third time.\n', - isRaw: true); + 'I am surprised by the brash move. From you, of all people. Remember your health. Stay home. Don\'t follow your brother\'s footsteps. Don\'t make my heart break for the third time.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20472,7 +25928,10 @@ final readLetterFromFatherInk = InkAst([ final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; - s.add('— Father\n', isRaw: true); + s.add( + '— Father\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20490,8 +25949,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'I carefully fold the paper and keep my thumb pressed against the broken wax seal. Without conscious thought, I start tapping the seal with the thumb, rhythmically. Tap. Tap. Tap. A nervous tic I picked up on the way here.\n', - isRaw: true); + 'I carefully fold the paper and keep my thumb pressed against the broken wax seal. Without conscious thought, I start tapping the seal with the thumb, rhythmically. Tap. Tap. Tap. A nervous tic I picked up on the way here.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20503,7 +25963,10 @@ final readLetterFromFatherInk = InkAst([ final ifBlock_5065ca633 = !c.hasHappened(evSavedSarn) ? '''_No,_ _Father._ _I_ _must_ _find_ _the_ _coward,_ _and_ _confront_ _him._''' : ''''''; - s.add('${ifBlock_5065ca633}\n', isRaw: true); + s.add( + '${ifBlock_5065ca633}\n', + isRaw: true, + ); }), InkForkNode([ InkChoiceNode( @@ -20524,8 +25987,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - '_Nobody_ should be able to get away with what Sarn did and feel no consequences. He left just after Mother died. He let Father and I steep in despair and destitution.\n', - isRaw: true); + '_Nobody_ should be able to get away with what Sarn did and feel no consequences. He left just after Mother died. He let Father and I steep in despair and destitution.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20535,8 +25999,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Sarn was supposed to help, and instead he took off, to find riches or adventure in San Francisco. For that, by the Eight Gods, he must be punished.\n', - isRaw: true); + 'Sarn was supposed to help, and instead he took off, to find riches or adventure in San Francisco. For that, by the Eight Gods, he must be punished.\n', + isRaw: true, + ); }), ], ), @@ -20560,8 +26025,9 @@ final readLetterFromFatherInk = InkAst([ final ifBlock_56c7cddbe = c.playerIsMale ? '''brother''' : '''sister'''; s.add( - 'Sarn took off just after Mother died. He left behind a devastated Father, and a little ${ifBlock_56c7cddbe}, terrified of what would come next. Is it possible that Sarn didn\'t know what he was doing? Could he not imagine what _another_ loss of a member would do to a struggling family?\n', - isRaw: true); + 'Sarn took off just after Mother died. He left behind a devastated Father, and a little ${ifBlock_56c7cddbe}, terrified of what would come next. Is it possible that Sarn didn\'t know what he was doing? Could he not imagine what _another_ loss of a member would do to a struggling family?\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20571,8 +26037,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'He must learn what happened. He cannot live his life without knowing that his act of cowardice broke Father, and me.\n', - isRaw: true); + 'He must learn what happened. He cannot live his life without knowing that his act of cowardice broke Father, and me.\n', + isRaw: true, + ); }), ], ), @@ -20594,8 +26061,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'Sarn must suffer. I have long wanted to make him feel the same kind of despair and destitution that Father and I had to go through after he left. As if it wasn\'t enough that Mother died, and that Father was sad beyond imagining from it.\n', - isRaw: true); + 'Sarn must suffer. I have long wanted to make him feel the same kind of despair and destitution that Father and I had to go through after he left. As if it wasn\'t enough that Mother died, and that Father was sad beyond imagining from it.\n', + isRaw: true, + ); }), InkParagraphNode((c) => c.outputStoryline.addParagraph()), InkParagraphNode((ActionContext c) { @@ -20605,8 +26073,9 @@ final readLetterFromFatherInk = InkAst([ final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'The coward took off then, and he must not be forgiven. I must have vengeance.\n', - isRaw: true); + 'The coward took off then, and he must not be forgiven. I must have vengeance.\n', + isRaw: true, + ); }), ], ), @@ -20620,11 +26089,20 @@ class ReadLetterFromFather extends RoamingAction { static final ReadLetterFromFather singleton = ReadLetterFromFather(); @override - List get commandPathTemplate => - ['Inventory', 'Letter from my father', 'Read']; + List get commandPathTemplate => [ + 'Inventory', + 'Letter from my father', + 'Read', + ]; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (!(c.isInIdleRoom && c.hasItem(letterFromFatherId))) { return false; } @@ -20632,7 +26110,10 @@ class ReadLetterFromFather extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20646,7 +26127,10 @@ class ReadLetterFromFather extends RoamingAction { } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; @@ -20657,23 +26141,36 @@ class ReadLetterFromFather extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return ReasonedSuccessChance.sureSuccess; } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => null; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -20687,9 +26184,15 @@ class GuardpostAboveChurchTakeShield extends RoamingAction { @override List get commandPathTemplate => ['Cautiously take the shield']; + @override bool isApplicable( - ApplicabilityContext c, Actor a, Simulation sim, WorldState w, void _) { + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + void _, + ) { if (c.inRoomParent('guardpost_above_church') != true) { return false; } @@ -20700,28 +26203,36 @@ class GuardpostAboveChurchTakeShield extends RoamingAction { } @override - String applySuccess(ActionContext c, void _) { + String applySuccess( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'You silently approach the goblin, wait a few moments, then lean over him and deftly lift the shield. The goblin sniffs and leans his head to the side, but stays asleep.\n\n\nYou take a few slow steps back, then grip the shield in your left hand, ready for anything.\n', - isRaw: true); + 'You silently approach the goblin, wait a few moments, then lean over him and deftly lift the shield. The goblin sniffs and leans his head to the side, but stays asleep.\n\n\nYou take a few slow steps back, then grip the shield in your left hand, ready for anything.\n', + isRaw: true, + ); return '${a.name} successfully performs GuardpostAboveChurchTakeShield'; } @override - String applyFailure(ActionContext c, void _) { + String applyFailure( + ActionContext c, + void _, + ) { final WorldState originalWorld = c.world; final Simulation sim = c.simulation; final Actor a = c.actor; final WorldStateBuilder w = c.outputWorld; final Storyline s = c.outputStoryline; s.add( - 'You silently approach the goblin, then wait a few moments. The goblin sniffs, moves, but stays asleep. You shift your weight on your right leg, leaning over the goblin and using the other leg as a counterweight. Briana watches you with amusement.\n\n\nYou touch the shield to lift it, but freeze. The goblin sniffs again, and shifts. If you move an inch, he\'ll wake up.\n', - isRaw: true); + 'You silently approach the goblin, then wait a few moments. The goblin sniffs, moves, but stays asleep. You shift your weight on your right leg, leaning over the goblin and using the other leg as a counterweight. Briana watches you with amusement.\n\n\nYou touch the shield to lift it, but freeze. The goblin sniffs again, and shifts. If you move an inch, he\'ll wake up.\n', + isRaw: true, + ); w.pushSituation(GuardpostAboveChurchTakeShieldRescueSituation.initialized( w.randomInt())); return '${a.name} fails to perform GuardpostAboveChurchTakeShield'; @@ -20729,24 +26240,37 @@ class GuardpostAboveChurchTakeShield extends RoamingAction { @override ReasonedSuccessChance getSuccessChance( - Actor a, Simulation sim, WorldState w, void _) { + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return const ReasonedSuccessChance(0.8); } @override bool get rerollable => false; + @override Resource? get rerollResource => null; + @override - String getRollReason(Actor a, Simulation sim, WorldState w, void _) { + String getRollReason( + Actor a, + Simulation sim, + WorldState w, + void _, + ) { return 'Will I be successful?'; } @override String? get helpMessage => 'The goblin is asleep, but not soundly — the floor here is cold and uncomfortable, and the wall isn’t much of a headrest. Taking the shield from the goblin\'s lap will likely wake him up.'; + @override bool get isAggressive => false; + @override bool get isImmediate => false; } @@ -20773,44 +26297,63 @@ abstract class GuardpostAboveChurchTakeShieldRescueSituation extends Object static Serializer get serializer => _$guardpostAboveChurchTakeShieldRescueSituationSerializer; + @override List get actions { return [ SimpleAction( - 'guardpost_above_church_take_shield_rescue', - 'Stay perfectly still', - (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( - 'You stay completely still. After a while, the strain of holding the awkward position start to show. Your left leg starts shaking. A bead of sweat is forming on your nose, threatening to fall on the goblin\'s leg.\n\n\n

Your stamina decreases by 1.

\n\n\nFortunately, the goblin shifts again and his expression gets visibly more relaxed. His breathing is deep and regular again.\n\n\nYou deftly lift the shield, take a few slow steps back, then grip the shield in your left hand, ready for anything.', - isRaw: true); - w.popSituation(c); - w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); - - return 'GuardpostAboveChurchTakeShieldRescueSituation resolved with rescue/continuation (Stay perfectly still)'; - }, - 'If you stop moving, the guard will probably go back to sleep. But in this position, staying perfectly still even for a single minute will be quite a feat. (It will cost you 1 stamina.)', - isApplicableClosure: (ApplicabilityContext c, Actor a, Simulation sim, - WorldState w, self) { - return a.stamina > 0; - }), - SimpleAction('guardpost_above_church_take_shield_continuation_of_failure', - 'Snatch the shield', (ActionContext c, self) { - final WorldState originalWorld = c.world; - final Simulation sim = c.simulation; - final Actor a = c.actor; - final WorldStateBuilder w = c.outputWorld; - final Storyline s = c.outputStoryline; - s.add( + 'guardpost_above_church_take_shield_rescue', + 'Stay perfectly still', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( + 'You stay completely still. After a while, the strain of holding the awkward position start to show. Your left leg starts shaking. A bead of sweat is forming on your nose, threatening to fall on the goblin\'s leg.\n\n\n

Your stamina decreases by 1.

\n\n\nFortunately, the goblin shifts again and his expression gets visibly more relaxed. His breathing is deep and regular again.\n\n\nYou deftly lift the shield, take a few slow steps back, then grip the shield in your left hand, ready for anything.', + isRaw: true, + ); + w.popSituation(c); + w.updateActorById(a.id, (b) => b.stamina = b.stamina! - 1); + + return 'GuardpostAboveChurchTakeShieldRescueSituation resolved with rescue/continuation (Stay perfectly still)'; + }, + 'If you stop moving, the guard will probably go back to sleep. But in this position, staying perfectly still even for a single minute will be quite a feat. (It will cost you 1 stamina.)', + isApplicableClosure: ( + ApplicabilityContext c, + Actor a, + Simulation sim, + WorldState w, + self, + ) { + return a.stamina > 0; + }, + ), + SimpleAction( + 'guardpost_above_church_take_shield_continuation_of_failure', + 'Snatch the shield', + ( + ActionContext c, + self, + ) { + final WorldState originalWorld = c.world; + final Simulation sim = c.simulation; + final Actor a = c.actor; + final WorldStateBuilder w = c.outputWorld; + final Storyline s = c.outputStoryline; + s.add( 'You snatch the shield and jump back next to Briana. The goblin wakes up instantly, and he gets his bearings surprisingly fast. He jumps up and points his scimitar at you.\n\n\nYou look at Briana. Both of you are ready to fight.', - isRaw: true); - w.popSituation(c); - return 'GuardpostAboveChurchTakeShieldRescueSituation resolved with rescue/continuation (Snatch the shield)'; - }, 'You can quickly snatch the shield, jump back and prepare for a fight.') + isRaw: true, + ); + w.popSituation(c); + return 'GuardpostAboveChurchTakeShieldRescueSituation resolved with rescue/continuation (Snatch the shield)'; + }, + 'You can quickly snatch the shield, jump back and prepare for a fight.', + ), ]; } @@ -20827,15 +26370,25 @@ abstract class GuardpostAboveChurchTakeShieldRescueSituation extends Object Situation elapseTurn() => rebuild((b) { return b..turn = b.turn! + 1; }); + @override - ActorTurn getNextTurn(Simulation sim, WorldState w) { + ActorTurn getNextTurn( + Simulation sim, + WorldState w, + ) { if (turn != 0) return ActorTurn.never; var player = w.actors.singleWhere((a) => a.isPlayer); - return ActorTurn(player, w.time); + return ActorTurn( + player, + w.time, + ); } @override - Iterable getActors(Simulation sim, WorldState w) { + Iterable getActors( + Simulation sim, + WorldState w, + ) { return [ w.actors.singleWhere((Actor a) { return a.isPlayer; @@ -20918,7 +26471,7 @@ final allRooms = [ goblinSkirmishPatrol, goblinSkirmishMain, start, - meadowFight + meadowFight, ]; final allApproaches = [ endOfRoamFromRandomEncounter, @@ -21006,7 +26559,7 @@ final allApproaches = [ goblinSkirmishMainFromGoblinSkirmishPatrol, startFromPreStartBook, meadowFightFromBleedsMain, - meadowFightFromStart + meadowFightFromStart, ]; final allActions = [ FinalFightInk.singleton, @@ -21130,7 +26683,7 @@ final allActions = [ CompassUse.singleton, PerformNecromancyElsewhere.singleton, ReadLetterFromFather.singleton, - GuardpostAboveChurchTakeShield.singleton + GuardpostAboveChurchTakeShield.singleton, ]; final allInks = { 'final_fight_ink_ink': finalFightInkInk, @@ -21205,5 +26758,5 @@ final allInks = { 'bleeds_blind_guide_whats_wrong_ink': bleedsBlindGuideWhatsWrongInk, 'sarn_talk_in_bleeds_ink': sarnTalkInBleedsInk, 'start_ink_ink': startInkInk, - 'read_letter_from_father_ink': readLetterFromFatherInk + 'read_letter_from_father_ink': readLetterFromFatherInk, }; diff --git a/edgehead/lib/writers_input.compiled.g.dart b/edgehead/lib/writers_input.compiled.g.dart index 85f42c02..652b90de 100644 --- a/edgehead/lib/writers_input.compiled.g.dart +++ b/edgehead/lib/writers_input.compiled.g.dart @@ -48,17 +48,17 @@ class _$ReservoirDamWheelLeftRescueSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -99,17 +99,17 @@ class _$ReservoirDamWheelRightRescueSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -151,17 +151,17 @@ class _$GuardpostAboveChurchTakeShieldRescueSituationSerializer final iterator = serialized.iterator; while (iterator.moveNext()) { - final key = iterator.current as String; + final key = iterator.current! as String; iterator.moveNext(); final Object? value = iterator.current; switch (key) { case 'id': result.id = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; case 'turn': result.turn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; + specifiedType: const FullType(int))! as int; break; } } @@ -181,15 +181,15 @@ class _$ReservoirDamWheelLeftRescueSituation [void Function(ReservoirDamWheelLeftRescueSituationBuilder)? updates]) => (new ReservoirDamWheelLeftRescueSituationBuilder()..update(updates)) - .build(); + ._build(); _$ReservoirDamWheelLeftRescueSituation._( {required this.id, required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - id, 'ReservoirDamWheelLeftRescueSituation', 'id'); + id, r'ReservoirDamWheelLeftRescueSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - turn, 'ReservoirDamWheelLeftRescueSituation', 'turn'); + turn, r'ReservoirDamWheelLeftRescueSituation', 'turn'); } @override @@ -211,12 +211,16 @@ class _$ReservoirDamWheelLeftRescueSituation @override int get hashCode { - return $jf($jc($jc(0, id.hashCode), turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ReservoirDamWheelLeftRescueSituation') + return (newBuiltValueToStringHelper(r'ReservoirDamWheelLeftRescueSituation') ..add('id', id) ..add('turn', turn)) .toString(); @@ -262,13 +266,15 @@ class ReservoirDamWheelLeftRescueSituationBuilder } @override - _$ReservoirDamWheelLeftRescueSituation build() { + ReservoirDamWheelLeftRescueSituation build() => _build(); + + _$ReservoirDamWheelLeftRescueSituation _build() { final _$result = _$v ?? new _$ReservoirDamWheelLeftRescueSituation._( id: BuiltValueNullFieldError.checkNotNull( - id, 'ReservoirDamWheelLeftRescueSituation', 'id'), + id, r'ReservoirDamWheelLeftRescueSituation', 'id'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'ReservoirDamWheelLeftRescueSituation', 'turn')); + turn, r'ReservoirDamWheelLeftRescueSituation', 'turn')); replace(_$result); return _$result; } @@ -285,15 +291,15 @@ class _$ReservoirDamWheelRightRescueSituation [void Function(ReservoirDamWheelRightRescueSituationBuilder)? updates]) => (new ReservoirDamWheelRightRescueSituationBuilder()..update(updates)) - .build(); + ._build(); _$ReservoirDamWheelRightRescueSituation._( {required this.id, required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - id, 'ReservoirDamWheelRightRescueSituation', 'id'); + id, r'ReservoirDamWheelRightRescueSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - turn, 'ReservoirDamWheelRightRescueSituation', 'turn'); + turn, r'ReservoirDamWheelRightRescueSituation', 'turn'); } @override @@ -316,12 +322,17 @@ class _$ReservoirDamWheelRightRescueSituation @override int get hashCode { - return $jf($jc($jc(0, id.hashCode), turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper('ReservoirDamWheelRightRescueSituation') + return (newBuiltValueToStringHelper( + r'ReservoirDamWheelRightRescueSituation') ..add('id', id) ..add('turn', turn)) .toString(); @@ -367,13 +378,15 @@ class ReservoirDamWheelRightRescueSituationBuilder } @override - _$ReservoirDamWheelRightRescueSituation build() { + ReservoirDamWheelRightRescueSituation build() => _build(); + + _$ReservoirDamWheelRightRescueSituation _build() { final _$result = _$v ?? new _$ReservoirDamWheelRightRescueSituation._( id: BuiltValueNullFieldError.checkNotNull( - id, 'ReservoirDamWheelRightRescueSituation', 'id'), + id, r'ReservoirDamWheelRightRescueSituation', 'id'), turn: BuiltValueNullFieldError.checkNotNull( - turn, 'ReservoirDamWheelRightRescueSituation', 'turn')); + turn, r'ReservoirDamWheelRightRescueSituation', 'turn')); replace(_$result); return _$result; } @@ -391,15 +404,15 @@ class _$GuardpostAboveChurchTakeShieldRescueSituation updates]) => (new GuardpostAboveChurchTakeShieldRescueSituationBuilder() ..update(updates)) - .build(); + ._build(); _$GuardpostAboveChurchTakeShieldRescueSituation._( {required this.id, required this.turn}) : super._() { BuiltValueNullFieldError.checkNotNull( - id, 'GuardpostAboveChurchTakeShieldRescueSituation', 'id'); + id, r'GuardpostAboveChurchTakeShieldRescueSituation', 'id'); BuiltValueNullFieldError.checkNotNull( - turn, 'GuardpostAboveChurchTakeShieldRescueSituation', 'turn'); + turn, r'GuardpostAboveChurchTakeShieldRescueSituation', 'turn'); } @override @@ -422,13 +435,17 @@ class _$GuardpostAboveChurchTakeShieldRescueSituation @override int get hashCode { - return $jf($jc($jc(0, id.hashCode), turn.hashCode)); + var _$hash = 0; + _$hash = $jc(_$hash, id.hashCode); + _$hash = $jc(_$hash, turn.hashCode); + _$hash = $jf(_$hash); + return _$hash; } @override String toString() { return (newBuiltValueToStringHelper( - 'GuardpostAboveChurchTakeShieldRescueSituation') + r'GuardpostAboveChurchTakeShieldRescueSituation') ..add('id', id) ..add('turn', turn)) .toString(); @@ -475,16 +492,18 @@ class GuardpostAboveChurchTakeShieldRescueSituationBuilder } @override - _$GuardpostAboveChurchTakeShieldRescueSituation build() { + GuardpostAboveChurchTakeShieldRescueSituation build() => _build(); + + _$GuardpostAboveChurchTakeShieldRescueSituation _build() { final _$result = _$v ?? new _$GuardpostAboveChurchTakeShieldRescueSituation._( id: BuiltValueNullFieldError.checkNotNull( - id, 'GuardpostAboveChurchTakeShieldRescueSituation', 'id'), - turn: BuiltValueNullFieldError.checkNotNull( - turn, 'GuardpostAboveChurchTakeShieldRescueSituation', 'turn')); + id, r'GuardpostAboveChurchTakeShieldRescueSituation', 'id'), + turn: BuiltValueNullFieldError.checkNotNull(turn, + r'GuardpostAboveChurchTakeShieldRescueSituation', 'turn')); replace(_$result); return _$result; } } -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new +// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/edgehead/mono_pkg.yaml b/edgehead/mono_pkg.yaml index 96468c92..54bc7959 100644 --- a/edgehead/mono_pkg.yaml +++ b/edgehead/mono_pkg.yaml @@ -6,7 +6,7 @@ stages: - analyze: --fatal-infos --fatal-warnings . - format - unit_test: - - command: pub run build_runner build --delete-conflicting-outputs && dart test + - command: dart run build_runner build --delete-conflicting-outputs && dart test # - build: # - command: pub run build_runner build --delete-conflicting-outputs diff --git a/edgehead/pubspec.lock b/edgehead/pubspec.lock index 09a836d1..426a3fe0 100644 --- a/edgehead/pubspec.lock +++ b/edgehead/pubspec.lock @@ -5,170 +5,191 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3" + url: "https://pub.dev" source: hosted - version: "31.0.0" + version: "68.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.1.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808" + url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "6.5.0" args: dependency: "direct main" description: name: args - url: "https://pub.dartlang.org" + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.5.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.4.1" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" + url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe + url: "https://pub.dev" source: hosted - version: "7.2.2" + version: "7.3.1" built_collection: dependency: "direct main" description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: "direct main" description: name: built_value - url: "https://pub.dartlang.org" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.9.2" built_value_generator: dependency: "direct dev" description: name: built_value_generator - url: "https://pub.dartlang.org" - source: hosted - version: "8.1.3" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" + sha256: bb06c5e9dbdbd35ed6de21520e2e5112582c964fa584e2a4bb59887fc7a169b0 + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "8.9.2" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" cli_menu: dependency: "direct main" description: name: cli_menu - url: "https://pub.dartlang.org" + sha256: "8e2ad533d6fa657bf944d943b948862f2c0cfcf1fa6568be9b65eef5573394bf" + url: "https://pub.dev" source: hosted - version: "0.3.0-nullsafety.0" + version: "0.4.0+1" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.dartlang.org" + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.10.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.1" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.8.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.6" egamebook_builder: dependency: "direct main" description: @@ -180,323 +201,393 @@ packages: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "7.0.0" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "4.0.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.3.1" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "40f592dd352890c3b60fec1b68e786cefb9603e05ff303dbc4dda49b304ecdf4" + url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.1.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.9.0" lint: dependency: "direct dev" description: name: lint - url: "https://pub.dartlang.org" + sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "2.3.0" logging: dependency: "direct main" description: name: logging - url: "https://pub.dartlang.org" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "0.1.0-main.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.16+1" meta: dependency: "direct main" description: name: meta - url: "https://pub.dartlang.org" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.15.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.5" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.0" path: dependency: "direct main" description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.5.1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" quiver: dependency: "direct main" description: name: quiver - url: "https://pub.dartlang.org" + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" source: hosted - version: "3.0.1+1" + version: "3.2.1" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "2.0.0" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.5.0" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" source: hosted - version: "0.10.10" + version: "0.10.12" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" t_stats: dependency: "direct dev" description: name: t_stats - url: "https://pub.dartlang.org" + sha256: ebe4babf8fba8140d4a66465707a5f3db43cf31c9159df225fee823973d467c6 + url: "https://pub.dev" source: hosted version: "3.0.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e" + url: "https://pub.dev" source: hosted - version: "1.19.5" + version: "1.25.7" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" source: hosted - version: "0.4.8" + version: "0.7.2" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696" + url: "https://pub.dev" source: hosted - version: "0.4.9" + version: "0.6.4" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.2" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + url: "https://pub.dev" source: hosted - version: "7.5.0" + version: "14.2.4" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "3.0.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.2.1" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" sdks: - dart: ">=2.15.0-7.0.dev <3.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/edgehead/pubspec.yaml b/edgehead/pubspec.yaml index 8719071e..3a7e4fe5 100644 --- a/edgehead/pubspec.yaml +++ b/edgehead/pubspec.yaml @@ -1,17 +1,17 @@ name: edgehead -version: 2.0.0 +version: 2.0.1 description: A game of fractal stories. homepage: https://www.egamebook.com publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: args: ^2.3.0 built_collection: ^5.1.1 built_value: ^8.1.3 - cli_menu: ^0.3.0-nullsafety.0 + cli_menu: ^0.4.0+1 collection: ^1.15.0 egamebook_builder: path: ../egamebook_builder @@ -23,6 +23,6 @@ dependencies: dev_dependencies: build_runner: ^2.1.4 built_value_generator: ^8.1.3 - lint: ^1.3.0 + lint: ^2.3.0 t_stats: ^3.0.0 test: ^1.15.3 diff --git a/edgehead/test/fractal_stories_test.dart b/edgehead/test/fractal_stories_test.dart index 598fb195..6e776ebb 100644 --- a/edgehead/test/fractal_stories_test.dart +++ b/edgehead/test/fractal_stories_test.dart @@ -124,35 +124,35 @@ void main() { final afterFireCrevice = Room("after_fire_hidden_crevice", emptyRoomDescription, emptyRoomDescription, null, null); - const _forgeName = "forge"; + const forgeName = "forge"; - const _forgeAfterFireName = "forge_after_fire"; + const forgeAfterFireName = "forge_after_fire"; - final creviceExit = Approach(_forgeAfterFireName, afterFireCrevice.name, + final creviceExit = Approach(forgeAfterFireName, afterFireCrevice.name, "explore to hidden crevice", (_) {}); - const _outsideName = "outside"; + const outsideName = "outside"; final forgeEntryAfterFire = Approach( - _outsideName, _forgeAfterFireName, "enter the charred forge", (_) {}); + outsideName, forgeAfterFireName, "enter the charred forge", (_) {}); final forgeEntry = - Approach(_outsideName, _forgeName, "enter the forge", (_) {}); + Approach(outsideName, forgeName, "enter the forge", (_) {}); final outside = Room( - _outsideName, emptyRoomDescription, emptyRoomDescription, null, null); + outsideName, emptyRoomDescription, emptyRoomDescription, null, null); final outsideExit = - Approach(_forgeName, outside.name, "go outside", (_) {}); + Approach(forgeName, outside.name, "go outside", (_) {}); final forge = Room( - _forgeName, emptyRoomDescription, emptyRoomDescription, null, null); + forgeName, emptyRoomDescription, emptyRoomDescription, null, null); - final forgeAfterFire = Room(_forgeAfterFireName, emptyRoomDescription, + final forgeAfterFire = Room(forgeAfterFireName, emptyRoomDescription, emptyRoomDescription, null, null, - parent: _forgeName, + parent: forgeName, prerequisite: Prerequisite( - _forgeAfterFireName.hashCode, 1, false, (_) => forgeIsAfterFire)); + forgeAfterFireName.hashCode, 1, false, (_) => forgeIsAfterFire)); final simulation = Simulation( [forge, forgeAfterFire, afterFireCrevice, outside], @@ -183,7 +183,7 @@ void main() { group("RoomRoamingSituation.moveActor", () { final aren = Actor.initialized(42, testRandomIdGetter, "Aren", - currentRoomName: _outsideName, isPlayer: true); + currentRoomName: outsideName, isPlayer: true); final initialSituation = RoomRoamingSituation.initialized(1, outside, false); final world = WorldState((b) => b @@ -198,10 +198,10 @@ void main() { final actionContext = ActionContext(mockAction, aren, simulation, world, world.toBuilder(), Storyline(), sureSuccess); - initialSituation.moveActor(aren, actionContext, _forgeName); + initialSituation.moveActor(aren, actionContext, forgeName); final result = actionContext.outputWorld.build(); - expect(result.getActorById(aren.id).currentRoomName, _forgeName); + expect(result.getActorById(aren.id).currentRoomName, forgeName); }); test("uses variant if applicable", () { @@ -210,13 +210,13 @@ void main() { forgeIsAfterFire = true; expect(world.visitHistory.getLatestOnly(aren)?.roomName, - isNot(_forgeAfterFireName)); + isNot(forgeAfterFireName)); - initialSituation.moveActor(aren, actionContext, _forgeName); + initialSituation.moveActor(aren, actionContext, forgeName); final result = actionContext.outputWorld.build(); expect(result.visitHistory.getLatestOnly(aren)!.roomName, - _forgeAfterFireName); + forgeAfterFireName); }); test("actor's currentRoom is always the parent", () { @@ -224,10 +224,10 @@ void main() { world, world.toBuilder(), Storyline(), sureSuccess); forgeIsAfterFire = true; - initialSituation.moveActor(aren, actionContext, _forgeName); + initialSituation.moveActor(aren, actionContext, forgeName); final result = actionContext.outputWorld.build(); - expect(result.getActorById(aren.id).currentRoomName, _forgeName); + expect(result.getActorById(aren.id).currentRoomName, forgeName); }); }); }); diff --git a/edgehead/test/history_test.dart b/edgehead/test/history_test.dart index 03242cd1..291000ff 100644 --- a/edgehead/test/history_test.dart +++ b/edgehead/test/history_test.dart @@ -10,13 +10,13 @@ import 'src/test_random.dart'; void main() { group("VisitHistory", () { - const _outsideName = "outside"; + const outsideName = "outside"; final outside = Room( - _outsideName, emptyRoomDescription, emptyRoomDescription, null, null); + outsideName, emptyRoomDescription, emptyRoomDescription, null, null); final inside = Room("inside", emptyRoomDescription, emptyRoomDescription, null, null); final aren = Actor.initialized(42, testRandomIdGetter, "Aren", - currentRoomName: _outsideName); + currentRoomName: outsideName); test("saves events in world state", () { final initialSituation = diff --git a/egamebook_builder/README.md b/egamebook_builder/README.md index 44738205..ce976c53 100644 --- a/egamebook_builder/README.md +++ b/egamebook_builder/README.md @@ -9,7 +9,7 @@ A library of builders intended for [egamebook.com][] projects. Add `egamebook_builder` to your dependencies and run `pub get`. Then, just use the annotations mentioned below and run -`pub run build_runner build` (or `pub run build_runner watch` for continuous +`dart run build_runner build` (or `dart run build_runner watch` for continuous rebuilding). ## Writer's builder diff --git a/egamebook_builder/analysis_options.yaml b/egamebook_builder/analysis_options.yaml index 83e4e853..ef9b22f3 100644 --- a/egamebook_builder/analysis_options.yaml +++ b/egamebook_builder/analysis_options.yaml @@ -7,8 +7,6 @@ linter: rules: - cancel_subscriptions - hash_and_equals - - iterable_contains_unrelated_type - - list_remove_unrelated_type - test_types_in_equals - unrelated_type_equality_checks - valid_regexps diff --git a/egamebook_builder/lib/src/generators/instance_serializer_generator.dart b/egamebook_builder/lib/src/generators/instance_serializer_generator.dart index c212aad8..b8744c59 100644 --- a/egamebook_builder/lib/src/generators/instance_serializer_generator.dart +++ b/egamebook_builder/lib/src/generators/instance_serializer_generator.dart @@ -50,10 +50,7 @@ class InstanceSerializerGenerator extends Generator { "Type of variable must be InstanceSerializer"); } final interfaceType = variable.type as InterfaceType; - if (interfaceType - .getDisplayString(withNullability: false) - .split('<') - .first != + if (interfaceType.getDisplayString().split('<').first != 'InstanceSerializer') { // TODO: find out how to create a DartType() and use it to check // via interfaceType.isAssignableTo(functionSerializerType) @@ -61,7 +58,7 @@ class InstanceSerializerGenerator extends Generator { "Top level declarations with the @GatherInstancesFrom " "annotation need to be of type InstanceSerializer, but we found " "one with type " - "${interfaceType.getDisplayString(withNullability: false)}"); + "${interfaceType.getDisplayString()}"); } final typeArguments = interfaceType.typeArguments; @@ -75,10 +72,7 @@ class InstanceSerializerGenerator extends Generator { final instanceType = typeArguments.single; // TODO: get the name from instanceType more elegantly - final instanceTypeName = instanceType - .getDisplayString(withNullability: false) - .split('<') - .first; + final instanceTypeName = instanceType.getDisplayString().split('<').first; final variableName = "_\$" "${ReCase(instanceTypeName).camelCase}" "Serializer"; @@ -160,7 +154,7 @@ class InstanceSerializerGenerator extends Generator { // ] result.writeln(", additionalTypes: ["); for (final type in additionalTypes) { - result.write(type!.getDisplayString(withNullability: false)); + result.write(type!.getDisplayString()); result.writeln(","); } result.write("]"); diff --git a/egamebook_builder/lib/src/generators/writers_input_generator.dart b/egamebook_builder/lib/src/generators/writers_input_generator.dart index 17ceba04..c2c47d25 100644 --- a/egamebook_builder/lib/src/generators/writers_input_generator.dart +++ b/egamebook_builder/lib/src/generators/writers_input_generator.dart @@ -95,6 +95,7 @@ class WritersInputGenerator extends Generator { lib.body.add(cb.Code("part '$fileName.compiled.g.dart';")); final devMode = false; + // ignore: dead_code if (devMode) { log.warning("Building in dev mode (less runtime asserts)."); } diff --git a/egamebook_builder/mono_pkg.yaml b/egamebook_builder/mono_pkg.yaml index ef57f819..d8f7299b 100644 --- a/egamebook_builder/mono_pkg.yaml +++ b/egamebook_builder/mono_pkg.yaml @@ -3,7 +3,8 @@ sdk: stages: - analyze: - - analyze: --fatal-infos --fatal-warnings . + # TODO: re-add `--fatal-infos` + - analyze: --fatal-warnings . - format - unit_test: - test diff --git a/egamebook_builder/pubspec.yaml b/egamebook_builder/pubspec.yaml index dc104733..52b41a23 100644 --- a/egamebook_builder/pubspec.yaml +++ b/egamebook_builder/pubspec.yaml @@ -1,12 +1,12 @@ name: egamebook_builder description: Builders for egamebook. -version: 1.0.0 +version: 1.0.1 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: - analyzer: ^2.7.0 + analyzer: ^6.5.0 build: ^2.1.1 code_builder: ^4.1.0 dart_style: ^2.2.0 diff --git a/tool/ci.sh b/tool/ci.sh index 137284bd..53dc70d0 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.0.0 +# Created with package:mono_repo v6.6.1 # Support built in commands on windows out of the box. + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". -# This assumes that the Flutter SDK has been installed in a previous step. + function format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -67,13 +63,17 @@ for PKG in ${PKGS}; do echo echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" case ${TASK} in - analyze) + analyze_0) echo 'dart analyze --fatal-infos --fatal-warnings .' dart analyze --fatal-infos --fatal-warnings . || EXIT_CODE=$? ;; + analyze_1) + echo 'dart analyze --fatal-warnings .' + dart analyze --fatal-warnings . || EXIT_CODE=$? + ;; command) - echo 'pub run build_runner build --delete-conflicting-outputs && dart test' - pub run build_runner build --delete-conflicting-outputs && dart test || EXIT_CODE=$? + echo 'dart run build_runner build --delete-conflicting-outputs && dart test' + dart run build_runner build --delete-conflicting-outputs && dart test || EXIT_CODE=$? ;; format) echo 'dart format --output=none --set-exit-if-changed .'