diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 3e86830..5235108 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index ac67b47..edfc02c 100644 --- a/main.cpp +++ b/main.cpp @@ -222,6 +222,11 @@ enum class Property{ DEFENSE_UP, }; +enum class BattleMoveName{ + TESTMOVE1, + TESTMOVE2, + TESTMOVE3, +}; namespace Battle{ class Move{ @@ -232,6 +237,7 @@ namespace Battle{ int randomDmg; //Additional random roll damage to add onto the base damage. bool pctDamage; //Uses % damage for the base damage instead of flat damage. std::vector> properties; //The int is used to determine the chance of something occurring. + //Properties order is WET, DRY, COLD, HEAT Move(std::string name,int baseDmg,int randomDmg,std::arraycomposition,bool pctDamage=false,std::vector> properties={}) :name(name),randomDmg(randomDmg),baseDmg(baseDmg),composition(composition),pctDamage(pctDamage),properties(properties){} }; @@ -335,6 +341,7 @@ public: ActionType CurrentAction=ActionType::NONE; double CUTSCENE_FADE_VALUE=0; std::vectorCUTSCENE_QUEUE; + std::mapMOVELIST; bool MOUSE_PRESSED_DOWN=false,MOUSE_DOWN=false,MOUSE_RELEASED=false; //TODO Implement Mouse things. @@ -361,6 +368,7 @@ public: EnableLayer(layer::COLLISION,false); + SetupMoveList(); SetupAnimations(); SetupObjectInfo(); @@ -1158,6 +1166,11 @@ goes on a very long time, I hope you can understand this is only for testing pur return newObj; } + void SetupMoveList() { + MOVELIST[BattleMoveName::TESTMOVE1]=new Battle::Move("Test Move 1",30,5,{0,0,0,0}); + MOVELIST[BattleMoveName::TESTMOVE2]=new Battle::Move("Test Move 2",40,10,{0,0,0,0}); + MOVELIST[BattleMoveName::TESTMOVE3]=new Battle::Move("Test Move 3",25,5,{0,0,20,0}); + } void SetupAnimations() { CreateSprite("terrainmap.png"); @@ -1539,10 +1552,9 @@ goes on a very long time, I hope you can understand this is only for testing pur new Object( NPC1_4,"Test Obj",{pos.x+20,pos.y+48},ANIMATIONS["player.png"] ),70,70,14,std::array{0,0,0,0},0,std::vector{ - new Battle::Move("Test Move 1",30,5,std::array{0,0,0,0}), - new Battle::Move("Test Move 2",30,5,std::array{0,0,0,0}), - new Battle::Move("Test Move 3",30,5,std::array{0,0,0,0}), - new Battle::Move("Test Move 4",30,5,std::array{0,0,0,0}), + MOVELIST[BattleMoveName::TESTMOVE1], + MOVELIST[BattleMoveName::TESTMOVE2], + MOVELIST[BattleMoveName::TESTMOVE3], } )} ,chance)