From 5f9a28e1448d4e212d94ebf415bdb86f02edb893 Mon Sep 17 00:00:00 2001 From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com> Date: Tue, 22 Sep 2026 23:43:37 +0000 Subject: [PATCH] chore: remove obsolete gem tier migration files --- scripts/add_config_tiers.py | 84 ---- scripts/config_input.yml | 963 ------------------------------------ 2 files changed, 1047 deletions(-) delete mode 100644 scripts/add_config_tiers.py delete mode 100644 scripts/config_input.yml diff --git a/scripts/add_config_tiers.py b/scripts/add_config_tiers.py deleted file mode 100644 index c2ddd90..0000000 --- a/scripts/add_config_tiers.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python3 -"""Inject socket-tiers and per-gem tier into GemInfusion config YAML.""" -from __future__ import annotations - -import re -import sys -from pathlib import Path - -TIER_BY_SOCKET = { - "Basic Gemstone": 1, - "Polished Gemstone": 2, - "Radiant Gemstone": 3, - "Mythical Gemstone": 4, -} - -SOCKET_TIERS_BLOCK = """socket-tiers: - "Basic Gemstone": 1 - "Polished Gemstone": 2 - "Radiant Gemstone": 3 - "Mythical Gemstone": 4 - "Uncolored": 0 - -""" - - -def insert_socket_tiers(text: str) -> str: - if "socket-tiers:" in text: - return text - marker = "infusion_item:" - idx = text.find(marker) - if idx == -1: - return SOCKET_TIERS_BLOCK + text - line_end = text.find("\n", idx) - if line_end == -1: - return text + "\n\n" + SOCKET_TIERS_BLOCK - return text[: line_end + 1] + "\n" + SOCKET_TIERS_BLOCK + text[line_end + 1 :] - - -def add_gem_tiers(text: str) -> str: - lines = text.splitlines() - out: list[str] = [] - in_gems = False - tier_added = False - - for line in lines: - if re.match(r"^gems:\s*$", line): - in_gems = True - tier_added = False - out.append(line) - continue - - if in_gems and re.match(r"^[a-z_]+:\s*$", line) and not line.startswith(" "): - in_gems = False - tier_added = False - - if in_gems and re.match(r"^ [a-z_]+:\s*$", line): - tier_added = False - - socket_match = re.match(r"^(\s+)socket_colour:\s*(.+?)\s*$", line) - if in_gems and socket_match and not tier_added: - indent = socket_match.group(1) - colour = socket_match.group(2).strip().strip('"').strip("'") - tier = TIER_BY_SOCKET.get(colour, 1) - out.append(f"{indent}tier: {tier}") - tier_added = True - - out.append(line) - - return "\n".join(out) + ("\n" if text.endswith("\n") else "") - - -def main() -> int: - src = Path(sys.argv[1]) if len(sys.argv) > 1 else Path(__file__).parent / "config_input.yml" - dst = Path(sys.argv[2]) if len(sys.argv) > 2 else Path(__file__).parent.parent / "src/main/resources/config.yml" - text = src.read_text(encoding="utf-8") - text = insert_socket_tiers(text) - text = add_gem_tiers(text) - dst.write_text(text, encoding="utf-8") - print(f"Wrote {dst}") - return 0 - - -if __name__ == "__main__": - raise SystemExit(main()) diff --git a/scripts/config_input.yml b/scripts/config_input.yml deleted file mode 100644 index 2f5b1f3..0000000 --- a/scripts/config_input.yml +++ /dev/null @@ -1,963 +0,0 @@ -infusion_blocks: - - enchanting_table -location_specific: false -locations: - - -2590,134,-5321 - -infusion_item: loot.infusion_token - -# Intelligence nudges the rolled gem stat (not rarity odds). 0.2 = 20% of the rolled value. -attribute-influence: - mmocore-id: intelligence - floor: 0 - neutral: 10 - full: 20 - max-bonus: 0.2 - max-penalty: 0.2 - -# Dexterity nudges the jewelry stat copied from the consumed gem. Independent of infusion Intelligence. -jewelry-attribute-influence: - mmocore-id: dexterity - floor: 0 - neutral: 10 - full: 20 - max-bonus: 0.2 - max-penalty: 0.2 - -rarities: - common: - name: "§aCommon" - chance: 65 - rare: - name: "§9Rare" - chance: 25 - epic: - name: "§5Epic" - chance: 7 - legendary: - name: "§6Legendary" - chance: 3 - announce: true -gems: - agate: - gem: gemstones.agate - #location_specific: true - #location: -303,71,86 - name: "Agate" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: max_health - min: 0.5 - max: 0.5 - rare: - stat: max_health - min: 0.6 - max: 0.7 - epic: - stat: max_health - min: 0.7 - max: 0.8 - legendary: - stat: max_health - min: 0.9 - max: 1 - jasper: - gem: gemstones.jasper - name: "Jasper" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage_reduction - min: 1 - max: 1.2 - rare: - stat: pvp_damage_reduction - min: 1.3 - max: 1.5 - epic: - stat: pvp_damage_reduction - min: 1.6 - max: 1.8 - legendary: - stat: pvp_damage_reduction - min: 1.9 - max: 2 - onyx: - gem: gemstones.onyx - name: "Onyx" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage_reduction - min: 2 - max: 2.5 - rare: - stat: pve_damage_reduction - min: 2.6 - max: 3.0 - epic: - stat: pve_damage_reduction - min: 3.1 - max: 1.5 - legendary: - stat: pve_damage_reduction - min: 3.6 - max: 4 - tourmaline: - gem: gemstones.tourmaline - name: "Tourmaline" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: dodge_rating - min: 1 - max: 1.2 - rare: - stat: dodge_rating - min: 1.3 - max: 1.5 - epic: - stat: dodge_rating - min: 1.6 - max: 1.8 - legendary: - stat: dodge_rating - min: 1.9 - max: 2 - pearl: - gem: gemstones.pearl - name: "Pearl" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: parry_rating - min: 1 - max: 1.2 - rare: - stat: parry_rating - min: 1.3 - max: 1.5 - epic: - stat: parry_rating - min: 1.6 - max: 1.8 - legendary: - stat: parry_rating - min: 1.9 - max: 2 - coral: - gem: gemstones.coral - name: "Coral" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage - min: 1 - max: 1.2 - rare: - stat: pvp_damage - min: 1.3 - max: 1.5 - epic: - stat: pvp_damage - min: 1.6 - max: 1.8 - legendary: - stat: pvp_damage - min: 1.9 - max: 2 - chrysoprase: - gem: gemstones.chrysoprase - name: "Chrysoprase" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage - min: 2 - max: 2.5 - rare: - stat: pve_damage - min: 2.6 - max: 3 - epic: - stat: pve_damage - min: 3.1 - max: 3.5 - legendary: - stat: pve_damage - min: 3.6 - max: 4 - larimar: - gem: gemstones.larimar - name: "Larimar" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: physical_damage - min: 1 - max: 1.2 - rare: - stat: physical_damage - min: 1.3 - max: 1.5 - epic: - stat: physical_damage - min: 1.6 - max: 1.8 - legendary: - stat: physical_damage - min: 1.9 - max: 2 - rhodonite: - gem: gemstones.rhodonite - name: "Rhodonite" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: projectile_damage - min: 1 - max: 1.2 - rare: - stat: projectile_damage - min: 1.3 - max: 1.5 - epic: - stat: projectile_damage - min: 1.6 - max: 1.8 - legendary: - stat: projectile_damage - min: 1.9 - max: 2 - vesuvianite: - gem: gemstones.vesuvianite - name: "Vesuvianite" - colour: white - socket_colour: Basic Gemstone - socket_name_colour: white - rarities: - common: - stat: lifesteal - min: 1 - max: 1.2 - rare: - stat: lifesteal - min: 1.3 - max: 1.5 - epic: - stat: lifesteal - min: 1.6 - max: 1.8 - legendary: - stat: lifesteal - min: 1.9 - max: 2 - turquoise: - gem: gemstones.turquoise - name: "Turquoise" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: max_health - min: 1 - max: 1 - rare: - stat: max_health - min: 1.1 - max: 1.2 - epic: - stat: max_health - min: 1.3 - max: 1.4 - legendary: - stat: max_health - min: 1.5 - max: 1.5 - peridot: - gem: gemstones.peridot - name: "Peridot" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage_reduction - min: 2 - max: 2.2 - rare: - stat: pvp_damage_reduction - min: 2.3 - max: 2.5 - epic: - stat: pvp_damage_reduction - min: 2.6 - max: 2.8 - legendary: - stat: pvp_damage_reduction - min: 2.9 - max: 3 - malachite: - gem: gemstones.malachite - name: "Malachite" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage_reduction - min: 3 - max: 3.7 - rare: - stat: pve_damage_reduction - min: 3.8 - max: 4.5 - epic: - stat: pve_damage_reduction - min: 4.6 - max: 5.3 - legendary: - stat: pve_damage_reduction - min: 5.4 - max: 6 - zircon: - gem: gemstones.zircon - name: "Zircon" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: dodge_rating - min: 2 - max: 2.2 - rare: - stat: dodge_rating - min: 2.3 - max: 2.5 - epic: - stat: dodge_rating - min: 2.6 - max: 2.8 - legendary: - stat: dodge_rating - min: 2.9 - max: 3 - apatite: - gem: gemstones.apatite - name: "Apatite" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: parry_rating - min: 2 - max: 2.2 - rare: - stat: parry_rating - min: 2.3 - max: 2.5 - epic: - stat: parry_rating - min: 2.6 - max: 2.8 - legendary: - stat: parry_rating - min: 2.9 - max: 3 - carnelian: - gem: gemstones.carnelian - name: "Carnelian" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage - min: 2 - max: 2.2 - rare: - stat: pvp_damage - min: 2.3 - max: 2.5 - epic: - stat: pvp_damage - min: 2.6 - max: 2.8 - legendary: - stat: pvp_damage - min: 2.9 - max: 3 - labradorite: - gem: gemstones.labradorite - name: "Labradorite" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage - min: 3 - max: 3.7 - rare: - stat: pve_damage - min: 3.8 - max: 4.5 - epic: - stat: pve_damage - min: 4.6 - max: 5.3 - legendary: - stat: pve_damage - min: 5.4 - max: 6 - sardonyx: - gem: gemstones.sardonyx - name: "Sardonyx" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: physical_damage - min: 2 - max: 2.2 - rare: - stat: physical_damage - min: 2.3 - max: 2.5 - epic: - stat: physical_damage - min: 2.6 - max: 2.8 - legendary: - stat: physical_damage - min: 2.9 - max: 3 - variscite: - gem: gemstones.variscite - name: "Variscite" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: projectile_damage - min: 2 - max: 2.2 - rare: - stat: projectile_damage - min: 2.3 - max: 2.5 - epic: - stat: projectile_damage - min: 2.6 - max: 2.8 - legendary: - stat: projectile_damage - min: 2.9 - max: 3 - wulfenite: - gem: gemstones.wulfenite - name: "Wulfenite" - colour: white - socket_colour: Polished Gemstone - socket_name_colour: white - rarities: - common: - stat: lifesteal - min: 2 - max: 2.2 - rare: - stat: lifesteal - min: 2.3 - max: 2.5 - epic: - stat: lifesteal - min: 2.6 - max: 2.8 - legendary: - stat: lifesteal - min: 2.9 - max: 3 - aquamarine: - gem: gemstones.aquamarine - name: "Aquamarine" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: max_health - min: 1.5 - max: 1.5 - rare: - stat: max_health - min: 1.6 - max: 1.7 - epic: - stat: max_health - min: 1.8 - max: 1.9 - legendary: - stat: max_health - min: 2 - max: 2 - garnet: - gem: gemstones.garnet - name: "Garnet" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage_reduction - min: 3 - max: 3.2 - rare: - stat: pvp_damage_reduction - min: 3.3 - max: 3.5 - epic: - stat: pvp_damage_reduction - min: 3.6 - max: 3.8 - legendary: - stat: pvp_damage_reduction - min: 3.9 - max: 4 - opal: - gem: gemstones.opal - name: "Opal" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage_reduction - min: 4 - max: 5 - rare: - stat: pve_damage_reduction - min: 5.1 - max: 6 - epic: - stat: pve_damage_reduction - min: 6.1 - max: 7 - legendary: - stat: pve_damage_reduction - min: 7.1 - max: 8 - tanzanite: - gem: gemstones.tanzanite - name: "Tanzanite" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: dodge_rating - min: 3 - max: 3.2 - rare: - stat: dodge_rating - min: 3.3 - max: 3.5 - epic: - stat: dodge_rating - min: 3.6 - max: 3.8 - legendary: - stat: dodge_rating - min: 3.9 - max: 4 - moonstone: - gem: gemstones.moonstone - name: "Moonstone" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: parry_rating - min: 3 - max: 3.2 - rare: - stat: parry_rating - min: 3.3 - max: 3.5 - epic: - stat: parry_rating - min: 3.6 - max: 3.8 - legendary: - stat: parry_rating - min: 3.9 - max: 4 - sunstone: - gem: gemstones.sunstone - name: "Sunstone" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage - min: 3 - max: 3.2 - rare: - stat: pvp_damage - min: 3.3 - max: 3.5 - epic: - stat: pvp_damage - min: 3.6 - max: 3.8 - legendary: - stat: pvp_damage - min: 3.9 - max: 4 - spinel: - gem: gemstones.spinel - name: "Spinel" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage - min: 4 - max: 5 - rare: - stat: pve_damage - min: 5.1 - max: 6 - epic: - stat: pve_damage - min: 6.1 - max: 7 - legendary: - stat: pve_damage - min: 7.1 - max: 8 - alexandrite: - gem: gemstones.alexandrite - name: "Alexandrite" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: physical_damage - min: 3 - max: 3.2 - rare: - stat: physical_damage - min: 3.3 - max: 3.5 - epic: - stat: physical_damage - min: 3.6 - max: 3.8 - legendary: - stat: physical_damage - min: 3.9 - max: 4 - firestone: - gem: gemstones.firestone - name: "Direstone" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: projectile_damage - min: 3 - max: 3.2 - rare: - stat: projectile_damage - min: 3.3 - max: 3.5 - epic: - stat: projectile_damage - min: 3.6 - max: 3.8 - legendary: - stat: projectile_damage - min: 3.9 - max: 4 - cloudstone: - gem: gemstones.cloudstone - name: "Cloudstone" - colour: white - socket_colour: Radiant Gemstone - socket_name_colour: white - rarities: - common: - stat: lifesteal - min: 3 - max: 3.2 - rare: - stat: lifesteal - min: 3.3 - max: 3.5 - epic: - stat: lifesteal - min: 3.6 - max: 3.8 - legendary: - stat: lifesteal - min: 3.9 - max: 4 - ruby: - gem: gemstones.ruby - name: "Ruby" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: max_health - min: 2 - max: 2 - rare: - stat: max_health - min: 2.1 - max: 2.2 - epic: - stat: max_health - min: 2.3 - max: 2.4 - legendary: - stat: max_health - min: 2.5 - max: 2.5 - sapphire: - gem: gemstones.sapphire - name: "Sapphire" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage_reduction - min: 4 - max: 4.2 - rare: - stat: pvp_damage_reduction - min: 4.3 - max: 4.5 - epic: - stat: pvp_damage_reduction - min: 4.6 - max: 4.8 - legendary: - stat: pvp_damage_reduction - min: 4.9 - max: 5 - topaz: - gem: gemstones.topaz - name: "Topaz" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage_reduction - min: 5 - max: 6.2 - rare: - stat: pve_damage_reduction - min: 6.3 - max: 7.5 - epic: - stat: pve_damage_reduction - min: 7.6 - max: 8.8 - legendary: - stat: pve_damage_reduction - min: 8.9 - max: 10 - citrine: - gem: gemstones.citrine - name: "Citrine" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: dodge_rating - min: 4 - max: 4.2 - rare: - stat: dodge_rating - min: 4.3 - max: 4.5 - epic: - stat: dodge_rating - min: 4.6 - max: 4.8 - legendary: - stat: dodge_rating - min: 4.9 - max: 5 - morganite: - gem: gemstones.morganite - name: "Morganite" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: parry_rating - min: 4 - max: 4.2 - rare: - stat: parry_rating - min: 4.3 - max: 4.5 - epic: - stat: parry_rating - min: 4.6 - max: 4.8 - legendary: - stat: parry_rating - min: 4.9 - max: 5 - crystallite: - gem: gemstones.crystallite - name: "Crystallite" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: pvp_damage - min: 4 - max: 4.2 - rare: - stat: pvp_damage - min: 4.3 - max: 4.5 - epic: - stat: pvp_damage - min: 4.6 - max: 4.8 - legendary: - stat: pvp_damage - min: 4.9 - max: 5 - tigers_eye: - gem: gemstones.tigers_eye - name: "Tiger's Eye" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: pve_damage - min: 5 - max: 6.2 - rare: - stat: pve_damage - min: 6.3 - max: 7.5 - epic: - stat: pve_damage - min: 7.6 - max: 8.8 - legendary: - stat: pve_damage - min: 8.9 - max: 10 - serpents_eye: - gem: gemstones.serpents_eye - name: "Serpent's Eye" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: physical_damage - min: 4 - max: 4.2 - rare: - stat: physical_damage - min: 4.3 - max: 4.5 - epic: - stat: physical_damage - min: 4.6 - max: 4.8 - legendary: - stat: physical_damage - min: 4.9 - max: 5 - musgravite: - gem: gemstones.musgravite - name: "Musgravite" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: projectile_damage - min: 4 - max: 4.2 - rare: - stat: projectile_damage - min: 4.3 - max: 4.5 - epic: - stat: projectile_damage - min: 4.6 - max: 4.8 - legendary: - stat: projectile_damage - min: 4.9 - max: 5 - taaffeite: - gem: gemstones.taaffeite - name: "Taaffeite" - colour: white - socket_colour: Mythical Gemstone - socket_name_colour: white - rarities: - common: - stat: lifesteal - min: 4 - max: 4.2 - rare: - stat: lifesteal - min: 4.3 - max: 4.5 - epic: - stat: lifesteal - min: 4.6 - max: 4.8 - legendary: - stat: lifesteal - min: 4.9 - max: 5