From 7140faf22b0faa16b73d8768cc7aded1564783a5 Mon Sep 17 00:00:00 2001 From: MH261677 Date: Wed, 23 Nov 2022 00:56:33 +0000 Subject: [PATCH] Updated EatableItems Seperated Items into functional sub-variables that do other stuff instead of just healing the player no matte the item you make --- .../BaseItems/Items/EatableItems.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp index 815b09f..04f104d 100644 --- a/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp +++ b/Source/the_twilight_abyss/BaseItems/Items/EatableItems.cpp @@ -16,14 +16,26 @@ void UEatableItems::Use(ATempCharacter* Character) { if(Character) { - Character->Health += 10; - + if(isHealingItem == true) + { + Character->Health += 10; + UE_LOG(LogTemp, Display, TEXT("Healed")); + } + if(isDamageBuffItem == true) + { + // need to add the damage buff functionality here + UE_LOG(LogTemp, Display, TEXT("Damage Buffed")); + } if(StoredItems) { StoredItems->Remove(this); } } + + /* + when player uses the item syrengine to debuff enemies + detect what enemie actors the player is fighting with + lower their damage by a value. + */ } - -// IF THE ITEM HAS THE TAG THEN HEAL OR IF IT HAS OTHER TAG DO SOMETHING ELSE \ No newline at end of file