33 dmgent.owner = dmgent.realowner =
this;
34 setorigin(dmgent, loc);
65 te_csqc_lightningarc(this.origin, it.origin);
66 Damage(it, this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_ZAP.m_id, DMG_NOWEP, it.origin,
'0 0 0');
116 gren.owner = gren.realowner =
this;
117 gren.bot_dodge =
true;
121 gren.projectiledeathtype = DEATH_MONSTER_GOLEM_ZAP.m_id;
123 setsize(gren,
'-8 -8 -8',
'8 8 8');
127 gren.nextthink =
time;
134 gren.damageforcescale = 0;
136 gren.damagedbycontents =
true;
157 setanim(actor, ((
random() >= 0.5) ? actor.anim_melee2 : actor.anim_melee3),
false,
true,
true);
160 actor.anim_finished = actor.attack_finished_single[0] =
time + (0.5 * swing_cnt);
165 float randomness =
random();
172 setanim(actor, actor.anim_melee1,
false,
true,
true);
174 if(actor.animstate_endtime >
time)
175 actor.anim_finished = actor.animstate_endtime;
177 actor.anim_finished =
time + 1.2;
178 actor.attack_finished_single[0] = actor.anim_finished + 0.2;
180 actor.golem_lastattack =
time + 3 +
random() * 1.5;
185 setanim(actor, actor.anim_melee2,
true,
true,
false);
187 actor.attack_finished_single[0] =
time + 1.1;
188 actor.anim_finished = 1.1;
189 actor.golem_lastattack =
time + 3 +
random() * 1.5;
203spawnfunc(monster_shambler) { spawnfunc_monster_golem(
this); }
216 actor.pain_finished =
time + 0.5;
217 setanim(actor, ((
random() >= 0.5) ? actor.anim_pain2 : actor.anim_pain1),
true,
true,
false);
224 setanim(actor, actor.anim_die1,
false,
true,
true);
233 actor.anim_idle =
animfixfps(actor,
'0 1 1', none);
234 actor.anim_walk =
animfixfps(actor,
'1 1 1', none);
235 actor.anim_run =
animfixfps(actor,
'2 1 1', none);
237 actor.anim_melee2 =
animfixfps(actor,
'4 1 5', none);
238 actor.anim_melee3 =
animfixfps(actor,
'5 1 5', none);
240 actor.anim_melee1 =
animfixfps(actor,
'6 1 5', none);
241 actor.anim_pain1 =
animfixfps(actor,
'7 1 2', none);
242 actor.anim_pain2 =
animfixfps(actor,
'8 1 2', none);
246 actor.anim_spawn =
animfixfps(actor,
'12 1 5', none);
247 actor.anim_die1 =
animfixfps(actor,
'13 1 0.5', none);
249 actor.anim_die2 =
animfixfps(actor,
'15 1 0.5', none);
267 if(!actor.attack_range) actor.attack_range = 150;
275 setanim(actor, actor.anim_spawn,
false,
true,
true);
276 actor.spawn_time = actor.animstate_endtime;
288 PAR(_(
"Golems are large powerful brutes capable of taking and dealing a beating. Keeping your distance is advised."));
289 PAR(_(
"The Golem's primary melee attack is a series of punches. "
290 "On occasion the Golem may jump into the air, dealing massive damage in an area as it slams the ground."));
291 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)
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)
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()