Files
valheim/Assets/_Valheim/Scripts/Skill/SkillData.cs
2025-07-04 14:16:14 +08:00

40 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XPlugin.Data.JsonLiteDB;
public enum ESkillType
{
RangeAttack = 1, // 范围攻击
SingleAttack = 2, // 单体攻击
DotAttack = 3, // 持续伤害
Buff = 4 // 增益/辅助
}
public class SkillData
{
public int SkillId;//技能ID
public string SkillName;//技能名称
public ESkillType SkillType;//技能类型(1范围攻击,2单体攻击,3持续攻击.4:增益等)
public float UserTime;//释放时间
public float SkillTime;//技能持续时间
public float MinAtk;//技能最小伤害
public float MaxAtk;//技能最大伤害
public int UserEnemyId;//所属幻宠ID
public string SkillDesc;//技能简介
public float SkillInterval;//使用技能条件阈值
public SkillData(JsonLiteDB.TableReader table)
{
SkillId = table["SkillId"].OptInt();
SkillName = table["SkillName"].OptString();
SkillType = (ESkillType)table["SkillType"].OptInt();
UserTime = table["UserTime"].OptFloat();
SkillTime = table["SkillTime"].OptFloat();
MinAtk = table["MinAtk"].OptFloat();
MaxAtk = table["MaxAtk"].OptFloat();
SkillDesc = table["SkillDesc"].OptString();
SkillInterval = table["SkillInterval"].OptFloat();
}
}