From 01065de8a6323f9edd12205e3134a660205ebafd Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 29 Nov 2018 20:03:29 +0100 Subject: [PATCH] HeCanBeEverywhere: SPIN IT FASTEEER Also fixed a bug that caused the "Jevil was defeated" flag getting set by overworld Jevils, blocking you out of the triple Jevil cell --- .../SampleScripts/HeCanBeEverywhere.csx | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/UndertaleModTool/SampleScripts/HeCanBeEverywhere.csx b/UndertaleModTool/SampleScripts/HeCanBeEverywhere.csx index 2a6c65cd5..417286e01 100644 --- a/UndertaleModTool/SampleScripts/HeCanBeEverywhere.csx +++ b/UndertaleModTool/SampleScripts/HeCanBeEverywhere.csx @@ -1,6 +1,6 @@ EnsureDataLoaded(); -ScriptMessage("HeCanBeEverywhere mod by krzys_h\nVersion 1"); +ScriptMessage("HeCanBeEverywhere mod by krzys_h\nVersion 2"); // spr_joker_main has an offset, so we need to make our own one var spr_joker_main = Data.Sprites.ByName("spr_joker_main"); @@ -873,6 +873,36 @@ pushi.e 241 pop.v.i [array]flag ", Data)); +Data.GameObjects.ByName("obj_jokerbg_triangle_real").EventHandlerFor(EventType.Draw, EventSubtypeDraw.Draw, Data.Strings, Data.Code, Data.CodeLocals).Append(Assembler.Assemble(@" +pushvar.v self.room +pushi.e room_cc_joker +cmp.i.v EQ +bf func_end + +pushi.e obj_joker +conv.i.v +call.i instance_number(argc=1) +conv.v.i +dup.i 0 + +pushi.e 0 +cmp.i.i NEQ +pop.v.i self.on + +dup.i 0 +mul.i.i +pop.v.i self.rotspeed +", Data)); + +var obj_joker_Draw = obj_joker.EventHandlerFor(EventType.Draw, EventSubtypeDraw.Draw, Data.Strings, Data.Code, Data.CodeLocals); +var obj_joker_Draw_code = obj_joker_Draw.Disassemble(Data.Variables, Data.CodeLocals.For(obj_joker_Draw)); +// I'm getting lazy, huh +obj_joker_Draw_code = obj_joker_Draw_code.Replace("00154: pushi.e 6", ""); +obj_joker_Draw_code = obj_joker_Draw_code.Replace("00155: pushi.e -5", ""); +obj_joker_Draw_code = obj_joker_Draw_code.Replace("00156: pushi.e 241", ""); +obj_joker_Draw_code = obj_joker_Draw_code.Replace("00157: pop.v.i [array]flag", ""); +obj_joker_Draw.Replace(Assembler.Assemble(obj_joker_Draw_code, Data)); + ChangeSelection(spr_joker_enemy); ScriptMessage("* I'M FREE!"); \ No newline at end of file