2026-02-13 09:22:11 -05:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Cielonos.MainGame.Characters;
|
|
|
|
|
using SLSUtilities.General;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2026-05-23 08:27:50 -04:00
|
|
|
namespace Cielonos.MainGame.Inventory.Collections
|
2026-02-13 09:22:11 -05:00
|
|
|
{
|
2026-05-23 08:27:50 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// 反射棱镜 / Reflection Prism
|
|
|
|
|
/// 格挡敌人的投射物后会将其反弹回去。
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ReflectionPrism : PassiveEquipmentBase
|
2026-02-13 09:22:11 -05:00
|
|
|
{
|
|
|
|
|
public override void OnObtained()
|
|
|
|
|
{
|
|
|
|
|
base.OnObtained();
|
|
|
|
|
Action<AttackAreaBase, BlockSource> onBlockSuccess = OnBlockSuccess;
|
2026-05-23 08:27:50 -04:00
|
|
|
player.eventSm.onBlockSuccess.Add("ReflectionPrism", onBlockSuccess.ToPrioritized(-100));
|
2026-02-13 09:22:11 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-23 08:27:50 -04:00
|
|
|
public partial class ReflectionPrism
|
2026-02-13 09:22:11 -05:00
|
|
|
{
|
|
|
|
|
private void OnBlockSuccess(AttackAreaBase attackArea, BlockSource blockSource)
|
|
|
|
|
{
|
2026-05-23 08:27:50 -04:00
|
|
|
player.reactionSc.reflectionSm.ApplyReflection(player, this, "ReflectionPrism_Reflection", 0, 0.01f,
|
2026-02-13 09:22:11 -05:00
|
|
|
area => area is Projectile,
|
2026-04-18 13:57:19 -04:00
|
|
|
area => (area as Projectile)!.Reflect(player));
|
2026-02-13 09:22:11 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|