2021-11-27 00:53:57 +01:00
|
|
|
#pragma once
|
2019-07-25 22:46:10 +10:00
|
|
|
|
|
|
|
#include <ForwardsZone.h>
|
|
|
|
#include <Common.h>
|
|
|
|
|
|
|
|
namespace Sapphire::World::Action
|
|
|
|
{
|
|
|
|
/*!
|
|
|
|
* @brief A container for the computed result of an effect on a single actor. Used to apply damage/healing dealt
|
|
|
|
* at a later point in time.
|
|
|
|
*/
|
|
|
|
class EffectResult
|
|
|
|
{
|
|
|
|
public:
|
2019-07-27 13:59:35 +10:00
|
|
|
explicit EffectResult( Entity::CharaPtr target, uint64_t delayMs );
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2020-01-05 20:49:50 +09:00
|
|
|
void damage( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionEffectResultFlag flag = Common::ActionEffectResultFlag::None );
|
|
|
|
void heal( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionEffectResultFlag flag = Common::ActionEffectResultFlag::None );
|
|
|
|
void restoreMP( uint32_t amount, Common::ActionEffectResultFlag flag = Common::ActionEffectResultFlag::None );
|
2020-01-05 17:09:27 +09:00
|
|
|
void startCombo( uint16_t actionId );
|
2020-01-05 20:49:50 +09:00
|
|
|
void comboSucceed();
|
2020-01-06 19:25:01 +09:00
|
|
|
void applyStatusEffect( uint16_t statusId, uint8_t param );
|
2020-01-26 21:16:41 +11:00
|
|
|
void mount( uint16_t mountId );
|
2019-07-25 22:46:10 +10:00
|
|
|
|
|
|
|
Entity::CharaPtr getTarget() const;
|
|
|
|
|
2019-07-27 13:59:35 +10:00
|
|
|
uint64_t getDelay();
|
|
|
|
|
2023-02-28 10:31:59 +01:00
|
|
|
const Common::CalcResultParam& getCalcResultParam() const;
|
2019-07-25 22:46:10 +10:00
|
|
|
|
2019-07-27 13:59:35 +10:00
|
|
|
void execute();
|
|
|
|
|
2019-07-25 22:46:10 +10:00
|
|
|
private:
|
2019-07-27 13:59:35 +10:00
|
|
|
uint64_t m_delayMs;
|
2019-07-25 22:46:10 +10:00
|
|
|
|
|
|
|
Entity::CharaPtr m_target;
|
|
|
|
|
2023-02-28 10:31:59 +01:00
|
|
|
Common::CalcResultParam m_result;
|
2020-01-08 17:21:01 +09:00
|
|
|
|
2019-07-25 22:46:10 +10:00
|
|
|
};
|
2021-11-27 00:53:57 +01:00
|
|
|
}
|