public void ResolveAbilities(ActorData actor, AbilityPriority priority) { AbilityData abilityData = actor.gameObject.GetComponent <AbilityData>(); // I didn't find any code that calculates what an ability hits aside from UpdateTargeting which is // used to draw targeters on the client. In order for it to work on the server we need to // * set actor as active owned actor data -- calculations rely on this // * AppearAtBoardSquare to set actor's current board square // * patch TargeterUtils so that RemoveActorsInvisibleToClient isn't called on the server // * disable ActorData.IsVisibleToClient on server (break cover otherwise) // * ..? foreach (ActorTargeting.AbilityRequestData ard in actor.TeamSensitiveData_authority.GetAbilityRequestData()) { Ability ability = abilityData.GetAbilityOfActionType(ard.m_actionType); if (ability.m_runPriority != priority) { continue; } Log.Info($"Resolving {ability.m_abilityName} for {actor.DisplayName}"); AbilityResolver resolver = GetAbilityResolver(actor, ability, priority, ard); resolver.Resolve(); ActionsThisPhase.AddRange(resolver.Actions); Animations.AddRange(resolver.Animations); Utils.Add(TargetedActorsThisPhase, resolver.TargetedActors); Barriers.AddRange(resolver.Barriers); } }