anchor.diff:                      then { model with Characters = Map.remove characterIndex model.Characters }
                       else model
                   just model
  -            | GiveConsumable (consumable, sourceIndex) ->
  -                let time = World.getTickTime world
  -                let model = BattleModel.updateCharacter (CharacterModel.setAnimationCycle time CastCycle) sourceIndex model
  -                let item = Consumable consumable
  -                let model = { model with Inventory = Inventory.removeItem item model.Inventory }
  -                just model
  -            | TakeConsumable (consumable, targetIndex) ->
  -                let time = World.getTickTime world
  -                let rom = screen.Parent.GetModel<Rom> world
  -                let healing =
  -                    match consumable with
  -                    | GreenHerb -> 50 // TODO: pull from rom data
  -                    | RedHerb -> 500 // TODO: pull from rom data
  -                let model = BattleModel.updateCharacterState (CharacterState.changeHitPoints rom false healing) targetIndex model
  -                let model = BattleModel.updateCharacter (CharacterModel.setAnimationCycle time SpinCycle) targetIndex model
  -                let displayHitPointsChange = DisplayHitPointsChange (targetIndex, healing)
  -                let playHealSound = PlaySound (0L, Constants.Audio.DefaultSoundVolume, Assets.HealSound)
  -                withCmds model [displayHitPointsChange; playHealSound]
               | Tick ->
                   if World.isTicking world
                   then tick (World.getTickTime world) model
  
positive.code:                     else withMsgs { model with CurrentCommandOpt = None } [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
                  | _ ->
                      if timeLocal = int64 source.AnimationState.Stutter * 4L then
                          match specialType with
                          | HeadSlash -> withMsg model (AttackCharacter sourceIndex)
                          | Bolt -> withMsg model (AttackCharacter sourceIndex)
                      elif timeLocal = int64 source.AnimationState.Stutter * 5L then
                          withMsg model (DamageCharacter (sourceIndex, targetIndex, Some specialType))
                      elif CharacterAnimationState.finished time source.AnimationState then
                          let target = BattleModel.getCharacter targetIndex model
                          if target.CharacterState.IsHealthy then
  
negative.code:                             let woundCommand = CurrentCommand.make time (ActionCommand.make Wound sourceIndex (Some targetIndex))
                              let model = { model with CurrentCommandOpt = Some woundCommand }
                              withMsg model (PoiseCharacter sourceIndex)
                      else just model
              | None ->
                  let model = { model with CurrentCommandOpt = None }
                  withMsgs model [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
  
          static let tickConsume consumable sourceIndex (targetIndexOpt : CharacterIndex option) time timeLocal model =
              match targetIndexOpt with
              | Some targetIndex ->
                  let source = BattleModel.getCharacter sourceIndex model
                  let target = BattleModel.getCharacter targetIndex model
                  match timeLocal with
                  | 0L ->
                      if target.CharacterState.IsHealthy
                      then withMsg model (ConsumeCharacter1 (consumable, sourceIndex))
                      else withMsgs { model with CurrentCommandOpt = None } [ResetCharacter sourceIndex; PoiseCharacter sourceIndex]
                  | _ ->
                      if timeLocal = int64 source.AnimationState.Stutter * 3L
                      then withMsg model (ConsumeCharacter2 (consumable, targetIndex))
                      elif CharacterAnimationState.finished time target.AnimationState then
                          let model = { model with CurrentCommandOpt = None }
                          withMsgs model [PoiseCharacter sourceIndex; PoiseCharacter targetIndex]
                      else just model
              | None ->
                  let model = { model with CurrentCommandOpt = None }
  