From 0f14b2fe749e32375248f97401af8197da4e0663 Mon Sep 17 00:00:00 2001 From: traffic95 Date: Tue, 18 Mar 2025 21:42:50 +0100 Subject: [PATCH] Added EPropertyType::Hp --- crates/battle-server/src/logic/property_util.rs | 4 ++++ crates/trigger-logic/src/battle.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/crates/battle-server/src/logic/property_util.rs b/crates/battle-server/src/logic/property_util.rs index 4840086..cd04694 100644 --- a/crates/battle-server/src/logic/property_util.rs +++ b/crates/battle-server/src/logic/property_util.rs @@ -626,6 +626,10 @@ fn remove_custom_properties(properties: &mut HashMap) { } fn set_battle_properties(properties: &mut HashMap) { + properties.insert( + EPropertyType::Hp.into(), + *properties.get(&EPropertyType::HpMax.into()).unwrap_or(&0), + ); properties.insert( EPropertyType::HpMaxBattle.into(), *properties.get(&EPropertyType::HpMax.into()).unwrap_or(&0), diff --git a/crates/trigger-logic/src/battle.rs b/crates/trigger-logic/src/battle.rs index c0fe23a..24ee765 100644 --- a/crates/trigger-logic/src/battle.rs +++ b/crates/trigger-logic/src/battle.rs @@ -3,6 +3,7 @@ use num_enum::{IntoPrimitive, TryFromPrimitive}; #[repr(u32)] #[derive(IntoPrimitive, TryFromPrimitive)] pub enum EPropertyType { + Hp = 1, HpMax = 111, Atk = 121, BreakStun = 122,