From 4e1f816f24004924e5361dd135df8ea6aca6223d Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Fri, 29 May 2020 16:42:43 -0300 Subject: [PATCH] max stack for each tool --- src/entity/item/tool.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/entity/item/tool.rs b/src/entity/item/tool.rs index 4d5dc59..a5a6645 100644 --- a/src/entity/item/tool.rs +++ b/src/entity/item/tool.rs @@ -218,6 +218,39 @@ impl ToolType { } } + pub fn max_stack(&self) -> u8 { + match self { + ToolType::Monomate => 10, + ToolType::Dimate => 10, + ToolType::Trimate => 10, + ToolType::Monofluid => 10, + ToolType::Difluid => 10, + ToolType::Trifluid => 10, + ToolType::SolAtomizer => 10, + ToolType::MoonAtomizer => 10, + ToolType::StarAtomizer => 10, + ToolType::Antidote => 10, + ToolType::Antiparalysis => 10, + ToolType::Telepipe => 10, + ToolType::TrapVision => 10, + ToolType::Monogrinder => 99, + ToolType::Digrinder => 99, + ToolType::Trigrinder => 99, + ToolType::PowerMaterial => 99, + ToolType::MindMaterial => 99, + ToolType::EvadeMaterial => 99, + ToolType::HpMaterial => 99, + ToolType::TpMaterial => 99, + ToolType::DefMaterial => 99, + ToolType::LuckMaterial => 99, + ToolType::Addslot => 99, + ToolType::PhotonDrop => 99, + ToolType::PhotonSphere => 99, + ToolType::PhotonCrystal => 99, + _ => 1, + } + } + pub fn value(&self) -> [u8; 3] { match self { ToolType::Monomate => [0x03, 0x00, 0x00],