2021-11-27 00:53:57 +01:00
|
|
|
#pragma once
|
2019-05-30 15:35:05 +10:00
|
|
|
|
2021-11-29 18:54:16 +01:00
|
|
|
#include <cstdint>
|
2019-05-30 15:35:05 +10:00
|
|
|
#include <unordered_map>
|
2023-01-27 05:23:13 +01:00
|
|
|
#include <string>
|
2022-01-20 20:34:00 -03:00
|
|
|
#include <vector>
|
2023-01-28 00:07:06 +01:00
|
|
|
#include "Common.h"
|
2019-05-30 15:35:05 +10:00
|
|
|
|
|
|
|
namespace Sapphire::World::Action
|
|
|
|
{
|
2023-01-28 00:07:06 +01:00
|
|
|
struct StatusModifier
|
|
|
|
{
|
|
|
|
Common::ParamModifier modifier;
|
|
|
|
int32_t value;
|
|
|
|
};
|
2023-01-27 05:23:13 +01:00
|
|
|
|
|
|
|
struct StatusEntry
|
|
|
|
{
|
|
|
|
uint16_t id;
|
2023-03-06 23:05:21 +01:00
|
|
|
int32_t duration;
|
2023-01-28 00:07:06 +01:00
|
|
|
std::vector< StatusModifier > modifiers;
|
2023-01-27 05:23:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StatusEffect
|
|
|
|
{
|
|
|
|
std::vector< StatusEntry > caster;
|
|
|
|
std::vector< StatusEntry > target;
|
|
|
|
};
|
|
|
|
|
2019-05-30 15:35:05 +10:00
|
|
|
struct ActionEntry
|
|
|
|
{
|
|
|
|
uint16_t potency;
|
|
|
|
uint16_t comboPotency;
|
|
|
|
uint16_t flankPotency;
|
|
|
|
uint16_t frontPotency;
|
|
|
|
uint16_t rearPotency;
|
|
|
|
uint16_t curePotency;
|
2020-01-05 17:09:27 +09:00
|
|
|
uint16_t restoreMPPercentage;
|
2022-01-20 20:14:34 -03:00
|
|
|
std::vector< uint32_t > nextCombo;
|
2023-01-27 05:23:13 +01:00
|
|
|
StatusEffect statuses;
|
2019-05-30 15:35:05 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
class ActionLut
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using Lut = std::unordered_map< uint16_t, ActionEntry >;
|
|
|
|
|
2019-06-02 00:34:07 +10:00
|
|
|
static bool validEntryExists( uint16_t actionId );
|
2019-06-02 02:30:54 +10:00
|
|
|
static const ActionEntry& getEntry( uint16_t actionId );
|
2019-06-02 00:34:07 +10:00
|
|
|
|
2019-05-30 15:35:05 +10:00
|
|
|
static Lut m_actionLut;
|
|
|
|
};
|
2021-11-29 18:54:16 +01:00
|
|
|
}
|