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.
- currentstate = "NONE"
- function Update()
- if items.inmenu then
- items.Update()
- end
- end
- function OnHit(bullet)
- end
- function EnteringState(newstate, oldstate)
- if newstate == "ITEMMENU" then
- items.OpenItemMenu()
- end
- end
- music = "MSBSG normalize" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
- encountertext = "Tails Doll appeared!" --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 4.0
- arenasize = {155, 130}
- enemies = {
- "Tails Doll"
- }
- enemypositions = {
- {0, 0}
- }
- attacknum = 0
- SetGlobal("intro",true)
- sparecount = 0
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here i""n case you want to use it.
- possible_attacks = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
- function EncounterStarting()
- State("ENEMYDIALOGUE")
- Player.name = "Tails"
- Player.lv = 20
- Player.hp = 99
- items = require "Libraries/itemsmenu"
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- enemies[1].SetVar('currentdialogue',{"Hehehehehe.", "Well well well...", "Hello Tails.", "What does your\nDetermination", "say", "to", "this. . ."})
- SetGlobal("intro",false)
- end
- end
- function EnemyDialogueEnding()
- attacknum = attacknum + 1
- if attacknum == 1 then
- nextwaves = {"Spears"}
- elseif attacknum == 2 then
- nextwaves = {"Spears Wave"}
- elseif attacknum == 3 then
- nextwaves = {"wave_spawning_example_x_version"}
- attacknum = 0
- end
- 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.
- end
- function HandleSpare()
- if sparecount == 0 then
- enemies[1].SetVar('currentdialogue',{"are you trying to\nspare me?", "pathetic"})
- sparecount = sparecount + 1
- elseif sparecount == 1 then
- enemies[1].SetVar('currentdialogue',{"You did a full\ngenocide and now\nyou are going to\njust spare me?", "no I refuse"})
- sparecount = sparecount + 1
- elseif sparecount == 2 then
- enemies[1].SetVar('currentdialogue',{"If you keep spareing me\nI will end you."})
- sparecount = sparecount + 1
- elseif sparecount == 3 then
- Player.Hurt(99)
- end
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- BattleDialog({"Selected item " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment