@@ -67,19 +67,19 @@ export abstract class BaseAction {
6767 } ;
6868 }
6969
70- getSuccessResult ( { initiator, target } = this . params ) : SuccessArgs {
70+ getSuccessResult ( { initiator, target, status } = this . context ) : SuccessArgs {
7171 return {
72- exp : this . status . exp ,
72+ exp : status . exp ,
7373 action : this . displayName ,
7474 actionType : this . actionType ,
7575 target,
7676 initiator,
77- effect : floatNumber ( this . status . effect ) ,
77+ effect : floatNumber ( status . effect ) ,
7878 hp : target . stats . val ( 'hp' ) ,
7979 effectType : this . effectType ,
8080 orderType : this . orderType ,
81- expArr : this . status . expArr ,
82- affects : this . status . affects ,
81+ expArr : status . expArr ,
82+ affects : status . affects ,
8383 // @ts -expect-error todo вынести кастомные сообщения в отдельный сервис
8484 msg : this . customMessage ?. bind ( this ) ,
8585 } ;
@@ -110,12 +110,12 @@ export abstract class BaseAction {
110110 }
111111 }
112112
113- next ( { initiator , target , game } = this . params ) : void {
114- const result = this . getSuccessResult ( { initiator , target , game } ) ;
113+ next ( context = this . context ) : void {
114+ const result = this . getSuccessResult ( context ) ;
115115 this . giveExp ( result ) ;
116116
117117 if ( ! this . isAffect ) {
118- game . recordOrderResult ( result ) ;
118+ context . game . recordOrderResult ( result ) ;
119119 }
120120 }
121121
0 commit comments