From b1a9e71f4b72b749fb9f346e5ad0ca474cf208bd Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Sep 2020 18:40:18 -0300 Subject: [PATCH] mag bank truncation logic --- src/entity/item/mag.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/entity/item/mag.rs b/src/entity/item/mag.rs index 80a95b7..ac4261f 100644 --- a/src/entity/item/mag.rs +++ b/src/entity/item/mag.rs @@ -1038,7 +1038,10 @@ impl Mag { } pub fn bank(&mut self) { - // what is the truncation logic anyway + self.def = self.def & 0xFFFE; + self.pow = self.pow & 0xFFFE; + self.dex = self.dex & 0xFFFE; + self.mind = self.mind & 0xFFFE; } // TODO: this needs more checks on validity