You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SeasonI/battle.h

56 lines
2.4 KiB

#ifndef BATTLE_H
#define BATTLE_H
#include "effect.h"
#include "pixelGameEngine.h"
using namespace olc;
enum class Resistance{
WET,
DRY,
COLD,
HEAT,
};
enum class Property{
PETRIFY,
PARALYZE,
DIAMONDIZE,
CRYING,
SLOW,
MUSHROOMIZED,
CONFUSE,
POISON,
REGEN,
DEFENSE_UP,
REVIVE,
};
namespace Battle{
class Move{
public:
std::string name;
std::string desc;
std::array<int,4>composition;
int baseDmg; //The base damage of the attack.
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
int PPCost=0;
int grade=0; //If the name of a move name match, then the grade helps sort it into the same category on menus.
int range=1; //The range of this ability in tiles.
int channelTime=0; //The amount of frames to channel the spell.
bool friendly=false; //Target allies instead.
Effect*eff=nullptr;
std::wstring attackMsg;
//Assumes friendly is false.
Move(std::string name,std::string desc,int baseDmg,int randomDmg,int PPCost,int range,std::array<int,4>composition,std::wstring attackMsg = L"$USER uses $POWER",Effect*eff=nullptr,bool pctDamage=false,std::vector<std::pair<Property,int>> properties={})
:Move(name,desc,0,baseDmg,randomDmg,PPCost,range,0,false,composition,attackMsg,eff,pctDamage,properties){};
Move(std::string name,std::string desc,int baseDmg,int randomDmg,int PPCost,int range,int channelTime,bool friendly,std::array<int,4>composition,std::wstring attackMsg = L"$USER uses $POWER",Effect*eff=nullptr,bool pctDamage=false,std::vector<std::pair<Property,int>> properties={})
:Move(name,desc,0,baseDmg,randomDmg,PPCost,range,channelTime,friendly,composition,attackMsg,eff,pctDamage,properties){};
Move(std::string name,std::string desc,int grade,int baseDmg,int randomDmg,int PPCost,int range,int channelTime,bool friendly,std::array<int,4>composition,std::wstring attackMsg = L"$USER uses $POWER",Effect*eff=nullptr,bool pctDamage=false,std::vector<std::pair<Property,int>> properties={})
:name(name),grade(grade),PPCost(PPCost),desc(desc),randomDmg(randomDmg),baseDmg(baseDmg),range(range),friendly(friendly),eff(eff),channelTime(channelTime),attackMsg(attackMsg),composition(composition),pctDamage(pctDamage),properties(properties){}
};
}
#endif