-------------------------------------------------
--            Type Init Function
-------------------------------------------------

function p.type_init(id)
    game_ment_type_init.monster(id)
    ia_ment_set_builtin_var_f(id, "__respawn_length", 60*60)
    ia_ment_set_builtin_var_f(id, "__radius", 1.0)
    ia_ment_set_builtin_var_s(id, "__mesh", "MonsterGoblin")
    ia_ment_new_var_i(id, "health", 32, 60.0 * 60.0)
    ia_ment_new_static_var_f(id, "dps", 1.0)
    ia_ment_new_static_var_s(id, "sound_hurt", "hurt_goblin")
    ia_ment_new_static_var_f(id, "sound_hurt_period", 0.5)
    ia_ment_new_static_var_s(id, "sound_death", "die_goblin")
    ia_ment_new_static_var_s(id, "identity_str", "Goblin")
    ia_ment_new_static_var_b(id, "shoots", true)
    ia_ment_new_static_var_f(id, "shoot_period", 5.0)
    ia_ment_new_static_var_s(id, "shoot_proj_type", "ment_monster_goblin_proj")
    ia_ment_new_static_var_f(id, "shoot_proj_speed", 40.0)
    ia_ment_new_static_var_f(id, "shoot_proj_ttl", 2.5)
    ia_ment_new_static_var_i(id, "shoot_proj_damage", 5)
    --more!!!
end

-------------------------------------------------
--              Inst Functions
-------------------------------------------------

function p.on_add_to_live_world(inst_id)
    game_ment_add_to_live.monster(inst_id)
end

function p.on_add_to_live_world(inst_id)
    game_ment_add_to_live.monster(inst_id)
    -- ga_print("here in goblin on_add_to_live_world function!")
    -- level = ga_ment_get_i(inst_id, "__level")
    -- ga_print("level = " .. level)
    -- alarm_time = 20.0
    -- ga_ment_set_alarm_on_level(inst_id, level, alarm_time, "test_level")
    -- ga_exit()
end

function p.on_alarm(inst_id, alarm_name)
    game_ment_alarms.monster(inst_id, alarm_name)
    -- ga_print("here inside monster_goblin.on_alarm")
    -- ga_print("alarm name = " .. alarm_name)
    -- ga_exit()
end

function p.on_die(inst_id)
    game_ment_die.main(inst_id)
end
