Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let step host toPos = seq {
- yield MoveAnimation (host, toPos) |> wait
- move host toPos
- }
- let attack target hpAmmount host = seq {
- yield AttackAnimation (host, target) |> waitMainPart
- damage target hpAmmount
- }
- let moveAndAttackRandomTarget hpAmmount host toPos = seq {
- yield! step host toPos
- let targets = enemiesInRange 1 $ from host
- if any targets then
- yield! host |> attack (randomElementFrom targets) hpAmmount
- }
Add Comment
Please, Sign In to add comment