Advertisement
SamiPiplup

Genocide Voodoo

Jun 7th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.74 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. music = "mus_spider" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
  4. encountertext = "Voodoo stands in your path!" --Modify as necessary. It will only be read out in the action select screen.
  5. nextwaves = {"bullettest_chaserorb"}
  6. wavetimer = 6.0
  7. arenasize = {155, 130}
  8. Player.lv = 12
  9. Player.hp = 64
  10.  
  11. enemies = {
  12. "Voodoo"
  13. }
  14.  
  15. enemypositions = {
  16. {0, 0}
  17. }
  18.  
  19. -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
  20. possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou", "waves", "waves2"}
  21. --I wanted to add purple soul attacks, but couldn't figure them out.
  22.  
  23. --function EncounterStarting(State {ENEMYDIALOGUE} )
  24.     -- If you want to change the game state immediately, this is the place.
  25. --end
  26. --end
  27.  
  28.  
  29. function EnemyDialogueStarting()
  30.     -- Good location for setting monster dialogue depending on how the battle is going.
  31.     enemies[1].SetVar('currentdialogue')
  32. end
  33.  
  34. function EnemyDialogueEnding()
  35.     -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  36.     -- This example line below takes a random attack from 'possible_attacks'.
  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.     BattleDialog({"Selected item " .. ItemID .. "."})
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement