Advertisement
Guest User

Scale issue encounter update 2

a guest
Oct 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.90 KB | None | 0 0
  1. -- A basic encounter script skeleton you can copy and modify for your own creations.
  2.  
  3. -- music = "shine_on_you_crazy_diamond" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
  4. encountertext = "Toriel blocks the way." --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. "Toriel" -- line 10
  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. --line 20
  20. function EncounterStarting()
  21.    --If you want to change the game state immediately, this is the place.
  22.       sadtoriel = CreateSprite("spr_torielboss_sadhappy_0")
  23.       sadtoriel.Scale(2 , 2)
  24.    Player.name = "Chara"
  25.    Player.lv = 1
  26.    Player.hp = 20
  27.    if isCYF then
  28.             SetPPCollision(true)
  29.    end
  30. end
  31. --line 30
  32. function EnemyDialogueStarting()
  33.     -- Good location for setting monster dialogue depending on how the battle is going.
  34.     -- If the monster's text has not be set, use one of the default text the monster uses.
  35.    
  36. end
  37.  
  38. function EnemyDialogueEnding()
  39.     -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
  40.     -- The wavetype is set in bullet_testing_Toriel's act commands.
  41.     nextwaves = { possible_attacks[math.random(#possible_attacks)] }--line 40
  42.  
  43. end
  44.  
  45. function DefenseEnding() --This built-in function fires after the defense round ends.
  46.     encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
  47.         if GetGlobal("spareable") == 1 then
  48.                 encountertext = "Toriel is sparing you."
  49.         end
  50.  
  51. end
  52.         sparecount = 0--line 50
  53.         function HandleSpare()
  54.              sparecount = sparecount + 1
  55.              if sparecount == 1 then
  56.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]..."})
  57.              elseif sparecount == 2 then
  58.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n..."})
  59.              elseif sparecount == 3 then
  60.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n...\n..."})
  61.              elseif sparecount == 4 then
  62.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]..?"})
  63.              elseif sparecount == 5 then
  64.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]Stop it."})
  65.              elseif sparecount == 6 then
  66.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]What are\n you\ndoing?"}) --line 60
  67.              elseif sparecount == 7 then
  68.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]You know\nI can't\nlet you\npast."}) --voice doesn't work
  69.              elseif sparecount == 8 then
  70.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]Ha Ha Ha..."})
  71.              elseif sparecount == 9 then
  72.                        enemies[1].SetVar('currentdialogue',{"[func:SetSprite,spr_torielboss_sadhappy_0][voice:toriel]Pathetic,[w:20]\nis it not[w:20]\nI can't\nsave a\nsingle child."})
  73.              elseif sparecount == 10 then
  74.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]No, I\nunderstand.[next]","[voice:toriel]You would\nnot be happy\nhere."})
  75.              elseif sparecount == 11 then
  76.                        enemies[1].SetVar('currentdialogue',{"[voice:toriel]I'm sorry,\nyou can\nleave now."})
  77.                                enemies[1].SetVar("canspare" , true)
  78.                                enemies[1].SetVar("def" , -66666)
  79.              end
  80.              State("ENEMYDIALOGUE")
  81.           end --line 70
  82.  
  83.  
  84. function HandleItem(ItemID)
  85.     BattleDialog({"Selected item " .. ItemID .. "."})
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement