gameboy_worlds.emulation.sword_of_hope.test_metrics

   1from gameboy_worlds.emulation.sword_of_hope.parsers import (
   2    SwordOfHope1Parser,
   3    SwordOfHope2Parser,
   4)
   5from gameboy_worlds.emulation.tracker import (
   6    RegionMatchTerminationMetric,
   7    TerminationMetric,
   8    RegionMatchSubGoal,
   9)
  10
  11
  12class MillRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  13    REQUIRED_PARSER = SwordOfHope1Parser
  14
  15    _TERMINATION_NAMED_REGION = "room_label"
  16    _TERMINATION_TARGET_NAME = "mill_room"
  17
  18
  19class ShamanRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  20    REQUIRED_PARSER = SwordOfHope1Parser
  21
  22    _TERMINATION_NAMED_REGION = "room_label"
  23    _TERMINATION_TARGET_NAME = "shaman_room"
  24
  25
  26class OldmanHouseSubGoal(RegionMatchSubGoal):
  27    NAME = "oldman_house"
  28    _NAMED_REGION = "room_label"
  29    _TARGET_NAME = "oldman_house"
  30
  31
  32class InForestSubGoal(RegionMatchSubGoal):
  33    NAME = "in_forest"
  34    _NAMED_REGION = "room_label"
  35    _TARGET_NAME = "in_forest"
  36
  37
  38class ShamanHouseSubGoal(RegionMatchSubGoal):
  39    NAME = "shaman_house"
  40    _NAMED_REGION = "room_label"
  41    _TARGET_NAME = "shaman_house"
  42
  43
  44class DialogueClearedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  45    REQUIRED_PARSER = SwordOfHope1Parser
  46
  47    _TERMINATION_NAMED_REGION = "command_area"
  48    _TERMINATION_TARGET_NAME = "dialogue_cleared"
  49
  50
  51class DialogueActiveSubGoal(RegionMatchSubGoal):
  52    NAME = "dialogue_active"
  53    _NAMED_REGION = "command_area"
  54    _TARGET_NAME = "dialogue_active"
  55
  56
  57class BattleWonTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  58    REQUIRED_PARSER = SwordOfHope1Parser
  59
  60    _TERMINATION_NAMED_REGION = "battle_command"
  61    _TERMINATION_TARGET_NAME = "battle_won"
  62
  63
  64class BattleActiveSubGoal(RegionMatchSubGoal):
  65    NAME = "battle_active"
  66    _NAMED_REGION = "battle_command"
  67    _TARGET_NAME = "battle_active"
  68
  69
  70class ItemFoundTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  71    REQUIRED_PARSER = SwordOfHope1Parser
  72
  73    _TERMINATION_NAMED_REGION = "status_command"
  74    _TERMINATION_TARGET_NAME = "item_found"
  75
  76
  77class LookSelectedSubGoal(RegionMatchSubGoal):
  78    NAME = "look_selected"
  79    _NAMED_REGION = "command_area"
  80    _TARGET_NAME = "look_selected"
  81
  82
  83class LookTargetOptionsSubGoal(RegionMatchSubGoal):
  84    NAME = "look_target_options"
  85    _NAMED_REGION = "status_command"
  86    _TARGET_NAME = "look_target_options"
  87
  88
  89class PurchaseConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
  90    REQUIRED_PARSER = SwordOfHope1Parser
  91
  92    _TERMINATION_NAMED_REGION = "status_command"
  93    _TERMINATION_TARGET_NAME = "purchase_confirmed"
  94
  95
  96class ShopMenuOpenSubGoal(RegionMatchSubGoal):
  97    NAME = "shop_menu_open"
  98    _NAMED_REGION = "status_command"
  99    _TARGET_NAME = "shop_menu_open"
 100
 101
 102class ExplorationMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 103    REQUIRED_PARSER = SwordOfHope1Parser
 104
 105    _TERMINATION_NAMED_REGION = "command_area"
 106    _TERMINATION_TARGET_NAME = "exploration_menu"
 107
 108
 109class DialogueVisibleSubGoal(RegionMatchSubGoal):
 110    NAME = "dialogue_visible"
 111    _NAMED_REGION = "status_command"
 112    _TARGET_NAME = "dialogue_visible"
 113
 114
 115class DialogueAdvancedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 116    REQUIRED_PARSER = SwordOfHope1Parser
 117
 118    _TERMINATION_NAMED_REGION = "status_command"
 119    _TERMINATION_TARGET_NAME = "dialogue_advanced"
 120
 121
 122class DialogueInitiatedSubGoal(RegionMatchSubGoal):
 123    NAME = "dialogue_initiated"
 124    _NAMED_REGION = "status_command"
 125    _TARGET_NAME = "dialogue_initiated"
 126
 127
 128class MenuOpenSubGoal(RegionMatchSubGoal):
 129    NAME = "menu_open"
 130    _NAMED_REGION = "command_area"
 131    _TARGET_NAME = "menu_open"
 132
 133
 134class BattleMagicMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 135    REQUIRED_PARSER = SwordOfHope1Parser
 136
 137    _TERMINATION_NAMED_REGION = "battle_command"
 138    _TERMINATION_TARGET_NAME = "battle_magic_menu"
 139
 140
 141class TeleportResultTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 142    REQUIRED_PARSER = SwordOfHope1Parser
 143
 144    _TERMINATION_NAMED_REGION = "status_command"
 145    _TERMINATION_TARGET_NAME = "teleport_result"
 146
 147
 148class MagicMenuOpenSubGoal(RegionMatchSubGoal):
 149    NAME = "magic_menu_open"
 150    _NAMED_REGION = "status_command"
 151    _TARGET_NAME = "magic_menu_open"
 152
 153
 154class MistressSecondDialogueTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 155    REQUIRED_PARSER = SwordOfHope1Parser
 156
 157    _TERMINATION_NAMED_REGION = "battle_full"
 158    _TERMINATION_TARGET_NAME = "mistress_second_dialogue"
 159
 160
 161class MistressFirstDialogueSubGoal(RegionMatchSubGoal):
 162    NAME = "mistress_first_dialogue"
 163    _NAMED_REGION = "battle_full"
 164    _TARGET_NAME = "mistress_first_dialogue"
 165
 166
 167class SaveConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 168    REQUIRED_PARSER = SwordOfHope1Parser
 169
 170    _TERMINATION_NAMED_REGION = "battle_full"
 171    _TERMINATION_TARGET_NAME = "save_confirmed"
 172
 173
 174class SavePromptVisibleSubGoal(RegionMatchSubGoal):
 175    NAME = "save_prompt_visible"
 176    _NAMED_REGION = "battle_full"
 177    _TARGET_NAME = "save_prompt_visible"
 178
 179
 180class HerbReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 181    REQUIRED_PARSER = SwordOfHope1Parser
 182
 183    _TERMINATION_NAMED_REGION = "battle_full"
 184    _TERMINATION_TARGET_NAME = "herb_received"
 185
 186
 187class LookPathTargetSubGoal(RegionMatchSubGoal):
 188    NAME = "look_path_target"
 189    _NAMED_REGION = "battle_full"
 190    _TARGET_NAME = "look_path_target"
 191
 192
 193class HitTargetShownSubGoal(RegionMatchSubGoal):
 194    NAME = "hit_target_shown"
 195    _NAMED_REGION = "battle_full"
 196    _TARGET_NAME = "hit_target_shown"
 197
 198
 199class TreantDefeatedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 200    REQUIRED_PARSER = SwordOfHope1Parser
 201
 202    _TERMINATION_NAMED_REGION = "battle_full"
 203    _TERMINATION_TARGET_NAME = "treant_defeated"
 204
 205
 206class HitWallTargetSubGoal(RegionMatchSubGoal):
 207    NAME = "hit_wall_target"
 208    _NAMED_REGION = "battle_full"
 209    _TARGET_NAME = "hit_wall_target"
 210
 211
 212class GateOpenedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 213    REQUIRED_PARSER = SwordOfHope1Parser
 214
 215    _TERMINATION_NAMED_REGION = "battle_full"
 216    _TERMINATION_TARGET_NAME = "gate_opened"
 217
 218
 219class KeyMSelectedSubGoal(RegionMatchSubGoal):
 220    NAME = "key_m_selected"
 221    _NAMED_REGION = "battle_full"
 222    _TARGET_NAME = "key_m_selected"
 223
 224
 225class ScrollReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 226    REQUIRED_PARSER = SwordOfHope1Parser
 227
 228    _TERMINATION_NAMED_REGION = "battle_full"
 229    _TERMINATION_TARGET_NAME = "scroll_received"
 230
 231
 232class InBackroomSubGoal(RegionMatchSubGoal):
 233    NAME = "in_backroom"
 234    _NAMED_REGION = "battle_full"
 235    _TARGET_NAME = "in_backroom"
 236
 237
 238class CharmReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 239    REQUIRED_PARSER = SwordOfHope1Parser
 240
 241    _TERMINATION_NAMED_REGION = "battle_full"
 242    _TERMINATION_TARGET_NAME = "charm_received"
 243
 244
 245class GraceSelectedSubGoal(RegionMatchSubGoal):
 246    NAME = "grace_selected"
 247    _NAMED_REGION = "battle_full"
 248    _TARGET_NAME = "grace_selected"
 249
 250
 251class TeleportLandedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 252    REQUIRED_PARSER = SwordOfHope1Parser
 253
 254    _TERMINATION_NAMED_REGION = "status_command"
 255    _TERMINATION_TARGET_NAME = "teleport_landed"
 256
 257
 258class TeleportDestCursorSubGoal(RegionMatchSubGoal):
 259    NAME = "teleport_dest_cursor"
 260    _NAMED_REGION = "status_command"
 261    _TARGET_NAME = "teleport_dest_cursor"
 262
 263
 264class EscapeConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 265    REQUIRED_PARSER = SwordOfHope1Parser
 266
 267    _TERMINATION_NAMED_REGION = "battle_command"
 268    _TERMINATION_TARGET_NAME = "escape_confirmed"
 269
 270
 271# ---------------------------------------------------------------------------
 272# Sword of Hope 1 — cursor-on-command, view-state, and battle-AUTO metrics
 273# Mirror the SoH2 cursor_on_<command> pattern. Region = status_command (152x72)
 274# for the exploration command grid; battle_command for in-battle cursor.
 275# ---------------------------------------------------------------------------
 276
 277
 278class CursorOnLookTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 279    REQUIRED_PARSER = SwordOfHope1Parser
 280
 281    _TERMINATION_NAMED_REGION = "status_command"
 282    _TERMINATION_TARGET_NAME = "cursor_on_look"
 283
 284
 285class CursorOnOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 286    REQUIRED_PARSER = SwordOfHope1Parser
 287
 288    _TERMINATION_NAMED_REGION = "status_command"
 289    _TERMINATION_TARGET_NAME = "cursor_on_open"
 290
 291
 292class CursorOnUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 293    REQUIRED_PARSER = SwordOfHope1Parser
 294
 295    _TERMINATION_NAMED_REGION = "status_command"
 296    _TERMINATION_TARGET_NAME = "cursor_on_use"
 297
 298
 299class CursorOnMagicTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 300    REQUIRED_PARSER = SwordOfHope1Parser
 301
 302    _TERMINATION_NAMED_REGION = "status_command"
 303    _TERMINATION_TARGET_NAME = "cursor_on_magic"
 304
 305
 306class CursorOnHitTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 307    REQUIRED_PARSER = SwordOfHope1Parser
 308
 309    _TERMINATION_NAMED_REGION = "status_command"
 310    _TERMINATION_TARGET_NAME = "cursor_on_hit"
 311
 312
 313class CursorOnPowerTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 314    REQUIRED_PARSER = SwordOfHope1Parser
 315
 316    _TERMINATION_NAMED_REGION = "status_command"
 317    _TERMINATION_TARGET_NAME = "cursor_on_power"
 318
 319
 320class CursorOnLookSubGoal(RegionMatchSubGoal):
 321    NAME = "cursor_on_look"
 322    _NAMED_REGION = "status_command"
 323    _TARGET_NAME = "cursor_on_look"
 324
 325
 326class CursorOnOpenSubGoal(RegionMatchSubGoal):
 327    NAME = "cursor_on_open"
 328    _NAMED_REGION = "status_command"
 329    _TARGET_NAME = "cursor_on_open"
 330
 331
 332class CursorOnUseSubGoal(RegionMatchSubGoal):
 333    NAME = "cursor_on_use"
 334    _NAMED_REGION = "status_command"
 335    _TARGET_NAME = "cursor_on_use"
 336
 337
 338class CursorOnMagicSubGoal(RegionMatchSubGoal):
 339    NAME = "cursor_on_magic"
 340    _NAMED_REGION = "status_command"
 341    _TARGET_NAME = "cursor_on_magic"
 342
 343
 344class CursorOnHitSubGoal(RegionMatchSubGoal):
 345    NAME = "cursor_on_hit"
 346    _NAMED_REGION = "status_command"
 347    _TARGET_NAME = "cursor_on_hit"
 348
 349
 350class CursorOnPowerSubGoal(RegionMatchSubGoal):
 351    NAME = "cursor_on_power"
 352    _NAMED_REGION = "status_command"
 353    _TARGET_NAME = "cursor_on_power"
 354
 355
 356class PowerStatsFirstPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 357    REQUIRED_PARSER = SwordOfHope1Parser
 358
 359    _TERMINATION_NAMED_REGION = "status_command"
 360    _TERMINATION_TARGET_NAME = "power_stats_first_page"
 361
 362
 363class CursorOnAutoTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 364    REQUIRED_PARSER = SwordOfHope1Parser
 365
 366    _TERMINATION_NAMED_REGION = "battle_command"
 367    _TERMINATION_TARGET_NAME = "cursor_on_auto"
 368
 369
 370# ---------------------------------------------------------------------------
 371# Sword of Hope 1 — sub-scope variants reusing existing captures.
 372# Each terminates on an intermediate state that other trackers use as a
 373# subgoal, creating shorter-scope evaluation tasks.
 374# ---------------------------------------------------------------------------
 375
 376
 377class ShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 378    REQUIRED_PARSER = SwordOfHope1Parser
 379
 380    _TERMINATION_NAMED_REGION = "status_command"
 381    _TERMINATION_TARGET_NAME = "shop_menu_open"
 382
 383
 384class LookSelectedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 385    REQUIRED_PARSER = SwordOfHope1Parser
 386
 387    _TERMINATION_NAMED_REGION = "command_area"
 388    _TERMINATION_TARGET_NAME = "look_selected"
 389
 390
 391class MenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 392    REQUIRED_PARSER = SwordOfHope1Parser
 393
 394    _TERMINATION_NAMED_REGION = "command_area"
 395    _TERMINATION_TARGET_NAME = "menu_open"
 396
 397
 398class MagicMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 399    REQUIRED_PARSER = SwordOfHope1Parser
 400
 401    _TERMINATION_NAMED_REGION = "status_command"
 402    _TERMINATION_TARGET_NAME = "magic_menu_open"
 403
 404
 405class DialogueInitiatedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 406    REQUIRED_PARSER = SwordOfHope1Parser
 407
 408    _TERMINATION_NAMED_REGION = "status_command"
 409    _TERMINATION_TARGET_NAME = "dialogue_initiated"
 410
 411
 412# ---------------------------------------------------------------------------
 413# Sword of Hope 2 metrics (5-task starter set)
 414# ---------------------------------------------------------------------------
 415
 416
 417class SoH2DialogueClearedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 418    REQUIRED_PARSER = SwordOfHope2Parser
 419
 420    _TERMINATION_NAMED_REGION = "status_command"
 421    _TERMINATION_TARGET_NAME = "dialogue_cleared"
 422
 423
 424class SoH2DialogueActiveSubGoal(RegionMatchSubGoal):
 425    NAME = "dialogue_active"
 426    _NAMED_REGION = "status_command"
 427    _TARGET_NAME = "dialogue_active"
 428
 429
 430class SoH2DialogueAdvancedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 431    REQUIRED_PARSER = SwordOfHope2Parser
 432
 433    _TERMINATION_NAMED_REGION = "status_command"
 434    _TERMINATION_TARGET_NAME = "dialogue_advanced"
 435
 436
 437class SoH2DialogueInitiatedSubGoal(RegionMatchSubGoal):
 438    NAME = "dialogue_initiated"
 439    _NAMED_REGION = "status_command"
 440    _TARGET_NAME = "dialogue_initiated"
 441
 442
 443class SoH2ExplorationMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 444    REQUIRED_PARSER = SwordOfHope2Parser
 445
 446    _TERMINATION_NAMED_REGION = "command_area"
 447    _TERMINATION_TARGET_NAME = "exploration_menu"
 448
 449
 450class SoH2PowerMenuLastSlideSubGoal(RegionMatchSubGoal):
 451    NAME = "power_menu_last_slide"
 452    _NAMED_REGION = "command_area"
 453    _TARGET_NAME = "power_menu_last_slide"
 454
 455
 456class SoH2DialogueVisibleSubGoal(RegionMatchSubGoal):
 457    NAME = "dialogue_visible"
 458    _NAMED_REGION = "status_command"
 459    _TARGET_NAME = "dialogue_visible"
 460
 461
 462class SoH2FirstAdjacentRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 463    REQUIRED_PARSER = SwordOfHope2Parser
 464
 465    _TERMINATION_NAMED_REGION = "soh2_room_label"
 466    _TERMINATION_TARGET_NAME = "riccar_castle"
 467
 468
 469class SoH2StarterRoomSubGoal(RegionMatchSubGoal):
 470    NAME = "kings_room"
 471    _NAMED_REGION = "soh2_room_label"
 472    _TARGET_NAME = "kings_room"
 473
 474
 475class SoH2BattleWonTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 476    REQUIRED_PARSER = SwordOfHope2Parser
 477
 478    _TERMINATION_NAMED_REGION = "status_command"
 479    _TERMINATION_TARGET_NAME = "battle_won"
 480
 481
 482class SoH2BattleActiveSubGoal(RegionMatchSubGoal):
 483    NAME = "battle_active"
 484    _NAMED_REGION = "soh2_battle_command"
 485    _TARGET_NAME = "battle_active"
 486
 487
 488class SoH2EscapeConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 489    REQUIRED_PARSER = SwordOfHope2Parser
 490
 491    _TERMINATION_NAMED_REGION = "status_command"
 492    _TERMINATION_TARGET_NAME = "escape_confirmed"
 493
 494
 495class SoH2WheatPurchasedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 496    REQUIRED_PARSER = SwordOfHope2Parser
 497
 498    _TERMINATION_NAMED_REGION = "status_command"
 499    _TERMINATION_TARGET_NAME = "wheat_purchased"
 500
 501
 502class SoH2ShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 503    REQUIRED_PARSER = SwordOfHope2Parser
 504
 505    _TERMINATION_NAMED_REGION = "full_screen"
 506    _TERMINATION_TARGET_NAME = "shop_menu_open"
 507
 508
 509class SoH2ShopMenuOpenSubGoal(RegionMatchSubGoal):
 510    NAME = "shop_menu_open"
 511    _NAMED_REGION = "full_screen"
 512    _TARGET_NAME = "shop_menu_open"
 513
 514
 515class SoH2BattleMagicMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 516    REQUIRED_PARSER = SwordOfHope2Parser
 517
 518    _TERMINATION_NAMED_REGION = "status_command"
 519    _TERMINATION_TARGET_NAME = "battle_magic_menu"
 520
 521
 522class SoH2MotionResultTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 523    REQUIRED_PARSER = SwordOfHope2Parser
 524
 525    _TERMINATION_NAMED_REGION = "status_command"
 526    _TERMINATION_TARGET_NAME = "motion_result"
 527
 528
 529class SoH2MagicMenuOpenSubGoal(RegionMatchSubGoal):
 530    NAME = "magic_menu_open"
 531    _NAMED_REGION = "full_screen"
 532    _TARGET_NAME = "magic_menu_open"
 533
 534
 535class SoH2LookTargetSubGoal(RegionMatchSubGoal):
 536    NAME = "look_target"
 537    _NAMED_REGION = "full_screen"
 538    _TARGET_NAME = "look_target"
 539
 540
 541class SoH2CprSwordPurchasedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 542    REQUIRED_PARSER = SwordOfHope2Parser
 543
 544    _TERMINATION_NAMED_REGION = "status_command"
 545    _TERMINATION_TARGET_NAME = "cpr_sword_purchased"
 546
 547
 548class SoH2WeaponsShopMenuOpenSubGoal(RegionMatchSubGoal):
 549    NAME = "weapons_shop_menu_open"
 550    _NAMED_REGION = "full_screen"
 551    _TARGET_NAME = "weapons_shop_menu_open"
 552
 553
 554class SoH2CursorOnAutoTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 555    REQUIRED_PARSER = SwordOfHope2Parser
 556
 557    _TERMINATION_NAMED_REGION = "soh2_battle_command"
 558    _TERMINATION_TARGET_NAME = "cursor_on_auto"
 559
 560
 561class SoH2WheatFromTreeTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 562    REQUIRED_PARSER = SwordOfHope2Parser
 563
 564    _TERMINATION_NAMED_REGION = "status_command"
 565    _TERMINATION_TARGET_NAME = "wheat_from_tree"
 566
 567
 568class SoH2HitTreeTargetSubGoal(RegionMatchSubGoal):
 569    NAME = "hit_tree_target"
 570    _NAMED_REGION = "full_screen"
 571    _TARGET_NAME = "hit_tree_target"
 572
 573
 574class SoH2UseMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 575    REQUIRED_PARSER = SwordOfHope2Parser
 576
 577    _TERMINATION_NAMED_REGION = "full_screen"
 578    _TERMINATION_TARGET_NAME = "use_menu_open"
 579
 580
 581class SoH2ItemMenuOpenSubGoal(RegionMatchSubGoal):
 582    NAME = "item_menu_open"
 583    _NAMED_REGION = "full_screen"
 584    _TARGET_NAME = "item_menu_open"
 585
 586
 587class SoH2UseMenuOpenSubGoal(RegionMatchSubGoal):
 588    NAME = "use_menu_open"
 589    _NAMED_REGION = "full_screen"
 590    _TARGET_NAME = "use_menu_open"
 591
 592
 593class SoH2WheatConsumedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 594    REQUIRED_PARSER = SwordOfHope2Parser
 595
 596    _TERMINATION_NAMED_REGION = "status_command"
 597    _TERMINATION_TARGET_NAME = "wheat_consumed"
 598
 599
 600class SoH2CursorOnWheatSubGoal(RegionMatchSubGoal):
 601    NAME = "cursor_on_wheat"
 602    _NAMED_REGION = "full_screen"
 603    _TARGET_NAME = "cursor_on_wheat"
 604
 605
 606class SoH2PowerStatsExpPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 607    REQUIRED_PARSER = SwordOfHope2Parser
 608
 609    _TERMINATION_NAMED_REGION = "status_command"
 610    _TERMINATION_TARGET_NAME = "power_stats_exp_page"
 611
 612
 613class SoH2PowerStatsExpPageSubGoal(RegionMatchSubGoal):
 614    NAME = "power_stats_exp_page"
 615    _NAMED_REGION = "status_command"
 616    _TARGET_NAME = "power_stats_exp_page"
 617
 618
 619class SoH2CursorOnPowerSubGoal(RegionMatchSubGoal):
 620    NAME = "cursor_on_power"
 621    _NAMED_REGION = "status_command"
 622    _TARGET_NAME = "cursor_on_power"
 623
 624
 625class SoH2PowerStatsFirstPageSubGoal(RegionMatchSubGoal):
 626    NAME = "power_stats_first_page"
 627    _NAMED_REGION = "status_command"
 628    _TARGET_NAME = "power_stats_first_page"
 629
 630
 631class SoH2CursorOnLookTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 632    REQUIRED_PARSER = SwordOfHope2Parser
 633
 634    _TERMINATION_NAMED_REGION = "status_command"
 635    _TERMINATION_TARGET_NAME = "cursor_on_look"
 636
 637
 638class SoH2CursorOnItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 639    REQUIRED_PARSER = SwordOfHope2Parser
 640
 641    _TERMINATION_NAMED_REGION = "status_command"
 642    _TERMINATION_TARGET_NAME = "cursor_on_item"
 643
 644
 645class SoH2CursorOnOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 646    REQUIRED_PARSER = SwordOfHope2Parser
 647
 648    _TERMINATION_NAMED_REGION = "status_command"
 649    _TERMINATION_TARGET_NAME = "cursor_on_open"
 650
 651
 652class SoH2CursorOnMagicTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 653    REQUIRED_PARSER = SwordOfHope2Parser
 654
 655    _TERMINATION_NAMED_REGION = "status_command"
 656    _TERMINATION_TARGET_NAME = "cursor_on_magic"
 657
 658
 659class SoH2CursorOnHitTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 660    REQUIRED_PARSER = SwordOfHope2Parser
 661
 662    _TERMINATION_NAMED_REGION = "status_command"
 663    _TERMINATION_TARGET_NAME = "cursor_on_hit"
 664
 665
 666class SoH2CursorOnPowerTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 667    REQUIRED_PARSER = SwordOfHope2Parser
 668
 669    _TERMINATION_NAMED_REGION = "status_command"
 670    _TERMINATION_TARGET_NAME = "cursor_on_power"
 671
 672
 673# Subgoal versions of cursor_on_<command> for the cycle-through task.
 674# Same regions/targets as the terminator versions, just different role.
 675
 676class SoH2CursorOnLookSubGoal(RegionMatchSubGoal):
 677    NAME = "cursor_on_look"
 678    _NAMED_REGION = "status_command"
 679    _TARGET_NAME = "cursor_on_look"
 680
 681
 682class SoH2CursorOnItemSubGoal(RegionMatchSubGoal):
 683    NAME = "cursor_on_item"
 684    _NAMED_REGION = "status_command"
 685    _TARGET_NAME = "cursor_on_item"
 686
 687
 688class SoH2CursorOnOpenSubGoal(RegionMatchSubGoal):
 689    NAME = "cursor_on_open"
 690    _NAMED_REGION = "status_command"
 691    _TARGET_NAME = "cursor_on_open"
 692
 693
 694class SoH2CursorOnMagicSubGoal(RegionMatchSubGoal):
 695    NAME = "cursor_on_magic"
 696    _NAMED_REGION = "status_command"
 697    _TARGET_NAME = "cursor_on_magic"
 698
 699
 700class SoH2CursorOnHitSubGoal(RegionMatchSubGoal):
 701    NAME = "cursor_on_hit"
 702    _NAMED_REGION = "status_command"
 703    _TARGET_NAME = "cursor_on_hit"
 704
 705
 706class SoH2LookShopkeeperSubGoal(RegionMatchSubGoal):
 707    NAME = "look_shopkeeper"
 708    _NAMED_REGION = "full_screen"
 709    _TARGET_NAME = "look_shopkeeper"
 710
 711
 712class SoH2ShopBuySellMenuSubGoal(RegionMatchSubGoal):
 713    NAME = "shop_buy_sell_menu"
 714    _NAMED_REGION = "full_screen"
 715    _TARGET_NAME = "shop_buy_sell_menu"
 716
 717
 718class SoH2CursorOnCprSwordSubGoal(RegionMatchSubGoal):
 719    NAME = "cursor_on_cpr_sword"
 720    _NAMED_REGION = "full_screen"
 721    _TARGET_NAME = "cursor_on_cpr_sword"
 722
 723
 724# ---------------------------------------------------------------------------
 725# SoH2 +7 batch terminators — all reuse existing capture targets. The matching
 726# SubGoal classes were defined earlier; these are the role-swapped Terminate
 727# versions used as the goal state for shorter sub-scope tests.
 728# ---------------------------------------------------------------------------
 729
 730
 731class SoH2PowerStatsFirstPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 732    REQUIRED_PARSER = SwordOfHope2Parser
 733
 734    _TERMINATION_NAMED_REGION = "status_command"
 735    _TERMINATION_TARGET_NAME = "power_stats_first_page"
 736
 737
 738class SoH2MagicMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 739    REQUIRED_PARSER = SwordOfHope2Parser
 740
 741    _TERMINATION_NAMED_REGION = "full_screen"
 742    _TERMINATION_TARGET_NAME = "magic_menu_open"
 743
 744
 745class SoH2ItemMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 746    REQUIRED_PARSER = SwordOfHope2Parser
 747
 748    _TERMINATION_NAMED_REGION = "full_screen"
 749    _TERMINATION_TARGET_NAME = "item_menu_open"
 750
 751
 752class SoH2LookShopkeeperTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 753    REQUIRED_PARSER = SwordOfHope2Parser
 754
 755    _TERMINATION_NAMED_REGION = "full_screen"
 756    _TERMINATION_TARGET_NAME = "look_shopkeeper"
 757
 758
 759class SoH2WeaponsShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 760    REQUIRED_PARSER = SwordOfHope2Parser
 761
 762    _TERMINATION_NAMED_REGION = "full_screen"
 763    _TERMINATION_TARGET_NAME = "weapons_shop_menu_open"
 764
 765
 766class SoH2CursorOnCprSwordTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 767    REQUIRED_PARSER = SwordOfHope2Parser
 768
 769    _TERMINATION_NAMED_REGION = "full_screen"
 770    _TERMINATION_TARGET_NAME = "cursor_on_cpr_sword"
 771
 772
 773class SoH2ShopBuySellMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 774    REQUIRED_PARSER = SwordOfHope2Parser
 775
 776    _TERMINATION_NAMED_REGION = "full_screen"
 777    _TERMINATION_TARGET_NAME = "shop_buy_sell_menu"
 778
 779
 780class SoH2CursorOnWheatTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 781    REQUIRED_PARSER = SwordOfHope2Parser
 782
 783    _TERMINATION_NAMED_REGION = "full_screen"
 784    _TERMINATION_TARGET_NAME = "cursor_on_wheat"
 785
 786
 787class SoH2CursorOnClashTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 788    REQUIRED_PARSER = SwordOfHope2Parser
 789
 790    _TERMINATION_NAMED_REGION = "soh2_battle_command"
 791    _TERMINATION_TARGET_NAME = "cursor_on_clash"
 792
 793
 794class SoH2Temple1fTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 795    REQUIRED_PARSER = SwordOfHope2Parser
 796
 797    _TERMINATION_NAMED_REGION = "soh2_room_label"
 798    _TERMINATION_TARGET_NAME = "temple_1f"
 799
 800
 801class SoH2OutsideTempleSubGoal(RegionMatchSubGoal):
 802    NAME = "outside_temple"
 803    _NAMED_REGION = "soh2_room_label"
 804    _TARGET_NAME = "outside_temple"
 805
 806
 807# ---------------------------------------------------------------------------
 808# SoH1 — reasoning-hard task metrics (50-task push)
 809# Mix of: (a) reuse-existing-targets for menu-cancel reasoning chains, and
 810# (b) capture-pending targets for cursor-on-specific-list-item reasoning.
 811# ---------------------------------------------------------------------------
 812
 813
 814class BattleActiveTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 815    REQUIRED_PARSER = SwordOfHope1Parser
 816
 817    _TERMINATION_NAMED_REGION = "battle_command"
 818    _TERMINATION_TARGET_NAME = "battle_active"
 819
 820
 821class TeleportDestCursorTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 822    REQUIRED_PARSER = SwordOfHope1Parser
 823
 824    _TERMINATION_NAMED_REGION = "status_command"
 825    _TERMINATION_TARGET_NAME = "teleport_dest_cursor"
 826
 827
 828class LookTargetOptionsTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 829    REQUIRED_PARSER = SwordOfHope1Parser
 830
 831    _TERMINATION_NAMED_REGION = "status_command"
 832    _TERMINATION_TARGET_NAME = "look_target_options"
 833
 834
 835class CursorOnFirebalTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 836    REQUIRED_PARSER = SwordOfHope1Parser
 837
 838    _TERMINATION_NAMED_REGION = "battle_command"
 839    _TERMINATION_TARGET_NAME = "cursor_on_firebal"
 840
 841
 842class CursorOnFirebal2TerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 843    REQUIRED_PARSER = SwordOfHope1Parser
 844
 845    _TERMINATION_NAMED_REGION = "battle_command"
 846    _TERMINATION_TARGET_NAME = "cursor_on_firebal2"
 847
 848
 849class CursorOnStripallTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 850    REQUIRED_PARSER = SwordOfHope1Parser
 851
 852    _TERMINATION_NAMED_REGION = "battle_command"
 853    _TERMINATION_TARGET_NAME = "cursor_on_stripall"
 854
 855
 856class CursorOnFirebalSubGoal(RegionMatchSubGoal):
 857    NAME = "cursor_on_firebal"
 858    _NAMED_REGION = "battle_command"
 859    _TARGET_NAME = "cursor_on_firebal"
 860
 861
 862class CursorOnFirebal2SubGoal(RegionMatchSubGoal):
 863    NAME = "cursor_on_firebal2"
 864    _NAMED_REGION = "battle_command"
 865    _TARGET_NAME = "cursor_on_firebal2"
 866
 867
 868class CursorOnStripallSubGoal(RegionMatchSubGoal):
 869    NAME = "cursor_on_stripall"
 870    _NAMED_REGION = "battle_command"
 871    _TARGET_NAME = "cursor_on_stripall"
 872
 873
 874class CursorOnTeleportOldmanTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 875    REQUIRED_PARSER = SwordOfHope1Parser
 876
 877    _TERMINATION_NAMED_REGION = "status_command"
 878    _TERMINATION_TARGET_NAME = "cursor_on_teleport_oldman"
 879
 880
 881class CursorOnHerbUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 882    REQUIRED_PARSER = SwordOfHope1Parser
 883
 884    _TERMINATION_NAMED_REGION = "status_command"
 885    _TERMINATION_TARGET_NAME = "cursor_on_herb_use"
 886
 887
 888class CursorOnKeymUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 889    REQUIRED_PARSER = SwordOfHope1Parser
 890
 891    _TERMINATION_NAMED_REGION = "status_command"
 892    _TERMINATION_TARGET_NAME = "cursor_on_keym_use"
 893
 894
 895class OldmanHouseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 896    REQUIRED_PARSER = SwordOfHope1Parser
 897
 898    _TERMINATION_NAMED_REGION = "room_label"
 899    _TERMINATION_TARGET_NAME = "oldman_house"
 900
 901
 902class PowerStatsLastPageSubGoal(RegionMatchSubGoal):
 903    NAME = "power_stats_last_page"
 904    _NAMED_REGION = "status_command"
 905    _TARGET_NAME = "power_stats_last_page"
 906
 907
 908class CursorOnTeleportOldmanSubGoal(RegionMatchSubGoal):
 909    NAME = "cursor_on_teleport_oldman"
 910    _NAMED_REGION = "status_command"
 911    _TARGET_NAME = "cursor_on_teleport_oldman"
 912
 913
 914class PowerStatsFirstPageSubGoal(RegionMatchSubGoal):
 915    NAME = "power_stats_first_page"
 916    _NAMED_REGION = "status_command"
 917    _TARGET_NAME = "power_stats_first_page"
 918
 919
 920class BattleMagicMenuSubGoal(RegionMatchSubGoal):
 921    NAME = "battle_magic_menu"
 922    _NAMED_REGION = "battle_command"
 923    _TARGET_NAME = "battle_magic_menu"
 924
 925
 926# ---------------------------------------------------------------------------
 927# SoH2 — reasoning-hard task metrics (50-task push)
 928# ---------------------------------------------------------------------------
 929
 930
 931class SoH2BattleActiveTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 932    REQUIRED_PARSER = SwordOfHope2Parser
 933
 934    _TERMINATION_NAMED_REGION = "soh2_battle_command"
 935    _TERMINATION_TARGET_NAME = "battle_active"
 936
 937
 938class SoH2CursorOnMotionTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 939    REQUIRED_PARSER = SwordOfHope2Parser
 940
 941    _TERMINATION_NAMED_REGION = "status_command"
 942    _TERMINATION_TARGET_NAME = "cursor_on_motion"
 943
 944
 945class SoH2CursorOnTheoSubGoal(RegionMatchSubGoal):
 946    NAME = "cursor_on_theo"
 947    _NAMED_REGION = "status_command"
 948    _TARGET_NAME = "cursor_on_theo"
 949
 950
 951class SoH2CursorOnShopFirstItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 952    REQUIRED_PARSER = SwordOfHope2Parser
 953
 954    _TERMINATION_NAMED_REGION = "full_screen"
 955    _TERMINATION_TARGET_NAME = "cursor_on_shop_first_item"
 956
 957
 958class SoH2CursorOnShopFirstItemSubGoal(RegionMatchSubGoal):
 959    NAME = "cursor_on_shop_first_item"
 960    _NAMED_REGION = "full_screen"
 961    _TARGET_NAME = "cursor_on_shop_first_item"
 962
 963
 964class SoH2CursorOnShopThirdItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 965    REQUIRED_PARSER = SwordOfHope2Parser
 966
 967    _TERMINATION_NAMED_REGION = "full_screen"
 968    _TERMINATION_TARGET_NAME = "cursor_on_shop_third_item"
 969
 970
 971class SoH2CursorOnFirstWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 972    REQUIRED_PARSER = SwordOfHope2Parser
 973
 974    _TERMINATION_NAMED_REGION = "full_screen"
 975    _TERMINATION_TARGET_NAME = "cursor_on_first_weapon"
 976
 977
 978class SoH2CursorOnFirstWeaponSubGoal(RegionMatchSubGoal):
 979    NAME = "cursor_on_first_weapon"
 980    _NAMED_REGION = "full_screen"
 981    _TARGET_NAME = "cursor_on_first_weapon"
 982
 983
 984class SoH2CursorOnSecondWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 985    REQUIRED_PARSER = SwordOfHope2Parser
 986
 987    _TERMINATION_NAMED_REGION = "full_screen"
 988    _TERMINATION_TARGET_NAME = "cursor_on_second_weapon"
 989
 990
 991class SoH2CursorOnSecondWeaponSubGoal(RegionMatchSubGoal):
 992    NAME = "cursor_on_second_weapon"
 993    _NAMED_REGION = "full_screen"
 994    _TARGET_NAME = "cursor_on_second_weapon"
 995
 996
 997class SoH2CursorOnThirdWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 998    REQUIRED_PARSER = SwordOfHope2Parser
 999
1000    _TERMINATION_NAMED_REGION = "full_screen"
1001    _TERMINATION_TARGET_NAME = "cursor_on_third_weapon"
1002
1003
1004class SoH2LookTreeTargetTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
1005    REQUIRED_PARSER = SwordOfHope2Parser
1006
1007    _TERMINATION_NAMED_REGION = "full_screen"
1008    _TERMINATION_TARGET_NAME = "look_tree_target"
1009
1010
1011class SoH2BattleMagicMenuSubGoal(RegionMatchSubGoal):
1012    NAME = "battle_magic_menu"
1013    _NAMED_REGION = "status_command"
1014    _TARGET_NAME = "battle_magic_menu"
1015
1016
1017class SoH2WeaponsShopMenuOpenSubGoalAlias(RegionMatchSubGoal):
1018    """Alias for SoH2WeaponsShopMenuOpenSubGoal under canonical naming."""
1019
1020    NAME = "weapons_shop_menu_open"
1021    _NAMED_REGION = "full_screen"
1022    _TARGET_NAME = "weapons_shop_menu_open"
1023
1024
1025class SoH2CursorOnAutoSubGoal(RegionMatchSubGoal):
1026    NAME = "cursor_on_auto"
1027    _NAMED_REGION = "soh2_battle_command"
1028    _TARGET_NAME = "cursor_on_auto"
1029
1030
1031class SoH2CursorOnClashSubGoal(RegionMatchSubGoal):
1032    NAME = "cursor_on_clash"
1033    _NAMED_REGION = "soh2_battle_command"
1034    _TARGET_NAME = "cursor_on_clash"
13class MillRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
14    REQUIRED_PARSER = SwordOfHope1Parser
15
16    _TERMINATION_NAMED_REGION = "room_label"
17    _TERMINATION_TARGET_NAME = "mill_room"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

20class ShamanRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
21    REQUIRED_PARSER = SwordOfHope1Parser
22
23    _TERMINATION_NAMED_REGION = "room_label"
24    _TERMINATION_TARGET_NAME = "shaman_room"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class OldmanHouseSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
27class OldmanHouseSubGoal(RegionMatchSubGoal):
28    NAME = "oldman_house"
29    _NAMED_REGION = "room_label"
30    _TARGET_NAME = "oldman_house"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'oldman_house'

Name of the subgoal.

class InForestSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
33class InForestSubGoal(RegionMatchSubGoal):
34    NAME = "in_forest"
35    _NAMED_REGION = "room_label"
36    _TARGET_NAME = "in_forest"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'in_forest'

Name of the subgoal.

class ShamanHouseSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
39class ShamanHouseSubGoal(RegionMatchSubGoal):
40    NAME = "shaman_house"
41    _NAMED_REGION = "room_label"
42    _TARGET_NAME = "shaman_house"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'shaman_house'

Name of the subgoal.

45class DialogueClearedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
46    REQUIRED_PARSER = SwordOfHope1Parser
47
48    _TERMINATION_NAMED_REGION = "command_area"
49    _TERMINATION_TARGET_NAME = "dialogue_cleared"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class DialogueActiveSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
52class DialogueActiveSubGoal(RegionMatchSubGoal):
53    NAME = "dialogue_active"
54    _NAMED_REGION = "command_area"
55    _TARGET_NAME = "dialogue_active"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_active'

Name of the subgoal.

58class BattleWonTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
59    REQUIRED_PARSER = SwordOfHope1Parser
60
61    _TERMINATION_NAMED_REGION = "battle_command"
62    _TERMINATION_TARGET_NAME = "battle_won"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class BattleActiveSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
65class BattleActiveSubGoal(RegionMatchSubGoal):
66    NAME = "battle_active"
67    _NAMED_REGION = "battle_command"
68    _TARGET_NAME = "battle_active"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'battle_active'

Name of the subgoal.

71class ItemFoundTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
72    REQUIRED_PARSER = SwordOfHope1Parser
73
74    _TERMINATION_NAMED_REGION = "status_command"
75    _TERMINATION_TARGET_NAME = "item_found"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class LookSelectedSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
78class LookSelectedSubGoal(RegionMatchSubGoal):
79    NAME = "look_selected"
80    _NAMED_REGION = "command_area"
81    _TARGET_NAME = "look_selected"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'look_selected'

Name of the subgoal.

class LookTargetOptionsSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
84class LookTargetOptionsSubGoal(RegionMatchSubGoal):
85    NAME = "look_target_options"
86    _NAMED_REGION = "status_command"
87    _TARGET_NAME = "look_target_options"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'look_target_options'

Name of the subgoal.

90class PurchaseConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
91    REQUIRED_PARSER = SwordOfHope1Parser
92
93    _TERMINATION_NAMED_REGION = "status_command"
94    _TERMINATION_TARGET_NAME = "purchase_confirmed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class ShopMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
 97class ShopMenuOpenSubGoal(RegionMatchSubGoal):
 98    NAME = "shop_menu_open"
 99    _NAMED_REGION = "status_command"
100    _TARGET_NAME = "shop_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'shop_menu_open'

Name of the subgoal.

103class ExplorationMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
104    REQUIRED_PARSER = SwordOfHope1Parser
105
106    _TERMINATION_NAMED_REGION = "command_area"
107    _TERMINATION_TARGET_NAME = "exploration_menu"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class DialogueVisibleSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
110class DialogueVisibleSubGoal(RegionMatchSubGoal):
111    NAME = "dialogue_visible"
112    _NAMED_REGION = "status_command"
113    _TARGET_NAME = "dialogue_visible"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_visible'

Name of the subgoal.

116class DialogueAdvancedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
117    REQUIRED_PARSER = SwordOfHope1Parser
118
119    _TERMINATION_NAMED_REGION = "status_command"
120    _TERMINATION_TARGET_NAME = "dialogue_advanced"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class DialogueInitiatedSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
123class DialogueInitiatedSubGoal(RegionMatchSubGoal):
124    NAME = "dialogue_initiated"
125    _NAMED_REGION = "status_command"
126    _TARGET_NAME = "dialogue_initiated"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_initiated'

Name of the subgoal.

135class BattleMagicMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
136    REQUIRED_PARSER = SwordOfHope1Parser
137
138    _TERMINATION_NAMED_REGION = "battle_command"
139    _TERMINATION_TARGET_NAME = "battle_magic_menu"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

142class TeleportResultTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
143    REQUIRED_PARSER = SwordOfHope1Parser
144
145    _TERMINATION_NAMED_REGION = "status_command"
146    _TERMINATION_TARGET_NAME = "teleport_result"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class MagicMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
149class MagicMenuOpenSubGoal(RegionMatchSubGoal):
150    NAME = "magic_menu_open"
151    _NAMED_REGION = "status_command"
152    _TARGET_NAME = "magic_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'magic_menu_open'

Name of the subgoal.

155class MistressSecondDialogueTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
156    REQUIRED_PARSER = SwordOfHope1Parser
157
158    _TERMINATION_NAMED_REGION = "battle_full"
159    _TERMINATION_TARGET_NAME = "mistress_second_dialogue"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class MistressFirstDialogueSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
162class MistressFirstDialogueSubGoal(RegionMatchSubGoal):
163    NAME = "mistress_first_dialogue"
164    _NAMED_REGION = "battle_full"
165    _TARGET_NAME = "mistress_first_dialogue"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'mistress_first_dialogue'

Name of the subgoal.

168class SaveConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
169    REQUIRED_PARSER = SwordOfHope1Parser
170
171    _TERMINATION_NAMED_REGION = "battle_full"
172    _TERMINATION_TARGET_NAME = "save_confirmed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SavePromptVisibleSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
175class SavePromptVisibleSubGoal(RegionMatchSubGoal):
176    NAME = "save_prompt_visible"
177    _NAMED_REGION = "battle_full"
178    _TARGET_NAME = "save_prompt_visible"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'save_prompt_visible'

Name of the subgoal.

181class HerbReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
182    REQUIRED_PARSER = SwordOfHope1Parser
183
184    _TERMINATION_NAMED_REGION = "battle_full"
185    _TERMINATION_TARGET_NAME = "herb_received"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class LookPathTargetSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
188class LookPathTargetSubGoal(RegionMatchSubGoal):
189    NAME = "look_path_target"
190    _NAMED_REGION = "battle_full"
191    _TARGET_NAME = "look_path_target"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'look_path_target'

Name of the subgoal.

class HitTargetShownSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
194class HitTargetShownSubGoal(RegionMatchSubGoal):
195    NAME = "hit_target_shown"
196    _NAMED_REGION = "battle_full"
197    _TARGET_NAME = "hit_target_shown"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'hit_target_shown'

Name of the subgoal.

200class TreantDefeatedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
201    REQUIRED_PARSER = SwordOfHope1Parser
202
203    _TERMINATION_NAMED_REGION = "battle_full"
204    _TERMINATION_TARGET_NAME = "treant_defeated"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class HitWallTargetSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
207class HitWallTargetSubGoal(RegionMatchSubGoal):
208    NAME = "hit_wall_target"
209    _NAMED_REGION = "battle_full"
210    _TARGET_NAME = "hit_wall_target"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'hit_wall_target'

Name of the subgoal.

213class GateOpenedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
214    REQUIRED_PARSER = SwordOfHope1Parser
215
216    _TERMINATION_NAMED_REGION = "battle_full"
217    _TERMINATION_TARGET_NAME = "gate_opened"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class KeyMSelectedSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
220class KeyMSelectedSubGoal(RegionMatchSubGoal):
221    NAME = "key_m_selected"
222    _NAMED_REGION = "battle_full"
223    _TARGET_NAME = "key_m_selected"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'key_m_selected'

Name of the subgoal.

226class ScrollReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
227    REQUIRED_PARSER = SwordOfHope1Parser
228
229    _TERMINATION_NAMED_REGION = "battle_full"
230    _TERMINATION_TARGET_NAME = "scroll_received"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class InBackroomSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
233class InBackroomSubGoal(RegionMatchSubGoal):
234    NAME = "in_backroom"
235    _NAMED_REGION = "battle_full"
236    _TARGET_NAME = "in_backroom"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'in_backroom'

Name of the subgoal.

239class CharmReceivedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
240    REQUIRED_PARSER = SwordOfHope1Parser
241
242    _TERMINATION_NAMED_REGION = "battle_full"
243    _TERMINATION_TARGET_NAME = "charm_received"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class GraceSelectedSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
246class GraceSelectedSubGoal(RegionMatchSubGoal):
247    NAME = "grace_selected"
248    _NAMED_REGION = "battle_full"
249    _TARGET_NAME = "grace_selected"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'grace_selected'

Name of the subgoal.

252class TeleportLandedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
253    REQUIRED_PARSER = SwordOfHope1Parser
254
255    _TERMINATION_NAMED_REGION = "status_command"
256    _TERMINATION_TARGET_NAME = "teleport_landed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class TeleportDestCursorSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
259class TeleportDestCursorSubGoal(RegionMatchSubGoal):
260    NAME = "teleport_dest_cursor"
261    _NAMED_REGION = "status_command"
262    _TARGET_NAME = "teleport_dest_cursor"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'teleport_dest_cursor'

Name of the subgoal.

265class EscapeConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
266    REQUIRED_PARSER = SwordOfHope1Parser
267
268    _TERMINATION_NAMED_REGION = "battle_command"
269    _TERMINATION_TARGET_NAME = "escape_confirmed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

279class CursorOnLookTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
280    REQUIRED_PARSER = SwordOfHope1Parser
281
282    _TERMINATION_NAMED_REGION = "status_command"
283    _TERMINATION_TARGET_NAME = "cursor_on_look"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

286class CursorOnOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
287    REQUIRED_PARSER = SwordOfHope1Parser
288
289    _TERMINATION_NAMED_REGION = "status_command"
290    _TERMINATION_TARGET_NAME = "cursor_on_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

293class CursorOnUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
294    REQUIRED_PARSER = SwordOfHope1Parser
295
296    _TERMINATION_NAMED_REGION = "status_command"
297    _TERMINATION_TARGET_NAME = "cursor_on_use"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

300class CursorOnMagicTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
301    REQUIRED_PARSER = SwordOfHope1Parser
302
303    _TERMINATION_NAMED_REGION = "status_command"
304    _TERMINATION_TARGET_NAME = "cursor_on_magic"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

307class CursorOnHitTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
308    REQUIRED_PARSER = SwordOfHope1Parser
309
310    _TERMINATION_NAMED_REGION = "status_command"
311    _TERMINATION_TARGET_NAME = "cursor_on_hit"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

314class CursorOnPowerTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
315    REQUIRED_PARSER = SwordOfHope1Parser
316
317    _TERMINATION_NAMED_REGION = "status_command"
318    _TERMINATION_TARGET_NAME = "cursor_on_power"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class CursorOnLookSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
321class CursorOnLookSubGoal(RegionMatchSubGoal):
322    NAME = "cursor_on_look"
323    _NAMED_REGION = "status_command"
324    _TARGET_NAME = "cursor_on_look"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_look'

Name of the subgoal.

class CursorOnOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
327class CursorOnOpenSubGoal(RegionMatchSubGoal):
328    NAME = "cursor_on_open"
329    _NAMED_REGION = "status_command"
330    _TARGET_NAME = "cursor_on_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_open'

Name of the subgoal.

class CursorOnUseSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
333class CursorOnUseSubGoal(RegionMatchSubGoal):
334    NAME = "cursor_on_use"
335    _NAMED_REGION = "status_command"
336    _TARGET_NAME = "cursor_on_use"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_use'

Name of the subgoal.

class CursorOnMagicSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
339class CursorOnMagicSubGoal(RegionMatchSubGoal):
340    NAME = "cursor_on_magic"
341    _NAMED_REGION = "status_command"
342    _TARGET_NAME = "cursor_on_magic"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_magic'

Name of the subgoal.

class CursorOnHitSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
345class CursorOnHitSubGoal(RegionMatchSubGoal):
346    NAME = "cursor_on_hit"
347    _NAMED_REGION = "status_command"
348    _TARGET_NAME = "cursor_on_hit"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_hit'

Name of the subgoal.

class CursorOnPowerSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
351class CursorOnPowerSubGoal(RegionMatchSubGoal):
352    NAME = "cursor_on_power"
353    _NAMED_REGION = "status_command"
354    _TARGET_NAME = "cursor_on_power"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_power'

Name of the subgoal.

357class PowerStatsFirstPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
358    REQUIRED_PARSER = SwordOfHope1Parser
359
360    _TERMINATION_NAMED_REGION = "status_command"
361    _TERMINATION_TARGET_NAME = "power_stats_first_page"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

364class CursorOnAutoTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
365    REQUIRED_PARSER = SwordOfHope1Parser
366
367    _TERMINATION_NAMED_REGION = "battle_command"
368    _TERMINATION_TARGET_NAME = "cursor_on_auto"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

378class ShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
379    REQUIRED_PARSER = SwordOfHope1Parser
380
381    _TERMINATION_NAMED_REGION = "status_command"
382    _TERMINATION_TARGET_NAME = "shop_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

385class LookSelectedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
386    REQUIRED_PARSER = SwordOfHope1Parser
387
388    _TERMINATION_NAMED_REGION = "command_area"
389    _TERMINATION_TARGET_NAME = "look_selected"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

399class MagicMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
400    REQUIRED_PARSER = SwordOfHope1Parser
401
402    _TERMINATION_NAMED_REGION = "status_command"
403    _TERMINATION_TARGET_NAME = "magic_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

406class DialogueInitiatedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
407    REQUIRED_PARSER = SwordOfHope1Parser
408
409    _TERMINATION_NAMED_REGION = "status_command"
410    _TERMINATION_TARGET_NAME = "dialogue_initiated"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

418class SoH2DialogueClearedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
419    REQUIRED_PARSER = SwordOfHope2Parser
420
421    _TERMINATION_NAMED_REGION = "status_command"
422    _TERMINATION_TARGET_NAME = "dialogue_cleared"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2DialogueActiveSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
425class SoH2DialogueActiveSubGoal(RegionMatchSubGoal):
426    NAME = "dialogue_active"
427    _NAMED_REGION = "status_command"
428    _TARGET_NAME = "dialogue_active"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_active'

Name of the subgoal.

431class SoH2DialogueAdvancedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
432    REQUIRED_PARSER = SwordOfHope2Parser
433
434    _TERMINATION_NAMED_REGION = "status_command"
435    _TERMINATION_TARGET_NAME = "dialogue_advanced"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2DialogueInitiatedSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
438class SoH2DialogueInitiatedSubGoal(RegionMatchSubGoal):
439    NAME = "dialogue_initiated"
440    _NAMED_REGION = "status_command"
441    _TARGET_NAME = "dialogue_initiated"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_initiated'

Name of the subgoal.

444class SoH2ExplorationMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
445    REQUIRED_PARSER = SwordOfHope2Parser
446
447    _TERMINATION_NAMED_REGION = "command_area"
448    _TERMINATION_TARGET_NAME = "exploration_menu"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2PowerMenuLastSlideSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
451class SoH2PowerMenuLastSlideSubGoal(RegionMatchSubGoal):
452    NAME = "power_menu_last_slide"
453    _NAMED_REGION = "command_area"
454    _TARGET_NAME = "power_menu_last_slide"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'power_menu_last_slide'

Name of the subgoal.

class SoH2DialogueVisibleSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
457class SoH2DialogueVisibleSubGoal(RegionMatchSubGoal):
458    NAME = "dialogue_visible"
459    _NAMED_REGION = "status_command"
460    _TARGET_NAME = "dialogue_visible"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'dialogue_visible'

Name of the subgoal.

463class SoH2FirstAdjacentRoomTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
464    REQUIRED_PARSER = SwordOfHope2Parser
465
466    _TERMINATION_NAMED_REGION = "soh2_room_label"
467    _TERMINATION_TARGET_NAME = "riccar_castle"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2StarterRoomSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
470class SoH2StarterRoomSubGoal(RegionMatchSubGoal):
471    NAME = "kings_room"
472    _NAMED_REGION = "soh2_room_label"
473    _TARGET_NAME = "kings_room"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'kings_room'

Name of the subgoal.

476class SoH2BattleWonTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
477    REQUIRED_PARSER = SwordOfHope2Parser
478
479    _TERMINATION_NAMED_REGION = "status_command"
480    _TERMINATION_TARGET_NAME = "battle_won"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2BattleActiveSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
483class SoH2BattleActiveSubGoal(RegionMatchSubGoal):
484    NAME = "battle_active"
485    _NAMED_REGION = "soh2_battle_command"
486    _TARGET_NAME = "battle_active"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'battle_active'

Name of the subgoal.

489class SoH2EscapeConfirmedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
490    REQUIRED_PARSER = SwordOfHope2Parser
491
492    _TERMINATION_NAMED_REGION = "status_command"
493    _TERMINATION_TARGET_NAME = "escape_confirmed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

496class SoH2WheatPurchasedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
497    REQUIRED_PARSER = SwordOfHope2Parser
498
499    _TERMINATION_NAMED_REGION = "status_command"
500    _TERMINATION_TARGET_NAME = "wheat_purchased"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

503class SoH2ShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
504    REQUIRED_PARSER = SwordOfHope2Parser
505
506    _TERMINATION_NAMED_REGION = "full_screen"
507    _TERMINATION_TARGET_NAME = "shop_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2ShopMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
510class SoH2ShopMenuOpenSubGoal(RegionMatchSubGoal):
511    NAME = "shop_menu_open"
512    _NAMED_REGION = "full_screen"
513    _TARGET_NAME = "shop_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'shop_menu_open'

Name of the subgoal.

516class SoH2BattleMagicMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
517    REQUIRED_PARSER = SwordOfHope2Parser
518
519    _TERMINATION_NAMED_REGION = "status_command"
520    _TERMINATION_TARGET_NAME = "battle_magic_menu"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

523class SoH2MotionResultTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
524    REQUIRED_PARSER = SwordOfHope2Parser
525
526    _TERMINATION_NAMED_REGION = "status_command"
527    _TERMINATION_TARGET_NAME = "motion_result"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2MagicMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
530class SoH2MagicMenuOpenSubGoal(RegionMatchSubGoal):
531    NAME = "magic_menu_open"
532    _NAMED_REGION = "full_screen"
533    _TARGET_NAME = "magic_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'magic_menu_open'

Name of the subgoal.

class SoH2LookTargetSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
536class SoH2LookTargetSubGoal(RegionMatchSubGoal):
537    NAME = "look_target"
538    _NAMED_REGION = "full_screen"
539    _TARGET_NAME = "look_target"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'look_target'

Name of the subgoal.

542class SoH2CprSwordPurchasedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
543    REQUIRED_PARSER = SwordOfHope2Parser
544
545    _TERMINATION_NAMED_REGION = "status_command"
546    _TERMINATION_TARGET_NAME = "cpr_sword_purchased"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2WeaponsShopMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
549class SoH2WeaponsShopMenuOpenSubGoal(RegionMatchSubGoal):
550    NAME = "weapons_shop_menu_open"
551    _NAMED_REGION = "full_screen"
552    _TARGET_NAME = "weapons_shop_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'weapons_shop_menu_open'

Name of the subgoal.

555class SoH2CursorOnAutoTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
556    REQUIRED_PARSER = SwordOfHope2Parser
557
558    _TERMINATION_NAMED_REGION = "soh2_battle_command"
559    _TERMINATION_TARGET_NAME = "cursor_on_auto"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

562class SoH2WheatFromTreeTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
563    REQUIRED_PARSER = SwordOfHope2Parser
564
565    _TERMINATION_NAMED_REGION = "status_command"
566    _TERMINATION_TARGET_NAME = "wheat_from_tree"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2HitTreeTargetSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
569class SoH2HitTreeTargetSubGoal(RegionMatchSubGoal):
570    NAME = "hit_tree_target"
571    _NAMED_REGION = "full_screen"
572    _TARGET_NAME = "hit_tree_target"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'hit_tree_target'

Name of the subgoal.

575class SoH2UseMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
576    REQUIRED_PARSER = SwordOfHope2Parser
577
578    _TERMINATION_NAMED_REGION = "full_screen"
579    _TERMINATION_TARGET_NAME = "use_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2ItemMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
582class SoH2ItemMenuOpenSubGoal(RegionMatchSubGoal):
583    NAME = "item_menu_open"
584    _NAMED_REGION = "full_screen"
585    _TARGET_NAME = "item_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'item_menu_open'

Name of the subgoal.

class SoH2UseMenuOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
588class SoH2UseMenuOpenSubGoal(RegionMatchSubGoal):
589    NAME = "use_menu_open"
590    _NAMED_REGION = "full_screen"
591    _TARGET_NAME = "use_menu_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'use_menu_open'

Name of the subgoal.

594class SoH2WheatConsumedTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
595    REQUIRED_PARSER = SwordOfHope2Parser
596
597    _TERMINATION_NAMED_REGION = "status_command"
598    _TERMINATION_TARGET_NAME = "wheat_consumed"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnWheatSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
601class SoH2CursorOnWheatSubGoal(RegionMatchSubGoal):
602    NAME = "cursor_on_wheat"
603    _NAMED_REGION = "full_screen"
604    _TARGET_NAME = "cursor_on_wheat"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_wheat'

Name of the subgoal.

607class SoH2PowerStatsExpPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
608    REQUIRED_PARSER = SwordOfHope2Parser
609
610    _TERMINATION_NAMED_REGION = "status_command"
611    _TERMINATION_TARGET_NAME = "power_stats_exp_page"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2PowerStatsExpPageSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
614class SoH2PowerStatsExpPageSubGoal(RegionMatchSubGoal):
615    NAME = "power_stats_exp_page"
616    _NAMED_REGION = "status_command"
617    _TARGET_NAME = "power_stats_exp_page"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'power_stats_exp_page'

Name of the subgoal.

class SoH2CursorOnPowerSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
620class SoH2CursorOnPowerSubGoal(RegionMatchSubGoal):
621    NAME = "cursor_on_power"
622    _NAMED_REGION = "status_command"
623    _TARGET_NAME = "cursor_on_power"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_power'

Name of the subgoal.

class SoH2PowerStatsFirstPageSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
626class SoH2PowerStatsFirstPageSubGoal(RegionMatchSubGoal):
627    NAME = "power_stats_first_page"
628    _NAMED_REGION = "status_command"
629    _TARGET_NAME = "power_stats_first_page"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'power_stats_first_page'

Name of the subgoal.

632class SoH2CursorOnLookTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
633    REQUIRED_PARSER = SwordOfHope2Parser
634
635    _TERMINATION_NAMED_REGION = "status_command"
636    _TERMINATION_TARGET_NAME = "cursor_on_look"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

639class SoH2CursorOnItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
640    REQUIRED_PARSER = SwordOfHope2Parser
641
642    _TERMINATION_NAMED_REGION = "status_command"
643    _TERMINATION_TARGET_NAME = "cursor_on_item"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

646class SoH2CursorOnOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
647    REQUIRED_PARSER = SwordOfHope2Parser
648
649    _TERMINATION_NAMED_REGION = "status_command"
650    _TERMINATION_TARGET_NAME = "cursor_on_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

653class SoH2CursorOnMagicTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
654    REQUIRED_PARSER = SwordOfHope2Parser
655
656    _TERMINATION_NAMED_REGION = "status_command"
657    _TERMINATION_TARGET_NAME = "cursor_on_magic"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

660class SoH2CursorOnHitTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
661    REQUIRED_PARSER = SwordOfHope2Parser
662
663    _TERMINATION_NAMED_REGION = "status_command"
664    _TERMINATION_TARGET_NAME = "cursor_on_hit"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

667class SoH2CursorOnPowerTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
668    REQUIRED_PARSER = SwordOfHope2Parser
669
670    _TERMINATION_NAMED_REGION = "status_command"
671    _TERMINATION_TARGET_NAME = "cursor_on_power"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnLookSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
677class SoH2CursorOnLookSubGoal(RegionMatchSubGoal):
678    NAME = "cursor_on_look"
679    _NAMED_REGION = "status_command"
680    _TARGET_NAME = "cursor_on_look"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_look'

Name of the subgoal.

class SoH2CursorOnItemSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
683class SoH2CursorOnItemSubGoal(RegionMatchSubGoal):
684    NAME = "cursor_on_item"
685    _NAMED_REGION = "status_command"
686    _TARGET_NAME = "cursor_on_item"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_item'

Name of the subgoal.

class SoH2CursorOnOpenSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
689class SoH2CursorOnOpenSubGoal(RegionMatchSubGoal):
690    NAME = "cursor_on_open"
691    _NAMED_REGION = "status_command"
692    _TARGET_NAME = "cursor_on_open"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_open'

Name of the subgoal.

class SoH2CursorOnMagicSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
695class SoH2CursorOnMagicSubGoal(RegionMatchSubGoal):
696    NAME = "cursor_on_magic"
697    _NAMED_REGION = "status_command"
698    _TARGET_NAME = "cursor_on_magic"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_magic'

Name of the subgoal.

class SoH2CursorOnHitSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
701class SoH2CursorOnHitSubGoal(RegionMatchSubGoal):
702    NAME = "cursor_on_hit"
703    _NAMED_REGION = "status_command"
704    _TARGET_NAME = "cursor_on_hit"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_hit'

Name of the subgoal.

class SoH2LookShopkeeperSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
707class SoH2LookShopkeeperSubGoal(RegionMatchSubGoal):
708    NAME = "look_shopkeeper"
709    _NAMED_REGION = "full_screen"
710    _TARGET_NAME = "look_shopkeeper"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'look_shopkeeper'

Name of the subgoal.

class SoH2ShopBuySellMenuSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
713class SoH2ShopBuySellMenuSubGoal(RegionMatchSubGoal):
714    NAME = "shop_buy_sell_menu"
715    _NAMED_REGION = "full_screen"
716    _TARGET_NAME = "shop_buy_sell_menu"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'shop_buy_sell_menu'

Name of the subgoal.

class SoH2CursorOnCprSwordSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
719class SoH2CursorOnCprSwordSubGoal(RegionMatchSubGoal):
720    NAME = "cursor_on_cpr_sword"
721    _NAMED_REGION = "full_screen"
722    _TARGET_NAME = "cursor_on_cpr_sword"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_cpr_sword'

Name of the subgoal.

732class SoH2PowerStatsFirstPageTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
733    REQUIRED_PARSER = SwordOfHope2Parser
734
735    _TERMINATION_NAMED_REGION = "status_command"
736    _TERMINATION_TARGET_NAME = "power_stats_first_page"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

739class SoH2MagicMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
740    REQUIRED_PARSER = SwordOfHope2Parser
741
742    _TERMINATION_NAMED_REGION = "full_screen"
743    _TERMINATION_TARGET_NAME = "magic_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

746class SoH2ItemMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
747    REQUIRED_PARSER = SwordOfHope2Parser
748
749    _TERMINATION_NAMED_REGION = "full_screen"
750    _TERMINATION_TARGET_NAME = "item_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

753class SoH2LookShopkeeperTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
754    REQUIRED_PARSER = SwordOfHope2Parser
755
756    _TERMINATION_NAMED_REGION = "full_screen"
757    _TERMINATION_TARGET_NAME = "look_shopkeeper"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

760class SoH2WeaponsShopMenuOpenTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
761    REQUIRED_PARSER = SwordOfHope2Parser
762
763    _TERMINATION_NAMED_REGION = "full_screen"
764    _TERMINATION_TARGET_NAME = "weapons_shop_menu_open"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

767class SoH2CursorOnCprSwordTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
768    REQUIRED_PARSER = SwordOfHope2Parser
769
770    _TERMINATION_NAMED_REGION = "full_screen"
771    _TERMINATION_TARGET_NAME = "cursor_on_cpr_sword"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

774class SoH2ShopBuySellMenuTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
775    REQUIRED_PARSER = SwordOfHope2Parser
776
777    _TERMINATION_NAMED_REGION = "full_screen"
778    _TERMINATION_TARGET_NAME = "shop_buy_sell_menu"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

781class SoH2CursorOnWheatTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
782    REQUIRED_PARSER = SwordOfHope2Parser
783
784    _TERMINATION_NAMED_REGION = "full_screen"
785    _TERMINATION_TARGET_NAME = "cursor_on_wheat"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

788class SoH2CursorOnClashTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
789    REQUIRED_PARSER = SwordOfHope2Parser
790
791    _TERMINATION_NAMED_REGION = "soh2_battle_command"
792    _TERMINATION_TARGET_NAME = "cursor_on_clash"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

795class SoH2Temple1fTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
796    REQUIRED_PARSER = SwordOfHope2Parser
797
798    _TERMINATION_NAMED_REGION = "soh2_room_label"
799    _TERMINATION_TARGET_NAME = "temple_1f"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2OutsideTempleSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
802class SoH2OutsideTempleSubGoal(RegionMatchSubGoal):
803    NAME = "outside_temple"
804    _NAMED_REGION = "soh2_room_label"
805    _TARGET_NAME = "outside_temple"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'outside_temple'

Name of the subgoal.

815class BattleActiveTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
816    REQUIRED_PARSER = SwordOfHope1Parser
817
818    _TERMINATION_NAMED_REGION = "battle_command"
819    _TERMINATION_TARGET_NAME = "battle_active"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

822class TeleportDestCursorTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
823    REQUIRED_PARSER = SwordOfHope1Parser
824
825    _TERMINATION_NAMED_REGION = "status_command"
826    _TERMINATION_TARGET_NAME = "teleport_dest_cursor"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

829class LookTargetOptionsTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
830    REQUIRED_PARSER = SwordOfHope1Parser
831
832    _TERMINATION_NAMED_REGION = "status_command"
833    _TERMINATION_TARGET_NAME = "look_target_options"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

836class CursorOnFirebalTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
837    REQUIRED_PARSER = SwordOfHope1Parser
838
839    _TERMINATION_NAMED_REGION = "battle_command"
840    _TERMINATION_TARGET_NAME = "cursor_on_firebal"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

843class CursorOnFirebal2TerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
844    REQUIRED_PARSER = SwordOfHope1Parser
845
846    _TERMINATION_NAMED_REGION = "battle_command"
847    _TERMINATION_TARGET_NAME = "cursor_on_firebal2"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

850class CursorOnStripallTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
851    REQUIRED_PARSER = SwordOfHope1Parser
852
853    _TERMINATION_NAMED_REGION = "battle_command"
854    _TERMINATION_TARGET_NAME = "cursor_on_stripall"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class CursorOnFirebalSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
857class CursorOnFirebalSubGoal(RegionMatchSubGoal):
858    NAME = "cursor_on_firebal"
859    _NAMED_REGION = "battle_command"
860    _TARGET_NAME = "cursor_on_firebal"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_firebal'

Name of the subgoal.

class CursorOnFirebal2SubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
863class CursorOnFirebal2SubGoal(RegionMatchSubGoal):
864    NAME = "cursor_on_firebal2"
865    _NAMED_REGION = "battle_command"
866    _TARGET_NAME = "cursor_on_firebal2"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_firebal2'

Name of the subgoal.

class CursorOnStripallSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
869class CursorOnStripallSubGoal(RegionMatchSubGoal):
870    NAME = "cursor_on_stripall"
871    _NAMED_REGION = "battle_command"
872    _TARGET_NAME = "cursor_on_stripall"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_stripall'

Name of the subgoal.

875class CursorOnTeleportOldmanTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
876    REQUIRED_PARSER = SwordOfHope1Parser
877
878    _TERMINATION_NAMED_REGION = "status_command"
879    _TERMINATION_TARGET_NAME = "cursor_on_teleport_oldman"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

882class CursorOnHerbUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
883    REQUIRED_PARSER = SwordOfHope1Parser
884
885    _TERMINATION_NAMED_REGION = "status_command"
886    _TERMINATION_TARGET_NAME = "cursor_on_herb_use"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

889class CursorOnKeymUseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
890    REQUIRED_PARSER = SwordOfHope1Parser
891
892    _TERMINATION_NAMED_REGION = "status_command"
893    _TERMINATION_TARGET_NAME = "cursor_on_keym_use"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

896class OldmanHouseTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
897    REQUIRED_PARSER = SwordOfHope1Parser
898
899    _TERMINATION_NAMED_REGION = "room_label"
900    _TERMINATION_TARGET_NAME = "oldman_house"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class PowerStatsLastPageSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
903class PowerStatsLastPageSubGoal(RegionMatchSubGoal):
904    NAME = "power_stats_last_page"
905    _NAMED_REGION = "status_command"
906    _TARGET_NAME = "power_stats_last_page"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'power_stats_last_page'

Name of the subgoal.

class CursorOnTeleportOldmanSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
909class CursorOnTeleportOldmanSubGoal(RegionMatchSubGoal):
910    NAME = "cursor_on_teleport_oldman"
911    _NAMED_REGION = "status_command"
912    _TARGET_NAME = "cursor_on_teleport_oldman"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_teleport_oldman'

Name of the subgoal.

class PowerStatsFirstPageSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
915class PowerStatsFirstPageSubGoal(RegionMatchSubGoal):
916    NAME = "power_stats_first_page"
917    _NAMED_REGION = "status_command"
918    _TARGET_NAME = "power_stats_first_page"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'power_stats_first_page'

Name of the subgoal.

class BattleMagicMenuSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
921class BattleMagicMenuSubGoal(RegionMatchSubGoal):
922    NAME = "battle_magic_menu"
923    _NAMED_REGION = "battle_command"
924    _TARGET_NAME = "battle_magic_menu"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'battle_magic_menu'

Name of the subgoal.

932class SoH2BattleActiveTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
933    REQUIRED_PARSER = SwordOfHope2Parser
934
935    _TERMINATION_NAMED_REGION = "soh2_battle_command"
936    _TERMINATION_TARGET_NAME = "battle_active"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

939class SoH2CursorOnMotionTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
940    REQUIRED_PARSER = SwordOfHope2Parser
941
942    _TERMINATION_NAMED_REGION = "status_command"
943    _TERMINATION_TARGET_NAME = "cursor_on_motion"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnTheoSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
946class SoH2CursorOnTheoSubGoal(RegionMatchSubGoal):
947    NAME = "cursor_on_theo"
948    _NAMED_REGION = "status_command"
949    _TARGET_NAME = "cursor_on_theo"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_theo'

Name of the subgoal.

952class SoH2CursorOnShopFirstItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
953    REQUIRED_PARSER = SwordOfHope2Parser
954
955    _TERMINATION_NAMED_REGION = "full_screen"
956    _TERMINATION_TARGET_NAME = "cursor_on_shop_first_item"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnShopFirstItemSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
959class SoH2CursorOnShopFirstItemSubGoal(RegionMatchSubGoal):
960    NAME = "cursor_on_shop_first_item"
961    _NAMED_REGION = "full_screen"
962    _TARGET_NAME = "cursor_on_shop_first_item"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_shop_first_item'

Name of the subgoal.

965class SoH2CursorOnShopThirdItemTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
966    REQUIRED_PARSER = SwordOfHope2Parser
967
968    _TERMINATION_NAMED_REGION = "full_screen"
969    _TERMINATION_TARGET_NAME = "cursor_on_shop_third_item"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

972class SoH2CursorOnFirstWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
973    REQUIRED_PARSER = SwordOfHope2Parser
974
975    _TERMINATION_NAMED_REGION = "full_screen"
976    _TERMINATION_TARGET_NAME = "cursor_on_first_weapon"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnFirstWeaponSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
979class SoH2CursorOnFirstWeaponSubGoal(RegionMatchSubGoal):
980    NAME = "cursor_on_first_weapon"
981    _NAMED_REGION = "full_screen"
982    _TARGET_NAME = "cursor_on_first_weapon"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_first_weapon'

Name of the subgoal.

985class SoH2CursorOnSecondWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
986    REQUIRED_PARSER = SwordOfHope2Parser
987
988    _TERMINATION_NAMED_REGION = "full_screen"
989    _TERMINATION_TARGET_NAME = "cursor_on_second_weapon"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2CursorOnSecondWeaponSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
992class SoH2CursorOnSecondWeaponSubGoal(RegionMatchSubGoal):
993    NAME = "cursor_on_second_weapon"
994    _NAMED_REGION = "full_screen"
995    _TARGET_NAME = "cursor_on_second_weapon"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_second_weapon'

Name of the subgoal.

 998class SoH2CursorOnThirdWeaponTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
 999    REQUIRED_PARSER = SwordOfHope2Parser
1000
1001    _TERMINATION_NAMED_REGION = "full_screen"
1002    _TERMINATION_TARGET_NAME = "cursor_on_third_weapon"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

1005class SoH2LookTreeTargetTerminateMetric(RegionMatchTerminationMetric, TerminationMetric):
1006    REQUIRED_PARSER = SwordOfHope2Parser
1007
1008    _TERMINATION_NAMED_REGION = "full_screen"
1009    _TERMINATION_TARGET_NAME = "look_tree_target"

Terminates the episode if a specific region matches a target. Can be used to terminate episodes when specific dialogue boxes appear, etc.

The StateParser which implements the minimum required functionality for this MetricGroup to work.

class SoH2BattleMagicMenuSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
1012class SoH2BattleMagicMenuSubGoal(RegionMatchSubGoal):
1013    NAME = "battle_magic_menu"
1014    _NAMED_REGION = "status_command"
1015    _TARGET_NAME = "battle_magic_menu"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'battle_magic_menu'

Name of the subgoal.

class SoH2WeaponsShopMenuOpenSubGoalAlias(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
1018class SoH2WeaponsShopMenuOpenSubGoalAlias(RegionMatchSubGoal):
1019    """Alias for SoH2WeaponsShopMenuOpenSubGoal under canonical naming."""
1020
1021    NAME = "weapons_shop_menu_open"
1022    _NAMED_REGION = "full_screen"
1023    _TARGET_NAME = "weapons_shop_menu_open"

Alias for SoH2WeaponsShopMenuOpenSubGoal under canonical naming.

NAME = 'weapons_shop_menu_open'

Name of the subgoal.

class SoH2CursorOnAutoSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
1026class SoH2CursorOnAutoSubGoal(RegionMatchSubGoal):
1027    NAME = "cursor_on_auto"
1028    _NAMED_REGION = "soh2_battle_command"
1029    _TARGET_NAME = "cursor_on_auto"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_auto'

Name of the subgoal.

class SoH2CursorOnClashSubGoal(gameboy_worlds.emulation.tracker.RegionMatchSubGoal):
1032class SoH2CursorOnClashSubGoal(RegionMatchSubGoal):
1033    NAME = "cursor_on_clash"
1034    _NAMED_REGION = "soh2_battle_command"
1035    _TARGET_NAME = "cursor_on_clash"

A subgoal that is completed if a specific region matches a target. Can be used to track subgoals that require specific dialogue boxes to appear, etc.

NAME = 'cursor_on_clash'

Name of the subgoal.