#pragma once

#include "../../../GAME_COMMON.h"
#include "../../../input/input.h"
#include "../../ecs_entity.h"

#include "../component_physics.h"
#include "component_action_return.h"
#include "component_action_damage.h"

#define COMPONENT_ACTION_REDIRECT_DAMAGE_INCREMENT 1
#define COMPONENT_ACTION_REDIRECT_DAMAGE_MULTIPLIER 2

typedef struct ComponentActionRedirect
{
	ECSComponent component;
	f32 multiplier;
	u32 sender;
	bool isRedirect;
	bool isGivenAngle;
} ComponentActionRedirect;

void component_action_redirect_init(ComponentActionRedirect* self, f32 multiplier, u32 sender);
void component_action_redirect_tick(ComponentActionRedirect* self, ECS* ecs);

static const ECSComponentInfo COMPONENT_ACTION_REDIRECT_INFO = 
{
	.system = 
	{
		.functions = 
		{ 
			NULL,
			NULL,
			(ECSFunction)component_action_redirect_tick,
			NULL
		}
	},
	.type = ECS_COMPONENT_ACTION_REDIRECT,
	.size = sizeof(ComponentActionRedirect)
};


