|
|
|
@ -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<std::pair<Property,int>> 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::array<int,4>composition,bool pctDamage=false,std::vector<std::pair<Property,int>> 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::vector<CutsceneAction*>CUTSCENE_QUEUE; |
|
|
|
|
std::map<BattleMoveName,Battle::Move*>MOVELIST; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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<int,4>{0,0,0,0},0,std::vector<Battle::Move*>{ |
|
|
|
|
new Battle::Move("Test Move 1",30,5,std::array<int,4>{0,0,0,0}), |
|
|
|
|
new Battle::Move("Test Move 2",30,5,std::array<int,4>{0,0,0,0}), |
|
|
|
|
new Battle::Move("Test Move 3",30,5,std::array<int,4>{0,0,0,0}), |
|
|
|
|
new Battle::Move("Test Move 4",30,5,std::array<int,4>{0,0,0,0}), |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE1], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE2], |
|
|
|
|
MOVELIST[BattleMoveName::TESTMOVE3], |
|
|
|
|
} |
|
|
|
|
)} |
|
|
|
|
,chance) |
|
|
|
|