2022-11-14 15:53:50 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
2022-11-14 17:42:26 +00:00
|
|
|
#include "EatableItems.h"
|
2022-11-14 15:53:50 +00:00
|
|
|
|
2023-01-12 13:56:30 +00:00
|
|
|
#include "BehaviorTree/BehaviorTreeTypes.h"
|
2022-11-15 00:04:46 +00:00
|
|
|
#include "the_twilight_abyss/BaseItems/InventoryComponent.h"
|
2022-11-14 16:52:57 +00:00
|
|
|
#include "the_twilight_abyss/PlayerTemp/TempCharacter.h"
|
|
|
|
|
2022-11-14 15:53:50 +00:00
|
|
|
|
2022-11-15 00:04:46 +00:00
|
|
|
UEatableItems::UEatableItems()
|
|
|
|
{
|
2023-01-12 13:56:30 +00:00
|
|
|
|
2022-11-15 00:04:46 +00:00
|
|
|
}
|
|
|
|
|
2022-11-14 17:42:26 +00:00
|
|
|
void UEatableItems::Use(ATempCharacter* Character)
|
2022-11-14 15:53:50 +00:00
|
|
|
{
|
2022-11-14 16:52:57 +00:00
|
|
|
if(Character)
|
|
|
|
{
|
2022-11-23 00:56:33 +00:00
|
|
|
if(isHealingItem == true)
|
|
|
|
{
|
|
|
|
Character->Health += 10;
|
|
|
|
UE_LOG(LogTemp, Display, TEXT("Healed"));
|
2023-01-12 13:56:30 +00:00
|
|
|
//delete itself
|
|
|
|
Character->Inventory->RemoveItem(this);
|
|
|
|
|
2022-11-23 00:56:33 +00:00
|
|
|
}
|
|
|
|
if(isDamageBuffItem == true)
|
|
|
|
{
|
|
|
|
// need to add the damage buff functionality here
|
|
|
|
UE_LOG(LogTemp, Display, TEXT("Damage Buffed"));
|
2023-01-12 13:56:30 +00:00
|
|
|
Character->Inventory->RemoveItem(this);
|
2022-11-15 00:04:46 +00:00
|
|
|
}
|
2022-11-14 16:52:57 +00:00
|
|
|
}
|
2022-11-15 03:27:44 +00:00
|
|
|
|
2022-11-23 00:56:33 +00:00
|
|
|
/*
|
|
|
|
when player uses the item syrengine to debuff enemies
|
|
|
|
detect what enemie actors the player is fighting with
|
|
|
|
lower their damage by a value.
|
|
|
|
*/
|
|
|
|
}
|
2022-11-18 18:19:14 +00:00
|
|
|
|