Advertisement
Grajoss

Untitled

Sep 19th, 2024
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | Gaming | 0 0
  1.  
  2.  
  3. -- A basic encounter script skeleton you can copy and modify for your own creations.
  4.  
  5. -- music = "shine_on_you_crazy_diamond" -- Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  6. encountertext = "outerdust sans blocks your path!" -- Modify as necessary. It will only be read out in the action select screen.
  7. wavetimer = 6.0
  8. attack_counter = 1
  9. attack_list = {"attack_1","attack_2","attack_3"}
  10. nextwaves = {attack_list[attack_counter]}
  11. arenasize = {155, 130}
  12. enemies = {
  13. "poseur"
  14. }
  15. enemypositions = {
  16. {0, 0}
  17. }
  18. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  19.  
  20. function EncounterStarting()
  21. -- If you want to change the game state immediately, this is the place.
  22. Player.lv = 3
  23. Player.hp = 28
  24. Player.name = "frisk"
  25. Dialoguecounter = 1
  26. attack_counter = 0
  27. end
  28.  
  29. function EnemyDialogueStarting()
  30. -- Good location for setting monster dialogue depending on how the battle is going.
  31. Dialoguecounter = Dialoguecounter + 1
  32. attack_counter = attack_counter + 1
  33. if Dialoguecounter == 1 then
  34. current_dialogue = 'well long time no see'
  35. elseif Dialoguecounter == 2 then
  36. current_dialogue = 'cant say i like what you have done'
  37. elseif Dialoguecounter == 3 then
  38. current_dialogue = 'it could of been peacful but you desided to genocide the entire underground multiple times'
  39. elseif Dialoguecounter == 4 then
  40. current_dialogue = 'so i decided to make sure this is your last genocide'
  41. elseif Dialoguecounter == 5 then
  42. current_dialogue = 'you see if i can get enough LV to outmatch your determination i will be able to make sure you cant reset'
  43. elseif Dialoguecounter == 6 then
  44. current_dialogue = 'and you wont be able to stop me as i become more and more powerful'
  45. elseif Dialoguecounter == 7 then
  46. current_dialogue = 'but that being said i should get going after all i cant let them all escape'
  47. else
  48. current_dialogue ='...'
  49. end
  50. end
  51. function EnemyDialogueEnding()
  52. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously
  53. if attack_counter > #attack_list then
  54. attack_counter = 1
  55. end
  56.  
  57. end
  58.  
  59. function DefenseEnding() -- This built-in function fires after the defense round ends.
  60. encountertext = RandomEncounterText() -- This built-in function gets a random encounter text from a random enemy.
  61. end
  62.  
  63. function HandleSpare()
  64. State("ENEMYDIALOGUE")
  65. end
  66.  
  67. function HandleItem(ItemID)
  68. BattleDialog({"Selected item " .. ItemID .. "."})
  69. end
  70.  
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement