Advertisement
Guest User

encounter.lua script for my mod with error

a guest
Jul 1st, 2022
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "omoritheme" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  4. encountertext = "Omori stands there." --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"bullettest_chaserorb"}
  6. wavetimer = 4.0
  7. arenasize = {155, 130}
  8.  
  9. deathmusic = "mytime"
  10.  
  11. autolinebreak = true
  12.  
  13. enemies = {
  14. "poseur"
  15. }
  16.  
  17. enemypositions = {
  18. {0, 0}
  19. }
  20.  
  21. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  22. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
  23.  
  24. function EncounterStarting()
  25.     -- If you want to change the game state immediately, this is the place.
  26.     currentdialogue = {"It's over.", "Oyasumi."}
  27.     Inventory.AddCustomItems({"Broken Violin"}, {3})
  28.     Inventory.SetInventory({"Broken Violin", "Violin"})
  29. end
  30.  
  31. function EnemyDialogueStarting()
  32.     -- Good location for setting monster dialogue depending on how the battle is going.
  33. end
  34.  
  35. function EnemyDialogueEnding()
  36.     -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  37.     nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  38. end
  39.  
  40. function DefenseEnding() --This built-in function fires after the defense round ends.
  41.     encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  42. end
  43.  
  44. function HandleSpare()
  45.     State("ENEMYDIALOGUE")
  46. end
  47.  
  48. function HandleItem(ItemID)
  49.     if ItemID == "BROKEN VIOLIN" then
  50.     Inventory.AddCustomItems ({Violin}, {1})
  51.     BattleDialog({"You fix the violin."})
  52.     elseif ItenID == "VIOLIN"
  53.     Inventory.SetAmount(99999999)
  54.     BattleDialog({"You get ready to play the final duet with MARI's spirit."})
  55.     end
  56. end
  57.  
  58. Player.maxhp = 300
  59. Player.hp = 300
  60. Player.atk = 46
  61. Player.def = 72
  62. Player.lv = 1
  63. Player.name = "Sunny"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement