void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
return;
if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
return; // g_projectiles_damage says to halt
return;
if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
return; // g_projectiles_damage says to halt
settouch(gren, M_Golem_Attack_Lightning_Touch);
gren.takedamage = DAMAGE_YES;
settouch(gren, M_Golem_Attack_Lightning_Touch);
gren.takedamage = DAMAGE_YES;
gren.damageforcescale = 0;
gren.event_damage = M_Golem_Attack_Lightning_Damage;
gren.damagedbycontents = true;
gren.damageforcescale = 0;
gren.event_damage = M_Golem_Attack_Lightning_Damage;
gren.damagedbycontents = true;
int swing_cnt = bound(1, floor(random() * 4), 3);
Monster_Delay(actor, swing_cnt, 0.5, M_Golem_Attack_Swing);
actor.anim_finished = actor.attack_finished_single[0] = time + (0.5 * swing_cnt); // set this for the delay
int swing_cnt = bound(1, floor(random() * 4), 3);
Monster_Delay(actor, swing_cnt, 0.5, M_Golem_Attack_Swing);
actor.anim_finished = actor.attack_finished_single[0] = time + (0.5 * swing_cnt); // set this for the delay
if(randomness <= 0.5 && vdist(actor.enemy.origin - actor.origin, <=, autocvar_g_monster_golem_attack_smash_range))
{
setanim(actor, actor.anim_melee1, false, true, true);
if(randomness <= 0.5 && vdist(actor.enemy.origin - actor.origin, <=, autocvar_g_monster_golem_attack_smash_range))
{
setanim(actor, actor.anim_melee1, false, true, true);
}
else if(randomness <= 0.1 && vdist(actor.enemy.origin - actor.origin, >=, autocvar_g_monster_golem_attack_smash_range * 1.5)) // small chance, don't want this spammed
{
}
else if(randomness <= 0.1 && vdist(actor.enemy.origin - actor.origin, >=, autocvar_g_monster_golem_attack_smash_range * 1.5)) // small chance, don't want this spammed
{
- setanim(actor, actor.anim_shoot, true, true, false);
+ setanim(actor, actor.anim_melee2, true, true, false);
actor.state = MONSTER_ATTACK_MELEE; // maybe we should rename this to something more general
actor.attack_finished_single[0] = time + 1.1;
actor.anim_finished = 1.1;
actor.state = MONSTER_ATTACK_MELEE; // maybe we should rename this to something more general
actor.attack_finished_single[0] = time + 1.1;
actor.anim_finished = 1.1;
//actor.anim_pain3 = animfixfps(actor, '9 1 2', none); // 0.5 seconds
//actor.anim_pain4 = animfixfps(actor, '10 1 2', none); // 0.5 seconds
//actor.anim_pain5 = animfixfps(actor, '11 1 2', none); // 0.5 seconds
//actor.anim_pain3 = animfixfps(actor, '9 1 2', none); // 0.5 seconds
//actor.anim_pain4 = animfixfps(actor, '10 1 2', none); // 0.5 seconds
//actor.anim_pain5 = animfixfps(actor, '11 1 2', none); // 0.5 seconds
actor.anim_die1 = animfixfps(actor, '13 1 0.5', none); // 2 seconds
//actor.anim_dead = animfixfps(actor, '14 1 0.5', none); // 2 seconds
actor.anim_die2 = animfixfps(actor, '15 1 0.5', none); // 2 seconds
actor.anim_die1 = animfixfps(actor, '13 1 0.5', none); // 2 seconds
//actor.anim_dead = animfixfps(actor, '14 1 0.5', none); // 2 seconds
actor.anim_die2 = animfixfps(actor, '15 1 0.5', none); // 2 seconds
METHOD(Golem, mr_setup, bool(Golem this, entity actor))
{
TC(Golem, this);
METHOD(Golem, mr_setup, bool(Golem this, entity actor))
{
TC(Golem, this);
- if(!GetResourceAmount(actor, RESOURCE_HEALTH)) SetResourceAmountExplicit(actor, RESOURCE_HEALTH, autocvar_g_monster_golem_health);
+ if(!GetResource(actor, RES_HEALTH)) SetResourceExplicit(actor, RES_HEALTH, autocvar_g_monster_golem_health);
if(!actor.attack_range) actor.attack_range = 150;
if(!actor.speed) { actor.speed = (autocvar_g_monster_golem_speed_walk); }
if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_golem_speed_run); }
if(!actor.attack_range) actor.attack_range = 150;
if(!actor.speed) { actor.speed = (autocvar_g_monster_golem_speed_walk); }
if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_golem_speed_run); }
actor.monster_loot = ITEM_HealthMega;
actor.weapon = WEP_ELECTRO.m_id; // matches attacks better than WEP_VORTEX
actor.monster_loot = ITEM_HealthMega;
actor.weapon = WEP_ELECTRO.m_id; // matches attacks better than WEP_VORTEX
- setanim(actor, actor.anim_shoot, false, true, true);
+ setanim(actor, actor.anim_spawn, false, true, true);
actor.spawn_time = actor.animstate_endtime;
actor.spawnshieldtime = actor.spawn_time;
actor.monster_attackfunc = M_Golem_Attack;
actor.spawn_time = actor.animstate_endtime;
actor.spawnshieldtime = actor.spawn_time;
actor.monster_attackfunc = M_Golem_Attack;