123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- /// <summary>
- /// 治疗, 4技能 4 - 1(禁锢结束后减速50%,持续3秒)
- /// </summary>
- public class Remedy_510410 : Remedy_510400
- {
- private static readonly int ID = 510410;
- //4-1减速效果,时间, 治疗系数
- public XmdsSkillValue valueSet2;
- //禁锢结束帧控制
- private static readonly int Buff_SpeedDown = (int)XmdsBuffBase.XmdsBuffList.REMEDY_4_JINGU_SPEEDDOWN;
- private static readonly int Buff_JINGUEXT = (int)XmdsBuffBase.XmdsBuffList.REMEDY_4_JINGUEXT;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- if(param.AtkProp.DamagePerID == 2)
- {
- param.UseDamageType = CommonAI.Data.DamageType.Heal;
- param.SkillDamagePer = valueSet2.GetValue(param.GameSkill.TalentSkillLevel1, 3);
- }
- else
- {
- base.OnSkillDamagePerEvent(param);
- }
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- //禁锢buf
- XmdsBuffPack pack1 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_JINGUEXT);
- BuffTemplate bt1 = pack1.mBuffTemplate;
- bt1.IsHarmful = true;
- bt1.LifeTimeMS = valueSet5.GetValue(info.SkillLevel);
- pack1.BindTemplateAndDispose();
- unit.RegistSendBuff(bt1);
- XmdsBuffPack pack2 = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_SpeedDown);
- var Buff2 = pack2.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.MoveSpeedDown) as XmdsBuff_MoveSpeedDown;
- Buff2.ChangePercent = -valueSet2.GetValue(info.TalentSkillLevel1, 1);
- BuffTemplate bt2 = pack2.mBuffTemplate;
- bt2.IsHarmful = true;
- bt2.LifeTimeMS = valueSet2.GetValue(info.TalentSkillLevel1, 2);
- pack2.BindTemplateAndDispose();
- unit.RegistSendBuff(bt2);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- //禁锢被替换了,不用调用父类的数据重载
- //base.OnSkillDataChange(gs, unit);
- var bt = unit.GetRegistBuff(Buff_JINGUEXT);
- bt.LifeTimeMS = valueSet5.GetValue(gs.SkillLevel);
- var buff2 = unit.GetRegisBuffVirtual(Buff_SpeedDown) as XmdsBuff_MoveSpeedDown;
- buff2.ChangePercent = -valueSet2.GetValue(gs.TalentSkillLevel1, 1);
- var bt2 = unit.GetRegistBuff(Buff_SpeedDown);
- bt2.LifeTimeMS = valueSet2.GetValue(gs.TalentSkillLevel1, 2);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- //一个人只被禁锢一次
- if (param.AtkProp.DamagePerID == 1 && !param.GameSkill.mHitUnits.ContainsKey(param.Hitter.mUnit.ID))//藤蔓
- {
- param.Hitter.mUnit.AddBuff(Buff_JINGUEXT, param.Attacker.mUnit);
- }
- }
- protected override void OnInitConfig()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- base.InitBaseConfig(data);
- InitData(data, out valueSet, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- //扩展配置
- InitData(data, out valueSet5, XmdsSkillData.XmdsSkillDataKey.ValueSet5);
- InitData(data, out valueSet8, XmdsSkillData.XmdsSkillDataKey.ValueSet8);
- }
- }
- }
|