diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini index 8698439..73b2f08 100644 --- a/Config/DefaultInput.ini +++ b/Config/DefaultInput.ini @@ -81,7 +81,7 @@ DoubleClickTime=0.200000 +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Bottom) +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=SpaceBar) +ActionMappings=(ActionName="Interact",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=E) -+ActionMappings=(ActionName="RightClick",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton) ++ActionMappings=(ActionName="Click",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton) +ActionMappings=(ActionName="Sneak",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftControl) +AxisMappings=(AxisName="Look Up / Down Gamepad",Scale=1.000000,Key=Gamepad_RightY) +AxisMappings=(AxisName="Look Up / Down Mouse",Scale=-1.000000,Key=MouseY) diff --git a/Content/Blueprints/Combat_UI/BookCombat_UI.uasset b/Content/Blueprints/Combat_UI/BookCombat_UI.uasset index b5dd3bc..769cd4f 100644 --- a/Content/Blueprints/Combat_UI/BookCombat_UI.uasset +++ b/Content/Blueprints/Combat_UI/BookCombat_UI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24239f11123eae1d8dfb8b8c91123a03047dd09ca6f9dc374f22257fe05209ad -size 79303 +oid sha256:0030dacfde336e729232b84b34bfa39e6b12baeeadedf973edcccfdbcf27d672 +size 120732 diff --git a/Content/Blueprints/Combat_UI/BookWorldWidget.uasset b/Content/Blueprints/Combat_UI/BookWorldWidget.uasset index 27542e5..218e2d7 100644 --- a/Content/Blueprints/Combat_UI/BookWorldWidget.uasset +++ b/Content/Blueprints/Combat_UI/BookWorldWidget.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df5d8b3aeb9cd7bcbe0d78c90f2a7278f6133c89b58600fee8e8f7b63f7dcbda -size 23477 +oid sha256:6aea2b49abbfdd1ac0da1147e3419e5f6410fa4e940075c7e56262d90c703fb2 +size 23653 diff --git a/Content/Blueprints/Combat_UI/CombatCharacter.uasset b/Content/Blueprints/Combat_UI/CombatCharacter.uasset index d1994e4..bdcc2d3 100644 --- a/Content/Blueprints/Combat_UI/CombatCharacter.uasset +++ b/Content/Blueprints/Combat_UI/CombatCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f5c422149980fd84aae6d5e3c93acb836034a66de360907cfedbc5b9384ce77 -size 129743 +oid sha256:2288fc028031dde43dddc963534df07aabf9d878a4c0f0ae4c7bd2bc88b9be16 +size 142363 diff --git a/Content/Blueprints/Combat_UI/CombatTutorial.uasset b/Content/Blueprints/Combat_UI/CombatTutorial.uasset index 4d5595b..72bdb4a 100644 --- a/Content/Blueprints/Combat_UI/CombatTutorial.uasset +++ b/Content/Blueprints/Combat_UI/CombatTutorial.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:105769fa75c92ede5d6755984d7e6ab2bb8a06f64de788b296dd59752966dab7 -size 59828 +oid sha256:4b4aab87269ca504b3c501ffc37ba58bcffa14975659fa61a31239fc365a0f1d +size 59827 diff --git a/Content/Blueprints/Combat_UI/Iconage/Azos.uasset b/Content/Blueprints/Combat_UI/Iconage/Azos.uasset new file mode 100644 index 0000000..15c5951 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/Azos.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbc7ec8eebbbe5a4510d594c44b5d60fe75e8f2755260d6489ea4bcef620487e +size 51542 diff --git a/Content/Blueprints/Combat_UI/Iconage/AzosFaded.uasset b/Content/Blueprints/Combat_UI/Iconage/AzosFaded.uasset new file mode 100644 index 0000000..d4e2518 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/AzosFaded.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2753b2d690f598012b71906b61ce6070108c5fd33db7ce4a93d7c19a3e877421 +size 51626 diff --git a/Content/Blueprints/Combat_UI/Iconage/Eis.uasset b/Content/Blueprints/Combat_UI/Iconage/Eis.uasset new file mode 100644 index 0000000..73b4b3d --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/Eis.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2af69a87cb6bcbfd24b3f74cfa38a4495431c1c7cd0653ecc66af2f08648336 +size 20913 diff --git a/Content/Blueprints/Combat_UI/Iconage/EisFaded.uasset b/Content/Blueprints/Combat_UI/Iconage/EisFaded.uasset new file mode 100644 index 0000000..1fc04eb --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/EisFaded.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d05f70b9fd9ba35fdbe10f06a7c6047985eb25f4ff58a02807495c6f70e1bf7 +size 21039 diff --git a/Content/Blueprints/Combat_UI/Iconage/Escape.uasset b/Content/Blueprints/Combat_UI/Iconage/Escape.uasset new file mode 100644 index 0000000..4803a12 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/Escape.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:255965f068b104100e1ca50ab88c54bd2cc850306c77c71d94ff8f2d6019524a +size 17995 diff --git a/Content/Blueprints/Combat_UI/Iconage/EscapeFaded.uasset b/Content/Blueprints/Combat_UI/Iconage/EscapeFaded.uasset new file mode 100644 index 0000000..bfe629e --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/EscapeFaded.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49d3256b98e61b2cee2d8f69b039cb74dcaa27fed29bda626a77aad5d9ac0ab9 +size 20400 diff --git a/Content/Blueprints/Combat_UI/Iconage/Iroquoiod.uasset b/Content/Blueprints/Combat_UI/Iconage/Iroquoiod.uasset new file mode 100644 index 0000000..82f2cf7 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/Iroquoiod.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d9b79cdf172aac833002bb0107b62310132e5ded15e0e14a9f261b8409754f1 +size 16172 diff --git a/Content/Blueprints/Combat_UI/Iconage/IroquoiodFaded.uasset b/Content/Blueprints/Combat_UI/Iconage/IroquoiodFaded.uasset new file mode 100644 index 0000000..32c88b7 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/IroquoiodFaded.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aeceb1033a4930416bccbbe5836f3e58a425274547c9c7061bf81815efed2f5 +size 16307 diff --git a/Content/Blueprints/Combat_UI/Iconage/Probertium.uasset b/Content/Blueprints/Combat_UI/Iconage/Probertium.uasset new file mode 100644 index 0000000..326c853 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/Probertium.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:559724e9580bfa816c04993927f741ec273e2fc942d010c1548deef27c81d92e +size 20793 diff --git a/Content/Blueprints/Combat_UI/Iconage/ProbertiumFaded.uasset b/Content/Blueprints/Combat_UI/Iconage/ProbertiumFaded.uasset new file mode 100644 index 0000000..a953e82 --- /dev/null +++ b/Content/Blueprints/Combat_UI/Iconage/ProbertiumFaded.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7afc4a259dd9d5d0ffec713ba7dc793a07ac07383b6945b2558ba0e5366c9c0 +size 20956 diff --git a/Content/Blueprints/Combat_UI/__RealTime/CombatCharacterRT.uasset b/Content/Blueprints/Combat_UI/__RealTime/CombatCharacterRT.uasset deleted file mode 100644 index d1d4ede..0000000 --- a/Content/Blueprints/Combat_UI/__RealTime/CombatCharacterRT.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc9eb13d6d72b8b0ed0e1ffa48c052e1a6d579087fd566fd400dbe2b4d9636f8 -size 79436 diff --git a/Content/Blueprints/Combat_UI/__RealTime/Combat_UI_RT.uasset b/Content/Blueprints/Combat_UI/__RealTime/Combat_UI_RT.uasset deleted file mode 100644 index 4e9640d..0000000 --- a/Content/Blueprints/Combat_UI/__RealTime/Combat_UI_RT.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8dfba51c1e874efc1e3d3d04fb94601fde10f98bde12c05080fd5461107d74f3 -size 46237 diff --git a/Content/Blueprints/Combat_UI/__RealTime/RealTimeCombatTest.uasset b/Content/Blueprints/Combat_UI/__RealTime/RealTimeCombatTest.uasset deleted file mode 100644 index d573236..0000000 --- a/Content/Blueprints/Combat_UI/__RealTime/RealTimeCombatTest.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8eea345343389a3c9c52ae3ff4f51e0b8c0d2083650e05e1596db4d065ec42ae -size 29452 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index b2aeee5..08a54d2 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -28,6 +28,11 @@ ATempCharacter::ATempCharacter() void ATempCharacter::BeginPlay() { Super::BeginPlay(); + + FirstPlayerController = GetWorld()->GetFirstPlayerController(); + CombatSystem = Cast(GetWorld()->GetGameState()); + WidgetPointer = Cast(this->GetComponentByClass(UWidgetInteractionComponent::StaticClass())); + Health = 100; ThisCamera = Cast(this->FindComponentByClass()); PlayerCapsule = GetCapsuleComponent(); @@ -93,6 +98,13 @@ void ATempCharacter::Sneak() void ATempCharacter::Tick(float DeltaTime) { Super::Tick(DeltaTime); + if (CombatSystem->bIsInCombat) + { + FVector VectorRotation; + FVector WidgetLocation; + FirstPlayerController->DeprojectMousePositionToWorld(WidgetLocation, VectorRotation); + WidgetPointer->SetWorldLocationAndRotation(WidgetLocation, VectorRotation.Rotation().Quaternion()); + } } // Gives the character the functionality diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 64b95b0..06d50f0 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -7,6 +7,8 @@ #include "the_twilight_abyss/BaseItems/Items/BaseItem.h" #include "Camera/CameraComponent.h" #include "Engine/PostProcessVolume.h" +#include "Components/WidgetInteractionComponent.h" +#include "../TurnBasedCombatV2/TurnBaseCombatV2.h" #include "TempCharacter.generated.h" UCLASS() @@ -29,6 +31,12 @@ protected: void Sneak(); UCapsuleComponent* PlayerCapsule; + UPROPERTY() + APlayerController* FirstPlayerController; + UPROPERTY() + UWidgetInteractionComponent* WidgetPointer; + UPROPERTY() + ATurnBaseCombatV2* CombatSystem; public: // Called every frame diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 4e257fb..ae699e5 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -9,7 +9,6 @@ #include "BehaviorTree/BlackboardComponent.h" #include "Components/TextBlock.h" #include "Components/ProgressBar.h" -#include "GameFramework/Character.h" #include "Kismet/GameplayStatics.h" #include "the_twilight_abyss/PlayerTemp/TempCharacter.h" @@ -36,6 +35,12 @@ ATurnBaseCombatV2::ATurnBaseCombatV2() void ATurnBaseCombatV2::StartCombat(AActor* Enemy) { if (Enemy == nullptr) return; + if (bIsInCombat) return; + EscapePercentage = CalculateEscapePercentage(); + EscapePercentageTextBlock->SetText(FText::Join(FText::FromString(""), FText::FromString(FString::FromInt(EscapePercentage * 100)), FText::FromString("%"))); + const FVector2D ViewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY()); + GetWorld()->GetFirstPlayerController()->SetMouseLocation(ViewportSize.X / 2, ViewportSize.Y / 2); + bIsInCombat = true; UBlackboardComponent* EnemyBlackboard = Cast(Enemy->GetInstigatorController())->GetBlackboardComponent(); if (!HasSeenTutorial) { @@ -62,7 +67,7 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy) } if (HUD->IsInViewport()) return; - HUD->AddToViewport(); + //HUD->AddToViewport(); EnemyActor = Enemy; ProbertiumResource = 10; @@ -71,13 +76,10 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy) IroquoidResource = 10; //Disable Character Movement - if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) - { - PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController()); - } - //Set to UI Mode Only APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); - PlayerController->SetInputMode(FInputModeUIOnly()); + PlayerController->SetIgnoreMoveInput(true); + PlayerController->SetIgnoreLookInput(true); + PlayerController->SetInputMode(FInputModeGameAndUI()); PlayerController->bShowMouseCursor = true; FVector Direction = Enemy->GetActorLocation() - PlayerActor->GetActorLocation(); @@ -98,8 +100,12 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy) void ATurnBaseCombatV2::EndCombat() { + const FVector2D ViewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY()); + TurnIndicatorTextBlock->SetText(FText::FromString("")); + GetWorld()->GetFirstPlayerController()->SetMouseLocation(ViewportSize.X / 2, ViewportSize.Y / 2); bEnemyHasExtraTurn = false; bPlayerHasExtraTurn = false; + bIsInCombat = false; for (UStatusEffect* StatusEffect : StatusEffects) { StatusEffect->OnExpiry(PlayerActor); @@ -110,12 +116,10 @@ void ATurnBaseCombatV2::EndCombat() PlayerPawn->bUseControllerRotationYaw = true; PlayerPawn->bUseControllerRotationPitch = true; //Enable Character Movement - if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) - { - PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController()); - } //Set to Game Mode Only APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetIgnoreMoveInput(false); + PlayerController->SetIgnoreLookInput(false); PlayerController->SetInputMode(FInputModeGameOnly()); PlayerController->bShowMouseCursor = false; } @@ -123,6 +127,8 @@ void ATurnBaseCombatV2::EndCombat() void ATurnBaseCombatV2::BeginPlay() { Super::BeginPlay(); + const FVector2D ViewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY()); + GetWorld()->GetFirstPlayerController()->SetMouseLocation(ViewportSize.X / 2, ViewportSize.Y / 2); TArray AllCharacterActorsInScene; @@ -140,24 +146,25 @@ void ATurnBaseCombatV2::BeginPlay() PlayerWidget->InitWidget(); BookHUD = PlayerWidget->GetWidget(); - TurnIndicatorTextBlock = Cast(HUD->GetWidgetFromName("TurnIndicator")); + TurnIndicatorTextBlock = Cast(BookHUD->GetWidgetFromName("TurnIndicator")); CurrentComboTextBlock = Cast(BookHUD->GetWidgetFromName("CurrentCombo")); CurrentComboTextBlock1 = Cast(BookHUD->GetWidgetFromName("CurrentCombo_1")); CurrentComboTextBlock2 = Cast(BookHUD->GetWidgetFromName("CurrentCombo_2")); BattleLogTextBlock = Cast(HUD->GetWidgetFromName("BattleLog")); + EscapePercentageTextBlock = Cast(BookHUD->GetWidgetFromName("EscapePercentage_Text")); PlayerHealthBar = Cast(BookHUD->GetWidgetFromName("PlayerHealthBar")); EnemyHealthBar = Cast(HUD->GetWidgetFromName("EnemyHealthBar")); ProbertiumResourceBar = Cast(BookHUD->GetWidgetFromName("ProbertiumResourceBar")); EisResourceBar = Cast(BookHUD->GetWidgetFromName("EisResourceBar")); AzosResourceBar = Cast(BookHUD->GetWidgetFromName("AzosResourceBar")); IroquoidResourceBar = Cast(BookHUD->GetWidgetFromName("IroquoidResourceBar")); - CastButton = Cast(HUD->GetWidgetFromName("CastButton")); - PButton = Cast(HUD->GetWidgetFromName("PButton")); - EButton = Cast(HUD->GetWidgetFromName("EButton")); - AButton = Cast(HUD->GetWidgetFromName("AButton")); - IButton = Cast(HUD->GetWidgetFromName("IButton")); - BackspaceButton = Cast(HUD->GetWidgetFromName("BackspaceButton")); - RunButton = Cast(HUD->GetWidgetFromName("RunButton")); + CastButton = Cast(BookHUD->GetWidgetFromName("Cast_Button")); + PButton = Cast(BookHUD->GetWidgetFromName("Probertium_Button")); + EButton = Cast(BookHUD->GetWidgetFromName("Eis_Button")); + AButton = Cast(BookHUD->GetWidgetFromName("Azos_Button")); + IButton = Cast(BookHUD->GetWidgetFromName("Iroquoid_Button")); + BackspaceButton = Cast(BookHUD->GetWidgetFromName("Clear_Button")); + RunButton = Cast(BookHUD->GetWidgetFromName("Escape_Button")); CastButton->OnClicked.AddDynamic(this, &ATurnBaseCombatV2::CastButtonOnClick); PButton->OnClicked.AddDynamic(this, &ATurnBaseCombatV2::PButtonOnClick); EButton->OnClicked.AddDynamic(this, &ATurnBaseCombatV2::EButtonOnClick); @@ -217,7 +224,7 @@ void ATurnBaseCombatV2::ExecuteCast(FString Combo) } } - if (GunEffect) + if (GunEffect && !bIsInCombat) { const UStaticMeshComponent* GunComponent = Cast(PlayerActor->GetComponentsByTag(UPrimitiveComponent::StaticClass(), FName("Gun"))[0]); const FVector GunLocationOffset = GunComponent->GetSocketTransform("Muzzle").TransformPosition(FVector(-100, 0, 0)); @@ -300,10 +307,14 @@ void ATurnBaseCombatV2::DamageEnemy(int Damage, FString DamageType) void ATurnBaseCombatV2::UpdateProgressBars() const { - //PlayerHealthBar->SetPercent(*PlayerHealth / 100.0f); EnemyHealthBar->SetPercent(*EnemyHealth / 100.0f); } +float ATurnBaseCombatV2::CalculateEscapePercentage() const +{ + return FMath::RandRange(0.1f, 0.9f); +} + bool ATurnBaseCombatV2::IsValidCombo(const FString Combo) const { return ValidCombos.Contains(Combo); @@ -415,32 +426,63 @@ void ATurnBaseCombatV2::BackspaceButtonOnClick() GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Blank Combo")); return; } - ReuseActionPoint(); - if (CurrentComboString.Right(1) == "P") + for (int i = 0; i < CurrentComboString.Len(); i++) { - ProbertiumResource += 1; + if (CurrentComboString[i] == 'P') + { + ProbertiumResource += 1; + } + else if (CurrentComboString[i] == 'E') + { + EisResource += 1; + } + else if (CurrentComboString[i] == 'A') + { + AzosResource += 1; + } + else if (CurrentComboString[i] == 'I') + { + IroquoidResource += 1; + } } - else if (CurrentComboString.Right(1) == "E") - { - EisResource += 1; - } - else if (CurrentComboString.Right(1) == "A") - { - AzosResource += 1; - } - else if (CurrentComboString.Right(1) == "I") - { - IroquoidResource += 1; - } - CurrentComboString.RemoveAt(CurrentComboString.Len() - 1); + CurrentComboString = ""; UpdateComboString(CurrentComboString); + RevertActionPoints(); + UpdateActionPoints(); UpdateResourceBars(); + // ReuseActionPoint(); + // if (CurrentComboString.Right(1) == "P") + // { + // ProbertiumResource += 1; + // } + // else if (CurrentComboString.Right(1) == "E") + // { + // EisResource += 1; + // } + // else if (CurrentComboString.Right(1) == "A") + // { + // AzosResource += 1; + // } + // else if (CurrentComboString.Right(1) == "I") + // { + // IroquoidResource += 1; + // } + // CurrentComboString.RemoveAt(CurrentComboString.Len() - 1); + // UpdateComboString(CurrentComboString); + // UpdateResourceBars(); } void ATurnBaseCombatV2::RunButtonOnClick() { + if (FMath::RandRange(0.0f, 1.0f) >= EscapePercentage) + { + EscapePercentage = CalculateEscapePercentage(); + EscapePercentageTextBlock->SetText(FText::Join(FText::FromString(""), FText::FromString(FString::FromInt(EscapePercentage * 100)), FText::FromString("%"))); + SwitchTurn(); + return; + } UBlackboardComponent* EnemyBlackboard = Cast(EnemyActor->GetInstigatorController())->GetBlackboardComponent(); - + EscapePercentageTextBlock->SetText(FText::Join(FText::FromString(""), FText::FromString("--"), FText::FromString("%"))); EnemyBlackboard->SetValueAsBool("IsInCombat", false); EnemyBlackboard->SetValueAsBool("WasInCombat", true); EndCombat(); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h index 7a9ca72..cc3446e 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.h @@ -26,6 +26,8 @@ public: int* EnemyHealth = nullptr; float* PlayerHealth = nullptr; + bool bIsInCombat = false; + UPROPERTY(EditDefaultsOnly) int DefaultActionPoints = 2; UPROPERTY(EditDefaultsOnly) @@ -126,6 +128,9 @@ protected: bool bPlayerHasExtraTurn = false; bool bEnemyHasExtraTurn = false; + float EscapePercentage = 0.0f; + float CalculateEscapePercentage() const; + private: bool IsValidCombo(FString Combo) const; bool IsSpecialCombo(FString Combo) const; @@ -156,6 +161,8 @@ private: UTextBlock* CurrentComboTextBlock2; UPROPERTY(VisibleAnywhere) UTextBlock* BattleLogTextBlock; + UPROPERTY(VisibleAnywhere) + UTextBlock* EscapePercentageTextBlock; UPROPERTY(VisibleAnywhere) UProgressBar* PlayerHealthBar; diff --git a/UI designs/Azos.png b/UI designs/Azos.png new file mode 100644 index 0000000..bade5d3 --- /dev/null +++ b/UI designs/Azos.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab5d483fbe8e218573a01c985b82b2a595f14a3643b7836d7c5bf077834323e1 +size 43662 diff --git a/UI designs/AzosFaded.png b/UI designs/AzosFaded.png new file mode 100644 index 0000000..c9ce54f --- /dev/null +++ b/UI designs/AzosFaded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ce9e6430edff0a38d0147e4f9b4ff3859cba663d3604b7831cc79b02c210aa9 +size 42815 diff --git a/UI designs/Eis.png b/UI designs/Eis.png new file mode 100644 index 0000000..cbe5085 --- /dev/null +++ b/UI designs/Eis.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e18e8da691b960930785dc5e7af06484f0ee09742ce846623e4c1ab65a1a07c3 +size 12742 diff --git a/UI designs/EisFaded.png b/UI designs/EisFaded.png new file mode 100644 index 0000000..28b1b61 --- /dev/null +++ b/UI designs/EisFaded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6103ecfc19ccf78e42aabb487db7634d1b5fa8b526875c481f23b20aae15379 +size 12748 diff --git a/UI designs/Escape.png b/UI designs/Escape.png new file mode 100644 index 0000000..3746191 --- /dev/null +++ b/UI designs/Escape.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d9934d979939b25df21a5f48731a7e0c1cecfb999a988375b786eb062842ab5 +size 11786 diff --git a/UI designs/EscapeFaded.png b/UI designs/EscapeFaded.png new file mode 100644 index 0000000..4a0a456 --- /dev/null +++ b/UI designs/EscapeFaded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdc93f3819c3e80e98478f771cb7c4170951d9150a17a780a4fb60e78b10a462 +size 12424 diff --git a/UI designs/Iroquoiod.png b/UI designs/Iroquoiod.png new file mode 100644 index 0000000..e04b2c4 --- /dev/null +++ b/UI designs/Iroquoiod.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa564adcf610e7486299554c9b76e034ca1bd63cbda8d00318380cbebffcc789 +size 8960 diff --git a/UI designs/IroquoiodFaded.png b/UI designs/IroquoiodFaded.png new file mode 100644 index 0000000..a8fad44 --- /dev/null +++ b/UI designs/IroquoiodFaded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5387df2e66294db9136ca8277b56d932daadd9d44b00949ce0d19c87cb699665 +size 8993 diff --git a/UI designs/Probertium.png b/UI designs/Probertium.png new file mode 100644 index 0000000..f056f6c --- /dev/null +++ b/UI designs/Probertium.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:530875cd87268209ed016b421144eec89e903eab0cc1b8779b49057b806b5b03 +size 12707 diff --git a/UI designs/ProbertiumFaded.png b/UI designs/ProbertiumFaded.png new file mode 100644 index 0000000..9b1fc86 --- /dev/null +++ b/UI designs/ProbertiumFaded.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9008bfe34070a91aa0a22420fa5abfcea83ff6e395dbef97f5dc80a0c58a16f +size 12753