Merge pull request #13 from Games-Academy-Student-Work-22-23/Extra-ammoTypes
Extra ammo types
This commit is contained in:
commit
f82e8a892e
BIN
Content/Blueprints/Items/AmmoItem.uasset
(Stored with Git LFS)
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
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
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
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
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
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
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
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
BIN
Content/Blueprints/Items/ItemMaterials/Mat_Probertium.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Items/ItemsInWorld/BP_AmmoItem.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Items/ItemsInWorld/BP_Azos.uasset
(Stored with Git LFS)
Normal file
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
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
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
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)
BIN
Content/Levels/MerchantPrototype.umap
(Stored with Git LFS)
Binary file not shown.
@ -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;
|
||||
|
@ -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;
|
||||
Character->Inventory->RemoveItem(this);
|
||||
}
|
||||
if (TurnBaseCombat->EisResource > 10)
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
Character->Inventory->RemoveItem(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user