Implement Mega Charged Shot. Release Build 10827.
This commit is contained in:
parent
10b849e906
commit
7fa02b0f7a
@ -572,5 +572,16 @@ namespace EnchantTests
|
|||||||
player->CheckAndPerformAbility(player->GetAbility1(),testKeyboardInput);
|
player->CheckAndPerformAbility(player->GetAbility1(),testKeyboardInput);
|
||||||
Assert::AreEqual("Ranger.Ability 1.ArrowCount"_I+int("Extreme Rapid Fire"_ENC["ARROW COUNT INCREASE"]),player->RemainingRapidFireShots(),L"Player now has even more Rapid Fire shots.");
|
Assert::AreEqual("Ranger.Ability 1.ArrowCount"_I+int("Extreme Rapid Fire"_ENC["ARROW COUNT INCREASE"]),player->RemainingRapidFireShots(),L"Player now has even more Rapid Fire shots.");
|
||||||
}
|
}
|
||||||
|
TEST_METHOD(MegaChargedShotCheck){
|
||||||
|
std::weak_ptr<Item>nullRing{Inventory::AddItem("Null Ring"s)};
|
||||||
|
Inventory::EquipItem(nullRing,EquipSlot::RING1);
|
||||||
|
nullRing.lock()->EnchantItem("Extreme Rapid Fire");
|
||||||
|
Assert::AreEqual("Warrior.Ability 2.Precast Time"_F,player->GetAbility2().precastInfo.castTime,L"Non-Ranger class' precast times should be unaffected with the item.");
|
||||||
|
game->ChangePlayerClass(RANGER);
|
||||||
|
player=game->GetPlayer();
|
||||||
|
Assert::AreEqual("Ranger.Ability 2.Precast Time"_F+"Mega Charged Shot"_ENC["CAST TIME INCREASE"],player->GetAbility2().precastInfo.castTime,L"Ranger class' precast time should be affected with the item.");
|
||||||
|
Inventory::UnequipItem(EquipSlot::RING1);
|
||||||
|
Assert::AreEqual("Ranger.Ability 2.Precast Time"_F,player->GetAbility2().precastInfo.castTime,L"Ranger class' precast time should be back to normal.");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -1424,6 +1424,11 @@ void Player::RecalculateEquipStats(){
|
|||||||
EquipSlot slot=EquipSlot(i);
|
EquipSlot slot=EquipSlot(i);
|
||||||
if(!ISBLANK(Inventory::GetEquip(slot))&&Inventory::GetEquip(slot).lock()->GetEnchant().has_value())enchantList.insert(Inventory::GetEquip(slot).lock()->GetEnchant().value().Name());
|
if(!ISBLANK(Inventory::GetEquip(slot))&&Inventory::GetEquip(slot).lock()->GetEnchant().has_value())enchantList.insert(Inventory::GetEquip(slot).lock()->GetEnchant().value().Name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GetClass()==RANGER){
|
||||||
|
GetAbility2().precastInfo.castTime=Ranger::ability2.precastInfo.castTime; //This resets the cast time of this ability since it's possible for an enchant to modify it.
|
||||||
|
if(HasEnchant("Mega Charged Shot"))GetAbility2().precastInfo.castTime+="Mega Charged Shot"_ENC["CAST TIME INCREASE"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<Buff>Player::GetStatBuffs(const std::vector<std::string>&attr)const{
|
const std::vector<Buff>Player::GetStatBuffs(const std::vector<std::string>&attr)const{
|
||||||
|
@ -130,7 +130,10 @@ void Ranger::InitializeClassAbilities(){
|
|||||||
float beamRadius{12*"Ranger.Ability 2.Radius"_F/100};
|
float beamRadius{12*"Ranger.Ability 2.Radius"_F/100};
|
||||||
if(p->HasEnchant("Charge Beam"))beamRadius*="Charge Beam"_ENC["ATTACK RADIUS INCREASE MULT"];
|
if(p->HasEnchant("Charge Beam"))beamRadius*="Charge Beam"_ENC["ATTACK RADIUS INCREASE MULT"];
|
||||||
|
|
||||||
BULLET_LIST.push_back(std::make_unique<ChargedArrow>(p->GetPos(),arrowVelocity*"Ranger.Ability 2.Speed"_F,beamRadius,p->GetAttack()*"Ranger.Ability 2.DamageMult"_F,p->OnUpperLevel(),true));
|
float damageMult{"Ranger.Ability 2.DamageMult"_F};
|
||||||
|
if(p->HasEnchant("Mega Charged Shot"))damageMult*="Mega Charged Shot"_ENC["DAMAGE INCREASE MULT"];
|
||||||
|
|
||||||
|
BULLET_LIST.push_back(std::make_unique<ChargedArrow>(p->GetPos(),arrowVelocity*"Ranger.Ability 2.Speed"_F,beamRadius,p->GetAttack()*damageMult,p->OnUpperLevel(),true));
|
||||||
p->SetState(State::SHOOT_ARROW);
|
p->SetState(State::SHOOT_ARROW);
|
||||||
p->rangerShootAnimationTimer=0.3f;
|
p->rangerShootAnimationTimer=0.3f;
|
||||||
p->SetAnimationBasedOnTargetingDirection("SHOOT",atan2(arrowVelocity.y,arrowVelocity.x));
|
p->SetAnimationBasedOnTargetingDirection("SHOOT",atan2(arrowVelocity.y,arrowVelocity.x));
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 10824
|
#define VERSION_BUILD 10827
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -128,10 +128,11 @@ Item Enchants
|
|||||||
}
|
}
|
||||||
Mega Charged Shot
|
Mega Charged Shot
|
||||||
{
|
{
|
||||||
Description = "Charged Shot's cast time increases by {CAST TIME INCREASE} seconds. Now deals two times more damage."
|
Description = "Charged Shot's cast time increases by {CAST TIME INCREASE} seconds. Now deals {DAMAGE INCREASE MULT}x more damage."
|
||||||
Affects = Ability 2
|
Affects = Ability 2
|
||||||
|
|
||||||
CAST TIME INCREASE = 1.5s
|
CAST TIME INCREASE = 1.5s
|
||||||
|
DAMAGE INCREASE MULT = 2x
|
||||||
|
|
||||||
# Stat, Lowest, Highest Value
|
# Stat, Lowest, Highest Value
|
||||||
# Stat Modifier[0] = ..., 0, 0
|
# Stat Modifier[0] = ..., 0, 0
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user