summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-06-25 22:52:39 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-06-25 22:52:39 +0200
commit6c7152aada204bfdfa6e39cdfea5e10440e0ed36 (patch)
tree1d2c8e17b47abc796de1f0e045abf3fb043d07df /src/game
parent1b13c257a9759f0a40c79f0acd3a07bc079df120 (diff)
Bring back some Basilisk code as a base for Wraith.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c58
-rw-r--r--src/game/bg_mod.h1
-rw-r--r--src/game/bg_pmove.c9
-rw-r--r--src/game/bg_public.h2
-rw-r--r--src/game/g_csw.h1
-rw-r--r--src/game/g_weapon.c4
-rw-r--r--src/game/tremulous.h16
7 files changed, 89 insertions, 2 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 0780ab8..33d4138 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -2253,11 +2253,42 @@ static const classAttributes_t bg_classList[ ] =
400.0f, //float stopSpeed;
250.0f, //float jumpMagnitude;
2.0f, //float knockbackScale;
- { PCL_ALIEN_LEVEL2, PCL_NONE }, //int children[ 3 ];
+ { PCL_ALIEN_LEVEL1, PCL_NONE }, //int children[ 3 ];
LEVEL0_COST, //int cost;
LEVEL0_VALUE, //int value;
},
{
+ PCL_ALIEN_LEVEL1, //int classnum;
+ "level1", //char *classname;
+ "A support class able to crawl on walls and ceilings. Its melee "
+ "attack is most effective when combined with the ability to grab "
+ "and hold its victims in place. Provides a weak healing aura "
+ "that accelerates the healing rate of nearby aliens. It also has "
+ "an acid bomb that can be used to deal moderate area damage. "
+ "The basilisk is also resistant to flamer.",
+ STAGE_GE_1, //int stages
+ LEVEL1_HEALTH, //int health;
+ 0.0f, //float fallDamage;
+ LEVEL1_REGEN, //float regenRate;
+ SCA_FOVWARPS|SCA_WALLCLIMBER|SCA_ALIENSENSE, //int abilities;
+ WP_ALEVEL1, //weapon_t startWeapon
+ 0.0f, //float buildDist;
+ 120, //int fov;
+ 0.001f, //float bob;
+ 1.8f, //float bobCycle;
+ 60, //int steptime;
+ LEVEL1_SPEED, //float speed;
+ 10.0f, //float acceleration;
+ 1.0f, //float airAcceleration;
+ 6.0f, //float friction;
+ 300.0f, //float stopSpeed;
+ 310.0f, //float jumpMagnitude;
+ 1.2f, //float knockbackScale;
+ { PCL_ALIEN_LEVEL2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ LEVEL1_COST, //int cost;
+ LEVEL1_VALUE, //int value;
+ },
+ {
PCL_ALIEN_LEVEL2, //int classnum;
"level2", //char *classname;
"Has a melee attack and the ability to jump off walls. This "
@@ -2986,6 +3017,31 @@ static const weaponAttributes_t bg_weapons[ ] =
TEAM_ALIENS //team_t team;
},
{
+ WP_ALEVEL1, //int weaponNum;
+ 0, //int price;
+ STAGE_GE_1, //int stages
+ SLOT_WEAPON, //int slots;
+ "level1", //char *weaponName;
+ "Claws", //char *humanName;
+ "",
+ 1, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ LEVEL1_CLAW_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
+ 0, //int repeatRate3;
+ 0, //int reloadTime;
+ LEVEL1_CLAW_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
+ qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
+ },
+ {
WP_ALEVEL2, //int weaponNum;
0, //int price;
STAGE_GE_2, //int stages
diff --git a/src/game/bg_mod.h b/src/game/bg_mod.h
index a34b7f5..1db77dc 100644
--- a/src/game/bg_mod.h
+++ b/src/game/bg_mod.h
@@ -31,6 +31,7 @@ MOD( MOD_TARGET_LASER, CSW_UNKNOWN ),
MOD( MOD_TRIGGER_HURT, CSW_UNKNOWN ),
MOD( MOD_ABUILDER_CLAW, CSW_ABUILDER ),
MOD( MOD_LEVEL0_BITE, CSW_UNKNOWN ),
+MOD( MOD_LEVEL1_CLAW, CSW_LEVEL1 ),
MOD( MOD_LEVEL3_CLAW, CSW_LEVEL3 ),
MOD( MOD_LEVEL3_POUNCE, CSW_UNKNOWN ),
MOD( MOD_LEVEL5_POUNCE, CSW_UNKNOWN ),
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 3b36d9e..8ab7282 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -3482,6 +3482,15 @@ static void PM_Weapon( void )
// weapon.cfg
switch( pm->ps->weapon )
{
+ case WP_ALEVEL1:
+ if( attack1 )
+ {
+ num /= RAND_MAX / 6 + 1;
+ PM_ForceLegsAnim( NSPA_ATTACK1 );
+ PM_StartWeaponAnim( WANIM_ATTACK1 + num );
+ }
+ break;
+
case WP_ALEVEL2_UPG:
if( attack2 )
{
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 6c0e626..8f12356 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -345,6 +345,7 @@ typedef enum
{
WP_NONE,
WP_ALEVEL0,
+ WP_ALEVEL1,
WP_ALEVEL2,
WP_ALEVEL2_UPG,
WP_ALEVEL5,
@@ -793,6 +794,7 @@ typedef enum
PCL_ALIEN_BUILDER0_UPG,
//offensive classes
PCL_ALIEN_LEVEL0,
+ PCL_ALIEN_LEVEL1,
PCL_ALIEN_LEVEL2,
PCL_ALIEN_LEVEL2_UPG,
PCL_ALIEN_LEVEL5,
diff --git a/src/game/g_csw.h b/src/game/g_csw.h
index 49e2088..96158b7 100644
--- a/src/game/g_csw.h
+++ b/src/game/g_csw.h
@@ -17,6 +17,7 @@ CSW( CSW_GRENADE, MOD_GRENADE, "Grenade", GRENADE_DAMAGE ),
CSW( CSW_ABUILDER, MOD_ABUILDER_CLAW, "Granger", ABUILDER_CLAW_DMG ),
CSW( CSW_ABUILDER_ALT, MOD_SLOWBLOB, "Granger Spit", ABUILDER_BLOB_DMG ),
+CSW( CSW_LEVEL1, MOD_LEVEL1_CLAW, "Basilisk", LEVEL1_CLAW_DMG ),
CSW( CSW_LEVEL2, MOD_LEVEL2_CLAW, "Marauder", LEVEL2_CLAW_DMG ),
CSW( CSW_LEVEL2_UPG, MOD_LEVEL2_CLAW_UPG, "Adv. Marauder", LEVEL2_CLAW_UPG_DMG ),
CSW( CSW_LEVEL2_ALT, MOD_LEVEL2_ZAP, "Marauder Zap", LEVEL2_AREAZAP_DMG ),
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 586af40..90eb069 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1763,6 +1763,10 @@ void FireWeapon( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
+ case WP_ALEVEL1:
+ meleeAttack( ent, LEVEL1_CLAW_RANGE, LEVEL1_CLAW_WIDTH, LEVEL1_CLAW_WIDTH,
+ LEVEL1_CLAW_DMG, MOD_LEVEL1_CLAW );
+ break;
case WP_ALEVEL3:
meleeAttack( ent, LEVEL3_CLAW_RANGE, LEVEL3_CLAW_WIDTH, LEVEL3_CLAW_WIDTH,
LEVEL3_CLAW_DMG, MOD_LEVEL3_CLAW );
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 95b6398..f548b58 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -125,12 +125,26 @@ TREMULOUS EDGE MOD SRC FILE
#define LEVEL0_BITE_REPEAT 500
#define LEVEL0_BITE_K_SCALE 1.0f
+//Basilik
+#define LEVEL1_SPEED 1.25f
+#define LEVEL1_VALUE AVM(270)
+#define LEVEL1_HEALTH AHM(60)
+#define LEVEL1_REGEN (0.03f * LEVEL1_HEALTH)
+#define LEVEL1_COST 1
+
+#define LEVEL1_CLAW_DMG ADM(32)
+#define LEVEL1_CLAW_RANGE 64.0f
+#define LEVEL1_CLAW_U_RANGE LEVEL1_CLAW_RANGE + 3.0f
+#define LEVEL1_CLAW_WIDTH 10.0f
+#define LEVEL1_CLAW_REPEAT 600
+#define LEVEL1_CLAW_K_SCALE 1.0f
+
//Marauder
#define LEVEL2_SPEED 1.2f
#define LEVEL2_VALUE AVM(420)
#define LEVEL2_HEALTH AHM(150)
#define LEVEL2_REGEN (0.03f * LEVEL2_HEALTH)
-#define LEVEL2_COST 2
+#define LEVEL2_COST 1
#define LEVEL2_UPG_SPEED 1.2f
#define LEVEL2_UPG_VALUE AVM(540)
#define LEVEL2_UPG_HEALTH AHM(175)