Implement Charge Beam. Make beam sprite effect distance twice as large so segments have smaller gaps. Release Build 10824.

mac-build
sigonasr2 4 months ago
parent ab963293d1
commit 10b849e906
  1. 1
      Adventures in Lestoria Tests/PlayerTests.cpp
  2. 2
      Adventures in Lestoria/AdventuresInLestoria.cpp
  3. 6
      Adventures in Lestoria/ChargedArrow.cpp
  4. 6
      Adventures in Lestoria/Ranger.cpp
  5. 2
      Adventures in Lestoria/Version.h
  6. 17
      testEnvironments.json
  7. BIN
      x64/Release/Adventures in Lestoria.exe

@ -100,6 +100,7 @@ namespace PlayerTests
}
TEST_METHOD_CLEANUP(CleanupTests){
testGame->EndGame();
testGame->OnUserUpdate(0.f);
}
TEST_METHOD(PlayerAlive){
Assert::IsTrue(player->IsAlive());

@ -394,7 +394,7 @@ bool AiL::OnUserCreate(){
void AiL::AdminConsole(){
if(ADMIN_MODE){
if(GetKey(F12).bPressed)ConsoleShow(F12);
if(GetKey(F11).bPressed)ConsoleShow(F11);
}
}

@ -54,7 +54,11 @@ void ChargedArrow::Update(float fElapsedTime){
float dist=lineToCurrentPos.length();
if(dist>=1){
vf2d midpoint(lineToCurrentPos.rpoint(0.5));
game->AddEffect(std::make_unique<Effect>(midpoint,0.1f,"laser.png",upperLevel,vf2d{1,dist},0.3f,vf2d{},Pixel{192,128,238},atan2(pos.y-lastLaserPos.y,pos.x-lastLaserPos.x)+PI/2,0,true));
const float normalBeamRadius{12*"Ranger.Ability 2.Radius"_F/100};
float laserWidth{radius/normalBeamRadius};
game->AddEffect(std::make_unique<Effect>(midpoint,0.1f,"laser.png",upperLevel,vf2d{laserWidth,dist*2},0.3f,vf2d{},Pixel{192,128,238},atan2(pos.y-lastLaserPos.y,pos.x-lastLaserPos.x)+PI/2,0,true));
lastLaserPos=pos;
}
}

@ -126,7 +126,11 @@ void Ranger::InitializeClassAbilities(){
Ranger::ability2.action=
[](Player*p,vf2d pos={}){
vf2d arrowVelocity=util::pointTo(p->GetPos(),p->GetWorldAimingLocation());
BULLET_LIST.push_back(std::make_unique<ChargedArrow>(p->GetPos(),arrowVelocity*"Ranger.Ability 2.Speed"_F,12*"Ranger.Ability 2.Radius"_F/100,p->GetAttack()*"Ranger.Ability 2.DamageMult"_F,p->OnUpperLevel(),true));
float beamRadius{12*"Ranger.Ability 2.Radius"_F/100};
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));
p->SetState(State::SHOOT_ARROW);
p->rangerShootAnimationTimer=0.3f;
p->SetAnimationBasedOnTargetingDirection("SHOOT",atan2(arrowVelocity.y,arrowVelocity.x));

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 3
#define VERSION_BUILD 10819
#define VERSION_BUILD 10824
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -0,0 +1,17 @@
{
"version": "1",
"environments": [
// See https://aka.ms/remotetesting for more details
// about how to configure remote environments.
//{
// "name": "WSL Ubuntu",
// "type": "wsl",
// "wslDistribution": "Ubuntu"
//},
//{
// "name": "Docker dotnet/sdk",
// "type": "docker",
// "dockerImage": "mcr.microsoft.com/dotnet/sdk"
//}
]
}
Loading…
Cancel
Save