210 lines
6.7 KiB
C++
210 lines
6.7 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameplayTagContainer.h"
|
|
#include "PawnWithSkill.h"
|
|
#include "UObject/Object.h"
|
|
#include "Definations.generated.h"
|
|
|
|
UENUM(BlueprintType)
|
|
enum class ESkillEffectType: uint8
|
|
{
|
|
Damage UMETA(DisplayName = "拉力", ToolTip = "对对方耐力造成损耗"),
|
|
Heal UMETA(DisplayName = "恢复", ToolTip = "对我方耐力进行恢复"),
|
|
ModifyCooldown UMETA(DisplayName = "技能冷却修改", ToolTip = "使技能冷却时间修改"),
|
|
Charge UMETA(DisplayName = "充能", ToolTip = "使技能的冷却进度加快"),
|
|
ModifySpeed UMETA(DisplayName = "速度修改", ToolTip = "使技能冷却进度倍率进展 持续指定时间"),
|
|
SkillEnduranceRestore UMETA(DisplayName = "技能耐久度恢复", ToolTip = "使技能耐久度恢复"),
|
|
EnhanceFishRod UMETA(DisplayName = "增强鱼竿", ToolTip = "使鱼竿上海增加"),
|
|
EnhanceSkill UMETA(DisplayName = "增强技能", ToolTip = "增强指定的技能数值"),
|
|
DamageReduce UMETA(DisplayName = "减伤", ToolTip = "减少所受的伤害"),
|
|
};
|
|
|
|
//技能对象类型
|
|
UENUM(BlueprintType)
|
|
enum class ESkillTargetType: uint8
|
|
{
|
|
Self UMETA(DisplayName = "目标是自身角色"),
|
|
Other UMETA(DisplayName = "目标是对方角色"),
|
|
Around UMETA(DisplayName = "格子周围的技能")
|
|
// AdjacentLeft UMETA(DisplayName = "左侧相邻"),
|
|
// AdjacentRight UMETA(DisplayName = "右侧相邻"),
|
|
// AllLeft UMETA(DisplayName = "左侧全部"),
|
|
// AllRight UMETA(DisplayName = "右侧全部"),
|
|
};
|
|
//随机对象类型
|
|
UENUM(BlueprintType)
|
|
enum class ERandomTargetType: uint8
|
|
{
|
|
AllSelf UMETA(DisplayName = "我方全部技能"),
|
|
AllOther UMETA(DisplayName = "敌方全部技能"),
|
|
};
|
|
|
|
//技能选择器类型
|
|
UENUM(BlueprintType)
|
|
enum class ETargetSelecterType: uint8
|
|
{
|
|
SkillPos UMETA(DisplayName = "指定对象选择"),
|
|
SkillTag UMETA(DisplayName = "根据技能Tag选择"),
|
|
RandomScope UMETA(DisplayName = "指定技能组选择"),
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FSkillContext
|
|
{
|
|
GENERATED_BODY()
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "敌人"))
|
|
class USkillManager* SkillManager;
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "所属的技能"))
|
|
class USkill* OwnerSkill;
|
|
|
|
};
|
|
|
|
|
|
|
|
//技能选择器
|
|
USTRUCT(BlueprintType)
|
|
struct FSkillTargetSelector
|
|
{
|
|
GENERATED_BODY()
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能选择器类型"))
|
|
ETargetSelecterType SelecterType;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能目标类型",
|
|
EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::SkillPos"))
|
|
ESkillTargetType TargetType;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "应用的技能tag",
|
|
EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::SkillTag"))
|
|
FGameplayTagContainer ApplySkillTags;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "随机目标类型"
|
|
, EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::RandomScope"))
|
|
ERandomTargetType RandomType;
|
|
};
|
|
|
|
//技能效果
|
|
USTRUCT(BlueprintType)
|
|
struct FSkillEffectData
|
|
{
|
|
GENERATED_BODY()
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能类型"))
|
|
ESkillEffectType EffectType;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能值"))
|
|
float EffectValue;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能配置补充,不需要为空"))
|
|
FString ParamAddition;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能选择器"))
|
|
FSkillTargetSelector SkillSelecter;
|
|
};
|
|
|
|
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FSkillData: public FTableRowBase
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能名称"))
|
|
FText SkillName;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (AllowedClasses = "Texture2D", ToolTip = "技能图片"))
|
|
FSoftObjectPath SkillTexture;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能Tag"))
|
|
FGameplayTag SkillTag;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "背包占用"))
|
|
FIntPoint SkillWeight = FIntPoint(1, 1);
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "是否为主动技能"))
|
|
bool bActiveSkill = true;
|
|
|
|
//主动技能属性
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能CD", EditConditionHides, EditCondition = "bActiveSkill"))
|
|
float CD;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能CD速度", EditConditionHides, EditCondition = "bActiveSkill"))
|
|
float Speed = 1.0f;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能耐久度", EditConditionHides, EditCondition = "bActiveSkill"))
|
|
int32 Endurance;
|
|
|
|
//被动技能属性
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "被动技能触发器,没有配置的话为光环类技能默认进行触发", AllowedClasses = "SkillTrigger", EditConditionHides, EditCondition = "!bActiveSkill"))
|
|
TSubclassOf<class USkillTrigger> SkillTrigger;
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能效果组"))
|
|
TArray<FSkillEffectData> SkillEffects;
|
|
};
|
|
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FSkillDataConfig
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (RowType = "FSkillData"))
|
|
UDataTable* DataTable;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
FName SkillRowName;
|
|
|
|
};
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class PROJECTFISH_API UDefinations : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FFishingRodSkill
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "鱼竿技能名称"))
|
|
FName SkillName;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (ToolTip = "鱼钩技能"))
|
|
TSubclassOf<class UFishingRodSKill_Base> SkillClass;
|
|
};
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FFishingRod: public FTableRowBase
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "鱼竿名称"))
|
|
FName FishingRod_Name;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "鱼竿伤害CD"))
|
|
int32 DamageCD;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "鱼竿伤害"))
|
|
int32 Damage;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "附加的耐力值"))
|
|
int32 Endurance_Add;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "附加的附加的韧性值"))
|
|
int32 Tenacity_Add;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "物品背包大小"))
|
|
FIntPoint BagSize;
|
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能效果组"))
|
|
TArray<FFishingRodSkill> Skills;
|
|
};
|