;=========================================================================================
; TUSHKANO
;=========================================================================================
[m_tushkano_e]:monster_base
GroupControlSection		= spawn_group
SpaceRestrictionSection	= space_restrictor,zone_mosquito_bald
$spawn					= "monsters\old\tushkano"	; option for Level Editor
$npc					= on						; option for Level Editor
$prefetch				= 16

class					= SM_TUSHK	;AI_TUSH	; AI class

visual					= monsters\tushkano\tushkano
corpse_visual			= monsters\tushkano\tushkano_dead
icon					= ui_npc_monster_tushkano

species					= tushkano

script_binding			= bind_monster.bind

ef_creature_type		= 2		; option for evaluation functions
ef_weapon_type			= 2
ef_detector_type		= 1
panic_threshold			= 0.3

bone_torso				= bip01_spine
bone_head				= bip01_head
bone_fire				= bip01_spine
bone_drag				= bip01_tail3

max_ignore_distance		= 21
parts_cut_count			= 80

;------------------------------------------------------------------------
; Offline Alife
;------------------------------------------------------------------------
Scheduled					= on			; option for ALife Simulator
Human						= off			; option for ALife Simulator
Health						= 100			; option for ALife Simulator
MinSpeed					= 1.0			; option for ALife Simulator
MaxSpeed					= 3.0			; option for ALife Simulator
going_speed					= 1.5			; option for ALife Simulator
current_level_going_speed	= 1.0			; option for ALife Simulator
MaxHealthValue				= 100			; range [0..200]
;------------------------------------------------------------------------
; Influences
;------------------------------------------------------------------------
psy_max_distance			= 0
psy_max_power				= -0.07

;radiation_max_distance		= 0
;radiation_max_power		= -0.05
;---------------------------------------------------------------------
; Physics
;---------------------------------------------------------------------
ph_box0_center			= 0.0,  0.25,  0.0
ph_box0_size			= 0.32, 0.25,  0.32
ph_box1_center			= 0.0,  0.25,  0.0
ph_box1_size			= 0.32, 0.25,  0.32
ph_crash_speed_min		= 7
ph_crash_speed_max		= 20
ph_collision_damage_factor	= 0.2
ph_mass					= 15

destroyed_vis_name		= ;		physics\dead_body\skelet_crash_monster
;---------------------------------------------------------------------
ph_skeleton_hinger_start		= 3.0	;Стартовое значение трения в суставе
ph_skeleton_hinger_end			= 2.0	;Финальное значение трения в суставе
ph_skeleton_ddelay				= 4.0	;Время изменения значения трения в суставе с момента создания шелла, сек

ph_skeleton_skin_friction_start	= 0.2	;Стартовое значение трения для оболочки
ph_skeleton_skin_friction_end	= 0.6	;Финальное значение трения для оболочки
ph_skeleton_skin_ddelay			= 1.5	;Время изменения значения трения с момента создания шелла, сек.

ph_skel_fatal_impulse_factor	= 6.0
ph_after_death_velocity_factor	= 1.1
ph_skel_shot_up_factor			= 0.5

;----------------------------------------------------------------------------
; Movement::Velocities & Acceleration
;----------------------------------------------------------------------------
; speed factors			linear | angular_real | angular_path | min | max
Velocity_Stand			= 0,		3.0,			3.0,		1,		1
Velocity_WalkFwdNormal	= 1.0,		3.0,			3.0,		0.1,	1.8
Velocity_RunFwdNormal	= 5.0,		3.5,			3.5,		0.3,	1
Velocity_WalkFwdDamaged	= 0.7,		3.0,			3.0,		0.2,	1.5
Velocity_RunFwdDamaged	= 1.2,		3.0,			3.0,		0.5,	1
Velocity_Drag			= 1.0,		3.0,			3.0,		1,		1
Velocity_Steal			= 1.6,		4.8,			3.0,		0.5,	1.5
Velocity_JumpGround		= 3.0,		0.2,			0.2,		1,		1
;Velocity_RunAttack		= 5.0,		0.01,			0.01,		0.2,	1

; acceleration
Accel_Calm			= 2.5
Accel_Aggressive	= 7.5

;---------------------------------------------------------------------
; Squad seperation behaviour (расталкивание)
;---------------------------------------------------------------------
separate_factor		= 0.5	; сила расталкивания
separate_range		= 2.7	; радиус в котором расталкивание действует

;--------------------------------------------------------------------------
; Attack parameters
;--------------------------------------------------------------------------
;attack_effector	= small_monster_attack_effector
attack_params		= m_tushkano_attack_params

MinAttackDist		= 1.0
MaxAttackDist		= 1.2	;	max  2*MinAttackDist-as_min_dist
as_min_dist			= 0.6
as_step				= 0.1

hit_type			= wound

;Melee_Rotation_Factor	= 1.0
;------------------------------------------------------------------------
; Attack On Move
;------------------------------------------------------------------------
aom_enabled					=	0.3
aom_animation_left			=	stand_run_attack_
aom_animation_right			=	stand_run_attack_
aom_far_radius				=	6
aom_max_go_close_time		=	6
aom_prepare_time			=	2
aom_attack_radius			=	0.6
aom_update_side_period		=	2
aom_prediction_factor		=	1
;----------------------------------------------------------------------------
; Jump Parameters
;----------------------------------------------------------------------------
jump_enabled				=	1
jump_delay					=	8600
jump_factor					=	0.95
jump_ground_trace_range		=	0.8
jump_hit_trace_range		=	1.6
jump_build_line_distance	=	1.5
jump_min_distance			=	1.2
jump_max_distance			=	3.5
jump_max_angle				=	0.6
jump_max_height				=	3.5
;jump_predict_prob			=	1.0
;jump_auto_aim_factor		=	1.5
;-------------------------------------------------------------------------
; Entity Conditions
;-------------------------------------------------------------------------
satiety_v				= 0.0001			;скорость уменьшения сытости со временем
radiation_v				= 0.00001			;скорость уменьшения радиации
;satiety_power_v		= 0.005				;увеличение силы при уменьшении сытости
;satiety_health_v		= 0.005				;увеличение здоровья при уменьшении сытости
radiation_health_v		= 0.01				;уменьшение здоровья при воздействии радиации
morale_v				= 0.01				;скорость восстановления морали
health_hit_part			= 1.0				;процент хита, уходящий на отнимание здоровья
power_hit_part			= 1.0				;процент хита, уходящий на отнимание силы
psy_health_v			= 0.1				;скорость восстановления psy-здоровья

immunities_sect			= tushkano_immunities
protections_sect		= tushkano_protections
hit_slowdown			= 2.2, 0.6

;открытые раны
bleeding_v				= 0.02		;потеря крови при номинальной ране в секунду
wound_incarnation_v		= 0.0005	;заживление ран в игровую секунду
min_wound_size			= 0.002

;Eat settings
eat_freq				= 1.0		; частота укусов в сек
eat_slice				= 0.01		; увеличение сытости при 1 укусе
eat_health				= 0.01		; увеличение здоровья при 1 укусе
eat_slice_weight		= 10		; уменьшение еды у трупа
satiety_threshold		= 0.5		; below this value monster fill hunger
;-------------------------------------------------------------------------
; Morale
;-------------------------------------------------------------------------
Morale_Hit_Quant				= 0.1
Morale_Attack_Success_Quant		= 0.1
Morale_Take_Heart_Speed			= 0.1
Morale_Despondent_Speed			= 0.1
Morale_Stable_Speed				= 0.05
Morale_Despondent_Threashold	= 0.5
;---------------------------------------------------------
; Sounds and sound parameters
;---------------------------------------------------------
sound_idle				= monsters\tushkano\tushkano_idle_
sound_eat				= monsters\tushkano\tushkano_eat_
sound_aggressive		= monsters\tushkano\tushkano_aggressive_
sound_attack_hit		= monsters\tushkano\tushkano_attack_
sound_take_damage		= monsters\tushkano\tushkano_pain_
sound_die				= monsters\tushkano\tushkano_death_
sound_threaten			= monsters\tushkano\tushkano_threaten_
sound_steal				= monsters\biting\def_
sound_panic				= monsters\tushkano\tushkano_panic_
;sound_growling			= monsters\biting\def_
sound_die_in_anomaly	= monsters\tushkano\tushkano_anomaly_
sound_distant_idle		= monsters\tushkano\tushkano_idle_

killer_clsids			= ZS_AMEBA,ZS_HAIRS,ZS_MBALD,ZS_MINEF,ZS_GALAN,ZS_MINCE,ZS_GRAVI,ZS_CAMPF,ZS_TORRD

idle_sound_delay		= 80000
eat_sound_delay			= 4000
attack_sound_delay		= 8000

distant_idle_sound_delay	= 80000
distant_idle_sound_range	= 100.0

SoundThreshold			= 0.06		; range [0..1]
SoundThreshold_Sleep	= 0.26
max_hear_dist			= 50
;-------------------------------------------------------------------------
; Damages
;-------------------------------------------------------------------------
DamagedThreshold	= 0.25
damage				= m_tushkano_damage

critical_wound_threshold		= -1
critical_wound_decrease_quant	= 0

;-------------------------------------------------------------------------
; Other Stuff (refactoring needed)
;-------------------------------------------------------------------------
DayTime_Begin			= 9		; начало дня для монстра
DayTime_End				= 0		; конец дня для монстра
sleep_time				= 8		; сколько часов нужно спать

distance_to_corpse		= 1.05	; дист. до трупа, при которой он переходит в состояние еды

terrain					= tushkan_terrain

material				= creatures\small	;medium

LegsCount				= 4
step_params				= m_tushkano_step_params

;-------------------------------------------------------------------------
; Vision
;-------------------------------------------------------------------------
eye_fov					= 100
eye_range				= 50
use_eye_direction		= false

vision_free_section		= tushkano_vision_free
vision_danger_section	= tushkano_vision_danger

[tushkano_vision_free]
min_view_distance   		= 0.6				; коэффициент, который множится на eye_range, в зависимости от угла
max_view_distance	 		= 1.0				; коэффициент, который множится на eye_range, в зависимости от угла
visibility_threshold	 	= 100.0				; значение, при достижении суммой которого объект считается видимым
always_visible_distance 	= 0.3
time_quant					= 0.001
decrease_value				= 0.01				; значение, на которое уменьшается вес, если объект попал в фрустум, но отсёкся по каким-то причинам
velocity_factor		     	= 0.5
luminocity_factor			= 0.5 				; фактор освещения (только для Актёра)
transparency_threshold		= 0.25

[tushkano_vision_danger]
min_view_distance   		= 0.6				; коэффициент, который множится на eye_range, в зависимости от угла
max_view_distance	 		= 1.0				; коэффициент, который множится на eye_range, в зависимости от угла
visibility_threshold	 	= 100.0				; значение, при достижении суммой которого объект считается видимым
always_visible_distance 	= 0.3
time_quant					= 0.001
decrease_value				= 0.01				; значение, на которое уменьшается вес, если объект попал в фрустум, но отсёкся по каким-то причинам
velocity_factor		     	= 0.5
luminocity_factor			= 0.5 				; фактор освещения (только для Актёра)
transparency_threshold		= 0.25

[m_tushkano_attack_params]
;---------------------------------------------------------------------------------------------------------------------------------------------
;	anim			| time[0..1] | hit_power | impulse | impulse_dir (x,y,z) | Field of hit_test (left,right, bottom, top ) | Test Dist
;---------------------------------------------------------------------------------------------------------------------------------------------
stand_attack_0		=	0.4,		0.12,		40,			0.0,-0.9, 0.1,		-1.2, 1.2, -1.6, 1.6,							1.2
stand_attack_1		=	0.35,		0.08,		20,			0.0, 0.0, 1.0,		-1.2, 1.2, -1.6, 1.6,							1.2
stand_attack_2		=	0.3,		0.09,		35,			0.0,-0.5, 0.5,		-1.2, 1.2, -1.6, 1.6,							1.2
stand_run_attack_0	=	0.5,		0.10,		50,			0.0, 0.3, 0.7,		-1.2, 1.2, -1.6, 1.6,							1.2
stand_jump_attack_0	=	0,			0.12,		50,			0.0, 0.3, 0.7,		-1.2, 1.2, -1.6, 1.6,							0,		wound_2

[m_tushkano_step_params]
;---------------------------------------------------------------------------
;	anim				| Cycles | time1 | power1 | time2 | power2 |	time3 | power3 | time4 | power4 |
;---------------------------------------------------------------------------
stand_walk_fwd_0		=	1,		0.0,	0.5,	0.0,	0.5,		0.6,	1,		0.6,	1
stand_walk_fwd_1		=	1,		0.12,	0.5,	0.62,	0.5,		0.02,	1,		0.62,	1
stand_walk_fwd_dmg_0	=	1,		0,		0,		0.0,	0.5,		0.47,	1,		0.53,	1

stand_run_0				=	1,		0.2,	0.2,	0.37,	0.2,		0.88,	1,		0.36,	1
stand_run_1				=	1,		0,		0,		0,		0,			0.88,	1,		0.36,	1
stand_ran_dmg_0			=	1,		0,		0,		0.31,	0.5,		0.08,	1,		1.0,	1

stand_run_attack_0		=	1,		0,		0,		0,		0,			0.07,	1,		0.0,	1

stand_turn_left_0		=	1,		0,		0,		0,		0,			0.98,	0.4,	0.44,	0.4
stand_turn_right_0		=	1,		0,		0,		0,		0,			0.44,	0.4,	0.98,	0.4

stand_jump_turn_left_0	=	1,		0,		0,		0,		0,			0.64,	0.7,	0.64,	0.7
stand_jump_turn_right_0	=	1,		0,		0,		0,		0,			0.64,	0.7,	0.65,	0.7

sleep_stand_up_0		=	1,		0,		0,		0,		0,			0.74,	1,		0.74,	1


;===========================================================================
; IMMUNITIES
;===========================================================================
[tushkano_immunities]
burn_immunity			= 1		;коэффициенты иммунитета
strike_immunity			= 0.8
shock_immunity			= 0.5
wound_immunity			= 0.6
wound_2_immunity		= 1
radiation_immunity		= 0
telepatic_immunity		= 1
chemical_burn_immunity	= 0.5
explosion_immunity		= 1.5
fire_wound_immunity		= 1.2

[tushkano_protections]
skin_armor				= 0.1
hit_fraction_monster	= 1.75

[m_tushkano_damage]
;bone_name		= <hit_scale>,-1,<wound_scale>
;<hit_scale>	- коэфф. изменения хита (уменьшения здоровья)
;<wound_scale>	- коэфф. изменения величины открытой раны

default				= 1.0, -1, 0.3

bip01_tail			= 0.2, -1, 0.3
bip01_tail1			= 0.2, -1, 0.3
bip01_tail2			= 0.2, -1, 0.3
bip01_tail3			= 0.2, -1, 0.3
bip01_tail4			= 0.1, -1, 0.3

bip01_pelvis		= 1.0, -1, 0.5
bip01_spine			= 1.0, -1, 0.5
bip01_neck			= 1.5, -1, 1.0
bip01_head			= 3.0, -1, 1.0

[tushkan_terrain]
	255,000,255,255


[tushkano_normal]:m_tushkano_e
$spawn				= "monsters\tushkanos\tushkano_normal"
;---------------------------
rank				= 401
spec_rank			= normal
panic_threshold		= 0.3
