anchor.diff:               battle.DeselectEvent =>! FinalizeBattle
                battle.OutgoingStartEvent =>! FadeSong
                battle.UpdateEvent => Tick] @
  -             BattleDispatcher.inputBindings 0 @
  -             BattleDispatcher.inputBindings 1 @
  -             BattleDispatcher.inputBindings 2
  +             inputBindings 0 @
  +             inputBindings 1 @
  +             inputBindings 2
   
           override this.Message (message, model, _, world) =
               match message with
               | ReadyCharactersM ->
                   let time = World.getTickTime world
  -                let model = BattleDispatcher.updateCharacters (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) ReadyCycle) character.CharacterAnimationState }) model
  +                let model = updateCharacters (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) ReadyCycle) character.CharacterAnimationState }) model
                   just model
               | PoiseCharactersM ->
                   let time = World.getTickTime world
  -                let model = BattleDispatcher.updateCharacters (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) PoiseCycle) character.CharacterAnimationState }) model
  +                let model = updateCharacters (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) PoiseCycle) character.CharacterAnimationState }) model
                   just model
               | CelebrateCharactersM outcome ->
                   let time = World.getTickTime world
                   let model =
                       if outcome
  -                    then BattleDispatcher.updateAllies (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) CelebrateCycle) character.CharacterAnimationState }) model
  -                    else BattleDispatcher.updateAllies (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) CelebrateCycle) character.CharacterAnimationState }) model
  +                    then updateAllies (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) CelebrateCycle) character.CharacterAnimationState }) model
  +                    else updateAllies (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) CelebrateCycle) character.CharacterAnimationState }) model
                   just model
               | AdvanceCharactersM ->
  -                let model = BattleDispatcher.updateCharacters (fun character -> { character with ActionTime = character.ActionTime + Constants.Battle.ActionTimeInc }) model
  +                let model = updateCharacters (fun character -> { character with ActionTime = character.ActionTime + Constants.Battle.ActionTimeInc }) model
                   just model
               | AttackCharacterM (sourceIndex, targetIndex) ->
                   let time = World.getTickTime world
  -                let source = BattleDispatcher.getCharacter sourceIndex model
  -                let target = BattleDispatcher.getCharacter targetIndex model
  -                let model = BattleDispatcher.updateCharacter (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) AttackCycle) character.CharacterAnimationState }) sourceIndex model
  +                let source = getCharacter sourceIndex model
  +                let target = getCharacter targetIndex model
  +                let model = updateCharacter (fun character -> { character with CharacterAnimationState = (CharacterAnimationState.setCycle (Some time) AttackCycle) character.CharacterAnimationState }) sourceIndex model
                   let model =
  -                    BattleDispatcher.updateCharacter (fun character ->
  +                    updateCharacter (fun character ->
                           let state = character.CharacterState
                           let rom = Simulants.Game.GetModel world
                           let power = source.CharacterState.ComputePower rom
  
positive.code:                 just (previousMenu.SetCenter (ally.GetCenter world) world)
  
          override this.Content (model, _, _) =
              [BattleDispatcher.inputContent 0
               BattleDispatcher.inputContent 1
               BattleDispatcher.inputContent 2
               Content.layer Simulants.Scene.Name []
                  [Content.label "Background"
                      [Entity.Position == v2 -480.0f -512.0f
                       Entity.Size == v2 1024.0f 1024.0f
                       Entity.Depth == -10.0f
                       Entity.LabelImage == asset "Battle" "Background"]
                   Content.entitiesi (model.MapOut (fun model -> seq (BattleDispatcher.getAllies model))) $ fun i model _ _ ->
                      Content.entity<CharacterDispatcher> ("Ally+" + scstring i)
                          [Entity.Position ==> model.MapOut (fun model -> model.CharacterPosition)
                           Entity.Size ==> model.MapOut (fun model -> model.CharacterSize)
  
negative.code:                    CharacterState = { CharacterType = Enemy Goblin; PartyIndex = 0; ExpPoints = 0; HitPoints = 5; SpecialPoints = 1; PowerBuff = 1.0f; ShieldBuff = 1.0f; MagicBuff = 1.0f; CounterBuff = 1.0f; Statuses = Set.empty; WeaponOpt = Some "Melee"; ArmorOpt = None; Relics = [] }
                     ActionTime = 0 }] |>
                  List.mapi (fun i ally -> (EnemyIndex i, ally))
               let characters =
                  Map.ofList (allies @ enemies)
               let model =
                  { BattleCharacters = characters
                    BattleState = BattleReady 0L }
               model)
  
          let getAllies model =
              model.BattleCharacters |> Map.toSeq |> Seq.filter (function (AllyIndex _, _) -> true | _ -> false) |> Seq.map snd |> Seq.toList
  
          let getEnemies model =
              model.BattleCharacters |> Map.toSeq |> Seq.filter (function (AllyIndex _, _) -> true | _ -> false) |> Seq.map snd |> Seq.toList
  
          let updateCharacters3 predicate updater model =
              { model with BattleCharacters = Map.map (fun index character -> if predicate index then updater character else character) model.BattleCharacters }
  
          let updateCharacters updater model =
              updateCharacters3 tautology updater model
  
          let updateAllies updater model =
              updateCharacters3 (function AllyIndex _ -> true | _ -> false) updater model
  
          let _updateEnemies updater model =
              updateCharacters3 (function EnemyIndex _ -> true | _ -> false) updater model
  
          let tryGetCharacter characterIndex model =
              Map.tryFind characterIndex model.BattleCharacters
  
          let getCharacter characterIndex model =
              tryGetCharacter characterIndex model |> Option.get
  
          let getCharacterIndex (entity : Entity) =
              let strs = entity.Name.Split '+'
              let ctor = if strs.[0] = "Ally" then AllyIndex else EnemyIndex
              ctor (scvalue<int> strs.[1])
  
          let _tryUpdateCharacter updater characterIndex model =
              match tryGetCharacter characterIndex model with
              | Some character ->
                  let character = updater character
                  { model with BattleCharacters = Map.add characterIndex character model.BattleCharacters }
              | None -> model
  
          let updateCharacter updater characterIndex model =
              let character = getCharacter characterIndex model
              let character = updater character
              { model with BattleCharacters = Map.add characterIndex character model.BattleCharacters }
  
          let tickAttack sourceIndex (targetIndexOpt : CharacterIndex option) time timeLocal battleRunning model =
  
              // if target available, proceed with attack
              let source = getCharacter sourceIndex model
              match targetIndexOpt with
              | Some targetIndex ->
                  let target = getCharacter targetIndex model
                  match timeLocal with
                  | 0L when target.CharacterState.IsHealthy ->
                      if target.CharacterState.IsHealthy then
  