Implement Wizard Ability 1 (Firebolt) configuration parameters.

pull/28/head
sigonasr2 1 year ago
parent bd407aca83
commit 694cb310f2
  1. 6
      Crawler.sln
  2. 71
      Crawler/Crawler.vcxproj
  3. 2
      Crawler/EnergyBolt.cpp
  4. 18
      Crawler/FireBolt.cpp
  5. 2
      Crawler/Version.h
  6. 39
      Crawler/assets/config/classes/Wizard.txt
  7. 2
      Crawler/assets/config/configuration.txt
  8. BIN
      x64/Release Desktop/Crawler.exe

@ -9,6 +9,8 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release Desktop|x64 = Release Desktop|x64
Release Desktop|x86 = Release Desktop|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
@ -17,6 +19,10 @@ Global
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Debug|x64.Build.0 = Debug|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Debug|x86.ActiveCfg = Debug|Win32
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Debug|x86.Build.0 = Debug|Win32
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release Desktop|x64.ActiveCfg = Release Desktop|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release Desktop|x64.Build.0 = Release Desktop|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release Desktop|x86.ActiveCfg = Release Desktop|Win32
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release Desktop|x86.Build.0 = Release Desktop|Win32
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x64.ActiveCfg = Release|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x64.Build.0 = Release|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x86.ActiveCfg = Release|Win32

@ -13,6 +13,14 @@
<Configuration>Emscripten</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Desktop|Win32">
<Configuration>Release Desktop</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release Desktop|x64">
<Configuration>Release Desktop</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@ -47,6 +55,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@ -60,6 +75,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Emscripten|Win32'">
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
@ -77,12 +99,18 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@ -118,6 +146,25 @@
<Command>powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File update_version.ps1 "./version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File update_version.ps1 "./version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@ -161,6 +208,30 @@
<Command>powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File emscripten_build.ps1</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Desktop|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
<Command>powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File update_version.ps1 "./version.h"</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Emscripten|Win32'">
<Link>
<SubSystem>Console</SubSystem>

@ -14,7 +14,7 @@ void EnergyBolt::Update(float fElapsedTime){
lastParticleSpawn=std::max(0.f,lastParticleSpawn-fElapsedTime);
if(lastParticleSpawn==0){
lastParticleSpawn="Wizard.Auto Attack.ParticleFrequency"_F;
game->AddEffect(std::make_unique<Effect>(pos,"Wizard.Auto Attack.ParticleLifetimeRange"_FRange,AnimationState::ENERGY_PARTICLE,upperLevel,"Wizard.Auto Attack.ParticleSizeRange"_FRange,"Wizard.Auto Attack.ParticleFadeoutTime"_F,vf2d{"Wizard.Auto Attack.ParicleSpeedRange"_FRange,"Wizard.Auto Attack.ParicleSpeedRange"_FRange}));
game->AddEffect(std::make_unique<Effect>(pos,"Wizard.Auto Attack.ParticleLifetimeRange"_FRange,AnimationState::ENERGY_PARTICLE,upperLevel,"Wizard.Auto Attack.ParticleSizeRange"_FRange,"Wizard.Auto Attack.ParticleFadeoutTime"_F,vf2d{"Wizard.Auto Attack.ParticleSpeedRange"_FRange,"Wizard.Auto Attack.ParticleSpeedRange"_FRange}));
}
}

@ -14,15 +14,15 @@ FireBolt::FireBolt(vf2d pos,vf2d vel,float radius,int damage,bool upperLevel,boo
void FireBolt::Update(float fElapsedTime){
lastParticleSpawn=std::max(0.f,lastParticleSpawn-fElapsedTime);
if(lastParticleSpawn==0){
lastParticleSpawn=0.03;
game->AddEffect(std::make_unique<Effect>(pos,util::random(1),AnimationState::ENERGY_PARTICLE,upperLevel,util::random(2),0.3,vf2d{util::random(120)-60,-util::random(60)},Pixel{255,uint8_t(util::random(250)),0}));
lastParticleSpawn="Wizard.Ability 1.ParticleFrequency"_F;
game->AddEffect(std::make_unique<Effect>(pos,"Wizard.Ability 1.ParticleLifetimeRange"_FRange,AnimationState::ENERGY_PARTICLE,upperLevel,"Wizard.Ability 1.ParticleSizeRange"_FRange,"Wizard.Ability 1.ParticleFadeoutTime"_F,vf2d{"Wizard.Ability 1.ParticleXSpeedRange"_FRange,"Wizard.Ability 1.ParticleYSpeedRange"_FRange},Pixel{uint8_t("Wizard.Ability 1.ParticleRedRange"_FRange),uint8_t("Wizard.Ability 1.ParticleGreenRange"_FRange),uint8_t("Wizard.Ability 1.ParticleBlueRange"_FRange),uint8_t("Wizard.Ability 1.ParticleAlphaRange"_FRange)}));
}
}
bool FireBolt::PlayerHit(Player*player)
{
deactivated=true;
fadeOutTime=0.2f;
fadeOutTime="Wizard.Ability 1.BulletHitFadeoutTime"_F;
game->AddEffect(std::make_unique<Effect>(player->GetPos(),0,AnimationState::SPLASH_EFFECT,upperLevel,5,0.25,vf2d{},Pixel{240,120,60}));
return false;
}
@ -30,12 +30,12 @@ bool FireBolt::PlayerHit(Player*player)
bool FireBolt::MonsterHit(Monster& monster)
{
deactivated=true;
fadeOutTime=0.2f;
for(int i=0;i<72;i++){
game->AddEffect(std::make_unique<Effect>(monster.GetPos(),util::random(0.5),AnimationState::DOT_PARTICLE,upperLevel,util::random(2),util::random(0.4),vf2d{util::random(300)-150,util::random(300)-150},Pixel{255,uint8_t(util::random(190)+60),60}));
fadeOutTime="Wizard.Ability 1.BulletHitFadeoutTime"_F;
for(int i=0;i<"Wizard.Ability 1.BulletHitExplosionParticleCount"_I;i++){
game->AddEffect(std::make_unique<Effect>(monster.GetPos(),"Wizard.Ability 1.BulletHitExplosionParticleLifetimeRange"_FRange,AnimationState::DOT_PARTICLE,upperLevel,"Wizard.Ability 1.BulletHitExplosionParticleSizeRange"_FRange,"Wizard.Ability 1.BulletHitExplosionParticleFadeoutTimeRange"_FRange,vf2d{"Wizard.Ability 1.BulletHitExplosionParticleSpeedRange"_FRange,"Wizard.Ability 1.BulletHitExplosionParticleSpeedRange"_FRange},Pixel{uint8_t("Wizard.Ability 1.BulletHitExplosionParticleRedRange"_FRange),uint8_t("Wizard.Ability 1.BulletHitExplosionParticleGreenRange"_FRange),uint8_t("Wizard.Ability 1.BulletHitExplosionParticleBlueRange"_FRange),uint8_t("Wizard.Ability 1.BulletHitExplosionParticleAlphaRange"_FRange)}));
}
game->SetupWorldShake(0.25);
game->HurtEnemies(monster.GetPos(),2.5*24,3*damage,OnUpperLevel());
game->AddEffect(std::make_unique<Effect>(monster.GetPos(),0,AnimationState::SPLASH_EFFECT,upperLevel,5,0.25,vf2d{},Pixel{240,120,60}));
game->SetupWorldShake("Wizard.Ability 1.WorldShakeTime"_F);
game->HurtEnemies(monster.GetPos(),"Wizard.Ability 1.BulletHitExplosionRange"_F/100*12,"Wizard.Ability 1.BulletHitExplosionDamageMult"_F*damage,OnUpperLevel());
game->AddEffect(std::make_unique<Effect>(monster.GetPos(),0,AnimationState::SPLASH_EFFECT,upperLevel,"Wizard.Ability 1.BulletHitExplosionRange"_F/100*2,"Wizard.Ability 1.BulletHitExplosionFadeoutTime"_F,vf2d{},"Wizard.Ability 1.BulletHitExplosionColor"_Pixel));
return false;
}

@ -2,7 +2,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 0
#define VERSION_BUILD 908
#define VERSION_BUILD 913
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -81,6 +81,45 @@ Wizard
#Coloring of the bullet.
BulletColor = 240, 120, 60, 255
# When bullet makes contact, how fast the bullet will fade out.
BulletHitFadeoutTime = 0.2
WorldShakeTime = 0.25
BulletHitExplosionRange = 250
# WARNING! This is how much damage multipled from the original damage of a fire bolt, not the base damage of the player.
BulletHitExplosionDamageMult = 3
BulletHitExplosionFadeoutTime = 0.25
BulletHitExplosionColor = 240, 120, 60, 255
# The number of particles that spawn when a fire bolt explodes on contact.
BulletHitExplosionParticleCount = 72
BulletHitExplosionParticleLifetimeRange = 0,0.5
BulletHitExplosionParticleSizeRange = 0,2
BulletHitExplosionParticleFadeoutTimeRange = 0,0.4
BulletHitExplosionParticleSpeedRange = -150,150
# Specific color randomization ranges for the explosion particles.
BulletHitExplosionParticleRedRange = 255,255
BulletHitExplosionParticleGreenRange = 60,250
BulletHitExplosionParticleBlueRange = 60,60
BulletHitExplosionParticleAlphaRange = 255,255
# How much time passes before another particle spawns from the bullet.
ParticleFrequency = 0.03
# Specify a minimum and maximum range
ParticleLifetimeRange = 0,1
ParticleSizeRange = 0,2
ParticleFadeoutTime = 0.3
ParticleXSpeedRange = -60,60
ParticleYSpeedRange = -60,-60
# Specific color randomization ranges for the fire bolt particles.
ParticleRedRange = 255,255
ParticleGreenRange = 0,250
ParticleBlueRange = 0,0
ParticleAlphaRange = 255,255
}
Ability 2
{

@ -16,4 +16,4 @@ class_directory = classes/
class_list = Warrior, Thief, Ranger, Trapper, Wizard, Witch
# Whether or not to show individual data accesses from config data structure.
debug_access_options = 0
debug_access_options = 1

Binary file not shown.
Loading…
Cancel
Save