4 float autocvar_g_monster_zombie_health;
5 float autocvar_g_monster_zombie_damageforcescale = 0.55;
6 float autocvar_g_monster_zombie_attack_melee_damage;
7 float autocvar_g_monster_zombie_attack_melee_delay;
8 float autocvar_g_monster_zombie_attack_leap_damage;
9 float autocvar_g_monster_zombie_attack_leap_force;
10 float autocvar_g_monster_zombie_attack_leap_speed;
11 float autocvar_g_monster_zombie_attack_leap_delay;
12 float autocvar_g_monster_zombie_speed_stop;
13 float autocvar_g_monster_zombie_speed_run;
14 float autocvar_g_monster_zombie_speed_walk;
52 void M_Zombie_Attack_Leap_Touch(
entity this,
entity toucher)
59 if(toucher.takedamage)
62 angles_face =
normalize(angles_face) * (autocvar_g_monster_zombie_attack_leap_force);
63 Damage(toucher,
this,
this, (autocvar_g_monster_zombie_attack_leap_damage) *
MONSTER_SKILLMOD(
this), DEATH_MONSTER_ZOMBIE_JUMP.m_id,
DMG_NOWEP, toucher.origin, angles_face);
75 void M_Zombie_Defend_Block_End(
entity this)
84 bool M_Zombie_Defend_Block(
entity this)
104 return M_Zombie_Defend_Block(actor);
106 float anim_chance =
random();
109 if(anim_chance < 0.33)
110 chosen_anim = actor.anim_melee1;
111 else if(anim_chance < 0.66)
112 chosen_anim = actor.anim_melee2;
114 chosen_anim = actor.anim_melee3;
116 return Monster_Attack_Melee(actor, actor.enemy, (autocvar_g_monster_zombie_attack_melee_damage), chosen_anim, actor.attack_range, (autocvar_g_monster_zombie_attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE.m_id,
true);
121 return Monster_Attack_Leap(actor, actor.anim_shoot, M_Zombie_Attack_Leap_Touch,
v_forward * (autocvar_g_monster_zombie_attack_leap_speed) +
'0 0 200', (autocvar_g_monster_zombie_attack_leap_delay));
135 if(
time >= actor.spawn_time)
136 actor.damageforcescale = autocvar_g_monster_zombie_damageforcescale;
143 actor.pain_finished =
time + 0.34;
144 setanim(actor, ((
random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2),
true,
true,
false);
153 setanim(actor, ((
random() > 0.5) ? actor.anim_die1 : actor.anim_die2),
false,
true,
true);
162 actor.anim_die1 = animfixfps(actor,
'9 1 0.5', none);
163 actor.anim_die2 = animfixfps(actor,
'12 1 0.5', none);
164 actor.anim_spawn = animfixfps(actor,
'30 1 3', none);
165 actor.anim_walk = animfixfps(actor,
'27 1 1', none);
166 actor.anim_idle = animfixfps(actor,
'19 1 1', none);
167 actor.anim_pain1 = animfixfps(actor,
'20 1 2', none);
168 actor.anim_pain2 = animfixfps(actor,
'22 1 2', none);
169 actor.anim_melee1 = animfixfps(actor,
'4 1 5', none);
170 actor.anim_melee2 = animfixfps(actor,
'4 1 5', none);
171 actor.anim_melee3 = animfixfps(actor,
'4 1 5', none);
172 actor.anim_shoot = animfixfps(actor,
'0 1 5', none);
173 actor.anim_run = animfixfps(actor,
'27 1 1', none);
174 actor.anim_blockstart = animfixfps(actor,
'8 1 1', none);
175 actor.anim_blockend = animfixfps(actor,
'7 1 1', none);
184 if(!actor.speed) { actor.speed = (autocvar_g_monster_zombie_speed_walk); }
185 if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_zombie_speed_run); }
186 if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_zombie_speed_stop); }
195 actor.monster_loot = ITEM_HealthMedium;
196 actor.monster_attackfunc = M_Zombie_Attack;
197 StatusEffects_apply(STATUSEFFECT_SpawnShield, actor, actor.spawn_time, 0);
198 actor.respawntime = 0.2;
199 actor.damageforcescale = 0.0001;
201 setanim(actor, actor.anim_spawn,
false,
true,
true);
202 actor.spawn_time = actor.animstate_endtime;
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
bool Monster_Attack_Melee(entity this, entity targ, float damg, vector anim, float er, float animtime, int deathtype, bool dostop)
float trace_dphitcontents
void Monster_Delay(entity this, int repeat_count, float defer_amnt, void(entity) func)
spawnfunc(info_player_attacker)
const int MONSTERFLAG_NORESPAWN
#define METHOD(cname, name, prototype)
const int MONSTERFLAG_APPEAR
bool Monster_Attack_Leap(entity this, vector anm, void(entity this, entity toucher) touchfunc, vector vel, float animtime)
#define MONSTER_SKILLMOD(mon)
const int MONSTER_ATTACK_MELEE
const int MONSTER_ATTACK_RANGED
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void Monster_Touch(entity this, entity toucher)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
bool Monster_Spawn(entity this, bool check_appear, Monster mon)
float autocvar_g_monsters_armor_blockpercent
const int MONSTER_RESPAWN_DEATHPOINT
float attack_finished_single[MAX_WEAPONSLOTS]