CardSkill_1030000.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using XmdsCommonServer.XLS.Data;
  7. using XmdsCommonServer.Plugin;
  8. using CommonAI.Zone.Formula;
  9. using XmdsCommonSkill.Plugin.Skills;
  10. namespace XmdsCommonSkill.Plugin.CardSkill
  11. {
  12. public class CardSkill_1030000 : CardSkill_LiangYiBase
  13. {
  14. private static readonly int ID = 1030000;
  15. public override int SkillID { get { return ID; } }
  16. /// 伤害倍数: 百分比
  17. protected static XmdsSkillValue s_ValueSet1;
  18. // 获得权重最高的球的概率
  19. protected static XmdsSkillValue s_ValueSet2;
  20. protected override void OnGetCardSkillDamage(BattleParams param)
  21. {
  22. param.SkillDamagePer = s_ValueSet1.GetValue(param.GameSkill.SkillLevel);
  23. }
  24. //触发卡牌技能
  25. public override void OnTriggerCardSkill(XmdsVirtual player, XmdsVirtual hitter, AttackSource source, CardSkillData skillData, int sameNums)
  26. {
  27. base.unitLaunchSpell(player, hitter, this.GetEffectID(skillData.skilLv, sameNums));
  28. if (player.RandomPercent(s_ValueSet2.GetValue(skillData.skilLv)))
  29. {
  30. //获得一个权重最高的求
  31. player.CardModule.AddCard(1, false);
  32. }
  33. }
  34. protected override void OnInitSkillParam()
  35. {
  36. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(this.SkillID);
  37. InitData(data, out s_ValueSet1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  38. InitData(data, out s_ValueSet2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
  39. }
  40. }
  41. }