diff --git a/lua/variables.lua b/lua/variables.lua index 7fea84e..0eee5f8 100644 --- a/lua/variables.lua +++ b/lua/variables.lua @@ -461,12 +461,12 @@ EXPLODING_ARMOR_DMG_ADDON = 40 EXPLODING_ARMOR_MAX_RADIUS = 200 EXPLODING_ARMOR_DELAY = 1 EXPLODING_ARMOR_DETECTION = 32 -MIRV_INITIAL_DAMAGE = 40 -MIRV_ADDON_DAMAGE = 7 -MIRV_INITIAL_RADIUS = 80 -MIRV_ADDON_RADIUS = 2 +MIRV_INITIAL_DAMAGE = 50 +MIRV_ADDON_DAMAGE = 10 +MIRV_INITIAL_RADIUS = 100 +MIRV_ADDON_RADIUS = 2.5 MIRV_DELAY = 0.5 -MIRV_COST = 35 +MIRV_COST = 15 SPIKER_INITIAL_HEALTH = 100 SPIKER_ADDON_HEALTH = 50 SPIKER_INITIAL_DAMAGE = 50 @@ -1040,7 +1040,7 @@ PROXY_ADDON_HEALTH = 30 NAPALM_MAX_COUNT = 3 NAPALM_ATTACK_DELAY = 1.0 NAPALM_DELAY = 1.0 -NAPALM_COST = 25 +NAPALM_COST = 20 NAPALM_DURATION = 10.0 NAPALM_INITIAL_DMG = 100 NAPALM_ADDON_DMG = 20 @@ -1099,7 +1099,7 @@ CALTROPS_DELAY = 0.2 CALTROPS_MAX_COUNT = 10 -SPIKEGRENADE_COST = 25 +SPIKEGRENADE_COST = 20 SPIKEGRENADE_DELAY = 1.0 SPIKEGRENADE_DURATION = 10.0 SPIKEGRENADE_INITIAL_DAMAGE = 50 diff --git a/src/combat/abilities/mirv.c b/src/combat/abilities/mirv.c index 3b8d0e6..fcd0cc7 100644 --- a/src/combat/abilities/mirv.c +++ b/src/combat/abilities/mirv.c @@ -152,6 +152,11 @@ void Cmd_TossMirv (edict_t *ent) if (!V_CanUseAbilities(ent, MIRV, MIRV_COST, true)) return; + if (ent->client->pers.inventory[grenade_index] < 1) + { + safe_cprintf(ent, PRINT_HIGH, "You need at least 1 grenade to use this ability.\n"); + return; + } damage = MIRV_INITIAL_DAMAGE + MIRV_ADDON_DAMAGE * ent->myskills.abilities[MIRV].current_level; radius = MIRV_INITIAL_RADIUS + MIRV_ADDON_RADIUS * ent->myskills.abilities[MIRV].current_level; @@ -165,4 +170,5 @@ void Cmd_TossMirv (edict_t *ent) ent->client->ability_delay = level.time + MIRV_DELAY; ent->client->pers.inventory[power_cube_index] -= cost; + ent->client->pers.inventory[grenade_index]--; } \ No newline at end of file diff --git a/src/combat/abilities/napalm.c b/src/combat/abilities/napalm.c index 3b15ef9..847e198 100644 --- a/src/combat/abilities/napalm.c +++ b/src/combat/abilities/napalm.c @@ -251,6 +251,12 @@ void Cmd_Napalm_f (edict_t *ent) if (!G_CanUseAbilities(ent, ent->myskills.abilities[NAPALM].current_level, cost)) return; + if (ent->client->pers.inventory[grenade_index] < 1) + { + safe_cprintf(ent, PRINT_HIGH, "You need at least 1 grenade to use this ability.\n"); + return; + } + if (ent->num_napalm >= NAPALM_MAX_COUNT) { safe_cprintf(ent, PRINT_HIGH, "Can't throw any more napalm grenades.\n"); @@ -269,5 +275,6 @@ void Cmd_Napalm_f (edict_t *ent) fire_napalm(ent, start, forward, damage, burn_dmg, 400, NAPALM_DURATION, radius); ent->client->pers.inventory[power_cube_index] -= cost; + ent->client->pers.inventory[grenade_index]--; ent->client->ability_delay = level.time + NAPALM_DELAY; } \ No newline at end of file diff --git a/src/combat/abilities/spikegrenade.c b/src/combat/abilities/spikegrenade.c index 04a646e..e0a191b 100644 --- a/src/combat/abilities/spikegrenade.c +++ b/src/combat/abilities/spikegrenade.c @@ -183,9 +183,9 @@ void ThrowSpikeGrenade (edict_t *self, vec3_t start, vec3_t forward, int slevel, VectorCopy(start, grenade->s.origin); grenade->movetype = MOVETYPE_BOUNCE; - grenade->health = grenade->max_health = 100;//4.4 - grenade->takedamage = DAMAGE_AIM;//4.4 - grenade->die = spikegren_die;//4.4 + //grenade->health = grenade->max_health = 100 + 25 * slevel;//4.4 + //grenade->takedamage = DAMAGE_AIM;//4.4 + //grenade->die = spikegren_die;//4.4 grenade->owner = self; grenade->monsterinfo.level = slevel; grenade->mtype = M_SPIKE_GRENADE; @@ -222,6 +222,12 @@ void Cmd_SpikeGrenade_f (edict_t *ent) if (!V_CanUseAbilities(ent, SPIKE_GRENADE, cost, true)) return; + if (ent->client->pers.inventory[grenade_index] < 1) + { + safe_cprintf(ent, PRINT_HIGH, "You need at least 1 grenade to use this ability.\n"); + return; + } + VectorCopy(ent->s.origin, start); start[2] += ent->viewheight - 8; AngleVectors(ent->client->v_angle, forward, NULL, NULL); @@ -234,5 +240,6 @@ void Cmd_SpikeGrenade_f (edict_t *ent) ThrowSpikeGrenade(ent, start, forward, ent->myskills.abilities[SPIKE_GRENADE].current_level, SPIKEGRENADE_DURATION); ent->client->pers.inventory[power_cube_index] -= cost; + ent->client->pers.inventory[grenade_index]--; ent->client->ability_delay = level.time + SPIKEGRENADE_DELAY; } \ No newline at end of file diff --git a/src/combat/common/g_combat.c b/src/combat/common/g_combat.c index d75f913..5433e64 100644 --- a/src/combat/common/g_combat.c +++ b/src/combat/common/g_combat.c @@ -824,7 +824,8 @@ int T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, if (!targ->inuse) return 0; -// gi.dprintf("original damage: %d target: %s (%.1f)\n", damage, targ->classname, level.time); + //gi.dprintf("original damage: %d target: %s (%.1f)\n", damage, targ->classname, level.time); + before_sub = damage = G_AddDamage(targ, inflictor, attacker, point, damage, dflags, mod); //4.1 some abilities that increase damage are seperate from all the others.