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 = "outerdust sans blocks your path!" -- Modify as necessary. It will only be read out in the action select screen.
- wavetimer = 6.0
- attack_counter = 1
- attack_list = {"attack_1","attack_2","attack_3"}
- nextwaves = {attack_list[attack_counter]}
- arenasize = {155, 130}
- enemies = {
- "poseur"
- }
- 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.
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- Player.lv = 3
- Player.hp = 28
- Player.name = "frisk"
- Dialoguecounter = 1
- attack_counter = 0
- end
- function EnemyDialogueStarting()
- -- Good location for setting monster dialogue depending on how the battle is going.
- Dialoguecounter = Dialoguecounter + 1
- attack_counter = attack_counter + 1
- if Dialoguecounter == 1 then
- current_dialogue = 'well long time no see'
- elseif Dialoguecounter == 2 then
- current_dialogue = 'cant say i like what you have done'
- elseif Dialoguecounter == 3 then
- current_dialogue = 'it could of been peacful but you desided to genocide the entire underground multiple times'
- elseif Dialoguecounter == 4 then
- current_dialogue = 'so i decided to make sure this is your last genocide'
- elseif Dialoguecounter == 5 then
- current_dialogue = 'you see if i can get enough LV to outmatch your determination i will be able to make sure you cant reset'
- elseif Dialoguecounter == 6 then
- current_dialogue = 'and you wont be able to stop me as i become more and more powerful'
- elseif Dialoguecounter == 7 then
- current_dialogue = 'but that being said i should get going after all i cant let them all escape'
- else
- current_dialogue ='...'
- end
- end
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously
- if attack_counter > #attack_list then
- attack_counter = 1
- 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()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- BattleDialog({"Selected item " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement