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 = "ALTERTALE - Dynami" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
- encountertext = "Flames erupt from the ground,\npulling you towards them.\nYou're going back to hell."
- nextwaves = {"bullettest_bouncy"}
- wavetimer = 6.0
- arenasize = {155, 130}
- enemies = {
- "Toriel"
- }
- 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_touhou"}
- function EncounterStarting()
- Inventory.AddCustomItems({"Chocolate", "Syringe", "Music Box"}, {0, 0, 3})
- Inventory.SetInventory({"Chocolate", "Syringe", "Music Box"})
- Inventory.SetItem(1, "Chocolate", 2, "Syringe", 3, "Music Box")
- Audio["hurtsound"] = "dogsecret"
- Player.name = "Chara"
- Player.lv = 15
- Player.hp = 76
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- enemies[1].SetVar('currentdialogue',{"My child... You\rcertainly know how\rto get around."})
- SetGlobal("intro",false)
- nextwaves = { possible_attacks[math.random(#possible_attacks)] }
- end
- 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'.
- 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.
- Audio["RESETDICTIONARY"] = "dogsecret"
- end
- function HandleSpare()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- if (ItemID == "CHOCOLATE") then
- Inventory.NoDelete = true
- Player.Heal(80)
- BattleDialog({"My favourite. Your HP was\rmaxed out."})
- elseif (ItemID == "SYRINGE") then
- Player.Heal(20)
- BattleDialog({"You stab the syringe into\ryour arm.\rFilled with juicy goodness!"})
- elseif (ItemID == "MUSIC BOX") then
- BattleDialog({"[noskip]You wind up the music box.\rA familiar tune fills the room.", "Recollection flashes in Toriel's\reyes.", "Toriel's DEF down!"})
- enemies[1].SetVar("def", enemies[1].GetVar("def") / 2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement