From 2ebe63a14ef9aece05fb85993022f37d72432896 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Thu, 13 Feb 2020 11:09:24 +0100 Subject: [PATCH] Updates CreatureLib, adds Fling Power. --- conanfile.py | 2 +- src/Library/Items/Item.hpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 98584e4..5acae0d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -44,7 +44,7 @@ class PkmnLibConan(ConanFile): self.options["AngelScript"].link_std_statically = True def requirements(self): - self.requires("CreatureLib/1969f59a9ca1408b6c107d679a83f6b73aeb2af9@creaturelib/master") + self.requires("CreatureLib/42050de18a9315921397d1da75b99671013203be@creaturelib/master") if self.options.script_handler == "angelscript": self.requires("AngelScript/2.34@AngelScript/Deukhoofd") else: diff --git a/src/Library/Items/Item.hpp b/src/Library/Items/Item.hpp index e6d3bbe..9162796 100644 --- a/src/Library/Items/Item.hpp +++ b/src/Library/Items/Item.hpp @@ -4,11 +4,15 @@ #include namespace PkmnLib::Library { class Item : public CreatureLib::Library::Item { + uint8_t _flingPower; + public: Item(std::string name, CreatureLib::Library::ItemCategory category, CreatureLib::Library::BattleItemCategory battleCategory, int32_t price, - std::unordered_set flags) - : CreatureLib::Library::Item(name, category, battleCategory, price, flags) {} + std::unordered_set flags, uint8_t flingPower) + : CreatureLib::Library::Item(name, category, battleCategory, price, flags), _flingPower(flingPower) {} + + inline uint8_t GetFlingPower() const { return _flingPower; } }; }