12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
-
- using CommonLang;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.XLS.Data;
- namespace XmdsCommonSkill.Plugin.Skills.Monster
- {
- /// <summary>
- /// 死亡使者(瑞沙德) - 死亡祭台: 读条2秒后,对当前目标施放致命一击,伤害视目标血量而定,目标血量越低伤害越高(魔法).
- /// </summary>
- public class Monster_1510003 : XmdsSkillBase
- {
- public static int ID = 1510003;
-
- public static XmdsSkillValue DP_1;
- public override int SkillID { get { return ID; } }
- protected override void OnSkillDamagePerEvent(BattleParams param)
- {
- int ret = CalDamagePer(DP_1, param.GameSkill.SkillLevel);
- param.SkillDamagePer = calculator(param, ret);
- }
- // 目标血量越低伤害越高.
- private int calculator(BattleParams param, int ret)
- {
- float p = param.Hitter.MirrorProp.HP / param.Hitter.mUnit.MaxHP;
- if (p < 0.8)
- {
- ret = CUtils.CastInt((1 + 0.2) * ret);
- }
- else if (p < 0.5)
- {
- ret = CUtils.CastInt((1 + 0.5) * ret);
- }
- else if (p < 0.1)
- {
- ret = CUtils.CastInt((1 + 1) * ret);
- }
- return ret;
- }
- protected override void OnInitSkillParam()
- {
- XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
- InitData(data, out DP_1, XmdsSkillData.XmdsSkillDataKey.DmgRate);
- }
- }
- }
|