示例#1
0
            RuntimeActor actor;             // 关联的玩家

            /// <summary>
            /// 应用
            /// </summary>
            /// <param name="battler">对战者</param>
            /// <param name="result">结果</param>
            public static void apply(RuntimeBattler battler, RuntimeActionResult result)
            {
                var calc = new ResultApplyCalc(battler, result);

                calc.processHP();
                calc.processHitFreeze();
                calc.processAddBuffs();
            }
示例#2
0
            /// <summary>
            /// 构造函数
            /// </summary>
            /// <param name="battler">对战者</param>
            /// <param name="result">结果</param>
            ResultApplyCalc(RuntimeBattler battler, RuntimeActionResult result)
            {
                this.battler = battler;
                this.result  = result;

                subject = result.action?.subject;
                actor   = (battler as RuntimeActor) ??
                          (subject as RuntimeActor);
            }
示例#3
0
        /// <summary>
        /// 应用到运行时数据
        /// </summary>
        /// <param name="battler"></param>
        void applyRuntimeBattler(RuntimeBattler battler)
        {
            var res = currentAction.makeResult(battler);

            battler.applyResult(res);
        }