51 if (!actor.target_range)
76 if (key_pressed && !player.OffhandMageTeleport_key_pressed)
78 player.OffhandMageTeleport_key_pressed = key_pressed;
141 DEATH_MONSTER_MAGE.m_id,
183 vector eorg = 0.5 * (e.absmin + e.absmax);
193 traceline(this.
origin, this.
origin + olddir * this.wait,
false,
this);
195 traceline(this.
origin, eorg,
false,
this);
220 missile.owner = missile.realowner =
this;
222 missile.ltime =
time + 7;
223 missile.nextthink =
time;
230 setsize(missile,
'0 0 0',
'0 0 0');
231 missile.velocity =
dir * 400;
232 missile.avelocity =
'300 300 300';
233 missile.enemy = this.
enemy;
243 bool washealed =
false;
263 fx = EFFECT_AMMO_REGEN;
269 fx = EFFECT_ARMOR_REPAIR;
287 setanim(
this, this.anim_melee,
true,
true,
true);
304 DEATH_MONSTER_MAGE.m_id,
310 setanim(
this, this.anim_duckjump,
true,
true,
true);
331 this.
angles =
'0 1 0' * a.y;
354 setorigin(
this, newpos);
371 setanim(
this, this.anim_shoot,
true,
true,
true);
383 Weapon wep = WEP_MAGE_SPIKE;
385 wep.
wr_think(wep, actor, weaponentity, 2);
395 actor.OffhandMageTeleport_key_pressed = 0;
401 setanim(actor, actor.anim_shoot,
true,
true,
true);
403 actor.anim_finished =
time + 1;
405 Weapon wep = WEP_MAGE_SPIKE;
406 wep.
wr_think(wep, actor, weaponentity, 1);
424 bool need_help =
false;
448 &&
time >= actor.attack_finished_single[0]
453 && actor.enemy &&
time >= actor.mage_shield_delay
469 setanim(actor, ((
random() > 0.5) ? actor.anim_die2 : actor.anim_die1),
false,
true,
true);
478 actor.anim_idle =
animfixfps(actor,
'0 1 1', none);
479 actor.anim_walk =
animfixfps(actor,
'1 1 1', none);
480 actor.anim_run =
animfixfps(actor,
'1 1 1', none);
481 actor.anim_shoot =
animfixfps(actor,
'2 1 5', none);
482 actor.anim_duckjump =
animfixfps(actor,
'4 1 5', none);
483 actor.anim_melee =
animfixfps(actor,
'5 1 5', none);
487 actor.anim_pain1 =
animfixfps(actor,
'6 1 2', none);
488 actor.anim_pain2 =
animfixfps(actor,
'7 1 2', none);
490 actor.anim_die1 =
animfixfps(actor,
'9 1 0.5', none);
491 actor.anim_die2 =
animfixfps(actor,
'10 1 0.5', none);
519 PAR(_(
"Wielding nanotechnology as if it were sorcery, the Mage employs a range of unique abilities of its own creation in combat."));
520 PAR(_(
"As a primary attack, the Mage throws a homing electric sphere towards the player. "
521 "This sphere will track its target at high speed, exploding on impact or if it does not reach its target in time."));
522 PAR(_(
"When threatened, the Mage may deploy an energy shield to protect itself from damage briefly. "
523 "Enemies approaching too closely during this time may be pushed away with explosive force!"));
524 PAR(_(
"Defensively the Mage is capable of healing itself and nearby allies, with some variants also providing armor and ammunition."));
525 PAR(_(
"The Mage may sometimes appear to blink out of existence as it teleports behind its target for a sneak attack."));
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.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
bool OffhandMageTeleport_key_pressed
virtual void offhand_think()
virtual void offhand_think()
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
virtual void wr_think()
(SERVER) logic to run every frame
int autocvar_g_pickup_rockets_max
int autocvar_g_pickup_shells_max
int autocvar_g_pickup_cells_max
int autocvar_g_pickup_nails_max
const float MOVE_NOMONSTERS
float DPCONTENTS_DONOTENTER
float DPCONTENTS_PLAYERCLIP
vector trace_plane_normal
void UpdateCSQCProjectile(entity e)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
bool Heal(entity targ, entity inflictor, float amount, float limit)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
void M_Mage_Defend_Shield(entity this)
void M_Mage_Defend_Heal(entity this)
float autocvar_g_monster_mage_attack_push_force
float autocvar_g_monster_mage_shield_time
float autocvar_g_monster_mage_attack_spike_chance
float autocvar_g_monster_mage_attack_push_radius
float autocvar_g_monster_mage_heal_delay
float autocvar_g_monster_mage_attack_spike_delay
float autocvar_g_monster_mage_attack_teleport_random
string autocvar_g_monster_mage_loot
float autocvar_g_monster_mage_attack_spike_smart_mindist
float autocvar_g_monster_mage_speed_run
float autocvar_g_monster_mage_speed_stop
float autocvar_g_monster_mage_attack_spike_radius
void M_Mage_Attack_Spike_Think(entity this)
float autocvar_g_monster_mage_attack_spike_smart_trace_min
void M_Mage_Attack_Spike_Explode(entity this, entity directhitentity)
float autocvar_g_monster_mage_heal_minhealth
float autocvar_g_monster_mage_attack_spike_smart
float autocvar_g_monster_mage_attack_spike_accel
float autocvar_g_monster_mage_attack_spike_smart_trace_max
float autocvar_g_monster_mage_health
float autocvar_g_monster_mage_attack_spike_decel
float autocvar_g_monster_mage_heal_range
float autocvar_g_monster_mage_attack_spike_turnrate
float autocvar_g_monster_mage_shield_delay
float autocvar_g_monster_mage_attack_spike_damage
void M_Mage_Attack_Teleport(entity this, entity targ)
float autocvar_g_monster_mage_speed_walk
float autocvar_g_monster_mage_attack_spike_speed_max
void M_Mage_Attack_Push(entity this)
float autocvar_g_monster_mage_attack_push_delay
float autocvar_g_monster_mage_attack_push_damage
float autocvar_g_monster_mage_shield_blockpercent
OffhandMageTeleport OFFHAND_MAGE_TELEPORT
bool M_Mage_Attack(int attack_type, entity actor, entity targ,.entity weaponentity)
bool M_Mage_Defend_Heal_Check(entity this, entity targ)
void M_Mage_Attack_Spike(entity this, vector dir)
float autocvar_g_monster_mage_attack_teleport_random_range
float autocvar_g_monster_mage_heal_allies
float autocvar_g_monster_mage_attack_teleport_delay
float autocvar_g_monster_mage_damageforcescale
void M_Mage_Attack_Spike_Touch(entity this, entity toucher)
float autocvar_g_monster_mage_attack_teleport_chance
float autocvar_g_monster_mage_attack_push_chance
vector animfixfps(entity e, vector a, vector b)
void set_movetype(entity this, int mt)
const int MOVETYPE_FLYMISSILE
#define METHOD(cname, name, prototype)
const int PROJECTILE_MAGE_SPIKE
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define sound(e, c, s, v, a)
string W_Sound(string w_snd)
#define SOUND(name, path)
#define STATIC_INIT(func)
during worldspawn
bool StatusEffects_active(StatusEffect this, entity actor)
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...
bool Monster_Spawn(entity this, bool check_appear, Monster mon)
Setup the basic required properties for a monster.
entity Monster_FindTarget(entity this)
void monster_makevectors(entity this, entity targ)
float anim_finished
will be phased out when we have proper animations system
entity monster_follow
monster follow target
float autocvar_g_monsters_target_range
const int MONSTER_ATTACK_MELEE
const int MONSTERFLAG_INVINCIBLE
monster doesn't take damage (may be used for map objects & temporary monsters)
const int MONSTER_ATTACK_RANGED
void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Gives an entity some resource but not more than a limit.
float autocvar_g_balance_health_regenstable
int autocvar_g_balance_armor_regenstable
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
#define FOREACH_CLIENT(cond, body)
#define CENTER_OR_VIEWOFS(ent)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void WaypointSprite_UpdateHealth(entity e, float f)
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float attack_finished_single[MAX_WEAPONSLOTS]
bool MoveToRandomLocationWithinBounds(entity e, vector boundmin, vector boundmax, float goodcontents, float badcontents, float badsurfaceflags, int attempts, float maxaboveground, float minviewdistance, bool frompos)