guard_hound.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. guard_hound = {
  2. on_start = function(self)
  3. return 0;
  4. end;
  5. on_action = function(self)
  6. local attack_id;
  7. if math.random(3) == 1 then
  8. attack_id = 275; -- Tentacle
  9. else
  10. attack_id = 274; -- Bite
  11. end;
  12. set_random_enemy_as_target();
  13. --set_random_enemy_with_lowest_current_hp_as_target();
  14. battle:run_command(Battle.MONSTER_ACTION, attack_id);
  15. return 0;
  16. end;
  17. action_idle = function(self)
  18. fighter_self:play_animation("0");
  19. return 0;
  20. end;
  21. action_hurt = function(self)
  22. fighter_self:play_animation("1");
  23. return 0;
  24. end;
  25. action_bite = function(self)
  26. fighter_self:play_animation("2");
  27. fighter_self:play_animation("3");
  28. fighter_self:play_animation("4");
  29. fighter_self:play_animation("5");
  30. return 0;
  31. end;
  32. action_tentacle = function(self)
  33. fighter_self:play_animation("6");
  34. fighter_self:play_animation("7");
  35. fighter_self:play_animation("8");
  36. fighter_self:play_animation("9");
  37. return 0;
  38. end;
  39. };