diff --git a/README.md b/README.md index 27bcf40..3f60ad4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Consistency -The intention of this mod is to adjust Noita's difficulty tuning. This is accomplished by scaling down enemy HP, scaling up environmental damage, and making gold permanent while reducing its value. +The intention of this mod is to adjust Noita's difficulty tuning. This is accomplished by scaling down enemy HP, scaling up environmental damage, making gold permanent, and allowing editing of wands everywhere. The game should still be quite difficult but most enemies will be much more manageable now especially in early stages. diff --git a/init.lua b/init.lua index c5dbf2f..dc27b75 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,24 @@ ModLuaFileAppend("data/scripts/perks/perk_list.lua", "mods/consistency/files/perkpoolremove.lua") +dofile("data/scripts/perks/perk.lua") + +local perks = {"EDIT_WANDS_EVERYWHERE"} + +function OnPlayerSpawned(player_entity) + local init_check_flag = "always_edit_wands_init_done" + if GameHasFlagRun(init_check_flag) then return end + GameAddFlagRun(init_check_flag) + + for i, perk_name in ipairs(perks) do + local perk_entity = perk_spawn(0, 0, perk_name) + if perk_entity ~= nil then + perk_pickup(perk_entity, player_entity, EntityGetName(perk_entity), + false, false) + end + end +end + -- all functions below are optional and can be left out --[[