mono_drive.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. mono_drive = {
  2. prepare = false;
  3. on_start = function(self)
  4. return 0;
  5. end;
  6. on_action = function(self)
  7. if self.prepare == false then
  8. self.prepare = true;
  9. if math.random(2) == 1 then
  10. -- DisplayText(254e454d59003349474854454401ff)(Enemy Sighted!)
  11. else
  12. --DisplayText(3741524e494e4701003741524e494e4701ff)(Warning! Warning!)
  13. end;
  14. else
  15. if math.random(3) == 1 then
  16. set_random_enemy_as_target();
  17. --set_random_enemy_with_lowest_magic_defense_as_target();
  18. attack_id = 27; -- Fire
  19. temp14 = 1;
  20. else
  21. set_random_enemy_as_target();
  22. --set_random_enemy_with_lowest_defence_as_target();
  23. attack_id = 276; -- Drilldrive
  24. temp14 = 0;
  25. end;
  26. --[[
  27. if attack_id == 27 and fighter_self.data.current_mp < game:get_attack_cost(attack_id) then
  28. set_random_enemy_as_target();
  29. --set_random_enemy_with_lowest_defence_as_target();
  30. attack_id = 276;
  31. end;
  32. ]]
  33. battle:run_command(Battle.MONSTER_ACTION, attack_id);
  34. end;
  35. return 0;
  36. end;
  37. action_idle = function(self)
  38. fighter_self:play_animation("0");
  39. return 0;
  40. end;
  41. action_hurt = function(self)
  42. fighter_self:play_animation("1");
  43. return 0;
  44. end;
  45. action_drilldrive = function(self)
  46. fighter_self:play_animation("2");
  47. fighter_self:play_animation("3");
  48. fighter_self:play_animation("4");
  49. fighter_self:play_animation("5");
  50. return 0;
  51. end;
  52. action_fire = function(self)
  53. fighter_self:play_animation("6");
  54. fighter_self:play_animation("7");
  55. fighter_self:play_animation("8");
  56. fighter_self:play_animation("9");
  57. return 0;
  58. end;
  59. };