Keep in mind I'm not a programmer, and anything I know about Lua I learned in the past hour, so there's probably a much better way to do this.
With that said, I edited the encounter.lua like this:
-- A basic encounter script skeleton you can copy and modify for your own creations.
-- music = "shine_on_you_crazy_diamond" --Always OGG. Extension is added automatically. Uncomment for custom music.
encountertext = "Poseur strikes a pose!" --Modify as necessary. It will only be read out in the action select screen.
nextwaves = {"bullettest_chaserorb"}
randomwave = 1
wavetimer = 1.0
arenasize = {155, 130}
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()
-- If you want to change the game state immediately, this is the place.
end
function EnemyDialogueStarting()
-- Good location for setting monster dialogue depending on how the battle is going.
end
function EnemyDialogueEnding()
-- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
-- This example line below takes a random attack from 'possible_attacks'.
randomwave = math.random(1, 3)
if randomwave == 1 then
wavetimer = 4.0
nextwaves = {"bullettest_bouncy"}
elseif randomwave == 2 then
wavetimer = 2.0
nextwaves = {"bullettest_chaserorb"}
elseif randomwave == 3 then
wavetimer = 10.0
nextwaves = {"bullettest_touhou"}
end
--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.
end
function HandleSpare()
BattleDialog({"Sparing functionality\ris still broken.\nSorry!"})
end
function HandleItem(ItemID)
BattleDialog({"Selected item " .. ItemID .. "."})
end
The only changes I made were adding randomwave = 1 to the top, adding in
randomwave = math.random(1, 3)
if randomwave == 1 then
wavetimer = 4.0
nextwaves = {"bullettest_bouncy"}
elseif randomwave == 2 then
wavetimer = 2.0
nextwaves = {"bullettest_chaserorb"}
elseif randomwave == 3 then
wavetimer = 10.0
nextwaves = {"bullettest_touhou"}
end
to the function EnemyDialogueEnding(), and removing the original wave randomizer.
This makes it so you can change the individual wave times. Right now, I have it set up so the bouncy bullets lasts for 4 second, chaser orb lasts for 2 seconds, and Touhou bullets lasts for 10 seconds.