1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using GameLogic.Combat.CombatTool;
- using GameLogic.Player;
- namespace GameLogic.Combat.Buff
- {
- /// <summary>
- /// 感电
- /// 麻痹敌人,敌人的身体受到麻痹,有{0}%*层数的概率是功法无法进入释放状态,没触发一次,消耗一半感电
- /// </summary>
- public class b_1018 : BuffBasic
- {
- protected override void ProInit()
- {
- CombatEventManager.Instance.AddEventListener(CombatEventType.TriggerSkillSlots, TriggerSkillSlots);
- }
- private void TriggerSkillSlots(IEventData eventData)
- {
- TriggerSkillSlotsEventData triggerSkillSlotsEventData = eventData as TriggerSkillSlotsEventData;
- if (triggerSkillSlotsEventData.SkillBasic != null &&
- triggerSkillSlotsEventData.SkillBasic.CombatHeroEntity == combatHeroEntity)
- {
- int triggerOdds = (int)(buffInf.BuffConfig.effectValue[0] * buffCount);
- int odds = CombatCalculateTool.Instance.GetOdd(0, 100);
- if (odds <= triggerOdds)
- {
- triggerSkillSlotsEventData.isNotUseSkill = true;
- ReduceCount(1);
- }
- }
- }
- protected override void ProDormancyObj()
- {
- CombatEventManager.Instance.RemoveEventListener(CombatEventType.TriggerSkillSlots, TriggerSkillSlots);
- }
- }
- }
|