Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "Battle Against a True Hero" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Chara pulls out a knife..." --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. enemies = {
  10. "Chara"
  11. }
  12.  
  13. enemypositions = {
  14. {0, 0}
  15. }
  16.  
  17. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  18. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
  19.  
  20. function EncounterStarting()
  21. -- If you want to change the game state immediately, this is the place.
  22. Player.sprite.color = {1.0, 1.0, 1.0}
  23. Player.lv = 0
  24. Player.hp = 1
  25. Player.name = "Sans"
  26. end
  27.  
  28. function EnemyDialogueStarting()
  29. -- Good location for setting monster dialogue depending on how the battle is going.
  30. enemies[1].SetVar('currentdialogue', {"[color:ff0000]Sans...\nKILL\nYOU!"})
  31.  
  32. function EnemyDialogueEnding()
  33. -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  34. -- This example line below takes a random attack from 'possible_attacks'.
  35. nextwaves = { possible_attacks[math.random(#possible_attacks)] }
  36. end
  37.  
  38. function DefenseEnding() --This built-in function fires after the defense round ends.
  39. encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  40. end
  41.  
  42. function HandleSpare()
  43. State("ENEMYDIALOGUE")
  44. end
  45.  
  46. function HandleItem(ItemID)
  47. if ItemID == "DOGTEST1" then
  48. BattleDialog({"In Chara now even more bad time!"})
  49. Player.Heal(0)
  50. elseif ItemID == "DOGTEST2" then
  51. BattleDialog({"..."})
  52. Player.Heal(0)
  53. elseif ItemID == "DOGTEST3" then
  54. BattleDialog({"..."})
  55. Player.Heal(0)
  56. elseif ItemID == "DOGTEST4" then
  57. BattleDialog({"..."})
  58. Player.Heal(0)
  59. elseif ItemID == "DOGTEST5" then
  60. BattleDialog({"..."})
  61. Player.Heal(0)
  62.  
  63. end
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement