Add ring enchant descriptions for Ranger enchants. Fix up test configuration.

This commit is contained in:
sigonasr2 2025-04-23 14:48:22 -04:00
parent a6e121cbaa
commit 97820bf52b
8 changed files with 47 additions and 11 deletions

View File

@ -47,7 +47,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unit Testing|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(ProjectDir)..\AdventuresInLestoria\Adventures in Lestoria;$(ProjectDir)..\AdventuresInLestoria\Adventures in Lestoria\include;$(IncludePath)</IncludePath>
<IncludePath>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\include;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\include;$(ProjectDir)..\AdventuresInLestoria\Adventures in Lestoria;$(ProjectDir)..\AdventuresInLestoria\Adventures in Lestoria\include;$(IncludePath)</IncludePath>
<OutDir>..\x64\Unit Testing</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unit Testing|Win32'">
@ -58,7 +58,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>J:\AdventuresInLestoria\Adventures in Lestoria\steam;J:\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\niconiconii\OneDrive\Documents\include;C:\Users\sigon\OneDrive\Documents\include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\include;J:\AdventuresInLestoria\Adventures in Lestoria\steam;J:\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\niconiconii\OneDrive\Documents\include;C:\Users\LabUser\OneDrive\Documents\include;C:\Users\sigon\OneDrive\Documents\include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<UseFullPaths>true</UseFullPaths>
<PrecompiledHeaderFile>

View File

@ -114,8 +114,8 @@ namespace EnchantTests
testGame.reset();
}
TEST_METHOD(EnchantAbilitySettingsReadProperly){
Assert::AreEqual(false,ItemEnchant{"Health Boost"}.HasAbilityDescriptionModifiers(),L"Health Boost should not have any modifiers attached to it (doesn't modify a skill)");
Assert::AreEqual(true,ItemEnchant{"Extreme Rapid Fire"}.HasAbilityDescriptionModifiers(),L"Extreme Rapid Fire should have ability description modifiers attached to it");
Assert::AreEqual("Increases Maximum Health by 3%",ItemEnchant{"Health Boost"}.GetModifiedDescription().c_str(),L"Health Boost has its normal description.");
Assert::AreEqual("Shoots nine arrows rapidly. Total Damage: 90",ItemEnchant{"Extreme Rapid Fire"}.GetModifiedDescription().c_str(),L"Extreme Rapid Fire should have ability description modifiers attached to it.");
}
TEST_METHOD(HealthBoostCheck){
Assert::AreEqual(100,player->GetMaxHealth(),L"Player starts with 100 health.");

View File

@ -96,4 +96,5 @@ struct Ability{
Ability(std::string name,std::string shortName,std::string description,float cooldownTime,int manaCost,InputGroup*input,std::string icon,Pixel barColor1=VERY_DARK_RED,Pixel barColor2=DARK_RED,PrecastData precastInfo={},bool canCancelCast=false);
const std::string GetName()const;
const std::string_view GetDescription()const;
const std::string GetModifiedName()const; //The finalized modified ability name based on player's current item enchants.
};

View File

@ -353,5 +353,5 @@ const std::optional<Class>&ItemEnchant::GetClass()const{
}
const std::string ItemEnchant::GetModifiedDescription()const{
return "";
}

View File

@ -120,7 +120,6 @@ public:
const Pixel&DisplayCol()const;
const std::optional<std::reference_wrapper<::Ability>>Ability()const;
const std::optional<Class>&GetClass()const;
const std::string GetModifiedName()const; //The finalized modified ability name.
const std::string GetModifiedDescription()const; //The finalized modified description.
private:

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 12140
#define VERSION_BUILD 12144
#define stringify(a) stringify_(a)
#define stringify_(a) #a

View File

@ -64,7 +64,7 @@ Ranger
# Whether or not this ability cancels casts.
CancelCast = 0
Description = Shoots {ARROW COUNT} arrows rapidly. Total Damage: {Damage:DAMAGE}
Description = Shoots {ARROW COUNT} arrows rapidly. Total Damage: {TotalDamageMult}
DAMAGE = 5.0x
ARROW COUNT = four
@ -91,6 +91,8 @@ Ranger
# Hitbox radius of the arrows
ArrowRadius = 100
TotalDamageMult = 4.0
Sound = Ranger Rapid Fire
}
Ability 2
@ -103,7 +105,7 @@ Ranger
# Whether or not this ability cancels casts.
CancelCast = 0
Description = Fires an ultrasonic arrow towards a location, piercing everything it comes in contact with.
Description = Fires an ultrasonic arrow towards a location, piercing everything it comes in contact with. Deals {DamageMult} damage.
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
Cooldown Bar Color 1 = 64, 0, 0, 192
@ -137,7 +139,7 @@ Ranger
# Whether or not this ability cancels casts.
CancelCast = 0
Description = The Ranger prepares and fires a fan of densely packed arrows.
Description = Prepares and fires a fan of densely packed arrows.
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown.
Cooldown Bar Color 1 = 64, 0, 0, 192

View File

@ -125,7 +125,7 @@ Item Enchants
# Use "Name" to completely overwrite the default ability name (be careful of conflicts with another modification!)
Pre-Name = Extreme
ARROW COUNT = nine
DAMAGE = 9.0x
TotalDamageMult = 9.0x
}
}
Charge Beam
@ -137,6 +137,17 @@ Item Enchants
# Stat, Lowest, Highest Value
# Stat Modifier[0] = ..., 0, 0
Ability Settings
{
# Add variables here to modify what the ability's original description might state.
# Use "Pre-Description" and "Post-Description" keys to add to the front or back of a current description string.
# Use "Description" key to completely overwrite the default description (be careful of conflicts with another modification!)
# Use "Pre-Name" and "Post-Name" keys to add to the front or back of a current ability name.
# Use "Name" to completely overwrite the default ability name (be careful of conflicts with another modification!)
Name = "Charge Beam"
Post-Description = "Width is massively increased."
}
}
Mega Charged Shot
{
@ -148,6 +159,18 @@ Item Enchants
# Stat, Lowest, Highest Value
# Stat Modifier[0] = ..., 0, 0
Ability Settings
{
# Add variables here to modify what the ability's original description might state.
# Use "Pre-Description" and "Post-Description" keys to add to the front or back of a current description string.
# Use "Description" key to completely overwrite the default description (be careful of conflicts with another modification!)
# Use "Pre-Name" and "Post-Name" keys to add to the front or back of a current ability name.
# Use "Name" to completely overwrite the default ability name (be careful of conflicts with another modification!)
Pre-Name = "Mega"
DamageMult = 5.0
Post-Description = "Cast Time increased by {CAST TIME INCREASE}."
}
}
Multi-Multishot
{
@ -159,6 +182,17 @@ Item Enchants
# Stat, Lowest, Highest Value
# Stat Modifier[0] = ..., 0, 0
Ability Settings
{
# Add variables here to modify what the ability's original description might state.
# Use "Pre-Description" and "Post-Description" keys to add to the front or back of a current description string.
# Use "Description" key to completely overwrite the default description (be careful of conflicts with another modification!)
# Use "Pre-Name" and "Post-Name" keys to add to the front or back of a current ability name.
# Use "Name" to completely overwrite the default ability name (be careful of conflicts with another modification!)
Pre-Name = "Multi-"
Post-Description = "Holds up to {EXTRA CHARGE COUNT} charges. Cooldown Reduced by {COOLDOWN REDUCTION PCT}%."
}
}
}
Thief