Compare commits

...

1 Commits

  1. 4
      Adventures in Lestoria Tests/EnchantTests.cpp
  2. 6
      Adventures in Lestoria/ItemEnchant.cpp
  3. 12
      Adventures in Lestoria/ItemEnchant.h
  4. 27
      Adventures in Lestoria/Pirates_Treasure.cpp
  5. 4
      Adventures in Lestoria/assets/config/Monsters.txt
  6. 5
      Adventures in Lestoria/assets/config/classes/Ranger.txt
  7. 12
      Adventures in Lestoria/assets/config/items/ItemEnchants.txt

@ -113,6 +113,10 @@ namespace EnchantTests
testGame->OnUserUpdate(0.f); testGame->OnUserUpdate(0.f);
testGame.reset(); 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");
}
TEST_METHOD(HealthBoostCheck){ TEST_METHOD(HealthBoostCheck){
Assert::AreEqual(100,player->GetMaxHealth(),L"Player starts with 100 health."); Assert::AreEqual(100,player->GetMaxHealth(),L"Player starts with 100 health.");
std::weak_ptr<Item>nullRing{Game::GiveAndEquipEnchantedRing("Aura of the Beast")}; std::weak_ptr<Item>nullRing{Game::GiveAndEquipEnchantedRing("Aura of the Beast")};

@ -350,4 +350,8 @@ const bool ItemEnchant::HasAttributes()const{
const std::optional<Class>&ItemEnchant::GetClass()const{ const std::optional<Class>&ItemEnchant::GetClass()const{
return ItemEnchantInfo::GetEnchant(Name()).GetClass(); return ItemEnchantInfo::GetEnchant(Name()).GetClass();
} }
const std::string ItemEnchant::GetModifiedDescription()const{
}

@ -120,10 +120,22 @@ public:
const Pixel&DisplayCol()const; const Pixel&DisplayCol()const;
const std::optional<std::reference_wrapper<::Ability>>Ability()const; const std::optional<std::reference_wrapper<::Ability>>Ability()const;
const std::optional<Class>&GetClass()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: private:
void UpdateDescription(); void UpdateDescription();
const ItemEnchantInfo&GetEnchantInfo()const; const ItemEnchantInfo&GetEnchantInfo()const;
std::string enchantName; std::string enchantName;
std::string description; std::string description;
ItemAttributable stats; ItemAttributable stats;
struct AbilityDescriptionModifiers{
std::optional<std::string>preName;
std::optional<std::string>postName;
std::optional<std::string>newName;
std::optional<std::string>preDescription;
std::optional<std::string>postDescription;
std::optional<std::string>newDescription;
};
AbilityDescriptionModifiers modifiers;
}; };

@ -42,12 +42,25 @@ All rights reserved.
INCLUDE_game INCLUDE_game
void Monster::STRATEGY::PIRATES_TREASURE(Monster&m,float fElapsedTime,std::string strategy){ void Monster::STRATEGY::PIRATES_TREASURE(Monster&m,float fElapsedTime,std::string strategy){
const float distToPlayer{util::distance(game->GetPlayer()->GetPos(),m.GetPos())}; enum Phase{
if(distToPlayer<=ConfigFloat("Open Distance"))m.PerformAnimation("OPEN"); NORMAL,
else m.PerformIdleAnimation(); LOCKED,
if(m.B(Attribute::COLLIDED_WITH_PLAYER)&&game->GetPlayer()->HasBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_COIN)){ };
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_PRECURSE);
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_COIN); switch(PHASE()){
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_DOT); case NORMAL:{
const float distToPlayer{util::distance(game->GetPlayer()->GetPos(),m.GetPos())};
if(distToPlayer<=ConfigFloat("Open Distance"))m.PerformAnimation("OPEN");
else m.PerformIdleAnimation();
if(m.B(Attribute::COLLIDED_WITH_PLAYER)&&game->GetPlayer()->HasBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_COIN)){
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_PRECURSE);
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_COIN);
game->GetPlayer()->RemoveBuff(BuffType::PIRATE_GHOST_CAPTAIN_CURSE_DOT);
}
}break;
case LOCKED:{
m.PerformAnimation("LOCKED");
m.SetCollisionRadius(m.GetOriginalCollisionRadius()+12);
}break;
} }
} }

@ -1887,7 +1887,7 @@ Monsters
Strategy = Pirate's Treasure Strategy = Pirate's Treasure
#Size of each animation frame #Size of each animation frame
SheetFrameSize = 24,24 SheetFrameSize = 36,36
# Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST
4-Way Spritesheet = False 4-Way Spritesheet = False
@ -1899,7 +1899,7 @@ Monsters
# The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator. # The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator.
IDLE = 1, 1.0, OneShot IDLE = 1, 1.0, OneShot
WALK = 1, 1.0, OneShot WALK = 1, 1.0, OneShot
SLASHING = 1, 1.0, OneShot LOCKED = 1, 1.0, OneShot
OPEN = 1, 1.0, OneShot OPEN = 1, 1.0, OneShot
} }

@ -64,7 +64,10 @@ Ranger
# Whether or not this ability cancels casts. # Whether or not this ability cancels casts.
CancelCast = 0 CancelCast = 0
Description = Shoots five arrows rapidly at a target location. Description = Shoots {ARROW COUNT} arrows rapidly. Total Damage: {Damage:DAMAGE}
DAMAGE = 5.0x
ARROW COUNT = four
#RGB Values. Color 1 is the circle at full cooldown, Color 2 is the color at empty cooldown. #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 Cooldown Bar Color 1 = 64, 0, 0, 192

@ -115,6 +115,18 @@ Item Enchants
# Stat, Lowest, Highest Value # Stat, Lowest, Highest Value
# Stat Modifier[0] = ..., 0, 0 # 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 = Extreme
ARROW COUNT = nine
DAMAGE = 9.0x
}
} }
Charge Beam Charge Beam
{ {

Loading…
Cancel
Save