diff --git a/quant.ew/data/entities/items/pickup/potion_mimic.xml b/quant.ew/data/entities/items/pickup/potion_mimic.xml new file mode 100644 index 00000000..015a36c8 --- /dev/null +++ b/quant.ew/data/entities/items/pickup/potion_mimic.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quant.ew/data/scripts/items/potion_mimic.lua b/quant.ew/data/scripts/items/potion_mimic.lua new file mode 100644 index 00000000..8bbe772c --- /dev/null +++ b/quant.ew/data/scripts/items/potion_mimic.lua @@ -0,0 +1,27 @@ +dofile_once("data/scripts/lib/utilities.lua") + +function spawn_leggy( entity_item ) + if not GameHasFlagRun("ew_flag_this_is_host") then + return + end + local x, y = EntityGetTransform( entity_item ) + EntityLoad( "data/entities/particles/polymorph_explosion.xml", x, y ) + GamePlaySound( "data/audio/Desktop/misc.bank", "game_effect/polymorph/create", x, y ); + EntityLoad( "data/entities/animals/mimic_potion.xml", x, y ) + EntityKill( entity_item ) +end + +function item_pickup( entity_item, entity_who_picked, name ) + spawn_leggy( entity_item ) + +end + +function physics_body_modified( is_destroyed ) + local entity_item = GetUpdatedEntityID() + spawn_leggy( entity_item ) +end + +function collision_trigger( colliding_entity_id ) + local entity_item = GetUpdatedEntityID() + spawn_leggy( entity_item ) +end \ No newline at end of file diff --git a/quant.ew/files/core/perk_fns.lua b/quant.ew/files/core/perk_fns.lua index 3e2fa723..d04d7bb9 100644 --- a/quant.ew/files/core/perk_fns.lua +++ b/quant.ew/files/core/perk_fns.lua @@ -18,6 +18,7 @@ local perks_to_ignore = { FASTER_WANDS = true, EXTRA_MANA = true, TELEKINESIS = true, + HEARTS_MORE_EXTRA_HP = true, } local global_perks = { diff --git a/quant.ew/files/system/local_health/local_health.lua b/quant.ew/files/system/local_health/local_health.lua index 161bad01..f4a972a3 100644 --- a/quant.ew/files/system/local_health/local_health.lua +++ b/quant.ew/files/system/local_health/local_health.lua @@ -165,6 +165,8 @@ local function allow_notplayer_perk(perk_id) ESSENCE_WATER = true, LUKKI_MINION = true, CONTACT_DAMAGE = true, + HEARTS_MORE_EXTRA_HP = true, + REVENGE_RATS = true, FOOD_CLOCK = true, -- TODO, should carry over satiation buff } return not ignored_perks[perk_id] @@ -250,6 +252,18 @@ local function player_died() ComponentSetValue2(inv, "mItemHolstered", false) ComponentSetValue2(inv, "mActualActiveItem", 0) ComponentSetValue2(inv, "mActiveItem", 0) + local quick + for _, child in ipairs(EntityGetAllChildren(ctx.my_player.entity) or {}) do + if EntityGetName(child) == "inventory_quick" then + quick = child + break + end + end + for _, child in ipairs(EntityGetAllChildren(quick) or {}) do + EntitySetComponentsWithTagEnabled(child, "enabled_in_hand", false) + EntitySetComponentsWithTagEnabled(child, "enabled_in_world", false) + EntitySetComponentsWithTagEnabled(child, "enabled_in_inventory", true) + end end polymorph.switch_entity(ent + 1) diff --git a/quant.ew/files/system/notplayer_ai/notplayer_ai.lua b/quant.ew/files/system/notplayer_ai/notplayer_ai.lua index 7b5d0187..dcac3f0f 100644 --- a/quant.ew/files/system/notplayer_ai/notplayer_ai.lua +++ b/quant.ew/files/system/notplayer_ai/notplayer_ai.lua @@ -60,7 +60,7 @@ local water_mats = {"water", "swamp", "water_swamp", "water_salt", "blood", "mud local ignore_spell = {"ANTIHEAL", "BLACK_HOLE", "BLACK_HOLE_DEATH_TRIGGER", "POWERDIGGER", "DIGGER", "PIPE_BOMB", "PIPE_BOMB_DEATH_TRIGGER", "GRENADE_LARGE", "CRUMBLING_EARTH", "HEAL_BULLET", "FISH", "TELEPORT_PROJECTILE_CLOSER", "TELEPORT_PROJECTILE_STATIC", "SWAPPER_PROJECTILE", "TELEPORT_PROJECTILE", "TELEPORT_PROJECTILE_SHORT", "WHITE_HOLE", "CESSATION", "ADD_TRIGGER", "ADD_TIMER", "ADD_DEATH_TRIGGER", "DIVIDE_2", "DIVIDE_3", "DIVIDE_4", "DIVIDE_10", "GAMMA", "MU", "ALPHA", "OMEGA", "PHI", "SIGMA", "TAU", "SUMMON_PORTAL", "DUPLICATE", - "IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG"} + "IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG", "SUMMON_HOLLOW_EGG", "PEBBLE"} local function get_potions_of_type(type) local potions = {}