From ab404d0cae2e157e48135398f2b064d525e32e12 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 4 Aug 2021 02:27:41 +0000 Subject: [PATCH] unit modifier to star value changes --- src/entity/item/unit.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/entity/item/unit.rs b/src/entity/item/unit.rs index cc973ed..371f450 100644 --- a/src/entity/item/unit.rs +++ b/src/entity/item/unit.rs @@ -446,4 +446,14 @@ impl Unit { | UnitType::PbIncrease ) } + + pub fn modifier_stars(&self) -> i8 { + match self.modifier { + Some(UnitModifier::PlusPlus) => 1, + Some(UnitModifier::Plus) => 1, + Some(UnitModifier::Minus) => -1, + Some(UnitModifier::MinusMinus) => -1, + _ => 0, + } + } }