12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using CommonAI.Zone;
- using CommonAI.Zone.Formula;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using CommonLang;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
- using static CommonAI.Zone.Instance.InstanceUnit;
- namespace XmdsCommonSkill.Plugin.Skills.Boss
- {
- /// <summary>
- /// boss - 1 - 破军(对当前朝向线性范围内释放一次攻击,对命中目标造成伤害和破甲BUFF)
- /// </summary>
- public class Boss_90309 : XmdsSkillBase
- {
- private static int ID = 90309;
- private static int Buff_ID = (int)XmdsBuffBase.XmdsBuffList.BOSS_SUNDERARMOR;
- public static XmdsSkillValue dmgValue; // 伤害系数
- public static XmdsSkillValue valueSet1; // 减防系数
- public static XmdsSkillValue valueSet2; // buff时间
- public override int SkillID { get { return ID; } }
- protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- XmdsBuff_SunderArmor buff = (XmdsBuff_SunderArmor)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.Sunder_Armor);
- buff.ChangeValue = -valueSet1.GetValue();
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- bt.HitIntervalMS = valueSet2.GetValue();
- //bt.MaxOverlay = 3;
- pack.BindTemplateAndDispose();
- unit.RegistSendBuff(bt);
- }
- //伤害计算
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- param.SkillDamagePer = dmgValue.GetValue();
- }
- private float OnHandleHitOther(float damage, XmdsVirtual hitted, XmdsVirtual attacker, AttackSource source, GameSkill sk, ref XmdsVirtual.AtkResult result)
- {
- // 流血
- var buff = attacker.GetRegisBuffVirtual(Buff_ID) as XmdsBuff_Bleed;
- buff.ChangeValue = CUtils.CastInt(damage * 0.5);
- hitted.mUnit.AddBuff(Buff_ID, attacker.mUnit);
- return damage;
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out dmgValue, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- InitData(data, out valueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
- InitData(data, out valueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
- }
- }
- }
|