Guest User

Untitled

a guest
Jan 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.51 KB | None | 0 0
  1.     let step host toPos = seq {
  2.         yield MoveAnimation (host, toPos) |> wait
  3.         move host toPos
  4.     }
  5.     let attack target hpAmmount host = seq {
  6.         yield AttackAnimation (host, target) |> waitMainPart
  7.         damage target hpAmmount
  8.     }
  9.     let moveAndAttackRandomTarget hpAmmount host toPos  = seq {
  10.         yield! step host toPos
  11.         let targets = enemiesInRange 1 $ from host
  12.         if any targets then
  13.             yield! host |> attack (randomElementFrom targets) hpAmmount
  14.     }
Add Comment
Please, Sign In to add comment