<commit_before>import { Region } from '../Region';
import { Location } from '../Location';
import { Item } from '../Item';
import { ItemCollection } from '../collection/ItemCollection';
import { PrimeItem } from '../enums/PrimeItem';
import { PrimeLocation } from '../enums/PrimeLocation';
import { settings } from 'cluster';

export class ChozoRuins extends Region {
  constructor() {
    super();
    this.name = '<NAME>';
    this.locations = new Map<string, Location>([
      [PrimeLocation.MAIN_PLAZA_HALF_PIPE, new Location(PrimeLocation.MAIN_PLAZA_HALF_PIPE, 'd5cdb809.mrea', 0x0002012C)],
      [PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE, new Location(PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE, 'd5cdb809.mrea', 0x00020131)],
      [PrimeLocation.MAIN_PLAZA_TREE, new Location(PrimeLocation.MAIN_PLAZA_TREE, 'd5cdb809.mrea', 0x0002006A)],
      [PrimeLocation.MAIN_PLAZA_LOCKED_DOOR, new Location(PrimeLocation.MAIN_PLAZA_LOCKED_DOOR, 'd5cdb809.mrea', 0x00020156, true)],
      [PrimeLocation.RUINED_FOUNTAIN, new Location(PrimeLocation.RUINED_FOUNTAIN, '165a4de9.mrea', 0x00080076)],
      [PrimeLocation.RUINED_SHRINE_BEETLE_BATTLE, new Location(PrimeLocation.RUINED_SHRINE_BEETLE_BATTLE, '3c785450.mrea', 0x00090024, true)],
      [PrimeLocation.RUINED_SHRINE_HALF_PIPE, new Location(PrimeLocation.RUINED_SHRINE_HALF_PIPE, '3c785450.mrea', 0x00090068)],
      [PrimeLocation.RUINED_SHRINE_LOWER_TUNNEL, new Location(PrimeLocation.RUINED_SHRINE_LOWER_TUNNEL, '3c785450.mrea', 0x0009006D)],
      [PrimeLocation.VAULT, new Location(PrimeLocation.VAULT, 'ef069019.mrea', 0x000B003D)],
      [PrimeLocation.TRAINING_CHAMBER, new Location(PrimeLocation.TRAINING_CHAMBER, '3f04f304.mrea', 0x000C0026, true)],
      [PrimeLocation.RUINED_NURSERY, new Location(PrimeLocation.RUINED_NURSERY, 'c2576e4d.mrea', 0x00100062)],
      [PrimeLocation.TRAINING_CHAMBER_ACCESS, new Location(PrimeLocation.TRAINING_CHAMBER_ACCESS, '18d186bb.mrea', 0x001400ED)],
      [PrimeLocation.MAGMA_POOL, new Location(PrimeLocation.MAGMA_POOL, '491bfaba.mrea', 0x001400ED)],
      [PrimeLocation.TOWER_OF_LIGHT, new Location(PrimeLocation.TOWER_OF_LIGHT, '0d72f1f7.mrea', 0x00150335, true)],
      [PrimeLocation.TOWER_CHAMBER, new Location(PrimeLocation.TOWER_CHAMBER, '11bd63b7.mrea', 0x001B0019, true)],
      [PrimeLocation.RUINED_GALLERY_MISSILE_WALL, new Location(PrimeLocation.RUINED_GALLERY_MISSILE_WALL, 'e34fd92b.mrea', 0x001C0024)],
      [PrimeLocation.RUINED_GALLERY_TUNNEL, new Location(PrimeLocation.RUINED_GALLERY_TUNNEL, 'e34fd92b.mrea', 0x001C0054)],
      [PrimeLocation.TRANSPORT_ACCESS_NORTH, new Location(PrimeLocation.TRANSPORT_ACCESS_NORTH, '3ad2120f.mrea', 0x001E0172, true)],
      [PrimeLocation.GATHERING_HALL, new Location(PrimeLocation.GATHERING_HALL, '47e73bc5.mrea', 0x00200057)],
      [PrimeLocation.HIVE_TOTEM, new Location(PrimeLocation.HIVE_TOTEM, 'c8309df6.mrea', 0x002401DC, true)],
      [PrimeLocation.SUNCHAMBER_FLAAHGRA, new Location(PrimeLocation.SUNCHAMBER_FLAAHGRA, '9a0a03eb.mrea', 0x002528EE, true)],
      [PrimeLocation.SUNCHAMBER_GHOSTS, new Location(PrimeLocation.SUNCHAMBER_GHOSTS, '9a0a03eb.mrea', 0x18252F7D, true)],
      [PrimeLocation.WATERY_HALL_ACCESS, new Location(PrimeLocation.WATERY_HALL_ACCESS, 'eeec837d.mrea', 0x00260008)],
      [PrimeLocation.WATERY_HALL_SCAN_PUZZLE, new Location(PrimeLocation.WATERY_HALL_SCAN_PUZZLE, '492cbf4a.mrea', 0x00290085, true)],
      [PrimeLocation.WATERY_HALL_UNDERWATER, new Location(PrimeLocation.WATERY_HALL_UNDERWATER, '492cbf4a.mrea', 0x002927E6)],
      [PrimeLocation.DYNAMO_LOWER, new Location(PrimeLocation.DYNAMO_LOWER, '04d6c285.mrea', 0x002D0022)],
      [PrimeLocation.DYNAMO_SPIDER_TRACK, new Location(PrimeLocation.DYNAMO_SPIDER_TRACK, '04d6c285.mrea', 0x002D00AD)],
      [PrimeLocation.BURN_DOME_TUNNEL, new Location(PrimeLocation.BURN_DOME_TUNNEL, '4148f7b0.mrea', 0x00300036)],
      [PrimeLocation.BURN_DOME_I_DRONE, new Location(PrimeLocation.BURN_DOME_I_DRONE, '4148f7b0.mrea', 0x0030278A, true)],
      [PrimeLocation.FURNACE_SPIDER_TRACKS, new Location(PrimeLocation.FURNACE_SPIDER_TRACKS, '2e318473.mrea', 0x0031005E)],
      [PrimeLocation.FURNACE_TUNNEL, new Location(PrimeLocation.FURNACE_TUNNEL, '2e318473.mrea', 0x0031000A, true)],
      [PrimeLocation.HALL_OF_THE_ELDERS, new Location(PrimeLocation.HALL_OF_THE_ELDERS, 'fb54a0cb.mrea', 0x003402DE, true)],
      [PrimeLocation.CROSSWAY, new Location(PrimeLocation.CROSSWAY, '13fff119.mrea', 0x003502C8)],
      [PrimeLocation.ELDER_CHAMBER, new Location(PrimeLocation.ELDER_CHAMBER, 'e1981efc.mrea', 0x00390003, true)],
      [PrimeLocation.ANTECHAMBER, new Location(PrimeLocation.ANTECHAMBER, 'afefe677.mrea', 0x003D0003, true)]
    ]);
  }

  public init(settings: any): void {
    this.locations.get(PrimeLocation.MAIN_PLAZA_HALF_PIPE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (items.has(PrimeItem.MORPH_BALL) && items.has(PrimeItem.BOOST_BALL)) // developer intended
      || ((settings.ghettoJumping || settings.standableTerrain) && items.has(PrimeItem.SPACE_JUMP_BOOTS)) // ghetto or space jump off of the topmost standable portion of ramp
      || (settings.halfPipeBombJumps && items.canLayBombs()); // hpbj to item
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return items.canFloatyJump(settings) // floaty jump
      || (settings.standableTerrain && (
        items.has(PrimeItem.GRAPPLE_BEAM) || (settings.dashing && items.has(PrimeItem.SPACE_JUMP_BOOTS)) // grapple or dash from the tree
      ))
      || (settings.lJumping && items.has(PrimeItem.SPACE_JUMP_BOOTS)) // L jump to the ledge
      || (items.hasMissiles() && items.canLayBombs() && items.hasSuit(settings) && items.has(PrimeItem.GRAPPLE_BEAM)
        && items.has(PrimeItem.BOOST_BALL) && items.has(PrimeItem.WAVE_BEAM)); // developer intended through Magma Pool and Training Chamber
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_TREE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (settings.trainingChamberOOB && items.canFloatyJump(settings)) // oob + floaty jump
      || items.canFireSuperMissiles(); // developer intended
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_LOCKED_DOOR).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (items.hasMissiles() && items.has(PrimeItem.MORPH_BALL)) // developer intended
      || (settings.lJumping && items.has(PrimeItem.SPACE_JUMP_BOOTS));
    };

    this.locations.get(PrimeLocation.RUINED_FOUNTAIN).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return items.hasMissiles() && ( // need missiles to access room
        (items.canLayBombs() && items.has(PrimeItem.SPIDER_BALL)) // Defeat Flaahgra
        || (settings.standableTerrain && settings.lJumping && items.has(PrimeItem.MORPH_BALL)<commit_msg>Main Plaza half pipe doesn't need standable terrain or ghetto jumping for space jump req<commit_after>import { Region } from '../Region';
import { Location } from '../Location';
import { Item } from '../Item';
import { ItemCollection } from '../collection/ItemCollection';
import { PrimeItem } from '../enums/PrimeItem';
import { PrimeLocation } from '../enums/PrimeLocation';
import { settings } from 'cluster';

export class ChozoRuins extends Region {
  constructor() {
    super();
    this.name = '<NAME>';
    this.locations = new Map<string, Location>([
      [PrimeLocation.MAIN_PLAZA_HALF_PIPE, new Location(PrimeLocation.MAIN_PLAZA_HALF_PIPE, 'd5cdb809.mrea', 0x0002012C)],
      [PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE, new Location(PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE, 'd5cdb809.mrea', 0x00020131)],
      [PrimeLocation.MAIN_PLAZA_TREE, new Location(PrimeLocation.MAIN_PLAZA_TREE, 'd5cdb809.mrea', 0x0002006A)],
      [PrimeLocation.MAIN_PLAZA_LOCKED_DOOR, new Location(PrimeLocation.MAIN_PLAZA_LOCKED_DOOR, 'd5cdb809.mrea', 0x00020156, true)],
      [PrimeLocation.RUINED_FOUNTAIN, new Location(PrimeLocation.RUINED_FOUNTAIN, '165a4de9.mrea', 0x00080076)],
      [PrimeLocation.RUINED_SHRINE_BEETLE_BATTLE, new Location(PrimeLocation.RUINED_SHRINE_BEETLE_BATTLE, '3c785450.mrea', 0x00090024, true)],
      [PrimeLocation.RUINED_SHRINE_HALF_PIPE, new Location(PrimeLocation.RUINED_SHRINE_HALF_PIPE, '3c785450.mrea', 0x00090068)],
      [PrimeLocation.RUINED_SHRINE_LOWER_TUNNEL, new Location(PrimeLocation.RUINED_SHRINE_LOWER_TUNNEL, '3c785450.mrea', 0x0009006D)],
      [PrimeLocation.VAULT, new Location(PrimeLocation.VAULT, 'ef069019.mrea', 0x000B003D)],
      [PrimeLocation.TRAINING_CHAMBER, new Location(PrimeLocation.TRAINING_CHAMBER, '3f04f304.mrea', 0x000C0026, true)],
      [PrimeLocation.RUINED_NURSERY, new Location(PrimeLocation.RUINED_NURSERY, 'c2576e4d.mrea', 0x00100062)],
      [PrimeLocation.TRAINING_CHAMBER_ACCESS, new Location(PrimeLocation.TRAINING_CHAMBER_ACCESS, '18d186bb.mrea', 0x001400ED)],
      [PrimeLocation.MAGMA_POOL, new Location(PrimeLocation.MAGMA_POOL, '491bfaba.mrea', 0x001400ED)],
      [PrimeLocation.TOWER_OF_LIGHT, new Location(PrimeLocation.TOWER_OF_LIGHT, '0d72f1f7.mrea', 0x00150335, true)],
      [PrimeLocation.TOWER_CHAMBER, new Location(PrimeLocation.TOWER_CHAMBER, '11bd63b7.mrea', 0x001B0019, true)],
      [PrimeLocation.RUINED_GALLERY_MISSILE_WALL, new Location(PrimeLocation.RUINED_GALLERY_MISSILE_WALL, 'e34fd92b.mrea', 0x001C0024)],
      [PrimeLocation.RUINED_GALLERY_TUNNEL, new Location(PrimeLocation.RUINED_GALLERY_TUNNEL, 'e34fd92b.mrea', 0x001C0054)],
      [PrimeLocation.TRANSPORT_ACCESS_NORTH, new Location(PrimeLocation.TRANSPORT_ACCESS_NORTH, '3ad2120f.mrea', 0x001E0172, true)],
      [PrimeLocation.GATHERING_HALL, new Location(PrimeLocation.GATHERING_HALL, '47e73bc5.mrea', 0x00200057)],
      [PrimeLocation.HIVE_TOTEM, new Location(PrimeLocation.HIVE_TOTEM, 'c8309df6.mrea', 0x002401DC, true)],
      [PrimeLocation.SUNCHAMBER_FLAAHGRA, new Location(PrimeLocation.SUNCHAMBER_FLAAHGRA, '9a0a03eb.mrea', 0x002528EE, true)],
      [PrimeLocation.SUNCHAMBER_GHOSTS, new Location(PrimeLocation.SUNCHAMBER_GHOSTS, '9a0a03eb.mrea', 0x18252F7D, true)],
      [PrimeLocation.WATERY_HALL_ACCESS, new Location(PrimeLocation.WATERY_HALL_ACCESS, 'eeec837d.mrea', 0x00260008)],
      [PrimeLocation.WATERY_HALL_SCAN_PUZZLE, new Location(PrimeLocation.WATERY_HALL_SCAN_PUZZLE, '492cbf4a.mrea', 0x00290085, true)],
      [PrimeLocation.WATERY_HALL_UNDERWATER, new Location(PrimeLocation.WATERY_HALL_UNDERWATER, '492cbf4a.mrea', 0x002927E6)],
      [PrimeLocation.DYNAMO_LOWER, new Location(PrimeLocation.DYNAMO_LOWER, '04d6c285.mrea', 0x002D0022)],
      [PrimeLocation.DYNAMO_SPIDER_TRACK, new Location(PrimeLocation.DYNAMO_SPIDER_TRACK, '04d6c285.mrea', 0x002D00AD)],
      [PrimeLocation.BURN_DOME_TUNNEL, new Location(PrimeLocation.BURN_DOME_TUNNEL, '4148f7b0.mrea', 0x00300036)],
      [PrimeLocation.BURN_DOME_I_DRONE, new Location(PrimeLocation.BURN_DOME_I_DRONE, '4148f7b0.mrea', 0x0030278A, true)],
      [PrimeLocation.FURNACE_SPIDER_TRACKS, new Location(PrimeLocation.FURNACE_SPIDER_TRACKS, '2e318473.mrea', 0x0031005E)],
      [PrimeLocation.FURNACE_TUNNEL, new Location(PrimeLocation.FURNACE_TUNNEL, '2e318473.mrea', 0x0031000A, true)],
      [PrimeLocation.HALL_OF_THE_ELDERS, new Location(PrimeLocation.HALL_OF_THE_ELDERS, 'fb54a0cb.mrea', 0x003402DE, true)],
      [PrimeLocation.CROSSWAY, new Location(PrimeLocation.CROSSWAY, '13fff119.mrea', 0x003502C8)],
      [PrimeLocation.ELDER_CHAMBER, new Location(PrimeLocation.ELDER_CHAMBER, 'e1981efc.mrea', 0x00390003, true)],
      [PrimeLocation.ANTECHAMBER, new Location(PrimeLocation.ANTECHAMBER, 'afefe677.mrea', 0x003D0003, true)]
    ]);
  }

  public init(settings: any): void {
    this.locations.get(PrimeLocation.MAIN_PLAZA_HALF_PIPE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (items.has(PrimeItem.MORPH_BALL) && items.has(PrimeItem.BOOST_BALL)) // developer intended
      || items.has(PrimeItem.SPACE_JUMP_BOOTS) // space jump from corner of upper part of room, or top of half pipe, to the item
      || (settings.halfPipeBombJumps && items.canLayBombs()); // hpbj to item
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_GRAPPLE_LEDGE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return items.canFloatyJump(settings) // floaty jump
      || (settings.standableTerrain && (
        items.has(PrimeItem.GRAPPLE_BEAM) || (settings.dashing && items.has(PrimeItem.SPACE_JUMP_BOOTS)) // grapple or dash from the tree
      ))
      || (settings.lJumping && items.has(PrimeItem.SPACE_JUMP_BOOTS)) // L jump to the ledge
      || (items.hasMissiles() && items.canLayBombs() && items.hasSuit(settings) && items.has(PrimeItem.GRAPPLE_BEAM)
        && items.has(PrimeItem.BOOST_BALL) && items.has(PrimeItem.WAVE_BEAM)); // developer intended through Magma Pool and Training Chamber
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_TREE).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (settings.trainingChamberOOB && items.canFloatyJump(settings)) // oob + floaty jump
      || items.canFireSuperMissiles(); // developer intended
    };

    this.locations.get(PrimeLocation.MAIN_PLAZA_LOCKED_DOOR).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return (items.hasMissiles() && items.has(PrimeItem.MORPH_BALL)) // developer intended
      || (settings.lJumping && items.has(PrimeItem.SPACE_JUMP_BOOTS));
    };

    this.locations.get(PrimeLocation.RUINED_FOUNTAIN).canFillItem = function (item: Item, items: ItemCollection): boolean {
      return items.hasMissiles() && ( // need missiles to access room
        (items.canLayBombs() && items.has(PrimeItem.SPIDER_BALL)) // Defeat Flaahgra
        || (settings.standableTerrain && settings.lJumping && items.has(PrimeItem.MORPH_BALL)
{'fraction_non_alphanumeric': 0.12035639864913415, 'fraction_numerical': 0.06538765538549975, 'mean_word_length': 5.6466093600764085, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2541782', 'n_tokens_mistral': 6013, 'n_tokens_neox': 5106, 'n_words': 736}