diff --git a/Adventures in Lestoria Tests/EnchantTests.cpp b/Adventures in Lestoria Tests/EnchantTests.cpp index cd726e9b..8431626e 100644 --- a/Adventures in Lestoria Tests/EnchantTests.cpp +++ b/Adventures in Lestoria Tests/EnchantTests.cpp @@ -1088,6 +1088,12 @@ namespace EnchantTests game->SetElapsedTime(9.f); game->OnUserUpdate(9.f); Assert::AreEqual(0U,player->GetShield(),L"The Advance Shield enchant shield lasts 9 seconds. It should have worn off after that time."); + player->GetRightClickAbility().charges=1; + player->CheckAndPerformAbility(player->GetRightClickAbility(),testKeyboardInput); + Assert::AreEqual(int(player->GetMaxHealth()*0.2f),int(player->GetShield()),L"The Advance Shield enchant provides a 20% health player shield."); + game->SetElapsedTime(9.f); + game->OnUserUpdate(9.f); + Assert::AreEqual(0U,player->GetShield(),L"The Advance Shield enchant shield lasts 9 seconds. It should have worn off after that time."); //Double check that reapplication still works for applying shields, since it's possible the timer already existing in the array could be bugged.... Cover this edge case! } TEST_METHOD(BattleShoutNoEnchantCheck){ testKey->bHeld=true; //Force the key to be held down for testing purposes. diff --git a/Adventures in Lestoria/MonsterData.cpp b/Adventures in Lestoria/MonsterData.cpp index cda1ebb1..fcd552f8 100644 --- a/Adventures in Lestoria/MonsterData.cpp +++ b/Adventures in Lestoria/MonsterData.cpp @@ -178,6 +178,11 @@ void MonsterData::InitializeMonsterData(){ DATA["Monsters"][MonsterName]["CollisionDmg"].GetInt() ); + if(DATA["Monsters"][MonsterName].HasProperty("Immovable")){ + monster.immovable=DATA["Monsters"][MonsterName]["Immovable"].GetBool(); + if(DATA["Monsters"][MonsterName].HasProperty("Fadeout"))monster.fadeout=DATA["Monsters"][MonsterName]["Fadeout"].GetBool(); + else monster.fadeout=true; + } if(DATA["Monsters"][MonsterName].HasProperty("Fadeout"))monster.fadeout=DATA["Monsters"][MonsterName]["Fadeout"].GetBool(); if(DATA["Monsters"][MonsterName].HasProperty("No Facing"))monster.noFacing=DATA["Monsters"][MonsterName]["No Facing"].GetBool(); if(DATA["Monsters"][MonsterName].HasProperty("Ignore Collisions"))monster.ignoresCollision=DATA["Monsters"][MonsterName]["Ignore Collisions"].GetBool(); @@ -186,7 +191,6 @@ void MonsterData::InitializeMonsterData(){ if(DATA["Monsters"][MonsterName]["Mounted Animation Offset"].GetValueCount()==2)monster.mountedAnimationOffset={DATA["Monsters"][MonsterName]["Mounted Animation Offset"].GetReal(0),DATA["Monsters"][MonsterName]["Mounted Animation Offset"].GetReal(1)}; else ERR(std::format("WARNING! Monster {} containing a mounted animation offset has {} for reading in a vector, when vectors are supposed to only have two values! Please check the \"Mounted Animation Offset\" configuration value for {}",MonsterName,DATA["Monsters"][MonsterName]["Mounted Animation Offset"].GetValueCount(),MonsterName)); } - if(DATA["Monsters"][MonsterName].HasProperty("Immovable"))monster.immovable=DATA["Monsters"][MonsterName]["Immovable"].GetBool(); if(DATA["Monsters"][MonsterName].HasProperty("Invulnerable"))monster.invulnerable=DATA["Monsters"][MonsterName]["Invulnerable"].GetBool(); if(DATA["Monsters"][MonsterName].HasProperty("Lifetime"))monster.lifetime=DATA["Monsters"][MonsterName]["Lifetime"].GetReal(); diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index f72ae76d..056b296f 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -2171,6 +2171,7 @@ void Player::AddShield(const ShieldAmount shieldAmt,const float shieldTimer, con if(shieldIt!=shield.end()){ std::pair&shieldData{*shieldIt}; shieldData.second=std::max(shieldData.second,shieldAmt); + AddTimer(shieldType,Timer{std::format("Shield Type {}",int(shieldType)),shieldTimer,[&shieldData,this](){shieldData.second=0U;}}); }else ERR(std::format("WARNING! The shield type {} does not have a corresponding entry! All shields when generated should have made one! THIS SHOULD NOT BE HAPPENING!",int(shieldType))); }else{ std::pair&newShield{shield.emplace_back(std::pair{shieldType,shieldAmt})}; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 8c45b49b..20a818e0 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 11085 +#define VERSION_BUILD 11094 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 61835f19..40ad22ae 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ