33 dmgent.owner = dmgent.realowner =
this;
34 setorigin(dmgent, loc);
42 DEATH_MONSTER_GOLEM_SMASH.m_id,
83 te_csqc_lightningarc(this.origin, it.origin);
84 Damage(it, this, this.realowner,
85 autocvar_g_monster_golem_attack_lightning_damage_zap * MONSTER_SKILLMOD(this),
86 DEATH_MONSTER_GOLEM_ZAP.m_id,
136 entity gren =
new(grenade);
137 gren.owner = gren.realowner =
this;
138 gren.bot_dodge =
true;
142 gren.projectiledeathtype = DEATH_MONSTER_GOLEM_ZAP.m_id;
144 setsize(gren,
'-8 -8 -8',
'8 8 8');
148 gren.nextthink =
time;
155 gren.damageforcescale = 0;
157 gren.damagedbycontents =
true;
178 setanim(actor, ((
random() >= 0.5) ? actor.anim_melee2 : actor.anim_melee3),
false,
true,
true);
181 actor.anim_finished = actor.attack_finished_single[0] =
time + (0.5 * swing_cnt);
186 float randomness =
random();
193 setanim(actor, actor.anim_melee1,
false,
true,
true);
195 if (actor.animstate_endtime >
time)
196 actor.anim_finished = actor.animstate_endtime;
198 actor.anim_finished =
time + 1.2;
199 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
201 actor.golem_lastattack =
time + 3 +
random() * 1.5;
206 setanim(actor, actor.anim_melee2,
true,
true,
false);
208 actor.attack_finished_single[0] =
time + 1.1;
209 actor.anim_finished = 1.1;
210 actor.golem_lastattack =
time + 3 +
random() * 1.5;
228 spawnfunc_monster_golem(
this);
240 actor.pain_finished =
time + 0.5;
241 setanim(actor, ((
random() >= 0.5) ? actor.anim_pain2 : actor.anim_pain1),
true,
true,
false);
248 setanim(actor, actor.anim_die1,
false,
true,
true);
257 actor.anim_idle =
animfixfps(actor,
'0 1 1', none);
258 actor.anim_walk =
animfixfps(actor,
'1 1 1', none);
259 actor.anim_run =
animfixfps(actor,
'2 1 1', none);
261 actor.anim_melee2 =
animfixfps(actor,
'4 1 5', none);
262 actor.anim_melee3 =
animfixfps(actor,
'5 1 5', none);
264 actor.anim_melee1 =
animfixfps(actor,
'6 1 5', none);
265 actor.anim_pain1 =
animfixfps(actor,
'7 1 2', none);
266 actor.anim_pain2 =
animfixfps(actor,
'8 1 2', none);
270 actor.anim_spawn =
animfixfps(actor,
'12 1 5', none);
271 actor.anim_die1 =
animfixfps(actor,
'13 1 0.5', none);
273 actor.anim_die2 =
animfixfps(actor,
'15 1 0.5', none);
291 if (!actor.attack_range) actor.attack_range = 150;
299 setanim(actor, actor.anim_spawn,
false,
true,
true);
300 actor.spawn_time = actor.animstate_endtime;
312 PAR(_(
"Golems are large powerful brutes capable of taking and dealing a beating. Keeping your distance is advised."));
313 PAR(_(
"The Golem's primary melee attack is a series of punches. "
314 "On occasion the Golem may jump into the air, dealing massive damage in an area as it slams the ground."));
315 PAR(_(
"To deal with distant foes, the Golem may throw a chunk of its electrified rocky exterior, zapping nearby targets on impact."));
IntrusiveList g_bot_dodge
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
IntrusiveList g_damagedbycontents
void SUB_Remove(entity this)
Remove entity.
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
void M_Golem_Attack_Lightning_Explode(entity this, entity directhitentity)
float autocvar_g_monster_golem_attack_lightning_force
void M_Golem_Attack_Lightning_Explode_use(entity this, entity actor, entity trigger)
float autocvar_g_monster_golem_attack_lightning_damage
float autocvar_g_monster_golem_attack_lightning_radius_zap
string autocvar_g_monster_golem_loot
float autocvar_g_monster_golem_speed_walk
void M_Golem_Attack_Lightning_Touch(entity this, entity toucher)
float autocvar_g_monster_golem_attack_lightning_damage_zap
void M_Golem_Attack_Lightning_Think(entity this)
float autocvar_g_monster_golem_attack_lightning_radius
float autocvar_g_monster_golem_attack_smash_range
float autocvar_g_monster_golem_health
float autocvar_g_monster_golem_speed_stop
float autocvar_g_monster_golem_attack_claw_damage
float autocvar_g_monster_golem_attack_lightning_speed_up
float autocvar_g_monster_golem_damageforcescale
void M_Golem_Attack_Smash(entity this)
float autocvar_g_monster_golem_attack_smash_damage
float autocvar_g_monster_golem_attack_lightning_speed
float autocvar_g_monster_golem_speed_run
void M_Golem_Attack_Swing(entity this)
void M_Golem_Attack_Lightning(entity this)
float autocvar_g_monster_golem_attack_smash_force
bool M_Golem_Attack(int attack_type, entity actor, entity targ,.entity weaponentity)
void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
vector animfixfps(entity e, vector a, vector b)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
#define METHOD(cname, name, prototype)
const int PROJECTILE_GOLEM_LIGHTNING
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
void StatusEffects_apply(StatusEffect this, entity actor, float eff_time, int eff_flags)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
void Monster_Delay(entity this, int repeat_count, float defer_amnt, void(entity) func)
bool Monster_Spawn(entity this, bool check_appear, Monster mon)
Setup the basic required properties for a monster.
void monster_makevectors(entity this, entity targ)
bool Monster_Attack_Melee(entity this, entity targ, float damg, vector anim, float er, float animtime, int deathtype, bool dostop)
#define MONSTER_SKILLMOD(mon)
float attack_range
melee attack if closer, ranged attack if further away (TODO: separate ranged attack range?...
const int MONSTER_ATTACK_MELEE
const int MONSTER_ATTACK_RANGED
void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
#define CENTER_OR_VIEWOFS(ent)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()