Implemented Trap Collector Enchant.
This commit is contained in:
parent
6002f69dfa
commit
33ce153bc8
@ -906,5 +906,20 @@ namespace EnchantTests
|
||||
game->OnUserUpdate(0.f); //Wait for mark lock-on
|
||||
Assert::AreEqual(20.f,newMonster.GetBuffs(BuffType::TRAPPER_MARK)[0].duration,L"Mark duration is increased greatly.");
|
||||
}
|
||||
TEST_METHOD(TrapCollectorNoEnchantCheck){
|
||||
game->ChangePlayerClass(TRAPPER);
|
||||
player=game->GetPlayer();
|
||||
Assert::AreEqual(uint8_t(1),Trapper::ability2.MAX_CHARGES,L"Normally Bear Trap only has one charge.");
|
||||
Assert::AreEqual(uint8_t(1),Trapper::ability3.MAX_CHARGES,L"Normally Explosive Trap only has one charge.");
|
||||
}
|
||||
TEST_METHOD(TrapCollectorEnchantCheck){
|
||||
game->ChangePlayerClass(TRAPPER);
|
||||
player=game->GetPlayer();
|
||||
std::weak_ptr<Item>nullRing{Inventory::AddItem("Null Ring"s)};
|
||||
Inventory::EquipItem(nullRing,EquipSlot::RING1);
|
||||
nullRing.lock()->EnchantItem("Trap Collector");
|
||||
Assert::AreEqual(uint8_t(2),Trapper::ability2.MAX_CHARGES,L"Trap Collector enchant increases Bear Trap charges to two.");
|
||||
Assert::AreEqual(uint8_t(2),Trapper::ability3.MAX_CHARGES,L"Trap Collector enchant increases Explosive Trap charges to two.");
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1463,6 +1463,13 @@ void Player::RecalculateEquipStats(){
|
||||
}
|
||||
}
|
||||
|
||||
if(GetClass()&TRAPPER){
|
||||
if(HasEnchant("Trap Collector")){
|
||||
GetAbility2().MAX_CHARGES="Trap Collector"_ENC["CHARGE COUNT"];
|
||||
GetAbility3().MAX_CHARGES="Trap Collector"_ENC["CHARGE COUNT"];
|
||||
}
|
||||
}
|
||||
|
||||
for(const std::reference_wrapper<Ability>&a:GetAbilities()){
|
||||
if(a.get().itemAbility)continue;
|
||||
if(a.get().charges<a.get().MAX_CHARGES&&a.get().cooldown==0.f)a.get().cooldown=a.get().GetCooldownTime();
|
||||
|
||||
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 3
|
||||
#define VERSION_BUILD 11020
|
||||
#define VERSION_BUILD 11021
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user