Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
vengeance.qc
Go to the documentation of this file.
1#include "vengeance.qh"
2
3#ifdef SVQC
5{
6 if (this.enemy)
7 {
8 Damage(this.enemy, this.owner, this.owner, this.dmg, DEATH_BUFF_VENGEANCE.m_id, DMG_NOWEP, this.enemy.origin, '0 0 0');
9 buff_Effect(this.owner, EFFECT_VENGEANCE, CENTER_OF_ENT(this.enemy), vec2(this.enemy.velocity), min(ceil(this.dmg), 50), false);
10 }
11
12 delete(this);
13 return;
14}
19#endif // SVQC
20#ifdef MENUQC
21#include "vampire.qh"
22
23METHOD(VengeanceBuff, describe, string(VengeanceBuff this))
24{
25 TC(VengeanceBuff, this);
27 PAR(_("The %s buff reciprocates a portion of the damage enemies deal to you onto them, until the buff expires."), COLORED_NAME(this));
28 PAR(_("In some sense, this is the opposite of the %s buff."), COLORED_NAME(BUFF_VAMPIRE));
29 return PAGE_TEXT;
30}
31#endif // MENUQC
float dmg
Definition breakable.qc:12
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity owner
Definition main.qh:87
#define COLORED_NAME(this)
Definition color.qh:189
#define CENTER_OF_ENT(ent)
Definition util.qh:10
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:484
#define DMG_NOWEP
Definition damage.qh:104
#define TC(T, sym)
Definition _all.inc:82
float ceil(float f)
float min(float f,...)
#define METHOD(cname, name, prototype)
Definition oo.qh:274
#define PAGE_TEXT
Definition string.qh:651
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:657
#define PAGE_TEXT_INIT()
Definition string.qh:650
void buff_Effect(entity player, entity eff, vector eff_loc, vector eff_vel, int eff_cnt, bool hide)
Spawn effects on a player with a buff.
Definition sv_buffs.qc:103
float frag_damage
Definition sv_ctf.qc:2316
entity enemy
Definition sv_ctf.qh:152
#define vec2(...)
Definition vector.qh:95
void buff_Vengeance_DelayedDamage(entity this)
Definition vengeance.qc:4
float buff_Vengeance_CalculateDamage(float frag_damage)
Definition vengeance.qc:15
float autocvar_g_buffs_vengeance_damage_multiplier
Definition vengeance.qh:6