Read all basic skill data from class configuration files.

pull/28/head
sigonasr2 1 year ago
parent 690171497f
commit 5a406bc469
  1. 7
      Crawler/Crawler.vcxproj
  2. 24
      Crawler/Crawler.vcxproj.filters
  3. 35
      Crawler/Player.h
  4. 9
      Crawler/Ranger.cpp
  5. 9
      Crawler/Thief.cpp
  6. 9
      Crawler/Trapper.cpp
  7. 2
      Crawler/Version.h
  8. 9
      Crawler/Warrior.cpp
  9. 9
      Crawler/Witch.cpp
  10. 9
      Crawler/Wizard.cpp
  11. 41
      Crawler/assets/config/classes/Ranger.txt
  12. 41
      Crawler/assets/config/classes/Thief.txt
  13. 41
      Crawler/assets/config/classes/Trapper.txt
  14. 38
      Crawler/assets/config/classes/Warrior.txt
  15. 41
      Crawler/assets/config/classes/Witch.txt
  16. 41
      Crawler/assets/config/classes/Wizard.txt

@ -235,8 +235,15 @@
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<Text Include="assets\config\classes\Ranger.txt" />
<Text Include="assets\config\classes\Thief.txt" />
<Text Include="assets\config\classes\Trapper.txt" />
<Text Include="assets\config\classes\Warrior.txt" />
<Text Include="assets\config\classes\Witch.txt" />
<Text Include="assets\config\classes\Wizard.txt" />
<Text Include="assets\config\configuration.txt" />
<Text Include="assets\config\gfx\gfx.txt" />
<Text Include="assets\config\levels.txt" />
<Text Include="NewClasses.txt" />
<Text Include="InitialConcept.txt" />
<Text Include="Slime_King_Encounter.txt" />

@ -34,6 +34,9 @@
<Filter Include="Configurations\GFX">
<UniqueIdentifier>{153059cd-0714-4c62-b01c-342f3bcd393d}</UniqueIdentifier>
</Filter>
<Filter Include="Configurations\Classes">
<UniqueIdentifier>{fd547111-0670-4be5-85cf-28fbd92c765f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="olcPixelGameEngine.h">
@ -224,6 +227,27 @@
<Text Include="assets\config\gfx\gfx.txt">
<Filter>Configurations\GFX</Filter>
</Text>
<Text Include="assets\config\levels.txt">
<Filter>Configurations</Filter>
</Text>
<Text Include="assets\config\classes\Ranger.txt">
<Filter>Configurations\Classes</Filter>
</Text>
<Text Include="assets\config\classes\Thief.txt">
<Filter>Configurations\Classes</Filter>
</Text>
<Text Include="assets\config\classes\Trapper.txt">
<Filter>Configurations\Classes</Filter>
</Text>
<Text Include="assets\config\classes\Warrior.txt">
<Filter>Configurations\Classes</Filter>
</Text>
<Text Include="assets\config\classes\Witch.txt">
<Filter>Configurations\Classes</Filter>
</Text>
<Text Include="assets\config\classes\Wizard.txt">
<Filter>Configurations\Classes</Filter>
</Text>
</ItemGroup>
<ItemGroup>
<Image Include="assets\heart.ico">

@ -333,4 +333,37 @@ struct Witch:Player{
AnimationState&GetIdleEAnimation()override;
AnimationState&GetIdleSAnimation()override;
AnimationState&GetIdleWAnimation()override;
};
};
#define READFROMCONFIG(class,enum) \
class::name=#class".ClassName"_S; \
class::cl=enum; \
class::rightClickAbility={ \
#class".Right Click Ability.Name"_S, \
#class".Right Click Ability.Cooldown"_F, \
#class".Right Click Ability.Mana Cost"_I, \
{uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 1"_f[3]==0?255:#class".Right Click Ability.Cooldown Bar Color 1"_f[3])}, \
{uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Right Click Ability.Cooldown Bar Color 2"_f[3]==0?255:#class".Right Click Ability.Cooldown Bar Color 2"_f[3])}, \
}; \
class::ability1={ \
#class".Ability 1.Name"_S, \
#class".Ability 1.Cooldown"_F, \
#class".Ability 1.Mana Cost"_I, \
{uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 1.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 1.Cooldown Bar Color 1"_f[3])}, \
{uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 1.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 1.Cooldown Bar Color 2"_f[3])}, \
}; \
class::ability2={ \
#class".Ability 2.Name"_S, \
#class".Ability 2.Cooldown"_F, \
#class".Ability 2.Mana Cost"_I, \
{uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 2.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 2.Cooldown Bar Color 1"_f[3])}, \
{uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 2.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 2.Cooldown Bar Color 2"_f[3])}, \
}; \
class::ability3={ \
#class".Ability 3.Name"_S, \
#class".Ability 3.Cooldown"_F, \
#class".Ability 3.Mana Cost"_I, \
{uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[0]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[1]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[2]),uint8_t(#class".Ability 3.Cooldown Bar Color 1"_f[3]==0?255:#class".Ability 3.Cooldown Bar Color 1"_f[3])}, \
{uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[0]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[1]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[2]),uint8_t(#class".Ability 3.Cooldown Bar Color 2"_f[3]==0?255:#class".Ability 3.Cooldown Bar Color 2"_f[3])}, \
}; \
class::ability4={"???",0,0};

@ -6,19 +6,14 @@
#include "Crawler.h"
#include "BulletTypes.h"
#include "utils.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Ranger::Initialize(){
Ranger::name="Ranger";
Ranger::cl=RANGER;
Ranger::rightClickAbility=Ability("Retreat",7,0,VERY_DARK_BLUE,DARK_BLUE);
Ranger::ability1=Ability("Rapid Fire",12,35);
Ranger::ability2=Ability("Charged Shot",15,40,VERY_DARK_RED,DARK_RED,PrecastData(0.3));
Ranger::ability3=Ability("Multishot",25,50);
Ranger::ability4=Ability("???",0,0);
READFROMCONFIG(Ranger,RANGER);
Ranger::idle_n=RANGER_IDLE_N;
Ranger::idle_e=RANGER_IDLE_E;
Ranger::idle_s=RANGER_IDLE_S;

@ -4,19 +4,14 @@
#include "Player.h"
#include "Effect.h"
#include "Crawler.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Thief::Initialize(){
Thief::name="Thief";
Thief::cl=THIEF;
Thief::rightClickAbility={"???",15,0,VERY_DARK_BLUE,DARK_BLUE};
Thief::ability1={"???",12,40};
Thief::ability2={"???",15,50};
Thief::ability3={"???",40,60};
Thief::ability4={"???",0,0};
READFROMCONFIG(Thief,THIEF);
Thief::idle_n=WARRIOR_IDLE_N;
Thief::idle_e=WARRIOR_IDLE_E;
Thief::idle_s=WARRIOR_IDLE_S;

@ -4,19 +4,14 @@
#include "Player.h"
#include "Effect.h"
#include "Crawler.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Trapper::Initialize(){
Trapper::name="Trapper";
Trapper::cl=TRAPPER;
Trapper::rightClickAbility={"???",15,0,VERY_DARK_BLUE,DARK_BLUE};
Trapper::ability1={"???",12,40};
Trapper::ability2={"???",15,50};
Trapper::ability3={"???",40,60};
Trapper::ability4={"???",0,0};
READFROMCONFIG(Trapper,TRAPPER);
Trapper::idle_n=WARRIOR_IDLE_N;
Trapper::idle_e=WARRIOR_IDLE_E;
Trapper::idle_s=WARRIOR_IDLE_S;

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

@ -4,19 +4,14 @@
#include "Player.h"
#include "Effect.h"
#include "Crawler.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Warrior::Initialize(){
Warrior::name="Warrior";
Warrior::cl=WARRIOR;
Warrior::rightClickAbility={"Block",15,0,VERY_DARK_BLUE,DARK_BLUE};
Warrior::ability1={"Battlecry",12,40};
Warrior::ability2={"Ground Slam",15,50};
Warrior::ability3={"Sonic Slash",40,60};
Warrior::ability4={"???",0,0};
READFROMCONFIG(Warrior,WARRIOR);
Warrior::idle_n=WARRIOR_IDLE_N;
Warrior::idle_e=WARRIOR_IDLE_E;
Warrior::idle_s=WARRIOR_IDLE_S;

@ -4,19 +4,14 @@
#include "Player.h"
#include "Effect.h"
#include "Crawler.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Witch::Initialize(){
Witch::name="Witch";
Witch::cl=WITCH;
Witch::rightClickAbility={"???",15,0,VERY_DARK_BLUE,DARK_BLUE};
Witch::ability1={"???",12,40};
Witch::ability2={"???",15,50};
Witch::ability3={"???",40,60};
Witch::ability4={"???",0,0};
READFROMCONFIG(Witch,WITCH);
Witch::idle_n=WARRIOR_IDLE_N;
Witch::idle_e=WARRIOR_IDLE_E;
Witch::idle_s=WARRIOR_IDLE_S;

@ -5,19 +5,14 @@
#include "Effect.h"
#include "Crawler.h"
#include "BulletTypes.h"
#include "config.h"
INCLUDE_MONSTER_LIST
INCLUDE_BULLET_LIST
INCLUDE_game
void Wizard::Initialize(){
Wizard::name="Wizard";
Wizard::cl=WIZARD;
Wizard::rightClickAbility={"Teleport",8,5,VERY_DARK_BLUE,DARK_BLUE};
Wizard::ability1={"Firebolt",6,30};
Wizard::ability2={"Lightning Bolt",6,25};
Wizard::ability3={"Meteor",40,75,VERY_DARK_RED,VERY_DARK_RED,PrecastData(1.5,9*24,4*24)};
Wizard::ability4={"???",0,0};
READFROMCONFIG(Wizard,WIZARD);
Wizard::idle_n=WIZARD_IDLE_N;
Wizard::idle_e=WIZARD_IDLE_E;
Wizard::idle_s=WIZARD_IDLE_S;

@ -1,4 +1,45 @@
Ranger
{
ClassName = Ranger
Right Click Ability
{
Name = Retreat
Cooldown = 7
Mana Cost = 0
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = Rapid Fire
Cooldown = 12
Mana Cost = 35
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = Charged Shot
Cooldown = 15
Mana Cost = 40
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = Multishot
Cooldown = 25
Mana Cost = 50
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}

@ -1,4 +1,45 @@
Thief
{
ClassName = Thief
Right Click Ability
{
Name = ???
Cooldown = 8
Mana Cost = 5
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = ???
Cooldown = 6
Mana Cost = 30
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = ???
Cooldown = 6
Mana Cost = 25
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = ???
Cooldown = 40
Mana Cost = 75
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}

@ -1,4 +1,45 @@
Trapper
{
ClassName = Trapper
Right Click Ability
{
Name = ???
Cooldown = 8
Mana Cost = 5
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = ???
Cooldown = 6
Mana Cost = 30
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = ???
Cooldown = 6
Mana Cost = 25
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = ???
Cooldown = 40
Mana Cost = 75
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}

@ -4,6 +4,42 @@ Warrior
Right Click Ability
{
testNumber = 1
Name = Block
Cooldown = 15
Mana Cost = 0
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = Battlecry
Cooldown = 12
Mana Cost = 40
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = Ground Slam
Cooldown = 15
Mana Cost = 50
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = Sonic Slash
Cooldown = 40
Mana Cost = 60
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}

@ -1,4 +1,45 @@
Witch
{
ClassName = Witch
Right Click Ability
{
Name = ???
Cooldown = 8
Mana Cost = 5
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = ???
Cooldown = 6
Mana Cost = 30
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = ???
Cooldown = 6
Mana Cost = 25
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = ???
Cooldown = 40
Mana Cost = 75
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}

@ -1,4 +1,45 @@
Wizard
{
ClassName = Wizard
Right Click Ability
{
Name = Teleport
Cooldown = 8
Mana Cost = 5
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 0, 0, 64
Cooldown Bar Color 2 = 0, 0, 128
}
Ability 1
{
Name = Firebolt
Cooldown = 6
Mana Cost = 30
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 2
{
Name = Lightning Bolt
Cooldown = 6
Mana Cost = 25
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
Ability 3
{
Name = Meteor
Cooldown = 40
Mana Cost = 75
#RGB Values. Color 1 is the left side of the bar, Color 2 is the right side.
Cooldown Bar Color 1 = 64, 0, 0
Cooldown Bar Color 2 = 128, 0, 0
}
}
Loading…
Cancel
Save