;=========================================================================================
; ZOMBIE
;=========================================================================================
[m_zombie_e]:monster_base
$npc				= on		; option for Level Editor
$prefetch			= 16

class				= SM_ZOMBI	; AI class

visual				= monsters\zombi\zombi_1
corpse_visual		= monsters\zombi\zombi_1
icon				= ui_npc_monster_zombie_weak

species				= zombie

script_binding		= bind_monster.bind

ef_creature_type	= 3		; option for evaluation functions
ef_weapon_type		= 1
ef_detector_type	= 1
panic_threshold		= 0.01

bone_torso			= bip01_spine1
bone_head			= bip01_head			; это кость на которой "глаза" :)
bone_fire			= bip01_head

parts_cut_count		= 90

;------------------------------------------------------------------------
; Offline Alife
;------------------------------------------------------------------------
Scheduled					= on			; option for ALife Simulator
Human						= off			; option for ALife Simulator
Health						= 300			; option for ALife Simulator
MinSpeed					= 1.0			; option for ALife Simulator
MaxSpeed					= 3.0			; option for ALife Simulator
going_speed					= 1.0			; option for ALife Simulator
MaxHealthValue				= 200			; range [0..200]
;------------------------------------------------------------------------
; Influences
;------------------------------------------------------------------------
acidic_max_distance			= 3.5
acidic_max_power			= 0.005

psy_max_distance			= 0
psy_max_power				= 0

radiation_max_distance		= 3.0
radiation_max_power			= 0
;---------------------------------------------------------------------
; Physics
;---------------------------------------------------------------------
ph_box0_center			= 0.0,  0.9,  0.0
ph_box0_size			= 0.35, 0.9,  0.35
ph_box1_center			= 0.0,  0.07, 0.0
ph_box1_size			= 0.6,  0.07, 0.6
ph_crash_speed_min		= 10
ph_crash_speed_max		= 30
ph_collision_damage_factor	= 0.1
ph_mass					= 80

destroyed_vis_name		= physics\dead_body\trupik_crash
;---------------------------------------------------------------------
ph_skeleton_collision_enabled	= true ; Включена ли коллизия тела

ph_skel_fatal_impulse_factor	= 1.3
ph_skel_head_impulse_factor		= 0.5
ph_after_death_velocity_factor	= 1.1
ph_skel_shot_up_factor			= 0.22
ph_character_have_wounded_state	= true
;----------------------------------------------------------------------------
; Movement::Velocities & Acceleration
;----------------------------------------------------------------------------
; speed factors			linear | angular_real | angular_path | min |  max
Velocity_Stand			= 0,		1.4,			1.4,		1,		1
Velocity_WalkFwdNormal	= 0.85,		0.6,			0.5,		0.05,	2.0
Velocity_RunFwdNormal	= 1.7,		3.0,			2.8,		0.4,	1
Velocity_Steal			= 2.6,		2.2,			2.0,		0.3,	1	; Actual Run

; acceleration
Accel_Calm			= 1.5
Accel_Aggressive	= 5.0

attack_run			= 0.25	;prob [0...1]
always_run			= 0		;prob [0...1]
;---------------------------------------------------------------------
; Squad seperation behaviour (расталкивание)
;---------------------------------------------------------------------
separate_factor			= 10	; сила расталкивания
separate_range			= 4.5	; радиус в котором расталкивание действует

;--------------------------------------------------------------------------
; Attack parameters
;--------------------------------------------------------------------------
attack_effector		= m_zombie_attack_effector
attack_params		= m_zombie_attack_params

MinAttackDist		= 1.5
MaxAttackDist		= 1.8
as_min_dist			= 1.2
as_step				= 0.1

hit_type			= strike

actor_hit_effect_factor	= 2.0
Melee_Rotation_Factor	= 1.8
;-----------------------------------------------------------------------
; Run Attack
;-----------------------------------------------------------------------
Run_Attack_Dist			= 1.7,	2.7
Run_Attack_Delay		= 3000,	4000
Run_Attack_Anim			= stand_run_atak_
;-------------------------------------------------------------------------
; Entity Conditions
;-------------------------------------------------------------------------
satiety_v				= 0.00005			;скорость уменьшения сытости со временем
radiation_v				= 0.00001			;скорость уменьшения радиации
radiation_health_v		= 0.01				;уменьшение здоровья при воздействии радиации
morale_v				= 0.01				;скорость восстановления морали
health_hit_part			= 0.5				;процент хита, уходящий на отнимание здоровья
power_hit_part			= 1.0				;процент хита, уходящий на отнимание силы
psy_health_v			= 0.01				;скорость восстановления psy-здоровья
health_restore_v		= 0.0001			;скорость восстановления здоровья

immunities_sect			= zombie_immunities
protections_sect		= zombie_protections_weak
hit_slowdown			= 0.9, 0.6

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

;Eat settings
eat_freq				= 1.0		; частота укусов в сек
eat_slice				= 0.01		; увеличение сытости при 1 укусе
eat_health				= 0.002		; увеличение здоровья при 1 укусе
eat_slice_weight		= 50		; уменьшение еды у трупа
satiety_threshold		= 0.7		; below this value monster fill hunger
;-------------------------------------------------------------------------
; Morale
;-------------------------------------------------------------------------
Morale_Hit_Quant				= 0.001
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.1
;---------------------------------------------------------
; Sounds and sound parameters
;---------------------------------------------------------
sound_idle				= monsters\zombie\zombie_idle_
sound_eat				= monsters\zombie\zombie_eat_
sound_aggressive		= monsters\zombie\zombie_attack_
sound_attack_hit		= monsters\zombie\zombie_attack_hit_
sound_take_damage		= monsters\zombie\zombie_take_damage_
sound_die				= monsters\zombie\zombie_die_
sound_threaten			= monsters\zombie\zombie_attack_
sound_steal				= monsters\biting\def_
sound_panic				= monsters\biting\def_
;sound_growling			= monsters\biting\def_
sound_die_in_anomaly	= monsters\zombie\zombie_die_
sound_distant_idle		= monsters\zombie\zombie_idle_

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

idle_sound_delay		= 30000
eat_sound_delay			= 3000
attack_sound_delay		= 25000

distant_idle_sound_delay	= 90000
distant_idle_sound_range	= 50

SoundThreshold			= 0.15		; если громкость звука больше этой, то монстр значит ЭТО услышал

max_hear_dist			= 35
;-------------------------------------------------------------------------
; Damages
;-------------------------------------------------------------------------
damage				= m_zombie_damage
DamagedThreshold	= 0.2

critical_wound_threshold		= -1
critical_wound_decrease_quant	= 0

FakeDeathCount					= 4		; max count of fake death
StartFakeDeathHealthThreshold	= 0.5
FakeDeathDurationMin			= 1500
FakeDeathDurationMax			= 6000

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

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

use_squad_behavior		= false

rest_walk_time			= 300	;sec
rest_idle_time			= 120	;sec

particles_sect			= particles_zombie
terrain					= zombie_terrain

material				= creatures\human

LegsCount				= 2
step_params				= m_zombie_step_params

;-------------------------------------------------------------------------
; Vision
;-------------------------------------------------------------------------
eye_fov					= 80
eye_range				= 50
eye_rotation			= 0, 0.5
;use_eye_direction		= false

vision_free_section		= zombie_vision_free
vision_danger_section	= zombie_vision_danger

; ЗНАЧЕНИЯ visibility_threshold ДОЛЖНЫ БЫТЬ РАВНЫ для денжера и фри,
; иначе возникают артефакты с потерей видимости при переходе от денжера во фри.

[zombie_vision_free]
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

[zombie_vision_danger]
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


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

default			= 0.5, -1, 0.05

bip01_pelvis	= 1.0, -1, 0.05
bip01_spine		= 0.35, -1, 0.05
bip01_spine1	= 0.35, -1, 0.05
bip01_neck		= 1.0, -1, 0.1
bip01_head		= 1.0, -1, 0.05

[zombie_terrain]
	255,000,255,255
	255,001,255,255		;Разрешено ходить по всем опасным местам

[m_zombie_step_params]
;---------------------------------------------------------------------------
;	anim				| Cycles | time1 | power1 | time2 | power2 |
;---------------------------------------------------------------------------
stand_walk_fwd_0		=	3,		1.0,	0.1,	0.5,	0.1
stand_walk_fwd_1		=	3,		1.0,	0.1,	0.57,	0.1

stand_run_0				=	3,		1.0,	0.15,	0.58,	0.15
stand_run_1				=	3,		1.0,	0.15,	0.58,	0.15
stand_run_2				=	2,		1.0,	0.15,	0.58,	0.15

stand_run_atak_0		=	2,		1.0,	0.2,	0.58,	0.2
stand_run_atak_1		=	2,		1.0,	0.2,	0.58,	0.2

stand_run_r_0			=	1,		0.2,	0.25,	0.67,	0.25
stand_run_r_1			=	1,		0.2,	0.25,	0.67,	0.25

stand_turn_ls_0			=	1,		0.42,	0.15,	0.8,	0.1
stand_turn_rs_0			=	1,		0.7,	0.1,	0.4,	0.15

fake_death_0_0			=	1,		0.35,	1,		0.35,	1
fake_death_1_0			=	1,		0.43,	1,		0.45,	1
fake_death_2_0			=	1,		0.61,	1,		0.63,	1
fake_death_3_0			=	1,		0.34,	1,		0.46,	1

eat_to_stand_up_0		=	1,		0.72,	0.15,	0.23,	0.1
sit_idle_to_stand_up_0	=	1,		0.99,	0.1,	0.7,	0.15
stand_idle_to_eat_0		=	1,		0.49,	0.15,	0.79,	0.1
stand_idle_to_sit_down_0=	1,		0.99,	0.1,	0.71,	0.15
check_corpse_0			=	1,		0,		0,		0.07,	0.1,	0,		0,		0.9,	0.1
check_corpse_1			=	1,		0,		0,		0.04,	0.1,	0,		0,		0.83,	0.1

[particles_zombie]
particles_zombie_flies_d2

[particles_zombie_strong]
particles_zombie_flies_a
particles_zombie_flies_d1

[particles_zombie_flies_a]
particle			= amik\nature\fly\muhi_00
sound				= nature\flies_corpse_1, nature\flies_corpse_2
bone				= bip01_spine1
stop_forced			= true
looped				= true
sound_looped		= true
cond				= {=dist_to_actor_le(40) =day_time_between(5:23) !under_heavy_rain}

[particles_zombie_flies_d1]:particles_zombie_flies_a
bone				= bip01_spine1
position_offset		= 0,0.3,0
play_on_death		= 0

[particles_zombie_flies_d2]:particles_zombie_flies_d1
play_on_death		= 4


[m_zombie_attack_params]
;---------------------------------------------------------------------------------------------------------------------------------------------
;	anim			| time[0..1] | hit_power | impulse | impulse_dir (x,y,z) | Field of hit_test (left,right, bottom, top ) | Test Dist
;---------------------------------------------------------------------------------------------------------------------------------------------
;right hand strike
stand_attack_0		=	0.35,		0.25,		100,		-0.1,0.0, 0.9,		-0.6, 0.9, -0.6, 0.6,							1.7,	strike
;left hand strike
stand_attack_1		=	0.45,		0.30,		140,		0.2, 0.1, 0.7,		-1.2, 0.6, -0.6, 0.6,							1.7,	strike
;left hand strike2
stand_attack_2		=	0.35,		0.35,		160,		0.0, 0.0, 1.0,		-0.6, 0.6, -0.6, 1.2,							2.0,	strike
;left hand strike3
stand_attack_3		=	0.35,		0.40,		150,		0.0, 0.0, 1.0,		-0.6, 0.6, -0.6, 0.6,							1.7,	strike
;on run
stand_run_atak_0	=	0.34,		0.15,		50,			0.0, 0.0, 1.0,		-0.6, 0.6, -0.6, 0.6,							1.7,	strike
stand_run_atak_1	=	0.29,		0.35,		200,		-0.4,0.2, 0.4,		-1.2, 0.6, -0.6, 0.6,							1.7,	strike

[m_zombie_attack_effector]
duality_h		= 0
duality_v		= 0
blur			= 0.5
noise_intensity	= 0.25
noise_grain		= 0.5
noise_fps		= 30
color_add		= 0.05,0,0
time			= 0.8
time_attack		= 0.20		; fade in
time_release	= 0.60		; fade out

; camera effects
ce_time				= 0.4
ce_amplitude		= -15.0
ce_period_number	= 9
ce_power			= 0.2

;===========================================================================
; IMMUNITIES
;===========================================================================
[zombie_immunities]
burn_immunity           = 0.6
strike_immunity         = 0.4
shock_immunity          = 0.8
wound_immunity          = 0.7
wound_2_immunity        = 0.8
radiation_immunity      = 0.0
telepatic_immunity      = 1.0
chemical_burn_immunity  = 0.0
explosion_immunity      = 1.5
fire_wound_immunity     = 0.65

;*********************************************************************************
; PROFILES
;*********************************************************************************

[zombie_weak]:m_zombie_e
$spawn				= "monsters\zombies\zombie_01_weak"
visual				= monsters\zombi\zombi_2
icon				= ui_npc_monster_zombie_weak
rank				= 50
spec_rank			= weak
panic_threshold		= 0.05

FakeDeathCount					= 2		; max count of fake death
StartFakeDeathHealthThreshold	= 0.4

health_hit_part		= 0.5
hit_power_factor	= 0.5
hit_impulse_factor	= 0.6
protections_sect	= zombie_protections_weak

[zombie_protections_weak]
skin_armor				= 0.25
hit_fraction_monster	= 0.65


[zombie_normal]:m_zombie_e
$spawn				= "monsters\zombies\zombie_02_normal"
visual				= monsters\zombi\zombi_1
icon				= ui_npc_monster_zombie_normal
rank				= 500
spec_rank			= normal
panic_threshold		= 0.03

FakeDeathCount		= 3		; max count of fake death

health_hit_part		= 0.4
hit_power_factor	= 0.8
hit_impulse_factor	= 1.0
protections_sect	= zombie_protections_normal

[zombie_protections_normal]
skin_armor				= 0.33
hit_fraction_monster	= 0.55


[zombie_strong]:m_zombie_e
$spawn				= "monsters\zombies\zombie_03_strong"
visual				= monsters\zombi\zombi_trup
panic_threshold		= 0.01
rank				= 820
spec_rank			= strong
icon				= ui_npc_monster_zombie_strong
particles_sect		= particles_zombie_strong

acidic_max_distance	= 4.0
acidic_max_power	= 0.01

FakeDeathCount		= 5		; max count of fake death

attack_run			= 0.35	;prob [0...1]
always_run			= 0.15	;prob [0...1]
health_hit_part		= 0.3
hit_power_factor	= 1.0
hit_impulse_factor	= 1.2
protections_sect	= zombie_protections_strong

[zombie_protections_strong]
skin_armor				= 0.45
hit_fraction_monster	= 0.45


[zombie_immortal]:zombie_strong
$spawn				= "monsters\zombies\zombie_immortal"
visual				= monsters\zombi\zombi_trup_2
icon				= ui_npc_monster_zombie_immortal

radiation_max_distance	= 5.0
radiation_max_power		= 0.02

health_restore_v		= 0.0005			;скорость восстановления здоровья

FakeDeathCount					= 6		; max count of fake death
StartFakeDeathHealthThreshold	= 0.3
FakeDeathDurationMax			= 3000


[zombie_ghost]:zombie_strong
$spawn				= "monsters\zombies\zombie_ghost"
visual				= monsters\zombi\zombi_1_ghost
icon				= ui_npc_monster_zombie_ghost
particles_sect		=

protections_sect	= zombie_protections_ghost
always_run			= 1		;prob [0...1]
DamagedThreshold	= 0.5

FakeDeathCount					= 2
StartFakeDeathHealthThreshold	= 0.5
FakeDeathDurationMin			= 2500
FakeDeathDurationMax			= 4500

;---------------------------------------------------------
; Sounds and sound parameters
;---------------------------------------------------------
sound_idle				= monsters\biting\def_
sound_eat				= monsters\biting\def_
sound_aggressive		= monsters\biting\def_
sound_take_damage		= monsters\biting\def_
sound_die				= monsters\biting\def_
sound_threaten			= monsters\biting\def_
sound_steal				= monsters\biting\def_
sound_panic				= monsters\biting\def_
sound_die_in_anomaly	= monsters\biting\def_
sound_distant_idle		= monsters\biting\def_

[zombie_protections_ghost]
skin_armor				= 1.0
hit_fraction_monster	= 0.4

[zombie_old]:zombie_normal
$spawn				= "monsters\zombies\zombie_old"
visual				= monsters\zombi\zombi_3
icon				= ui_npc_monster_zombie_old

; Karlan: временная затычка для чумного
[zombie_plague]:zombie_old

