The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'!
https://forums.lestoria.net
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.
31 lines
1006 B
31 lines
1006 B
#pragma once
|
|
#include "olcPixelGameEngine.h"
|
|
|
|
struct Player;
|
|
|
|
struct PrecastData{
|
|
float castTime;
|
|
float range;
|
|
float size;
|
|
//Whether or not this ability requires precasting (automatically set to true when precast time is greater than zero)
|
|
bool precastTargetingRequired=false;
|
|
PrecastData();
|
|
//Cast an ability without a targeting indicator, just starts the cast.
|
|
PrecastData(float castTime);
|
|
PrecastData(float castTime,float range,float size);
|
|
};
|
|
|
|
//Abilities are tied to class data which is defined in Class.cpp.
|
|
struct Ability{
|
|
std::string name="";
|
|
std::string shortName="";
|
|
float cooldown=0;
|
|
float COOLDOWN_TIME=0;
|
|
int manaCost=0;
|
|
Pixel barColor1,barColor2;
|
|
PrecastData precastInfo;
|
|
bool canCancelCast=false;
|
|
std::function<bool(Player*,vf2d)>action=[](Player*,vf2d){return false;};
|
|
Ability();
|
|
Ability(std::string name,std::string shortName,float cooldownTime,int manaCost,Pixel barColor1=VERY_DARK_RED,Pixel barColor2=DARK_RED,PrecastData precastInfo={},bool canCancelCast=false);
|
|
}; |