| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | using Common.Utility.CombatEvent;using Fort23.Core;using GameLogic.Combat.CombatTool;using GameLogic.Player;namespace GameLogic.Combat.Skill{    /// <summary>    /// 崩脉决 前方功法照成伤害时有5%概率施加一层对应属性的伤势    /// </summary>    public class S2003 : SkillBasic    {        protected override void ProUseSkill()        {        }        protected override void ProReplace()        {            CombatEventManager.Instance.RemoveEventListener(CombatEventType.HeroInjured, HeroInjured);        }        protected override void ProActiveSkill()        {            CombatEventManager.Instance.AddEventListener(CombatEventType.HeroInjured, HeroInjured);        }        private void HeroInjured(IEventData iEventData)        {            HeroInjuredEventData heroInjuredEventData = iEventData as HeroInjuredEventData;            if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity)            {                SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;                if (skillBasic != null && skillBasic.SelfSkillConfig.SkillType == 1 && skillBasic.index + 1 == index)                {                    int odds = CombatCalculateTool.Instance.GetOdd(0, 100);                    if (odds < 5)                    {                        switch (skillBasic.wuXingType)                        {                            case WuXingType.Fire:                                heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.CurrCombatHeroInfo                                    .Fire_Injury += 1;                                break;                            case WuXingType.Wood:                                heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.CurrCombatHeroInfo                                    .Wood_Injury += 1;                                break;                            case WuXingType.Water:                                heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.CurrCombatHeroInfo                                    .Water_Injury += 1;                                break;                            case WuXingType.Earth:                                heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.CurrCombatHeroInfo                                    .Earth_Injury += 1;                                break;                            case WuXingType.Gold:                                heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.CurrCombatHeroInfo                                    .Metal_Injury += 1;                                break;                        }                    }                }            }        }    }}
 |