82 lines
2.4 KiB
C#
82 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Cielonos.MainGame.Characters;
|
|
using SLSUtilities.General;
|
|
using SLSUtilities.FunctionalAnimation;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public enum AttackType
|
|
{
|
|
Energy = 1,
|
|
Kinetics = 2,
|
|
Explosion = 3,
|
|
Magic = 4,
|
|
Elemental = 5,
|
|
Pure = 6
|
|
}
|
|
|
|
public enum BreakthroughType
|
|
{
|
|
None = 0,
|
|
Weak = 10,
|
|
Medium = 20,
|
|
Heavy = 30,
|
|
Disruption = 40,
|
|
Forced = 50,
|
|
Unstoppable = 100 // 不可用于攻击,只能用于防御状态,表示无法被打断
|
|
}
|
|
|
|
public static class Breakthrough
|
|
{
|
|
public static readonly List<BreakthroughType> Types = new List<BreakthroughType>()
|
|
{
|
|
BreakthroughType.None,
|
|
BreakthroughType.Weak,
|
|
BreakthroughType.Medium,
|
|
BreakthroughType.Heavy,
|
|
BreakthroughType.Disruption,
|
|
BreakthroughType.Forced,
|
|
BreakthroughType.Unstoppable
|
|
};
|
|
|
|
public static List<BreakthroughType> GetLowerTypes(BreakthroughType type)
|
|
{
|
|
return Types.Where(t => t < type).ToList();
|
|
}
|
|
|
|
public static List<BreakthroughType> GetHigherTypes(BreakthroughType type)
|
|
{
|
|
return Types.Where(t => t > type).ToList();
|
|
}
|
|
}
|
|
|
|
public class AttackValue : ICloneable<AttackValue>
|
|
{
|
|
public CharacterBase attacker;
|
|
public bool isCritical;
|
|
public float damage;
|
|
public AttackType attackType;
|
|
public BreakthroughType breakthroughType;
|
|
public DisruptionType disruptionType;
|
|
|
|
public AttackValue(CharacterBase attacker, bool isCritical, float damage, AttackType attackType,
|
|
DisruptionType disruptionType = DisruptionType.None, BreakthroughType breakthroughType = BreakthroughType.None)
|
|
{
|
|
this.attacker = attacker;
|
|
this.isCritical = isCritical;
|
|
this.damage = damage;
|
|
this.attackType = attackType;
|
|
this.disruptionType = disruptionType;
|
|
this.breakthroughType = breakthroughType;
|
|
}
|
|
|
|
public AttackValue Clone()
|
|
{
|
|
return new AttackValue(attacker, isCritical, damage, attackType, disruptionType, breakthroughType);
|
|
}
|
|
}
|
|
|
|
} |