;===========================================================================
; FRACTURE
;===========================================================================
[m_fracture_e]:monster_base
GroupControlSection		= spawn_group
SpaceRestrictionSection	= space_restrictor,zone_mosquito_bald,zone_witches_galantine,zone_burning_fuzz,zone_mincer,zone_gravi_zone
;$spawn					= "monsters\fracture"		; option for Level Editor
$npc					= on		; option for Level Editor
$prefetch				= 16

class					= SM_IZLOM		; AI class

visual					= monsters\izlom\izlom.ogf
corpse_visual			= monsters\izlom\izlom.ogf
icon					= ui_npc_monster_fracture

species					= fracture

script_binding			= bind_monster.bind

ef_creature_type		= 21		; option for evaluation functions
ef_weapon_type			= 4
ef_detector_type		= 1
panic_threshold			= 0.1

bone_torso				= bip01_spine1
bone_head				= bip01_head
bone_fire				= bip01_head

parts_cut_count			= 100

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

radiation_max_distance		= 3.5
radiation_max_power			= 0.015
;---------------------------------------------------------------------
; Physics
;---------------------------------------------------------------------
ph_box0_center				= 0.0,  0.9,  0.0
ph_box0_size				= 0.4,  0.9,  0.4
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						= 110

destroyed_vis_name			= physics\Dead_Body\trupik_crash

;---------------------------------------------------------------------
ph_skeleton_collision_enabled = true

;----------------------------------------------------------------------------
; Movement::Velocities & Acceleration
;----------------------------------------------------------------------------
; speed factors				linear | angular_real | angular_path | min	| max
Velocity_Stand				= 0,		1.5,			1.5,		1,		1
Velocity_WalkFwdNormal		= 0.8,		2.4,			2.2,		0.02,	2.5
Velocity_RunFwdNormal		= 3.7,		2.8,			2.5,		0.4,	1
Velocity_WalkFwdDamaged		= 0.85,		1.7,			1.5,		0.2,	2.0
Velocity_RunFwdDamaged		= 3.7,		2.2,			2.0,		0.2,	1
Velocity_Drag				= 0.9,		0.8,			0.8,		1,		1
Velocity_Steal				= 1.5,		1.0,			1.0,		1,		1.2

; acceleration
Accel_Generic			= 1.5
Accel_Calm				= 2.5
Accel_Aggressive		= 7.0

;--------------------------------------------------------------------------
; Attack parameters
;--------------------------------------------------------------------------
attack_effector			= m_fracture_attack_effector
attack_params			= m_fracture_attack_params

MinAttackDist			= 1.9
MaxAttackDist			= 2.6	;	max  2*MinAttackDist-as_min_dist
as_min_dist				= 1.2
as_step					= 0.35

actor_hit_effect_factor	= 3

Melee_Rotation_Factor	= 1.7

hit_type				= strike

Run_Attack_Dist			= 2.5,	3.5
Run_Attack_Delay		= 1500,	2500
Run_Attack_Anim			= stand_run_attack_0
;-------------------------------------------------------------------------
; Entity Conditions
;-------------------------------------------------------------------------
satiety_v				= 0.0001			;скорость уменьшения сытости со временем
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-здоровья

;Immunities
immunities_sect			= fracture_immunities
protections_sect		= fracture_weak_protections
hit_slowdown			= 1.1, 0.85

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

;Eat settings
eat_freq				= 1.0		; частота укусов в сек
eat_slice				= 0.01		; увеличение сытости при 1 укусе
eat_health				= 0.002		; увеличение здоровья при 1 укусе
eat_slice_weight		= 40		; уменьшение еды у трупа
satiety_threshold		= 0.6		; 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.01
Morale_Despondent_Threashold	= 0.5
;---------------------------------------------------------
; Sounds and sound parameters
;---------------------------------------------------------
sound_idle				= monsters\biting\def_	;monsters\zombie\zombie_idle_
sound_eat				= monsters\zombie\zombie_eat_
sound_aggressive		= monsters\biting\def_	;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\biting\def_
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		= 125000
eat_sound_delay			= 3000
attack_sound_delay		= 4000

distant_idle_sound_delay	= 80000
distant_idle_sound_range	= 100.0

SoundThreshold			= 0.06		; range [0..1]
SoundThreshold_Sleep	= 0.18
max_hear_dist			= 80

;-------------------------------------------------------------------------
; Damages
;-------------------------------------------------------------------------
DamagedThreshold		= 0.5
damage					= m_Fracture_damage

critical_wound_threshold		= -1
critical_wound_decrease_quant	= 0
;---------------------------------------------------------
; Logic
;---------------------------------------------------------
DayTime_Begin			= 0
DayTime_End				= 21
sleep_time				= 6

distance_to_corpse		= 1.2
;-------------------------------------------------------------------------
; Other Stuff (refactoring needed)
;-------------------------------------------------------------------------
material			= creatures\medium

step_params			= m_fracture_step_params
LegsCount			= 4

terrain				= 255,255,255,255

;---------------------------------------------------------
; Vision
;---------------------------------------------------------
eye_fov					= 100
eye_range				= 50
eye_rotation			= 0, 0.15

vision_free_section		= fracture_vision_free
vision_danger_section	= fracture_vision_danger

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

[fracture_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

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

default				= 0.7, -1, 0.1

bip01_pelvis		= 1, -1, 0.1
bip01_spine			= 1, -1, 0.1
bip01_spine1		= 1, -1, 0.1
bip01_spine2		= 1, -1, 0.1
bip01_neck			= 1, -1, 0.25
bip01_head			= 4, -1, 0.5

[m_fracture_attack_params]
;---------------------------------------------------------------------------------------------------------------------------------------------
;	anim			| time[0..1] | hit_power | impulse | impulse_dir (x,y,z) | Field of hit_test  (left,right, bottom, top ) | Test Dist | Hit Type
;---------------------------------------------------------------------------------------------------------------------------------------------
stand_attack_0		=	0.47,		0.4,		250,		0.4, 0.3, 0.3,		-1.6, 1.6, -1.4, 1.4,							2.8,		strike
stand_attack_1		=	0.37,		0.05,		0,			0.0, 1.0, 0.0,		-1.3, 1.3, -1.3, 1.3,							2.7,		strike
stand_attack_2		=	0.30,		0.3,		200,		0.0, 0.0, 1.0,		-1.3, 1.3, -1.3, 1.3,							2.6,		strike
stand_attack_3		=	0.30,		0.5,		300,		0.0, 0.8, 0.2,		-1.3, 1.3, -1.6, 1.4,							2.7,		strike

stand_run_attack_0	=	0.40,		0.4,		250,		0.4, 0.3, 0.3,		-1.6, 1.6, -1.6, 1.6,							2.7,		strike

[m_fracture_step_params]
;---------------------------------------------------------------------------
;	anim			| Cycles | time1 | power1 | time2 | power2 | time3 | power3 | time4 | power4
;---------------------------------------------------------------------------
stand_walk_fwd_0	=	1,		0,		0,		0,		0,		1.0,	0.7,	0.5,	0.7
stand_walk_fwd_dmg_0=	1,		0,		0,		0.81,	0.1,	0.41,	0.7,	1.0,	0.7

stand_run_0			=	1,		0.58,	0.4,	0.34,	0.6,	0.26,	1,		0.12,	1
stand_run_dmg_0		=	1,		0.69,	0.1,	0.08,	0.6,	0.08,	1,		0.78,	1

stand_run_look_left_0 =	1,		0.34,	0.4,	0.12,	0.6,	0.10,	1,		0.89,	1
stand_run_look_right_0=	1,		0.34,	0.4,	0.12,	0.6,	0.10,	1,		0.89,	1

stand_run_attack_0	=	1,		0,		0,		0.12,	0.6,	0.10,	1,		0.89,	1
stand_crawl_0		=	1,		0.55,	0.4,	1.0,	0.3,	0.50,	0.4,	1.0,	0.4
stand_drag_0		=	1,		1.0,	1,		0,		0,		1.0,	1,		0.5,	1

;===========================================================================
; SPECIAL EFFECTORS
;===========================================================================
[m_fracture_attack_effector]
duality_h			= 0.02
duality_v			= 0.01
blur				= 1.0
gray				= 0.1
color_base			= 0.4,0.4,0.4
color_add			= 0,0,0
time				= 3.0
time_attack			= 0.05		; fade in
time_release		= 0.75		; fade out

;===========================================================================
; IMMUNITIES
;===========================================================================
[fracture_immunities]
burn_immunity			= 0.7
strike_immunity			= 0.8
shock_immunity			= 0.7
wound_immunity			= 0.2
wound_2_immunity		= 0.3
radiation_immunity		= 0.5
telepatic_immunity		= 1.0
chemical_burn_immunity	= 0.7
explosion_immunity		= 0.8
fire_wound_immunity		= 0.3

;*********************************************************************************
; WEAK PROFILE
;*********************************************************************************
[fracture_weak]:m_fracture_e
$spawn				= "monsters\fracture_weak"		; option for Level Editor
monster_type		= indoor
rank				= 301
spec_rank			= weak
community			= fracture
panic_threshold		= 0.15
;immunities_sect		= fracture_immunities
protections_sect	= fracture_weak_protections

[fracture_weak_protections]
skin_armor				= 0.3
hit_fraction_monster	= 0.7

