Updated Boss to Add Combat Variation (Scream)
This commit is contained in:
parent
0667273c45
commit
72308aabb0
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -11,8 +11,8 @@ void UDamageDownPlayer::Invoke(AActor* Character, float TimeOfExpiry)
|
|||||||
|
|
||||||
void UDamageDownPlayer::OnExpiry(AActor* Character)
|
void UDamageDownPlayer::OnExpiry(AActor* Character)
|
||||||
{
|
{
|
||||||
Super::OnExpiry(Character);
|
|
||||||
CombatSystem->BaseDamageMultiplier += PlayerDamageMultiplierDecreaseAmount;
|
CombatSystem->BaseDamageMultiplier += PlayerDamageMultiplierDecreaseAmount;
|
||||||
|
Super::OnExpiry(Character);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDamageDownPlayer::OnEnemyTurn(AActor* Enemy, AActor* Character)
|
void UDamageDownPlayer::OnEnemyTurn(AActor* Enemy, AActor* Character)
|
||||||
|
@ -778,9 +778,27 @@ void ATurnBaseCombatV2::EnemyTurn()
|
|||||||
else ChanceToMiss = 30;
|
else ChanceToMiss = 30;
|
||||||
if (FMath::RandRange(1, 100) > ChanceToMiss)
|
if (FMath::RandRange(1, 100) > ChanceToMiss)
|
||||||
{
|
{
|
||||||
const FProperty* EnemyBaseDamageProperty = EnemyActor->GetClass()->FindPropertyByName(FName("BaseDamage"));
|
if (IsBossBoolProperty->GetPropertyValue_InContainer(EnemyActor) && FMath::RandRange(1, 100) > 10)
|
||||||
const int* EnemyBaseDamageSpeedPtr = EnemyBaseDamageProperty->ContainerPtrToValuePtr<int>(EnemyActor);
|
{
|
||||||
DamagePlayer(*EnemyBaseDamageSpeedPtr);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user