Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- attacknum = 0
- textnum = 0
- music = "MegalovaniaRe"
- encountertext = "Stop C H A R A"
- wavetimer = 4
- arenasize = {155, 130}
- SetGlobal("hurtTime",-10)
- CanAttack = 1
- kill = 1
- SetGlobal('damage', 15)
- can = 1
- Skin = 15
- Button = 0
- Lol =1
- SetPPCollision(true)
- transformationTimer = 0
- Def = 1
- TheAudio = 0
- ending = 0
- function EnteringState(newstate, oldstate)
- if newstate == "ENEMYDIALOGUE" then
- elseif newstate!= "ENEMYDIALOGUE" and oldstate == "ENEMYDIALOGUE" then
- if Def == 2 then
- State("ACTIONSELECT")
- Def = 3
- end
- elseif newstate!= "DEFENDING" and oldstate == "DEFENDING" then
- if Def == 1 then
- Def = 2
- State("ENEMYDIALOGUE")
- end
- if ending == 1 then
- attacknum = 13
- State("Defending")
- ending = 0
- end
- elseif newstate != "ATTACKING" and oldstate == "ENEMYSELECT" then
- end
- end
- function DefenseEnding()
- if Def == 1 then
- State("ENEMYDIALOGUE")
- enemies[1].SetVar('currentdialogue',("You Have Stood\n In My Way Long\n Enough!"))
- end
- end
- NewAudio.CreateChannel("1")
- NewAudio.PlaySound( "1","Bird",true,0.65)
- enemies = {
- "End Sans"
- }
- fliktimer = 0
- flik = false
- enemypositions = {
- {0, 0}
- }
- thetimer = 0
- spawntimer = 0
- lol = 1
- Can = 1
- right = 0
- Animate = false
- atking = 0
- atkingx = 0
- function Update()
- if PlayerHP == 1 then
- Player.hp = 1
- end
- if atking == 1 then
- if atkingx == 0 then
- atkingx = 1
- State("ACTIONSELECT")
- end
- end
- if Animate == true then
- AnimateSans()
- AnimateSans()
- AnimateSans()
- AnimateSans()
- AnimateSans()
- AnimateSans()
- end
- if Animate2 == true then
- AnimateSans2()
- end
- if TheAudio == 1 then
- TheAudio = 0
- Audio.Play()
- end
- if flik == true then
- fliktimer = fliktimer + 1
- if fliktimer == 10 then
- Audio.PlaySound("flicker")
- fliktimer = 0
- end
- end
- if (GetGlobal("transforming") == true) then
- thetimer = thetimer + 1
- if lol == 1 then
- lol =2
- whitebullet = CreateProjectileAbs("screenfade/white",320,240)
- whitebullet.sprite.alpha = 1
- whitebullet.SetVar('tile', 1)
- Audio.PlaySound("flicker")
- transformationTimer = Time.time
- Audio.StopAll()
- Audio.PlaySound("flicker")
- end
- if thetimer == 30 then
- Audio.PlaySound("flicker")
- whitebullet.Remove()
- Can=2
- end
- end
- if Hi == 1 then
- spawntimer = spawntimer + 1
- end
- if Lol == 1 then
- SetButtonLayer("Top")
- else
- SetButtonLayer("BelowArena")
- end
- end
- possible_attacks = {"Husky/blue_H","Husky/at2"}
- spawntimer7 = 0
- function EncounterStarting()
- require "Animations/Sans"
- State("ENEMYDIALOGUE")
- Player.name = "Frisk"
- Player.lv = 1
- SetGlobal("hurtTime",false)
- Inventory.AddCustomItems({"Thin Air"}, {0})
- Inventory.SetInventory({"Thin Air"})
- end
- function Husky1()
- end
- function EnemyDialogueStarting()
- local intro = GetGlobal("intro")
- if intro == true then
- enemies[1].SetVar('currentdialogue',("You Have Stood\n In My Way Long\n Enough!"))
- SetGlobal("intro",false)
- end
- textnum = textnum + 1
- attacknum = attacknum + 1
- if can == 1 then
- if textnum == 1 then
- enemies[1].SetVar('currentdialogue', {
- "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]so you \nfinaly made\nit",
- "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]the end of\nyour journey\nis at hand",
- "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]in a few\nmoments,\nyou will meet\nthe king",
- "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]together...",
- "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]you will determine \nthe future \nof this world",
- "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]that's then",
- "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]now",
- "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]you will be\njudged",
- "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]you will be\njudged for\nyour every\naction",
- "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]you will be\njudged for\nevery EXP\nyou've earned",
- "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]...",
- "[func:SetSprite,AAASans/Normal/SansWink][effect:twitch][font:sans][voice:sans]but you\nyou never gained\nany LOVE",
- "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]'course, that...",
- "[func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][font:sans][voice:sans]what",
- "[noskip][func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][font:sans][voice:sans][func:tut][w:5]aaaaah[w:50][next]",
- "[func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][voice:sans][func:tutend]Heh",
- "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]You thought\nthat you\ncould ignore\nme",
- "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]No one can\nignore me",
- "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]And now\nI have sans's\nbody and\nsoul",
- "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]It's not human\nbut I am strong \nmyself and\nwill channel his\npower",
- "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]Now you",
- "[func:StartTransformation][func:SetSprite,AAASans/Emote/Sockets][func:Button1][voice:None][noskip][effect:twitch][w:20]should be\nburning\nin hell",
- })
- Audio.Pause()
- elseif textnum == 2 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Emote/Wink2][voice:sans]Yes",
- "[noskip][func:SetSprite,AAASans/Emote/Wink3][voice:sans]This will\ndo fine[w:10][func:TheAudio][next]"})
- elseif textnum == 3 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You are\nweak",
- "[voice:sans]But I know sans\nwill fix that",
- "[voice:sans]He will\nincrease your\nLOVE",
- "[func:SetSprite,AAASans/Na][voice:sans]So I must\nstop you\nbefore you reach\nmaximum power"})
- elseif textnum == 4 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You wished to\ngain the\nending",
- "[func:SetSprite,AAASans/Na][voice:sans]That involves\nthe most\nlove",})
- elseif textnum == 5 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]To do that\nyou had to\nsacrifice LOVE"})
- elseif textnum == 6 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Yet i\nknow for\nthe sake of\n all",
- "[func:SetSprite,AAASans/Na][voice:sans]You will\nnever QUIT",
- "[func:SetSprite,AAASans/Na][voice:sans]But maby\nI can crush\nyour \nDETERMINATION"})
- elseif textnum == 7 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You're still\nalive","[func:SetSprite,AAASans/Na][voice:sans]Not\nfor long"})
- elseif textnum == 8 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Look\nyou killed\nno one",
- "[func:SetSprite,AAASans/Na][voice:sans]This power\nwas just\nignored"})
- elseif textnum == 9 then
- enemies[1].SetVar('currentdialogue',{"[voice:sans]And you\ncan not\neven hit","[voice:sans]a stationary\nskeleton"})
- elseif textnum == 10 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Is that\nyour idea\nof love","[func:SetSprite,AAASans/Na][voice:sans]Ha"})
- elseif textnum == 11 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]No","[func:SetSprite,AAASans/Na][voice:sans]But You're getting\nTo strong","[func:SetSprite,AAASans/Na][voice:sans]I must\ndestroy you","[func:SetSprite,AAASans/Na][voice:sans]Suvive 2 more attacks\nand I'll use\nmy special\nattack","Tip for this Move: \nUse Space"}) --Pre Special Attack
- elseif textnum == 12 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]No No","[func:SetSprite,AAASans/Na][voice:sans]You Can not\nbe doing this","[func:SetSprite,AAASans/Na][voice:sans]Ah!","[func:SetSprite,AAASans/Normal/SansHap][voice:sans]human","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]you must\nkill me","[func:SetSprite,AAASans/Na][voice:sans]Yes yes\nkill you're\nlittle freind.","[func:SetSprite,AAASans/Na][voice:sans]I Dare you"})
- elseif textnum == 13 then
- enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/NA][voice:sans]Ha","[func:SetSprite,AAASans/Na][voice:sans]You're to\nweak","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]no","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]this human\nis many things","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]but weak\nis most\ndefinatly\nnot one\nof them","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]and neither\nam I","[func:SetSprite,AAASans/Na][voice:sans]AH","[func:ending][func:attack]"})
- end
- end
- end
- function EnemyDialogueEnding()
- if CanAttack == 1 then
- if attacknum == 1 then
- nextwaves = {"Sans/S1"}
- Player.lv = 1
- elseif attacknum == 2 then
- nextwaves = {""}
- elseif attacknum == 3 then
- nextwaves = {"Sans/S2"}
- Player.lv = 2
- elseif attacknum == 4 then
- nextwaves = {"Sans/S3"}
- Player.lv = 4
- elseif attacknum == 5 then
- nextwaves = {"Sans/S4"}
- Player.lv = 6
- elseif attacknum == 6 then
- nextwaves = {"Sans/S5"}
- Player.lv = 8
- elseif attacknum == 7 then
- nextwaves = {"Sans/S6"}
- elseif attacknum == 8 then
- nextwaves = {"Sans/S7"}
- Player.lv = 10
- elseif attacknum == 9 then
- nextwaves = {"Sans/S8"}
- Player.lv = 12
- elseif attacknum == 10 then
- nextwaves = {"Sans/S10"}
- elseif attacknum == 11 then
- nextwaves = {"Sans/S12"} --Pre Special Attack
- elseif attacknum == 12 then
- nextwaves = {"Sans/S11"}
- elseif attacknum == 13 then
- nextwaves = {"As/Ha"} --Final
- elseif attacknum == 14 then
- nextwaves = {"Sans/10"}
- elseif attacknum == 15 then
- nextwaves = {"As/15"}
- elseif attacknum == 16 then
- nextwaves = {"As/16"}
- elseif attacknum == 17 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 18 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 19 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 20 then
- nextwaves = {"Husky/Blank"}
- elseif attacknum == 21 then
- nextwaves = {"As/Ha"}
- attacknum = 0
- end
- end
- if CanAttack == 0 then
- nextwaves = {"Husky/Blank"}
- end
- end
- function DefenseEnding()
- encountertext = RandomEncounterText()
- end
- function HandleSpare()
- State("ENEMYDIALOGUE")
- end
- function HandleItem(ItemID)
- if ItemID == "THIN AIR" then
- Player.Heal(0)
- BattleDialog({"You ate the Thin air\nIt was tasty\nYou gained 0 Hp"})
- end
- end
- function OnHit(bullet)
- if(bullet.GetVar('tile')) == 0 then
- Player.Hurt(1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement