Added All Item ammo types

Added every item ammo type to the game
This commit is contained in:
Marcel Hara 2023-03-13 17:00:08 +00:00
parent e0f7a2682a
commit 7e8ded362a
17 changed files with 85 additions and 10 deletions

BIN
Content/Blueprints/Items/AmmoItem.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Blueprints/Items/BP_Azos.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/BP_Eis.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/BP_Iroquoid.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/BP_Probertium.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemMaterials/Mat_Azos.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemMaterials/Mat_Eis.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemMaterials/Mat_Iroquoid.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemMaterials/Mat_Probertium.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Content/Blueprints/Items/ItemsInWorld/BP_Azos.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemsInWorld/BP_Eis.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemsInWorld/BP_Iroquoid.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Blueprints/Items/ItemsInWorld/BP_Probertium.uasset (Stored with Git LFS) Normal file

Binary file not shown.

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

Binary file not shown.

View File

@ -54,7 +54,16 @@ public:
bool isDamageBuffItem;
UPROPERTY(EditAnywhere, Category = "Item")
bool isAmmoItemType;
bool isProbertiumType;
UPROPERTY(EditAnywhere, Category = "Item")
bool isEisType;
UPROPERTY(EditAnywhere, Category = "Item")
bool isAzosType;
UPROPERTY(EditAnywhere, Category = "Item")
bool isIroquoidType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item")
int32 StackCount = 1;

View File

@ -39,18 +39,48 @@ void UEatableItems::Use(ATempCharacter* Character)
Character->Inventory->RemoveItem(this);
}
if (isAmmoItemType)
if (isProbertiumType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->ProbertiumResource > 10)
if (TurnBaseCombat->ProbertiumResource < 10)
{
UE_LOG(LogTemp, Warning, TEXT("Probertium eaten"));
TurnBaseCombat->ProbertiumResource += 5;
}
if (TurnBaseCombat->EisResource > 10)
Character->Inventory->RemoveItem(this);
}
if (isEisType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->EisResource < 10)
{
UE_LOG(LogTemp, Warning, TEXT("Eis eaten"));
TurnBaseCombat->EisResource += 5;
}
Character->Inventory->RemoveItem(this);
}
if (isAzosType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->AzosResource < 10)
{
UE_LOG(LogTemp, Warning, TEXT("Azos eaten"));
TurnBaseCombat->AzosResource += 5;
}
Character->Inventory->RemoveItem(this);
}
if (isIroquoidType)
{
TurnBaseCombat = GetWorld()->GetGameState<ATurnBaseCombatV2>();
if (TurnBaseCombat->IroquoidResource < 10)
{
UE_LOG(LogTemp, Warning, TEXT("Iroq eaten"));
TurnBaseCombat->IroquoidResource += 5;
}
Character->Inventory->RemoveItem(this);
}
}
}