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" --Always OGG. Extension is added automatically. Remove the first two lines for custom music.
- encountertext = "Toriel is here to stop you!" --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_touhou"}
- wavetimer = 4.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_chaserorb", "bullettest_touhou"}
- function EncounterStarting()
- -- If you want to change the game state immediately, this is the place.
- battle_progress = 0
- enemies[1].setVar("currentdialogue", {"[color:fca600][effect:shake]For the sake of a\n better ending\n I must\n\n\nDEFEAT YOU"})
- State("ENEMYDIALOGUE")
- Player.lv = 10
- Player.hp = 56
- Audio.LoadFile("toriel_theme")
- end
- function EnemyDialogueStarting()
- if battle_progress == 0 then
- enemies[1].setVar("currentdialogue", {"After all you've \ndone, you want \nme to\n stand aside? \nAll I've got to\n say is \n[effect:shake][color:fca600]HECK NO!."})
- elseif battle_progress == 1 then
- enemies[1].setVar("currentdialogue", {"[color:fca600][effect:shake]For the sake of \na better ending\n I must\n[color:ff0000]DEFEAT YOU"})
- else
- enemies[1].setVar("currentdialogue", {"[color:fca600]I can't give up..."})
- battle_progress = battle_progress + 1
- end
- -- 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'.
- 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("[color:ff0000]NO SPARING =)")
- end
- function HandleItem(ItemID)
- if healcount == 7 then
- BattleDialog("[color:ff0000]No more healing\n or else I'll take \ndrastic measures.")
- elseif healcount == 8 then
- BattleDialog("[color:ff0000]HAHAHAHAHA...\nYou don't get it do you \nNO MORE HEALING!")
- elseif healcount == 9 then
- Audio.Stop()
- Audio.LoadFile("ssmtt_jumpscare")
- BattleDialog("[color:ff0000]I warned you\nDIE!!!")
- sprite.Set("i_warned_you")
- Player.hurt(Player.hp)
- else
- Player.Heal(15)
- BattleDialog("You ate a TESTDOG. You gaind 15HP.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement