From 53126c6b1008f8085855b6d6238902bc9b926089 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Thu, 11 May 2023 04:12:00 +0100 Subject: [PATCH] Exposed Base Damage for Enemies --- Content/BlueprintAI/AI/AIBruh.uasset | 4 ++-- Content/BlueprintAI/AI/AIBruh_Boss.uasset | 4 ++-- Content/Levels/Build.umap | 4 ++-- .../TurnBasedCombatV2/TurnBaseCombatV2.cpp | 7 ++++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Content/BlueprintAI/AI/AIBruh.uasset b/Content/BlueprintAI/AI/AIBruh.uasset index be176e5..c510da3 100644 --- a/Content/BlueprintAI/AI/AIBruh.uasset +++ b/Content/BlueprintAI/AI/AIBruh.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f62e04e0c4b999171683839ce55019fcba45f1c1d6218fe1675e2e435ccba460 -size 100073 +oid sha256:a288fa4ebd324988aab14b0d87b949c358a2c2c3cc9bc3bd6332f555732806d5 +size 100609 diff --git a/Content/BlueprintAI/AI/AIBruh_Boss.uasset b/Content/BlueprintAI/AI/AIBruh_Boss.uasset index 284f3c1..524ec5a 100644 --- a/Content/BlueprintAI/AI/AIBruh_Boss.uasset +++ b/Content/BlueprintAI/AI/AIBruh_Boss.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60414b698d8a8a00875b69592bfeb75736ac263c3337a58e27d36cc376ed99f3 -size 143105 +oid sha256:bfa566cea4453caf6bd27c616f7ece25fadb0557a37c68a347734c79097d62e6 +size 143344 diff --git a/Content/Levels/Build.umap b/Content/Levels/Build.umap index 87c01ba..52c7da7 100644 --- a/Content/Levels/Build.umap +++ b/Content/Levels/Build.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bdbabb407635962b617b3caed1be8fdac397f905a0f891506c013180f1bad424 -size 3462276 +oid sha256:83ffa5c68b6474224a8be89c56746da390b35704aceb715607c6b59480ca3010 +size 3461524 diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index da8631b..149aa92 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -734,7 +734,12 @@ void ATurnBaseCombatV2::EnableButtons() const void ATurnBaseCombatV2::EnemyTurn() { - if (FMath::RandRange(1, 100) > 30) DamagePlayer(10); + if (FMath::RandRange(1, 100) > 30) + { + const FProperty* EnemyBaseDamageProperty = EnemyActor->GetClass()->FindPropertyByName(FName("BaseDamage")); + const int* EnemyBaseDamageSpeedPtr = EnemyBaseDamageProperty->ContainerPtrToValuePtr(EnemyActor); + DamagePlayer(*EnemyBaseDamageSpeedPtr); + } else { StatusTextBlock->SetText(FText::FromString("Missed"));