12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using CommonAI.Zone;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- namespace XmdsCommonSkill.Plugin.Skills.Remedy
- {
- /// <summary>
- /// 治疗, 三技能 3- 3(对被命中敌人造成伤害时,并标记一个伤害加深buff)
- /// </summary>
- public class Remedy_510330 : Remedy_510320
- {
- private static readonly int ID = 510330;
- public static readonly int Buff_1 = (int)XmdsBuffBase.XmdsBuffList.REMEDY_3_3_TAG;
- public override int SkillID { get { return ID; } }
- //减防系数
- protected XmdsSkillValue valueSet4;
-
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- base.OnInit(info, unit, ref template);
- //命中降防
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_1);
- var buff = (XmdsBuff_Brand_4)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.Brand_4);
- buff.isPrecent = XmdsVirtual.PropChangeOperation.OperateType.Percent;
- buff.ChangePropType = XmdsVirtual.UnitAttributeType.Defence;
- buff.ChangePropValue = -valueSet4.GetValue(info.TalentSkillLevel3, 1);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- bt.LifeTimeMS = valueSet4.GetValue(info.TalentSkillLevel3, 2);
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnSkillDataChange(GameSkill gs, XmdsVirtual unit)
- {
- base.OnSkillDataChange(gs, unit);
- var buff = unit.GetRegisBuffVirtual(Buff_1) as XmdsBuff_Brand_4;
- buff.ChangePropValue = -valueSet4.GetValue(gs.TalentSkillLevel3, 1);
- var bt = unit.GetRegistBuff(Buff_1);
- bt.LifeTimeMS = valueSet4.GetValue(gs.TalentSkillLevel3, 2);
- }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- base.OnSkillLogicEvent(param);
- //命中,加buff
- param.Hitter.mUnit.AddBuff(Buff_1, 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 valueSet3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
- InitData(data, out valueSet4, XmdsSkillData.XmdsSkillDataKey.ValueSet4);
- }
- }
- }
|