Skip to content

Commit e54ab1e

Browse files
committed
Replaced Phantom Obstacle talent with Spitting Gasser, which adds a medium range acid attack to gassers.
1 parent 2c38398 commit e54ab1e

File tree

7 files changed

+97
-33
lines changed

7 files changed

+97
-33
lines changed

lua/variables.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,16 @@ GASSER_DELAY = 1.0
12441244
GASCLOUD_POISON_DURATION = 10.0
12451245
GASCLOUD_POISON_FACTOR = 0.1
12461246

1247+
ACID_INITIAL_DAMAGE = 50
1248+
ACID_ADDON_DAMAGE = 15
1249+
ACID_INITIAL_SPEED = 600
1250+
ACID_ADDON_SPEED = 0
1251+
ACID_INITIAL_RADIUS = 64
1252+
ACID_ADDON_RADIUS = 0
1253+
ACID_DURATION = 10.0
1254+
ACID_DELAY = 0.2
1255+
ACID_COST = 20
1256+
12471257
--Blink Strike
12481258
BLINKSTRIKE_INITIAL_COST = 50
12491259
BLINKSTRIKE_ADDON_COST = -4

src/characters/Talents.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const talentdef_t talents_poltergeist[] = {
3434
};
3535

3636
const talentdef_t talents_alien[] = {
37-
{TALENT_PHANTOM_OBSTACLE, 5, false},
37+
{TALENT_SPITTING_GASSER, 5, false},
3838
{TALENT_SUPER_HEALER, 5, false},
3939
{TALENT_PHANTOM_COCOON, 5, false},
4040
{TALENT_SWARMING, 5, false},
@@ -606,9 +606,12 @@ int writeTalentDescription(edict_t *ent, int talentID) {
606606
menu_add_line(ent, "totem to shoot a fireball.", MENU_WHITE_CENTERED);
607607
return 2;
608608
//Alien talents
609-
case TALENT_PHANTOM_OBSTACLE:
610-
menu_add_line(ent, "Reduces time to cloak.", MENU_WHITE_CENTERED);
611-
return 1;
609+
case TALENT_SPITTING_GASSER:
610+
menu_add_line(ent, "Gives gassers an acid attack", MENU_WHITE_CENTERED);
611+
menu_add_line(ent, "which is tied to your", MENU_WHITE_CENTERED);
612+
menu_add_line(ent, "acid ability. Upgrades", MENU_WHITE_CENTERED);
613+
menu_add_line(ent, "increase rate of fire.", MENU_WHITE_CENTERED);
614+
return 4;
612615
case TALENT_SUPER_HEALER:
613616
menu_add_line(ent, "Allows healer to heal", MENU_WHITE_CENTERED);
614617
menu_add_line(ent, "beyond maximum health.", MENU_WHITE_CENTERED);

src/characters/Talents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#define TALENT_EXPLODING_BODIES 100
7474
#define TALENT_SWARMING 101
7575
#define TALENT_PHANTOM_COCOON 102
76-
#define TALENT_PHANTOM_OBSTACLE 103
76+
#define TALENT_SPITTING_GASSER 103
7777
#define TALENT_SUPER_HEALER 104
7878
#define TALENT_LIFE_REG 135
7979
//Weapon Master

src/characters/settings.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,15 @@ extern double GASSER_COST;
12031203
extern double GASSER_DELAY;
12041204
extern double GASCLOUD_POISON_DURATION;
12051205
extern double GASCLOUD_POISON_FACTOR;
1206+
extern double ACID_INITIAL_DAMAGE;
1207+
extern double ACID_ADDON_DAMAGE;
1208+
extern double ACID_INITIAL_SPEED;
1209+
extern double ACID_ADDON_SPEED;
1210+
extern double ACID_INITIAL_RADIUS;
1211+
extern double ACID_ADDON_RADIUS;
1212+
extern double ACID_DURATION;
1213+
extern double ACID_DELAY;
1214+
extern double ACID_COST;
12061215
extern double BLINKSTRIKE_INITIAL_COST;
12071216
extern double BLINKSTRIKE_ADDON_COST;
12081217
extern double BLINKSTRIKE_MIN_COST;

src/characters/v_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ char *GetTalentString(int talent_ID) {
504504
case TALENT_TOTEM:
505505
return "Totemic Focus";
506506
//Alien Talents
507-
case TALENT_PHANTOM_OBSTACLE:
508-
return "Hidden Obstacle";
507+
case TALENT_SPITTING_GASSER:
508+
return "Spitting Gasser";
509509
case TALENT_SUPER_HEALER:
510510
return "Super Healer";
511511
case TALENT_LIFE_REG:

src/combat/abilities/gloom.c

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ edict_t *CreateObstacle (edict_t *ent, int skill_level)
12311231
e->max_health = OBSTACLE_INITIAL_HEALTH + OBSTACLE_ADDON_HEALTH * skill_level;
12321232
e->health = 0.5*e->max_health;
12331233
e->dmg = OBSTACLE_INITIAL_DAMAGE + OBSTACLE_ADDON_DAMAGE * skill_level;
1234-
e->monsterinfo.nextattack = 100 - 9 * vrx_get_talent_level(ent, TALENT_PHANTOM_OBSTACLE);
1234+
e->monsterinfo.nextattack = 100;// -9 * vrx_get_talent_level(ent, TALENT_PHANTOM_OBSTACLE);
12351235
e->monsterinfo.level = skill_level;
12361236
e->gib_health = -2 * BASE_GIB_HEALTH;
12371237
e->die = obstacle_die;
@@ -1510,21 +1510,23 @@ void fire_acid (edict_t *self, vec3_t start, vec3_t aimdir, int projectile_damag
15101510
void gasser_acidattack (edict_t *self)
15111511
{
15121512
float dist;
1513-
float range=384;
1514-
int speed=600;
1513+
float range=self->monsterinfo.sight_range;
1514+
int speed= ACID_INITIAL_SPEED;
15151515
vec3_t forward, start, end;
15161516
edict_t *e=NULL;
15171517

15181518
if (self->monsterinfo.attack_finished > level.time)
15191519
return;
15201520

15211521
VectorCopy(self->s.origin, start);
1522-
start[2] = self->absmax[2] - 16;
1522+
start[2] = self->absmax[2] + 1;// -16;
15231523

1524-
while ((e = findradius(e, self->s.origin, range)) != NULL)
1525-
{
1526-
if (!G_ValidTarget(self, e, true, true))
1527-
continue;
1524+
e = self->enemy;
1525+
//while ((e = findradius(e, self->s.origin, range)) != NULL)
1526+
//{
1527+
if (!G_ValidTarget(self, e, true, true))
1528+
return;
1529+
// continue;
15281530

15291531
// copy target location
15301532
G_EntMidPoint(e, end);
@@ -1539,13 +1541,13 @@ void gasser_acidattack (edict_t *self)
15391541
VectorSubtract(end, start, forward);
15401542
VectorNormalize(forward);
15411543

1542-
fire_acid(self, self->s.origin, forward, 200, 64, speed, 20, 10.0);
1544+
fire_acid(self, start, forward, self->radius_dmg, ACID_INITIAL_RADIUS, speed, (0.1*self->radius_dmg), ACID_DURATION);
15431545

15441546
//FIXME: only need to do this once
1545-
self->monsterinfo.attack_finished = level.time + 2.0;
1547+
self->monsterinfo.attack_finished = level.time + (3.0 - (0.4 * self->light_level)); // talent level reduces attack delay
15461548
self->s.frame = GASSER_FRAMES_ATTACK_END-2;
15471549
//gi.sound (self, CHAN_VOICE, gi.soundindex ("weapons/twang.wav"), 1, ATTN_NORM, 0);
1548-
}
1550+
//}
15491551
}
15501552

15511553
void gasser_attack (edict_t *self)
@@ -1558,6 +1560,8 @@ void gasser_attack (edict_t *self)
15581560
VectorCopy(self->s.origin, start);
15591561
start[2] = self->absmax[2] + 8;
15601562
SpawnGasCloud(self, start, self->dmg, self->dmg_radius, 4.0);
1563+
//gi.sound(self, CHAN_VOICE, gi.soundindex("weapons/poisonloopmedium2.wav"), 1, ATTN_NORM, 0);
1564+
gi.sound(self, CHAN_VOICE, gi.soundindex("weapons/gas1.wav"), 1, ATTN_NORM, 0);
15611565

15621566
self->s.frame = GASSER_FRAMES_ATTACK_START+2;
15631567
self->monsterinfo.attack_finished = level.time + GASSER_REFIRE;
@@ -1567,7 +1571,7 @@ qboolean gasser_findtarget (edict_t *self)
15671571
{
15681572
edict_t *e=NULL;
15691573

1570-
while ((e = findclosestradius_targets(e, self, GASSER_RANGE)) != NULL)
1574+
while ((e = findclosestradius_targets(e, self, self->monsterinfo.sight_range)) != NULL)
15711575
{
15721576
if (!G_ValidTarget_Lite(self, e, true))
15731577
continue;
@@ -1592,8 +1596,12 @@ void gasser_think (edict_t *self)
15921596
V_HealthCache(self, (int)(0.2 * self->max_health), 1);
15931597

15941598
if (gasser_findtarget(self))
1595-
gasser_attack(self);
1596-
//gasser_acidattack(self);
1599+
{
1600+
if (entdist(self, self->enemy) < self->dmg_radius)
1601+
gasser_attack(self);
1602+
else if (self->light_level)
1603+
gasser_acidattack(self);
1604+
}
15971605

15981606
if (self->s.frame < GASSER_FRAMES_ATTACK_END)
15991607
G_RunFrames(self, GASSER_FRAMES_ATTACK_START, GASSER_FRAMES_ATTACK_END, false);
@@ -1730,7 +1738,7 @@ void gasser_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damag
17301738
gi.linkentity(self);
17311739
}
17321740

1733-
edict_t *CreateGasser (edict_t *ent, int skill_level)
1741+
edict_t *CreateGasser (edict_t *ent, int skill_level, int talent_level)
17341742
{
17351743
edict_t *e;
17361744

@@ -1752,8 +1760,20 @@ edict_t *CreateGasser (edict_t *ent, int skill_level)
17521760
e->health = 0.5*e->max_health;
17531761
e->dmg = GASSER_INITIAL_DAMAGE + GASSER_ADDON_DAMAGE * skill_level;
17541762
e->dmg_radius = GASSER_INITIAL_ATTACK_RANGE + GASSER_ADDON_ATTACK_RANGE * skill_level;
1755-
17561763
e->monsterinfo.level = skill_level;
1764+
1765+
e->light_level = talent_level; // Talent: Spitting Gasser
1766+
if (talent_level)
1767+
{
1768+
int acid_level = ent->myskills.abilities[ACID].current_level;
1769+
if (acid_level < 1)
1770+
acid_level = 1;
1771+
e->radius_dmg = ACID_INITIAL_DAMAGE + ACID_ADDON_DAMAGE * acid_level;
1772+
e->monsterinfo.sight_range = 384;
1773+
}
1774+
else
1775+
e->monsterinfo.sight_range = GASSER_RANGE;
1776+
17571777
e->gib_health = -1.25 * BASE_GIB_HEALTH;
17581778
e->s.frame = GASSER_FRAMES_IDLE_START;
17591779
e->die = gasser_die;
@@ -1801,7 +1821,7 @@ void Cmd_Gasser_f (edict_t *ent)
18011821
return;
18021822
}
18031823

1804-
gasser = CreateGasser(ent, ent->myskills.abilities[GASSER].current_level);
1824+
gasser = CreateGasser(ent, ent->myskills.abilities[GASSER].current_level, vrx_get_talent_level(ent, TALENT_SPITTING_GASSER)); // Talent: Spitting Gasser
18051825
if (!G_GetSpawnLocation(ent, 100, gasser->mins, gasser->maxs, start, NULL, PROJECT_HITBOX_FAR, false))
18061826
{
18071827
ent->num_gasser--;
@@ -2742,6 +2762,9 @@ void acid_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf
27422762
return;
27432763
}
27442764

2765+
if (other == ent->owner)
2766+
return;
2767+
27452768
acid_explode(ent);
27462769
}
27472770

@@ -2786,15 +2809,15 @@ void fire_acid (edict_t *self, vec3_t start, vec3_t aimdir, int projectile_damag
27862809
VectorSet (grenade->avelocity, 300, 300, 300);
27872810
}
27882811

2789-
#define ACID_INITIAL_DAMAGE 50
2790-
#define ACID_ADDON_DAMAGE 15
2791-
#define ACID_INITIAL_SPEED 600
2792-
#define ACID_ADDON_SPEED 0
2793-
#define ACID_INITIAL_RADIUS 64
2794-
#define ACID_ADDON_RADIUS 0
2795-
#define ACID_DURATION 10.0
2796-
#define ACID_DELAY 0.2
2797-
#define ACID_COST 20
2812+
//#define ACID_INITIAL_DAMAGE 50
2813+
//#define ACID_ADDON_DAMAGE 15
2814+
//#define ACID_INITIAL_SPEED 600
2815+
//#define ACID_ADDON_SPEED 0
2816+
//#define ACID_INITIAL_RADIUS 64
2817+
//#define ACID_ADDON_RADIUS 0
2818+
//#define ACID_DURATION 10.0
2819+
//#define ACID_DELAY 0.2
2820+
//#define ACID_COST 20
27982821

27992822
void Cmd_FireAcid_f (edict_t *ent)
28002823
{

src/server/v_luasettings.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,15 @@ double GASSER_COST;
13811381
double GASSER_DELAY;
13821382
double GASCLOUD_POISON_DURATION;
13831383
double GASCLOUD_POISON_FACTOR;
1384+
double ACID_INITIAL_DAMAGE;
1385+
double ACID_ADDON_DAMAGE;
1386+
double ACID_INITIAL_SPEED;
1387+
double ACID_ADDON_SPEED;
1388+
double ACID_INITIAL_RADIUS;
1389+
double ACID_ADDON_RADIUS;
1390+
double ACID_DURATION;
1391+
double ACID_DELAY;
1392+
double ACID_COST;
13841393
double EXP_MINIBOSS;
13851394
double BLINKSTRIKE_INITIAL_COST;
13861395
double BLINKSTRIKE_ADDON_COST;
@@ -2636,6 +2645,16 @@ void Lua_LoadVariables()
26362645
GASCLOUD_POISON_DURATION = vrx_lua_get_variable("GASCLOUD_POISON_DURATION", 10.0);
26372646
GASCLOUD_POISON_FACTOR = vrx_lua_get_variable("GASCLOUD_POISON_FACTOR", 0.1);
26382647

2648+
ACID_INITIAL_DAMAGE = vrx_lua_get_variable("ACID_INITIAL_DAMAGE", 50);
2649+
ACID_ADDON_DAMAGE = vrx_lua_get_variable("ACID_ADDON_DAMAGE", 15);
2650+
ACID_INITIAL_SPEED = vrx_lua_get_variable("ACID_INITIAL_SPEED", 600);
2651+
ACID_ADDON_SPEED = vrx_lua_get_variable("ACID_ADDON_SPEED", 0);
2652+
ACID_INITIAL_RADIUS = vrx_lua_get_variable("ACID_INITIAL_RADIUS", 64);
2653+
ACID_ADDON_RADIUS = vrx_lua_get_variable("ACID_ADDON_RADIUS", 0);
2654+
ACID_DURATION = vrx_lua_get_variable("ACID_DURATION", 10);
2655+
ACID_DELAY = vrx_lua_get_variable("ACID_DELAY", 0.2);
2656+
ACID_COST = vrx_lua_get_variable("ACID_COST", 20);
2657+
26392658
BLINKSTRIKE_INITIAL_COST = vrx_lua_get_variable("BLINKSTRIKE_INITIAL_COST", 75);
26402659
BLINKSTRIKE_ADDON_COST = vrx_lua_get_variable("BLINKSTRIKE_ADDON_COST", -5);
26412660
BLINKSTRIKE_MIN_COST = vrx_lua_get_variable("BLINKSTRIKE_MIN_COST", 25);

0 commit comments

Comments
 (0)