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