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.
- require "Animations/metta"
- music = "perfectcelebrity" --Either OGG or WAV. Extension is added automatically. Uncomment for custom music.
- encountertext = "The heroic celebrity appears." --Modify as necessary. It will only be read out in the action select screen.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 999
- arenasize = {155, 130}
- autolinebreak = true
- SetGlobal('damage', 9)
- SetGlobal('lights', 0)
- fAlpha = {}
- enemies = {
- "Mettaton"
- }
- 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.
- Misc.WindowName = "STORYSPIN"
- Player.name = "SANS"
- Player.lv = 11
- Player.hp = 60
- end
- function Update()
- AnimateMetta()
- SetGlobal('lights', GetGlobal('lights')+1)
- local lights = GetGlobal('lights')
- if lights == 980 then
- -- focus
- local focusL = CreateSprite("lights/focusL")
- local focusR = CreateSprite("lights/focusR")
- focusL.x = 30
- focusL.y = 460
- focusL.xscale = 1.36
- focusL.yscale = 1.36
- focusR.x = 610
- focusR.y = 460
- focusR.xscale = 1.36
- focusR.yscale = 1.36
- focusL.alpha = 0
- focusR.alpha = 0
- table.insert(fAlpha,focusL)
- table.insert(fAlpha,focusR)
- end
- if lights == 1170 then
- -- lights
- local lightL = CreateSprite("lights/lightL","Bottom")
- local lightR = CreateSprite("lights/lightR","Bottom")
- lightL.x = 256
- lightL.y = 344
- lightL.xscale = 1.7
- lightL.yscale = 2.5
- lightR.x = 388
- lightR.y = 342
- lightR.xscale = 1.7
- lightR.yscale = 2.7
- end
- if lights <= 1169 then
- possible_attacks = {"none"}
- end
- if lights >= 1170 then
- possible_attacks = {"masrapido"}
- end
- for i=1, #fAlpha do
- local focusL = fAlpha[i]
- local focusR = fAlpha[i]
- if lights >= 780 then
- fAlpha[i].alpha = fAlpha[i].alpha + 0.1
- end
- end
- 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.
- 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()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- BattleDialog({"Selected item " .. ItemID .. "."})
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement