123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using GameLogic.Combat.Buff;
- using GameLogic.Combat.CombatTool;
- namespace GameLogic.Combat.Skill
- {
- /// <summary>
- /// 毒爆
- ///后方功法击中目标后,如果目标升上有{0}层毒时对目标照成20%伤害,并对周围的敌人照成等额伤害
- /// </summary>
- public class S2014 : SkillBasic
- {
- protected override void ProActiveSkill()
- {
- CombatEventManager.Instance.AddEventListener(CombatEventType.HeroInjured, HeroInjured);
- }
- protected override void ProDispose()
- {
- CombatEventManager.Instance.RemoveEventListener(CombatEventType.HeroInjured, HeroInjured);
- }
- private void HeroInjured(IEventData iEventData)
- {
- HeroInjuredEventData heroInjuredEventData = iEventData as HeroInjuredEventData;
- if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity &&
- heroInjuredEventData.HarmReturnInfo.isHitHero)
- {
- SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;
- if (skillBasic != null && IsPassiveActivateSkill(skillBasic))
- {
- CombatHeroEntity target =
- heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity as CombatHeroEntity;
- b_1003 b1003 = target.BuffControl.GetBuffBasicForType<b_1003>();
- if (b1003 != null && b1003.buffCount >= effectValue[0])
- {
- long harm = heroInjuredEventData.HarmReturnInfo.att;
- long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(harm, effectValue[1]);
- HarmReturnInfo harmReturnInfo = CombatCalculateTool.Instance.Harm(CombatHeroEntity, target,
- v,
- AttType.Skill | AttType.JianJie, triggerData,
- wuXingType, null,
- HarmType.Default);
- long v2 = CombatCalculateTool.Instance.GetVlaueRatioForLong(v, effectValue[2]);
- CombatHeroEntity[] allHero =
- CombatController.currActiveCombat.CombatHeroController.GetHero(!CombatHeroEntity.IsEnemy);
- for (int i = 0; i < allHero.Length; i++)
- {
- if (allHero[i] == target)
- {
- continue;
- }
- CombatCalculateTool.Instance.Harm(CombatHeroEntity, allHero[i],
- v2,
- AttType.Skill | AttType.JianJie, triggerData,
- wuXingType, null,
- HarmType.Default);
- }
- }
- }
- }
- }
- protected override void ProUseSkill()
- {
- }
- }
- }
|