fix(armor): correct 7-slot structure to match EU exactly

- HEAD: Helmet
- CHEST: Harness
- ARMS: Arm Guards (both arms combined)
- HANDS: Gloves (both hands combined)
- THIGHS: Thigh Guards
- SHINS: Shin Guards
- FEET: Foot Guards

Updated ArmorSlot enum and Frontier set with correct structure
This commit is contained in:
LemonNexus 2026-02-09 10:59:17 +00:00
parent e48dca4ea2
commit fd2b34e395
1 changed files with 81 additions and 73 deletions

View File

@ -18,25 +18,35 @@ from enum import Enum, auto
class ArmorSlot(Enum): class ArmorSlot(Enum):
"""Armor slot types in Entropia Universe.""" """Armor slot types in Entropia Universe.
Standard 7-piece armor structure:
- Head (Helmet)
- Chest (Harness)
- Arms (Arm Guards - both arms)
- Hands (Gloves - both hands)
- Thighs (Thigh Guards)
- Shins (Shin Guards)
- Feet (Foot Guards)
"""
HEAD = "head" HEAD = "head"
CHEST = "chest" # Also called Harness CHEST = "chest" # Harness
LEFT_ARM = "left_arm" ARMS = "arms" # Arm Guards (both arms)
RIGHT_ARM = "right_arm" HANDS = "hands" # Gloves (both hands)
LEFT_HAND = "left_hand" THIGHS = "thighs" # Thigh Guards
RIGHT_HAND = "right_hand" SHINS = "shins" # Shin Guards
LEGS = "legs" # Also called Thighs + Shins + Feet FEET = "feet" # Foot Guards
# Full set of 7 slots # Full set of 7 slots
ALL_ARMOR_SLOTS = [ ALL_ARMOR_SLOTS = [
ArmorSlot.HEAD, ArmorSlot.HEAD,
ArmorSlot.CHEST, ArmorSlot.CHEST,
ArmorSlot.LEFT_ARM, ArmorSlot.ARMS,
ArmorSlot.RIGHT_ARM, ArmorSlot.HANDS,
ArmorSlot.LEFT_HAND, ArmorSlot.THIGHS,
ArmorSlot.RIGHT_HAND, ArmorSlot.SHINS,
ArmorSlot.LEGS, ArmorSlot.FEET,
] ]
@ -291,13 +301,13 @@ class ArmorPiece:
def get_slot_display_name(self) -> str: def get_slot_display_name(self) -> str:
"""Get human-readable slot name.""" """Get human-readable slot name."""
slot_names = { slot_names = {
ArmorSlot.HEAD: "Head", ArmorSlot.HEAD: "Helmet",
ArmorSlot.CHEST: "Chest/Harness", ArmorSlot.CHEST: "Harness",
ArmorSlot.LEFT_ARM: "Left Arm", ArmorSlot.ARMS: "Arm Guards",
ArmorSlot.RIGHT_ARM: "Right Arm", ArmorSlot.HANDS: "Gloves",
ArmorSlot.LEFT_HAND: "Left Hand", ArmorSlot.THIGHS: "Thigh Guards",
ArmorSlot.RIGHT_HAND: "Right Hand", ArmorSlot.SHINS: "Shin Guards",
ArmorSlot.LEGS: "Legs/Feet", ArmorSlot.FEET: "Foot Guards",
} }
return slot_names.get(self.slot, self.slot.value) return slot_names.get(self.slot, self.slot.value)
@ -802,8 +812,8 @@ def create_ghost_set() -> ArmorSet:
def create_shogun_set() -> ArmorSet: def create_shogun_set() -> ArmorSet:
"""Create the Shogun armor set (medium, good vs impact/cut).""" """Create the Shogun armor set (medium, good vs impact/cut)."""
# Shogun uses standard 20 hp/pec economy # Shogun: 2500 durability = better economy than Ghost
shogun_economy = Decimal("0.05") shogun_durability = 2500
pieces = { pieces = {
ArmorSlot.HEAD: ArmorPiece( ArmorSlot.HEAD: ArmorPiece(
@ -811,7 +821,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_helmet", item_id="shogun_helmet",
slot=ArmorSlot.HEAD, slot=ArmorSlot.HEAD,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")), protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")),
weight=Decimal("0.8"), weight=Decimal("0.8"),
), ),
@ -820,7 +830,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_harness", item_id="shogun_harness",
slot=ArmorSlot.CHEST, slot=ArmorSlot.CHEST,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("8"), cut=Decimal("6"), stab=Decimal("5"), burn=Decimal("4"), cold=Decimal("4")), protection=ProtectionProfile(impact=Decimal("8"), cut=Decimal("6"), stab=Decimal("5"), burn=Decimal("4"), cold=Decimal("4")),
weight=Decimal("1.5"), weight=Decimal("1.5"),
), ),
@ -829,7 +839,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_arm_l", item_id="shogun_arm_l",
slot=ArmorSlot.LEFT_ARM, slot=ArmorSlot.LEFT_ARM,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")), protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")),
weight=Decimal("0.8"), weight=Decimal("0.8"),
), ),
@ -838,7 +848,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_arm_r", item_id="shogun_arm_r",
slot=ArmorSlot.RIGHT_ARM, slot=ArmorSlot.RIGHT_ARM,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")), protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3"), burn=Decimal("2"), cold=Decimal("2")),
weight=Decimal("0.8"), weight=Decimal("0.8"),
), ),
@ -847,7 +857,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_gloves_l", item_id="shogun_gloves_l",
slot=ArmorSlot.LEFT_HAND, slot=ArmorSlot.LEFT_HAND,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2"), burn=Decimal("1"), cold=Decimal("1")), protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2"), burn=Decimal("1"), cold=Decimal("1")),
weight=Decimal("0.4"), weight=Decimal("0.4"),
), ),
@ -856,7 +866,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_gloves_r", item_id="shogun_gloves_r",
slot=ArmorSlot.RIGHT_HAND, slot=ArmorSlot.RIGHT_HAND,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2"), burn=Decimal("1"), cold=Decimal("1")), protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2"), burn=Decimal("1"), cold=Decimal("1")),
weight=Decimal("0.4"), weight=Decimal("0.4"),
), ),
@ -865,7 +875,7 @@ def create_shogun_set() -> ArmorSet:
item_id="shogun_legs", item_id="shogun_legs",
slot=ArmorSlot.LEGS, slot=ArmorSlot.LEGS,
set_name="Shogun", set_name="Shogun",
decay_per_hp=shogun_economy, durability=shogun_durability,
protection=ProtectionProfile(impact=Decimal("7"), cut=Decimal("5"), stab=Decimal("4"), burn=Decimal("3"), cold=Decimal("3")), protection=ProtectionProfile(impact=Decimal("7"), cut=Decimal("5"), stab=Decimal("4"), burn=Decimal("3"), cold=Decimal("3")),
weight=Decimal("1.2"), weight=Decimal("1.2"),
), ),
@ -879,7 +889,7 @@ def create_shogun_set() -> ArmorSet:
def create_vigilante_set() -> ArmorSet: def create_vigilante_set() -> ArmorSet:
"""Create the Vigilante armor set (light, good all-around).""" """Create the Vigilante armor set (light, good all-around)."""
vigilante_economy = Decimal("0.05") vigilante_durability = 2000 # Same as Ghost
pieces = { pieces = {
ArmorSlot.HEAD: ArmorPiece( ArmorSlot.HEAD: ArmorPiece(
@ -887,7 +897,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_helmet", item_id="vigilante_helmet",
slot=ArmorSlot.HEAD, slot=ArmorSlot.HEAD,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")), protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.4"), weight=Decimal("0.4"),
), ),
@ -896,7 +906,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_harness", item_id="vigilante_harness",
slot=ArmorSlot.CHEST, slot=ArmorSlot.CHEST,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("6"), cut=Decimal("5"), stab=Decimal("4")), protection=ProtectionProfile(impact=Decimal("6"), cut=Decimal("5"), stab=Decimal("4")),
weight=Decimal("1.0"), weight=Decimal("1.0"),
), ),
@ -905,7 +915,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_arm_l", item_id="vigilante_arm_l",
slot=ArmorSlot.LEFT_ARM, slot=ArmorSlot.LEFT_ARM,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")), protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.4"), weight=Decimal("0.4"),
), ),
@ -914,7 +924,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_arm_r", item_id="vigilante_arm_r",
slot=ArmorSlot.RIGHT_ARM, slot=ArmorSlot.RIGHT_ARM,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")), protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.4"), weight=Decimal("0.4"),
), ),
@ -923,7 +933,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_gloves_l", item_id="vigilante_gloves_l",
slot=ArmorSlot.LEFT_HAND, slot=ArmorSlot.LEFT_HAND,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")), protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")),
weight=Decimal("0.2"), weight=Decimal("0.2"),
), ),
@ -932,7 +942,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_gloves_r", item_id="vigilante_gloves_r",
slot=ArmorSlot.RIGHT_HAND, slot=ArmorSlot.RIGHT_HAND,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")), protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")),
weight=Decimal("0.2"), weight=Decimal("0.2"),
), ),
@ -941,7 +951,7 @@ def create_vigilante_set() -> ArmorSet:
item_id="vigilante_legs", item_id="vigilante_legs",
slot=ArmorSlot.LEGS, slot=ArmorSlot.LEGS,
set_name="Vigilante", set_name="Vigilante",
decay_per_hp=vigilante_economy, durability=vigilante_durability,
protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3")), protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("3")),
weight=Decimal("0.8"), weight=Decimal("0.8"),
), ),
@ -1236,53 +1246,51 @@ def create_frontier_set() -> ArmorSet:
protection=ProtectionProfile(impact=Decimal("8"), cut=Decimal("6"), stab=Decimal("6")), protection=ProtectionProfile(impact=Decimal("8"), cut=Decimal("6"), stab=Decimal("6")),
weight=Decimal("1.0"), weight=Decimal("1.0"),
), ),
ArmorSlot.LEFT_ARM: ArmorPiece( ArmorSlot.ARMS: ArmorPiece(
name="Frontier Arm Guards, Adjusted (M)", name="Frontier Arm Guards, Adjusted (M)", # Both arms
item_id="frontier_arm_adj_m", item_id="frontier_arm_adj_m",
slot=ArmorSlot.LEFT_ARM, slot=ArmorSlot.ARMS,
set_name="Frontier", set_name="Frontier",
decay_per_hp=frontier_economy, decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")), protection=ProtectionProfile(impact=Decimal("5"), cut=Decimal("4"), stab=Decimal("4")),
weight=Decimal("0.4"), weight=Decimal("0.8"),
), ),
ArmorSlot.RIGHT_ARM: ArmorPiece( ArmorSlot.HANDS: ArmorPiece(
name="Frontier Arm Guards, Adjusted (M)", # Same name - both arms name="Frontier Gloves, Adjusted (M)", # Both hands
item_id="frontier_arm_adj_m_r",
slot=ArmorSlot.RIGHT_ARM,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.4"),
),
ArmorSlot.LEFT_HAND: ArmorPiece(
name="Frontier Gloves, Adjusted (M)",
item_id="frontier_gloves_adj_m", item_id="frontier_gloves_adj_m",
slot=ArmorSlot.LEFT_HAND, slot=ArmorSlot.HANDS,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.6"),
),
ArmorSlot.THIGHS: ArmorPiece(
name="Frontier Thigh Guards, Adjusted (M)",
item_id="frontier_thigh_adj_m",
slot=ArmorSlot.THIGHS,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("4"), cut=Decimal("3"), stab=Decimal("3")),
weight=Decimal("0.6"),
),
ArmorSlot.SHINS: ArmorPiece(
name="Frontier Shin Guards, Adjusted (M)",
item_id="frontier_shin_adj_m",
slot=ArmorSlot.SHINS,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("3"), cut=Decimal("2"), stab=Decimal("2")),
weight=Decimal("0.4"),
),
ArmorSlot.FEET: ArmorPiece(
name="Frontier Foot Guards, Adjusted (M)",
item_id="frontier_foot_adj_m",
slot=ArmorSlot.FEET,
set_name="Frontier", set_name="Frontier",
decay_per_hp=frontier_economy, decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")), protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")),
weight=Decimal("0.3"), weight=Decimal("0.3"),
), ),
ArmorSlot.RIGHT_HAND: ArmorPiece(
name="Frontier Gloves, Adjusted (M)", # Same name - both hands
item_id="frontier_gloves_adj_m_r",
slot=ArmorSlot.RIGHT_HAND,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("2"), cut=Decimal("1"), stab=Decimal("1")),
weight=Decimal("0.3"),
),
# Note: Full Frontier set has separate Thigh, Shin, and Foot pieces
# Currently modeled as combined leg piece for simplicity
ArmorSlot.LEGS: ArmorPiece(
name="Frontier Thigh+Shin+Foot Guards, Adjusted (M)", # All leg pieces combined
item_id="frontier_legs_adj_m",
slot=ArmorSlot.LEGS,
set_name="Frontier",
decay_per_hp=frontier_economy,
protection=ProtectionProfile(impact=Decimal("8"), cut=Decimal("6"), stab=Decimal("6")),
weight=Decimal("1.2"),
),
} }
return ArmorSet( return ArmorSet(
name="Frontier Set (Adjusted)", name="Frontier Set (Adjusted)",