Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- nextwaves = {"bullettest_chaserorb"}
- wavetimer = 6.0
- arenasize = {155, 130}
- canflee = false
- enemies = {
- "Him"
- }
- 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 = {"bullettest_bouncy", "bullettest_chaserorb", "bullettest_touhou"}
- function EncounterStarting()
- require "Animations/him_animation"
- State("ENEMYDIALOGUE")
- Player.name = "Snes"
- Player.lv = 19
- Player.hp = 92
- Inventory.AddCustomItems({"Ramen","Sushi",},{0,0})
- Inventory.SetInventory({"Ramen","Sushi"})
- -- 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', {"[font:sans]Here we\ngo."})
- SetGlobal("intro", false)
- end
- -- Good location for setting monster dialogue depending on how the battle is going.
- end
- function Update()
- AnimateHim()
- 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()
- BattleDialogue("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