Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- number_of_hits = 0
- music = "Theme" --Either OGG or WAV. Extension is added automatically. Uncomment (remove the two dashes) for custom music.
- encountertext = "Your flesh begins to crawl." --Modify as necessary. It will only be read out in the action select screen.
- wavetimer = 8.0
- arenasize = {155, 130}
- canflee = false
- enemies = {
- "Placeholder"
- }
- enemypositions = {
- {0, 0}
- }
- SetGlobal("intro", true)
- -- A custom list with attacks to choose from. Actual selection happens in EnemyDialogueEnding(). Put here in case you want to use it.
- possible_attacks = {""}
- function EncounterStarting()
- require "Animations/placeholder_animation"
- State("ENEMYDIALOGUE")
- Player.name = "Placeholder"
- Player.lv = 19
- Player.hp = 92
- Inventory.AddCustomItems({"Ramen","Sushi"},{0,0})
- Inventory.SetInventory({"Ramen","Sushi"})
- Audio.Pause()
- -- If you want to change the game state immediately, this is the place.
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- enemies[1].SetVar('currentdialogue', {"[effect:none]Let me tell you\nsomething about\nmyself.","[effect:none]I try my best\nto be nice to\neveryone I meet.", "[effect:none][func:SetSide]But when people like you\ncome around...", "[effect:none [func:SetAnnoyed]...Whatever.", "[func:SetNeutral][effect:none]Here we go."})
- SetGlobal("intro", false)
- end
- -- Good location for setting monster dialogue depending on how the battle is going.
- end
- function Update()
- AnimatePlaceholder()
- ChangePlaceholder()
- end
- function EnemyDialogueEnding()
- -- Good location to fill the 'nextwaves' table with the attacks you want to have simultaneously.
- number_of_hits = number_of_hits + 1
- if number_of_hits == 1 then
- nextwaves = {"blue_soul"}
- elseif number_of_hits == 2 then
- nextwaves = {"bullet_hell"}
- elseif number_of_hits == 3 then
- nextwaves = {"gravity_spikes"}
- end
- end
- function DefenseEnding() --This built-in function fires after the defense round ends. --This built-in function gets a random encounter text from a random enemy.
- Audio.Unpause()
- encountertext = RandomEncounterText()
- end
- function HandleSpare()
- BattleDialog("It's too late for that now.")
- end
- function HandleItem(ItemID)
- if (ItemID == "RAMEN") then
- if Player.hp >= 62 then
- Player.Heal(30)
- BattleDialog({"You ate the Ramen. Your HP\rwas maxed out!"})
- elseif Player.hp <= 61 then
- Player.Heal(30)
- BattleDialog({"You ate the Ramen.\rYou recovered 30 HP!"})
- end
- end
- if (ItemID == "SUSHI") then
- if Player.hp <= 81 then
- Player.Heal(10)
- BattleDialog({"You ate the Sushi.\rYou recovered 10 HP!"})
- elseif Player.hp >= 82 then
- Player.Heal(10)
- BattleDialog({"You ate the Sushi. Your HP\rwas maxed out!"})
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement