1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
-
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonServer.Plugin;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using CommonAI.Zone;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using CommonLang;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
-
-
-
-
- public class Monster_6061204 : XmdsSkillBase
- {
- public static int ID = 6061204;
-
- public static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.WEN_YI;
- public static XmdsSkillValue BuffDamageHPPec;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillLogicEvent(BattleParams param)
- {
- param.UseDamageType = CommonAI.Data.DamageType.None;
-
- UnitBuff ub = param.Attacker.GetRegisBuffVirtual(Buff_ID);
- XmdsBuff_Bleed buff = ub as XmdsBuff_Bleed;
- int t = this.GetTargetFormulaValue(param.GameSkill.SkillLevel, BuffDamageHPPec);
- t = CUtils.CastInt(t / XmdsDamageCalculator.PERER * param.Hitter.MirrorProp.MaxHP);
- buff.ChangeValue = t / 5;
- BuffTemplate bt = param.Attacker.GetRegistBuff(Buff_ID);
- bt.LifeTimeMS = 5000;
-
- param.Hitter.mUnit.AddBuff(Buff_ID, param.Attacker.mUnit);
- }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_Bleed buff = (XmdsBuff_Bleed)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.Bleed);
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = true;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out BuffDamageHPPec, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- }
- }
- }
|