-- File: codersea/codersea-octopus.lua -- Purpose: CoderSea octopus mob support module -- Credits: See "codersea.md" -- Licenses: See "LICENSE" -- Revision: 190115 local l_spawn_in = { "codersea:water_source" , "codersea:water_flowing" , "default:water_source" , "default:water_flowing" , "default:water_gel" , } local l_spawn_near = { "darkage:silt" , "default:sand" , "default:dirt" , "ethereal:dry_dirt" , "ethereal:green_dirt" , "ethereal:grove_dirt" , "ethereal:mushroom_dirt" , "group:sand" , "group:soil" , } local spawnchance = codersea_chance_octopus if spawnchance < 300 then spawnchance = 300 end local mobtype = "animal" if codersea_monster_octopus then mobtype = "monster" end codersea:register_mob ("codersea:octopus", { do_custom = mob_custom, type = mobtype, hp_max = 32, hp_min = 25, collisionbox = {-0.9, -0.5, -0.9, 0.9, 0.92, 0.9}, visual = "mesh", mesh = "codersea_octopus.x", textures = {{"codersea_octopus.png"}}, visual_size = {x=4, y=4}, view_range = 25, fly = true, fly_in = fly_water, fall_speed = -20, walk_velocity = 1.5, run_velocity = 3, damage = 5, reach = 2, rotate = 270, jump = false, jump_chance = 0, jump_height = 0, sounds = { random = "codersea_octopus", }, armor = 70, drawtype = "front", water_damage = 0, lava_damage = 10, light_damage = 0, group_attack=true, attack_animals=true, knock_back=2, on_rightclick = nil, attack_type = "dogfight", animation = { speed_normal = 25, speed_run = 35, stand_start = 1, stand_end = 50, walk_start = 60, walk_end = 100, run_start = 60, run_end = 100, punch_start = 120, punch_end = 160, } }) codersea:spawn_specific ("codersea:octopus", l_spawn_in, l_spawn_near, -1, 20, 30, spawnchance, codersea_aoc_octopus, -31000, -1)