@@ -25,7 +25,8 @@ import type {
2525 LobbyState ,
2626} from './multiplayer' ;
2727import type { AuthoritativeState , Intent } from './multiplayer/authoritative' ;
28- import { getVisibilityAwareDelay , sleep } from './utility/time' ;
28+ import type { AbilityTarget } from './multiplayer/types' ;
29+ import { getVisibilityAwareDelay } from './utility/time' ;
2930import { DEBUG_DISABLE_GAME_STATUS_CONSOLE_LOG , DEBUG_DISABLE_MUSIC } from './debug' ;
3031import { Point , configure as configurePointFacade } from './utility/pointfacade' ;
3132import { pretty as version } from './utility/version' ;
@@ -925,10 +926,10 @@ export default class Game {
925926 const intent = message . intent ;
926927 switch ( intent . kind ) {
927928 case 'skip' :
928- this . action ( { action : 'skip' } , { callback ( ) { } } ) ;
929+ this . action ( { action : 'skip' } , { } ) ;
929930 break ;
930931 case 'delay' :
931- this . action ( { action : 'delay' } , { callback ( ) { } } ) ;
932+ this . action ( { action : 'delay' } , { } ) ;
932933 break ;
933934 case 'move' :
934935 this . action (
@@ -942,8 +943,13 @@ export default class Game {
942943 break ;
943944 case 'ability' :
944945 this . action (
945- { action : 'ability' , id : intent . id , target : intent . target , args : intent . args } ,
946- { callback ( ) { } } ,
946+ {
947+ action : 'ability' ,
948+ id : intent . id ,
949+ target : intent . target ,
950+ args : intent . args ,
951+ } ,
952+ { } ,
947953 ) ;
948954 break ;
949955 }
@@ -1100,17 +1106,7 @@ export default class Game {
11001106 } ) ;
11011107 }
11021108
1103- sendMultiplayerAbility ( params : {
1104- target : {
1105- type : string ;
1106- x ?: number ;
1107- y ?: number ;
1108- crea ?: number ;
1109- array ?: Array < { x : number ; y : number } > ;
1110- } ;
1111- id : number ;
1112- args : unknown [ ] ;
1113- } ) : void {
1109+ sendMultiplayerAbility ( params : { target : AbilityTarget ; id : number ; args : unknown [ ] } ) : void {
11141110 if ( ! this . multiplayer || ! this . lobby || ! this . activeCreature ) {
11151111 return ;
11161112 }
@@ -1124,15 +1120,15 @@ export default class Game {
11241120 this . sendIntent ( {
11251121 kind : 'ability' ,
11261122 id : params . id ,
1127- target : params . target as any ,
1123+ target : params . target ,
11281124 args : params . args ,
11291125 } as Intent ) ;
11301126 return ;
11311127 }
11321128 this . lobby . sendAction ( {
11331129 type : 'action-ability' ,
11341130 id : params . id ,
1135- target : params . target as any , // eslint-disable-line @typescript-eslint/no-explicit-any
1131+ target : params . target ,
11361132 args : params . args ,
11371133 playerId : this . lobby . getLocalPlayer ( ) ?. playerId || '' ,
11381134 creatureId : this . activeCreature . id ,
@@ -1159,7 +1155,7 @@ export default class Game {
11591155 // which are stricter than the serializable snapshot. Cast to `any` so the
11601156 // authoritative state can drive the live game without fighting internal
11611157 // types; the fields we set are the canonical ones `serializeState` reads.
1162- const g = this as any ;
1158+ const g = this as any ; // eslint-disable-line @typescript-eslint/no-explicit-any
11631159 for ( const snap of state . creatures ) {
11641160 const creature = g . creatures [ snap . id ] ;
11651161 if ( ! creature ) {
0 commit comments