diff --git a/textures/mobs_mc_vex.png b/textures/mobs_mc_vex.png new file mode 100644 index 0000000..392cfce Binary files /dev/null and b/textures/mobs_mc_vex.png differ diff --git a/textures/mobs_mc_vex_charging.png b/textures/mobs_mc_vex_charging.png new file mode 100644 index 0000000..04ebce0 Binary files /dev/null and b/textures/mobs_mc_vex_charging.png differ diff --git a/textures/vex.png b/textures/vex.png deleted file mode 100644 index 86d62b4..0000000 Binary files a/textures/vex.png and /dev/null differ diff --git a/vex.lua b/vex.lua index 65f2a94..8435aca 100644 --- a/vex.lua +++ b/vex.lua @@ -43,9 +43,22 @@ mobs:register_mob("mobs_mc:vex", { walk_start = 0, walk_end = 40, run_start = 0, run_end = 40, }, - -- Take constant damage if the vex' life clock ran out - -- (only for vexes summoned by evokers) do_custom = function(self, dtime) + -- Glow red while attacking + if self.state == "attack" then + if self.base_texture[1] ~= "mobs_mc_vex_charging.png" then + self.base_texture = {"mobs_mc_vex_charging.png"} + self.object:set_properties({textures=self.base_texture}) + end + else + if self.base_texture[1] ~= "mobs_mc_vex.png" then + self.base_texture = {"mobs_mc_vex.png"} + self.object:set_properties({textures=self.base_texture}) + end + end + + -- Take constant damage if the vex' life clock ran out + -- (only for vexes summoned by evokers) if self._summoned then if not self._lifetimer then self._lifetimer = 33