Files
bansonic_beta_main/Assets/scripts/Combat/CombatCommon.cs
T
2026-03-03 14:07:39 +08:00

60 lines
1.6 KiB
C#

using System;
using UnityEngine;
// Shared types used by combat/effect/skill systems
public enum Selector
{
Self,
AllAllies,
AllAlliesExceptSelf,
AdjacentAllies,
CurrentEnemies,
AllEntities
}
public enum EffectType
{
DamageSingleEnemy,
DamageOverTimeEnemy,
HealSingleEnemy,
HealOverTimeEnemy,
DamageSingleAlly,
DamageOverTimeAlly,
HealSingleSelf,
HealOverTimeSelf,
HealGroupSingle,
HealGroupOverTime,
BuffDuration,
DebuffDuration,
IncreaseManaOverTime,
ReduceEnemyHealOverTime,
ScoreMultiplier,
AddScore,
IncreaseMaxHP,
DecreaseMaxHP,
IncreaseMaxMana,
DecreaseMaxMana,
IncreaseScoreEfficiency,
DecreaseScoreEfficiency,
// New: modify damage resistance (0-1). Amount interpreted as additive delta (e.g. 0.2 to add 20% resistance)
IncreaseDamageResistance,
DecreaseDamageResistance,
IncreaseAttack,
DecreaseAttack,
RedirectNextDamageToSelf,
// Adds a virtual "Perfect" judgement to targeted ally tracks (counts + score + triggers note-hit hooks).
GrantExtraPerfect,
// While active, redirects damage that would be taken by this ally to an adjacent ally.
RedirectSelfDamageToAdjacent,
// While active, any non-Miss note judgement on the ally's track is rewritten to Perfect.
RewriteNonMissToPerfect
}
public interface ICombatant
{
void ReceiveDamage(float amount, GameObject source, bool deferPopup = false);
void ReceiveHeal(float amount, GameObject source, bool deferPopup = false);
void ApplyBuff(Buff buff, GameObject source);
void RemoveBuff(string buffId);
}