Updated Boss to Add Combat Variation (Scream)

This commit is contained in:
Philip W 2023-05-13 00:42:38 +01:00
parent 0667273c45
commit 72308aabb0
4 changed files with 26 additions and 8 deletions

BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Levels/Build.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -11,8 +11,8 @@ void UDamageDownPlayer::Invoke(AActor* Character, float TimeOfExpiry)
void UDamageDownPlayer::OnExpiry(AActor* Character)
{
Super::OnExpiry(Character);
CombatSystem->BaseDamageMultiplier += PlayerDamageMultiplierDecreaseAmount;
Super::OnExpiry(Character);
}
void UDamageDownPlayer::OnEnemyTurn(AActor* Enemy, AActor* Character)

View File

@ -778,9 +778,27 @@ void ATurnBaseCombatV2::EnemyTurn()
else ChanceToMiss = 30;
if (FMath::RandRange(1, 100) > ChanceToMiss)
{
const FProperty* EnemyBaseDamageProperty = EnemyActor->GetClass()->FindPropertyByName(FName("BaseDamage"));
const int* EnemyBaseDamageSpeedPtr = EnemyBaseDamageProperty->ContainerPtrToValuePtr<int>(EnemyActor);
DamagePlayer(*EnemyBaseDamageSpeedPtr);
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor) && FMath::RandRange(1, 100) > 10)
{
FOutputDeviceNull AR;
UStatusSystem* StatusSystem = Cast<UStatusSystem>(PlayerActor->GetComponentByClass(UStatusSystem::StaticClass()));
UStatusEffect* TempPlayerDamageDownStatusEffect = NewObject<UStatusEffect>(PlayerActor, DamageDownPlayerStatusEffect);
StatusSystem->AddStatusEffect(TempPlayerDamageDownStatusEffect, 1, true);
StatusEffects.Add(TempPlayerDamageDownStatusEffect);
AddBattleLogMessage("Player Damage Down");
StatusTextBlock->SetColorAndOpacity(FSlateColor(FLinearColor(1.0f, 0.0f, 0.0f, 1.0f)));
StatusTextBlock->SetText(FText::FromString("Player Damage Down"));
const FString Command3 = FString::Printf(TEXT("PlayStatusAnimation"));
HUD->CallFunctionByNameWithArguments(*Command3, AR, nullptr, true);
const FString Command4 = FString::Printf(TEXT("TriggerScreamAnimation"));
EnemyActor->CallFunctionByNameWithArguments(*Command4, AR, nullptr, true);
}
else
{
const FProperty* EnemyBaseDamageProperty = EnemyActor->GetClass()->FindPropertyByName(FName("BaseDamage"));
const int* EnemyBaseDamagePtr = EnemyBaseDamageProperty->ContainerPtrToValuePtr<int>(EnemyActor);
DamagePlayer(*EnemyBaseDamagePtr);
}
}
else
{