123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using XGame.Database;
- namespace FL.Battle
- {
- /// <summary>
- /// 战斗数值结算
- /// </summary>
- public interface ICombatCalculation
- {
- /// <summary>
- /// 结算伤害
- /// </summary>
- /// <param name="damage"></param>
- /// <param name="attackerId"></param>
- /// <param name="skill"></param>
- void Damage(int damage, long attackerId, SkillTable skill);
- /// <summary>
- /// 结算伤害
- /// </summary>
- /// <param name="damage"></param>
- /// <param name="elementType"></param>
- void Damage(int damage, EElementType elementType);
- /// <summary>
- /// 根据技能的目标类型返回技能的触发者
- /// 受击者调用
- /// </summary>
- /// <param name="skillId"></param>
- /// <param name="attacker"></param>
- /// <returns></returns>
- ICombatCalculation GetSkillTrigger(long skillId, ICombatCalculation attacker);
- /// <summary>
- /// 根据buff的目标类型返回buff的触发者
- /// 受击者调用
- /// </summary>
- /// <param name="buffId"></param>
- /// <param name="attacker"></param>
- /// <returns></returns>
- ICombatCalculation GetBuffTrigger(long buffId, ICombatCalculation attacker);
- /// <summary>
- /// 触发技能
- /// </summary>
- /// <param name="skillId"></param>
- /// <param name="targetId"></param>
- /// <param name="probability">触发概率, 默认100%触发</param>
- void TickSkill(long skillId, long targetId, int probability = 10000);
- /// <summary>
- /// 触发buff
- /// </summary>
- /// <param name="buffId"></param>
- /// <param name="probability">buff触发概率, 默认100%触发</param>
- /// <param name="addLayer">叠加层数,默认为1</param>
- /// <param name="damage">触发buff的技能伤害值</param>
- void TickBuff(long buffId, int probability = 10000, int addLayer = 1, int damage = 0);
- /// <summary>
- /// 攻击者触发铭文
- /// 只有随从有铭文
- /// </summary>
- /// <param name="targetId"></param>
- /// <param name="skillElementType"></param>
- /// <param name="damage"></param>
- void TickEpigraph(long targetId, EElementType skillElementType, int damage);
- }
- }
|