71 if (key_pressed && !player.OffhandMageTeleport_key_pressed)
73 player.OffhandMageTeleport_key_pressed = key_pressed;
94 if(
STAT(FROZEN, targ))
164 vector eorg = 0.5 * (e.absmin + e.absmax);
174 traceline(this.
origin, this.
origin + olddir * this.wait,
false,
this);
176 traceline(this.
origin, eorg,
false,
this);
201 missile.owner = missile.realowner =
this;
203 missile.ltime =
time + 7;
204 missile.nextthink =
time;
211 setsize(missile,
'0 0 0',
'0 0 0');
212 missile.velocity =
dir * 400;
213 missile.avelocity =
'300 300 300';
214 missile.enemy = this.
enemy;
224 bool washealed =
false;
247 fx = EFFECT_AMMO_REGEN;
254 fx = EFFECT_ARMOR_REPAIR;
263 Send_Effect(EFFECT_HEALING, it.origin,
'0 0 0', 1);
272 setanim(
this, this.anim_melee,
true,
true,
true);
286 setanim(
this, this.anim_duckjump,
true,
true,
true);
306 this.
angles =
'0 1 0' * a.y;
328 setorigin(
this, newpos);
345 setanim(
this, this.anim_shoot,
true,
true,
true);
358 Weapon wep = WEP_MAGE_SPIKE;
360 wep.
wr_think(wep, actor, weaponentity, 2);
371 actor.OffhandMageTeleport_key_pressed = 0;
377 setanim(actor, actor.anim_shoot,
true,
true,
true);
379 actor.anim_finished =
time + 1;
381 Weapon wep = WEP_MAGE_SPIKE;
382 wep.
wr_think(wep, actor, weaponentity, 1);
401 bool need_help =
false;
427 if(
time >= actor.attack_finished_single[0])
431 if(actor.enemy &&
time >= actor.mage_shield_delay &&
random() < 0.5)
447 setanim(actor, ((
random() > 0.5) ? actor.anim_die2 : actor.anim_die1),
false,
true,
true);
457 actor.anim_idle =
animfixfps(actor,
'0 1 1', none);
458 actor.anim_walk =
animfixfps(actor,
'1 1 1', none);
459 actor.anim_run =
animfixfps(actor,
'1 1 1', none);
460 actor.anim_shoot =
animfixfps(actor,
'2 1 5', none);
461 actor.anim_duckjump =
animfixfps(actor,
'4 1 5', none);
462 actor.anim_melee =
animfixfps(actor,
'5 1 5', none);
466 actor.anim_pain1 =
animfixfps(actor,
'6 1 2', none);
467 actor.anim_pain2 =
animfixfps(actor,
'7 1 2', none);
469 actor.anim_die1 =
animfixfps(actor,
'9 1 0.5', none);
470 actor.anim_die2 =
animfixfps(actor,
'10 1 0.5', none);
498 PAR(_(
"Wielding nanotechnology as if it were sorcery, the Mage employs a range of unique abilities of its own creation in combat."));
499 PAR(_(
"As a primary attack, the Mage throws a homing electric sphere towards the player. "
500 "This sphere will track its target at high speed, exploding on impact or if it does not reach its target in time."));
501 PAR(_(
"When threatened, the Mage may deploy an energy shield to protect itself from damage briefly. "
502 "Enemies approaching too closely during this time may be pushed away with explosive force!"));
503 PAR(_(
"Defensively the Mage is capable of healing itself and nearby allies, with some variants also providing armor and ammunition."));
504 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)
entity Monster_FindTarget(entity this)
void monster_makevectors(entity this, entity targ)
float autocvar_g_monsters_target_range
const int MONSTER_ATTACK_MELEE
const int MONSTERFLAG_INVINCIBLE
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)