Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A basic encounter script skeleton you can copy and modify for your own creations.
- -- music = "shine_on_you_crazy_diamond" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- encountertext = "Toriel blocks the way." --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 4.0
- arenasize = {155, 130}
- enemies = {
- "Toriel" -- line 10
- }
- enemypositions = {
- {0, 0}
- }
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
- possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
- function EncounterStarting() --line 20
- --If you want to change the game state immediately, this is the place.
- sadtoriel = CreateSprite("spr_torielboss_sadhappy_0")
- sadtoriel.Scale(2 , 2)
- sadtoriel.alpha = 0
- sadtoriel.y =330
- hurttoriel = CreateSprite("spr_torielboss_reallyhurt_0")
- hurttoriel.Scale(2 , 2)
- hurttoriel.alpha = 0
- hurttoriel.y = 330
- kneeltoriel = CreateSprite("spr_torielboss_kneel_0")
- kneeltoriel.Scale(2 , 2)
- kneeltoriel.alpha = 0
- kneeltoriel.y = 330
- killedtoriel = CreateSprite("spr_torielboss_murdered_0")
- killedtoriel.Scale(2 , 2)
- killedtoriel.alpha = 0
- killedtoriel.y = 330
- Player.name = "Chara"
- Player.lv = 1
- Player.hp = 20
- if isCYF then --line 30
- SetPPCollision(true)
- end
- end
- function EnemyDialogueStarting()
- -- Good location for setting monster dialogue depending on how the battle is going.
- -- If the monster's text has not be set, use one of the default text the monster uses.
- end
- -- line 40
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- -- The wavetype is set in bullet_testing_Toriel's act commands.
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- end
- function DefenseEnding() --This built-in function fires after the defense round ends.
- encountertext = RandomEncounterText() --This built-in function gets a random encounter text from a random enemy.
- if GetGlobal("spareable") == 1 then --line 50
- encountertext = "Toriel is sparing you."
- end
- end
- sparecount = 0
- function HandleSpare()
- sparecount = sparecount + 1
- if sparecount == 1 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]..."})
- elseif sparecount == 2 then --line 60
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n..."})
- elseif sparecount == 3 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]...\n...\n..."})
- elseif sparecount == 4 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]..?"})
- elseif sparecount == 5 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]Stop it."})
- elseif sparecount == 6 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]What are\n you\ndoing?"})
- elseif sparecount == 7 then --line 70
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]You know\nI can't\nlet you\npast."})
- elseif sparecount == 8 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]Ha Ha Ha..."})
- elseif sparecount == 9 then
- sadtoriel.alpha = 1
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,Toriel_Empty][voice:toriel]Pathetic,[w:20]\nis it not[w:20]\nI can't\nsave a\nsingle child."})
- elseif sparecount == 10 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]No, I\nunderstand.[next]","[voice:toriel]You would\nnot be happy\nhere."})
- elseif sparecount == 11 then
- enemies[1].SetVar('currentdialogue',{"[voice:toriel]I'm sorry,\nyou can\nleave now."})
- enemies[1].SetVar("canspare" , true)
- enemies[1].SetVar("def" , -66666)
- end
- State("ENEMYDIALOGUE")
- end --line 70
- function HandleItem(ItemID)
- BattleDialog({"Selected item " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement