; ПЛОТЬ
[m_flesh_e]:monster
SpaceRestrictionSection = space_restrictor,zone_mosquito_bald,zone_gravi_zone
Scheduled		     	= on
Human		     	 	= off
Health			     	= 250
MinSpeed		     	= 1.0
MaxSpeed		     	= 1.5
going_speed          	= 2.0
search_speed         	= .5
visual				= monsters\flesh\flesh
corpse_visual		= monsters\flesh\flesh_dead
icon				= ui_npc_monster_flesh
short_name			= flesh
MaxHealthValue	= 1.0		; range [0..200]
smart_terrain_choose_interval	= 00:15:00
current_level_going_speed		= 1;2

Spawn_Inventory_Item_Section = part_flesh_eye
Spawn_Inventory_Item_Probability = 0.3

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

class               = SM_FLESH			; AI class

bone_torso			= bip01_spine1 			; bone name
bone_head			= bip01_head			; bone name
bone_fire			= bip01_head			; bone name
weapon_usage		= 0						; boolean

; Physics
; movement
ph_box0_center 		 	= 0.0,  0.9,  0.0
ph_box0_size 		 		= 0.55, 0.9,  0.55
ph_box1_center 		 	= 0.0,  0.6,  0.0
ph_box1_size 		 		= 0.40, 0.6,  0.40
ph_crash_speed_min		= 10
ph_crash_speed_max		= 30
ph_collision_damage_factor = 0.1
ph_mass 	 = 200;100						; also it's the food

destroyed_vis_name   = dynamics\dead_body\skelet_crash_monster

ph_skeleton_airr_lin_factor   	= -0.40
ph_skeleton_airr_ang_factor   	= -0.20
ph_skeleton_hinger_factor1    	= 1.0 ;1.0
ph_skeleton_ddelay	     	  	= 15.0 
ph_skel_fatal_impulse_factor  	= 0.0
ph_after_death_velocity_factor	= 0.75
ph_skel_shot_up_factor        		= 0.25

; Movement::Velocities & Acceleration
; speed factors			linear | angular_real | angular_path | min |  max
Velocity_Stand					= 0,			1.79,		1.79		1,		1
Velocity_WalkFwdNormal		= 1.5,		2.0,			2.0,			0.2,		2.0
Velocity_WalkFwdDamaged	= 1.2,		1.14,		1.14,		0.2,		2.0	
Velocity_RunFwdNormal		= 5.2,		2.5,			2.5,			0.2,		1	
Velocity_RunFwdDamaged		= 5.5,  		3.0,			3.0,			0.3,		1
Velocity_Drag					= 1.5,		2.14,		2.14,		1,		1
Velocity_Steal					= 1.3,		2.14,		2.14,		1,		1

; acceleration
Accel_Generic		= 1.5
Accel_Calm		= 2.5
Accel_Aggressive	= 8.5

; Attack parameters
MinAttackDist		= 1.3
MaxAttackDist		= 3.9
as_min_dist			= 1.3
as_step			= 0.4

attack_effector		= m_flesh_attack_effector
attack_params		= m_flesh_attack_params

Melee_Rotation_Factor	= 2.6
; Entity Conditions
satiety_v       		= 0.0001
radiation_v     		= 0.00001
satiety_power_v   	= 0.005
satiety_health_v  	= 0.0005
satiety_critical  		= -1.0
radiation_health_v  	= 0.01
morale_v      		= 0.01
health_hit_part   		= 1.0
power_hit_part    	= 1.0
psy_health_v    		= 0.1
health_restore_v      	= 0.0001

immunities_sect       = flesh_immunities

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

sleep_health			= 1.0
sleep_power			= 1.0
sleep_satiety			= 1.0
sleep_radiation			= 1.0
sleep_psy_health		= 1.0

eat_freq				= 5.0
eat_slice				= 0.01
eat_slice_weight		= 10.0
satiety_threshold		= 0.5

; Sounds and sound parameters
SoundThreshold	 = 0.07			; range [0..1]
max_hear_dist		 = 40

sound_idle				= monsters\flesh\flesh_idle_
sound_eat				= monsters\flesh\flesh_eat_
sound_aggressive		= monsters\flesh\flesh_aggressive_
sound_attack_hit		= monsters\flesh\flesh_attack_			
sound_take_damage	= monsters\flesh\flesh_pain_
sound_die				= monsters\flesh\flesh_death_
sound_threaten			= monsters\flesh\flesh_attack_
sound_landing			= monsters\biting\def_
sound_steal			= monsters\biting\def_
sound_panic			= monsters\flesh\flesh_panic_
sound_growling			= monsters\biting\def_
sound_die_in_anomaly	= monsters\flesh\flesh_anomaly_death_
;sound_distant			= monsters\dog\flesh_distant_	; только для расстояний свыше 200м

idle_sound_delay		= 85000
eat_sound_delay		= 3000
attack_sound_delay	= 6000

sound_distant_idle			= monsters\flesh\flesh_idle_
distant_idle_sound_delay	= 80000
distant_idle_sound_range	= 100.0	

; Vision
eye_fov 	= 100
eye_range 	= 40  ;60 ;30

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

; Logic
Min_Satiety			= 0.4
Max_Satiety		= 1.0

; 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.01
Morale_Despondent_Threashold	= 0.5

; Other Stuff (refactoring needed)
critical_wound_threshold		= 0.4
critical_wound_decrease_quant	= 0.

critical_wound_anim_head	= critical_hit_head_0
critical_wound_bones_head	= flesh_critical_wound_bones_head

critical_wound_anim_torso	= critical_hit_torso_0
critical_wound_bones_torso	= flesh_critical_wound_bones_torso

critical_wound_anim_legs	= critical_hit_torso_0
critical_wound_bones_legs	= flesh_critical_wound_bones_legs

distance_to_corpse	= 0.9
selector_approach	=      20.0,            1.0,                1000.0,             0.0,               0.0,						1000.0,				10000.0,      
DamagedThreshold = 0.2

material		= creatures\hoof
step_params	= m_flesh_step_params
LegsCount		= 4
damage		= m_flesh_damage
species       		= flesh
terrain       		= flesh_terrain

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

default       		= 0.2,  -1, 1.50
bip01_pelvis    	= 0.075, -1, 1.5
bip01_spine     	= 0.075, -1, 1.5
bip01_neck      	= 0.2, -1, 2.3
bip01_head      	= 0.075, -1, 1.5, 1

;=================================================================================
; Flesh Terrain
;=================================================================================
[flesh_terrain]
  255,255,255,255

;===========================================================================
; Step Events
;===========================================================================
[m_flesh_step_params]
;	anim			| cycles | time1 | power1 | time2 | power2 | time3 | power3 | time4 | power4 |
stand_walk_fwd_0	=	   8,	    0.2,     1,	    0.25,    0.7,    0.5,     1.0,     0.7,    1.0
stand_walk_dmg_0	=        7,	    0.2,     1,	    0.25,    0.7,    0.5,     1.0,     0.7,    1.0
stand_run_0		=	   6,	    0.2,     1,	    0.25,    0.7,    0.5,     1.0,     0.7,    1.0
stand_run_dmg_0	=	   6,	    0.2,     1,	    0.25,    0.7,    0.7,     1.0,     0.7,    1.0
stand_steal_0		=	   1,	    0.2,     1,	    0.25,    0.7,    0.7,     1.0,     0.7,    1.0
stand_drag_0		=	   1,	    0.2,     1,	    0.25,    0.7,    0.7,     1.0,     0.7,    1.0

;===========================================================================
; Immunities
;===========================================================================
[flesh_immunities]
burn_immunity     		= 1.0       
strike_immunity     		= 1.0
shock_immunity      		= 1.0
wound_immunity      		= 0.01
radiation_immunity 		= 0.0
telepatic_immunity 		= 0.0
chemical_burn_immunity = 1.0
explosion_immunity 	= 1.0
fire_wound_immunity  	= 0.35

;===========================================================================
; SPECIAL EFFECTORS
;===========================================================================
[m_flesh_attack_effector]
duality_h		= 0.01
duality_v		= 0.01
blur				= 0.01
gray			= 0.5
noise_intensity 	= 0.0
noise_grain		= 1
noise_fps		= 30
color_base		= 0.65,0.15,0.1
color_gray		= 0.333,0.333,0.333
color_add		= 0,0,0
time			= 0.3
time_attack		= 0.05		; fade in
time_release	= 0.25		; fade out

; camera effects
ce_time				= 0.45 ;time 
ce_amplitude		= -10.0 
ce_period_number	= 2.0 
ce_power			= 1.5 ;0.7 ; power 

;===========================================================================
; Attack Animation Parameters
;===========================================================================
[m_flesh_attack_params]
; anim      | time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  | Field of hit_test  (left,right, top, bottom) |  Test Dist
;Left leg strike
stand_attack_0 =      0.25,   0.35,       70,        0.0, 0.5, 1.0,    -1.0, 1.0, -1.0, 1.0,                  2.5
;Both leg strike
stand_attack_1 =      0.30,   0.40,       100,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_2 =      0.30,   0.50,       150,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_3 =      0.40,   0.60,       170,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5

; WEAK PROFILE
[flesh_weak]:m_flesh_e
visual					= monsters\flesh\flesh
corpse_visual			= monsters\flesh\flesh_dead
icon					= ui_npc_monster_flesh
short_name				= flesh_weak
panic_threshold			= 0.2
rank					= 0
immunities_sect			= flesh_immunities_weak
attack_params			= flesh_attack_params_weak
spec_rank				= weak

[flesh_immunities_weak]
burn_immunity			= 1.0
strike_immunity			= 1.0
shock_immunity			= 1.0
wound_immunity		= 0.05
radiation_immunity		= 0.0
telepatic_immunity		= 0.0
chemical_burn_immunity = 1.0
explosion_immunity		= 0.5
fire_wound_immunity	= 0.25

[flesh_attack_params_weak]
; anim      | time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  | Field of hit_test  (left,right, top, bottom) |  Test Dist
;Left leg strike
stand_attack_0 =      0.25,   0.55,       70,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                 2.0
;Both leg strike
stand_attack_1 =      0.30,   0.60,       100,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_2 =      0.30,   0.70,       150,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_3 =      0.40,   0.80,       170,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5

; NORMAL PROFILE
[flesh_normal]:m_flesh_e
visual				= monsters\flesh\flesh_strong
corpse_visual		= monsters\flesh\flesh_strong
icon				= ui_npc_monster_flesh_strong
short_name			= flesh_normal
panic_threshold		= 0.1
rank				= 401
immunities_sect		= flesh_immunities_normal
attack_params		= flesh_attack_params_normal
spec_rank			= normal

[flesh_immunities_normal]
burn_immunity			= 1.0
strike_immunity			= 1.0
shock_immunity			= 1.0
wound_immunity		= 0.04
radiation_immunity		= 0.0
telepatic_immunity		= 0.0
chemical_burn_immunity = 1.0
explosion_immunity		= 0.4
fire_wound_immunity	= 0.2

[flesh_attack_params_normal]
; anim      | time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  | Field of hit_test  (left,right, top, bottom) |  Test Dist
;Left leg strike
stand_attack_0 =      0.25,   0.65,       70,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                 2.0
;Both leg strike
stand_attack_1 =      0.30,   0.70,       100,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_2 =      0.30,   0.80,       150,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_3 =      0.40,   0.90,       170,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5

; STRONG PROFILE
[flesh_strong]:m_flesh_e
visual				= monsters\flesh\flesh_build
corpse_visual		= monsters\flesh\flesh_build
icon				= ui_npc_monster_flesh_strong
short_name			= flesh_strong
panic_threshold		= 0.05	
rank				= 801
immunities_sect		= flesh_immunities_strong
attack_params		= flesh_attack_params_strong
spec_rank			= strong

Spawn_Inventory_Item_Probability = 0.35

[flesh_immunities_strong]
burn_immunity          		= 0.5
strike_immunity        		= 0.6
shock_immunity         	= 1.0
wound_immunity         	= 0.04
radiation_immunity     	= 0.0
telepatic_immunity     	= 0.0
chemical_burn_immunity = 1.0
explosion_immunity     	= 0.20
fire_wound_immunity    	= 0.06

[flesh_attack_params_strong]
; anim      | time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  | Field of hit_test  (left,right, top, bottom) |  Test Dist
;Left leg strike
stand_attack_0 =      0.35,   0.75,       100,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                 2.0
;Both leg strike
stand_attack_1 =      0.50,   0.80,       160,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_2 =      0.50,   0.90,       180,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5
stand_attack_3 =      0.50,   1.00,       190,        0.0, 0.5, 1.0,     -1.0, 1.0, -1.0, 1.0,                  2.5

; БОЛОТНАЯ ПЛОТЬ
[flesh_swamp]:flesh_strong
visual				= monsters\flesh\flesh_boloto
corpse_visual		= monsters\flesh\flesh_boloto
icon				= ui_npc_monster_flesh_swamp
short_name			= flesh_swamp

Spawn_Inventory_Item_Probability = 0.32

[flesh_group]:base
Human                	= off           
class                	= AI_FLE_G       
monster_section = m_flesh_e

[flesh_critical_wound_bones_head]
bip01_neck
bip01_head
bip01_ponytail1
bip01_ponytail2

[flesh_critical_wound_bones_torso]
bip01_pelvis
bip01_l_calf
bip01_r_calf
bip01_spine
bip01_spine1
bip01_spine2
bip01_l_clavicle
bip01_r_clavicle

[flesh_critical_wound_bones_legs]
bip01_l_horselink
bip01_l_foot
bip01_l_toe0
bip01_r_thigh
bip01_r_horselink
bip01_r_foot
bip01_r_toe0
bip01_l_upperarm
bip01_l_forearm
bip01_l_hand
bip01_l_finger0
bip01_l_finger01
bip01_r_upperarm
bip01_r_forearm
bip01_r_hand
bip01_r_finger0
bip01_r_finger01
bip01_l_thigh

; Плоть с мясом
[flesh_meat]:flesh_weak
Spawn_Inventory_Item_Section = part_flesh_meat
Spawn_Inventory_Item_Probability = 1.0

; ЗАНОЗА  (автор - Goroff)
[zanoza]:m_flesh_e
visual				= monsters\zanoza\zanoza
corpse_visual		= monsters\zanoza\zanoza_dead
icon				= ui_npc_monster_zanoza
short_name			= zanoza
panic_threshold		= 0.05
rank				= 801

Spawn_Inventory_Item_Section = part_zanoza_leg
Spawn_Inventory_Item_Probability = 0.38

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

; Sounds and sound parameters
SoundThreshold	 = 0.09	; range [0..1]
max_hear_dist		 = 100

sound_idle				= monsters\zanoza\zanoza_idle_
sound_eat				= monsters\zanoza\zanoza_eat_
sound_aggressive		= monsters\zanoza\zanoza_aggressive_
sound_attack_hit		= monsters\zanoza\zanoza_attack_hit_
sound_take_damage	= monsters\zanoza\zanoza_take_damage_
sound_die				= monsters\zanoza\zanoza_die_
sound_threaten			= monsters\biting\def_
sound_landing			= monsters\biting\def_
sound_steal			= monsters\biting\def_
sound_panic			= monsters\biting\def_
sound_growling			= monsters\biting\def_
sound_die_in_anomaly	= monsters\biting\def_
;sound_distant			= monsters\dog\flesh_distant_	; только для расстояний свыше 200м

idle_sound_delay		= 85000
eat_sound_delay		= 3000
attack_sound_delay	= 6000

sound_distant_idle			= monsters\zanoza\zanoza_idle_
distant_idle_sound_delay	= 80000
distant_idle_sound_range	= 100.0

immunities_sect		= zanoza_immunities
attack_params		= zanoza_attack_params

eye_fov			= 110 ;--/90
eye_range			= 30  ;--/90
max_hear_dist	        = 160  ;--/30
 
[zanoza_immunities]
burn_immunity			= 0.4
strike_immunity			= 0.2
shock_immunity			= 0.2
wound_immunity		= 0.2
radiation_immunity		= 0.0
telepatic_immunity		= 0.0
chemical_burn_immunity = 0.2
explosion_immunity		= 0.2
fire_wound_immunity	= 0.02

[zanoza_attack_params]
;	anim		| time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  |	Field of hit_test  (left,right, top, bottom) |	Test Dist
;Left leg strike
stand_attack_0 = 0.25,		6.95,		    70,          0.0, 0.5, 1.0,		 -1.0, 1.0, -1.0, 1.0,		2.0
;Both leg strike
stand_attack_1 = 0.30,		8.95,		    150,        0.0, 0.5, 1.0,		 -1.0, 1.0, -1.0, 1.0,		2.5
stand_attack_2 = 0.30,		6.95,		    150,        0.0, 0.5, 1.0,		 -1.0, 1.0, -1.0, 1.0,		2.5
stand_attack_3 = 0.40,		9.95,		    150,        0.0, 0.5, 1.0,		 -1.0, 1.0, -1.0, 1.0,		2.5
