diff --git a/docs/testing_wands.md b/docs/testing_wands.md index 84ff0859..34ed93fb 100644 --- a/docs/testing_wands.md +++ b/docs/testing_wands.md @@ -17,3 +17,16 @@ | spell2 = Black Hole | spell3 = Black Hole }} + + +{{Wand Card +| wandPic = Wand handgun.png +| castDelay = -10.0 +| rechargeTime = -10.0 +| manaMax = 30000.00 +| manaCharge = 30000.00 +| capacity = 10 +| spread = -30 +| speed = 1.00 +| spell1 = Spark bolt +}} diff --git a/quant.ew/files/src/system/patch_dragon_boss/dragon_boss_extra.xml b/quant.ew/files/src/system/patch_dragon_boss/dragon_boss_extra.xml new file mode 100644 index 00000000..8538b35f --- /dev/null +++ b/quant.ew/files/src/system/patch_dragon_boss/dragon_boss_extra.xml @@ -0,0 +1,299 @@ + + + <_Transform + position.x="0" + position.y="0" + rotation="0" + scale.x="1" + scale.y="1" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quant.ew/files/src/system/patch_dragon_boss/dragonspot_script.lua b/quant.ew/files/src/system/patch_dragon_boss/dragonspot_script.lua new file mode 100644 index 00000000..15e9be03 --- /dev/null +++ b/quant.ew/files/src/system/patch_dragon_boss/dragonspot_script.lua @@ -0,0 +1,14 @@ +dofile_once("data/scripts/lib/utilities.lua") + +function collision_trigger() + if not GameHasFlagRun("ew_flag_this_is_host") then + return + end + + local entity_id = GetUpdatedEntityID() + local pos_x, pos_y = EntityGetTransform( entity_id ) + local eid = EntityLoad( "mods/quant.ew/files/src/system/patch_dragon_boss/dragon_boss_extra.xml", pos_x, pos_y ) + EntityLoad( "data/entities/particles/image_emitters/magical_symbol_fast.xml", pos_x, pos_y ) + + EntityKill( entity_id ) +end \ No newline at end of file diff --git a/quant.ew/files/src/system/patch_dragon_boss/patch_dragon_boss.lua b/quant.ew/files/src/system/patch_dragon_boss/patch_dragon_boss.lua new file mode 100644 index 00000000..d2f6ae7e --- /dev/null +++ b/quant.ew/files/src/system/patch_dragon_boss/patch_dragon_boss.lua @@ -0,0 +1,8 @@ +local util = dofile_once("mods/quant.ew/files/src/util.lua") + +ModLuaFileAppend("data/scripts/buildings/dragonspot.lua", "mods/quant.ew/files/src/system/patch_dragon_boss/dragonspot_script.lua") +util.replace_text_in("data/entities/buildings/dragonspot.xml", "player_unit", "ew_peer") + +local module = {} + +return module \ No newline at end of file diff --git a/quant.ew/init.lua b/quant.ew/init.lua index e4b00f08..388d86d2 100755 --- a/quant.ew/init.lua +++ b/quant.ew/init.lua @@ -62,8 +62,11 @@ local function load_modules() ctx.dofile_and_add_hooks("mods/quant.ew/files/src/system/ending/ending.lua") ctx.load_system("spell_patches") ctx.load_system("enemy_scaling") + ctx.load_system("kivi_patch") ctx.load_system("patch_meat_biome") + ctx.load_system("patch_dragon_boss") + ctx.load_system("player_arrows") end @@ -133,7 +136,11 @@ function OnPausedChanged(paused, is_wand_pickup) end function OnWorldInitialized() -- This is called once the game world is initialized. Doesn't ensure any world chunks actually exist. Use OnPlayerSpawned to ensure the chunks around player have been loaded or created. - --GamePrint( "OnWorldInitialized() " .. tostring(GameGetFrameNum()) ) + if ctx.is_host then + GameAddFlagRun("ew_flag_this_is_host") + else + GameRemoveFlagRun("ew_flag_this_is_host") + end end @@ -306,6 +313,7 @@ function OnModPreInit() register_localizations("mods/quant.ew/translations.csv", 1) ctx.init() net.init() + load_modules() end