Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COV-0070: Update weapon types #31

Merged
merged 1 commit into from
Nov 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/const.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,13 @@ const struct lck_app_type lck_app[26] = {
{-120} /* 25 */
};

const char *const attack_table[18] = {
"hit",
"slice", "stab", "slash", "whip", "claw",
"blast", "pound", "crush", "grep", "bite",
"pierce", "suction", "bolt", "arrow", "dart",
"stone", "pea"
const char *const attack_table[23] = {
"hit", "pound", "crush", "smash", "spear", "pierce", "stab", "thrust",
"slice", "slash", "cleave", "chop", "smite", "whip", "claw", "bite",
"sting", "blast", "bolt", "arrow", "dart", "stone", "shield"
};


const char *s_blade_messages[24] = {
"miss", "barely scratch", "scratch", "nick", "cut", "hit", "tear",
"rip", "gash", "lacerate", "hack", "maul", "rend", "decimate",
Expand Down
25 changes: 14 additions & 11 deletions src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,14 @@ bool MPSilent;
bool DONT_UPPER;

/* weaponry */
short gsn_pugilism;
short gsn_long_blades;
short gsn_short_blades;
short gsn_flexible_arms;
short gsn_talonous_arms;
short gsn_bludgeons;
short gsn_pole_weapons;
short gsn_daggers;
short gsn_swords;
short gsn_axes;
short gsn_exotic_arms;
short gsn_missile_weapons;
short gsn_shieldwork;

/* thief */
short gsn_detrap;
Expand Down Expand Up @@ -570,13 +571,15 @@ void boot_db(bool fCopyOver)
ASSIGN_GSN(gsn_style_aggressive, "aggressive style");
ASSIGN_GSN(gsn_style_berserk, "berserk style");

ASSIGN_GSN(gsn_pugilism, "pugilism");
ASSIGN_GSN(gsn_long_blades, "long blades");
ASSIGN_GSN(gsn_short_blades, "short blades");
ASSIGN_GSN(gsn_flexible_arms, "flexible arms");
ASSIGN_GSN(gsn_talonous_arms, "talonous arms");
ASSIGN_GSN(gsn_bludgeons, "bludgeons");
ASSIGN_GSN(gsn_pole_weapons, "pole weapons");
ASSIGN_GSN(gsn_swords, "swords");
ASSIGN_GSN(gsn_daggers, "daggers");
ASSIGN_GSN(gsn_axes, "axes");
ASSIGN_GSN(gsn_exotic_arms, "exotic arms");
ASSIGN_GSN(gsn_bludgeons, "bludgeons");
ASSIGN_GSN(gsn_missile_weapons, "missile weapons");
ASSIGN_GSN(gsn_shieldwork, "shields");

ASSIGN_GSN(gsn_detrap, "detrap");
ASSIGN_GSN(gsn_backstab, "backstab");
ASSIGN_GSN(gsn_circle, "circle");
Expand Down
43 changes: 26 additions & 17 deletions src/fight.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,44 +932,53 @@ int weapon_prof_bonus_check(CHAR_DATA * ch, OBJ_DATA * wield, int *gsn_ptr)
*gsn_ptr = -1;
if (!IS_NPC(ch) && ch->level > 5 && wield)
{
switch (wield->value[3])
{
switch (wield->value[3]) {
default:
*gsn_ptr = -1;
break;

case DAM_HIT:
case DAM_SUCTION:
case DAM_BITE:
case DAM_BLAST:
*gsn_ptr = gsn_pugilism;
case DAM_POUND:
case DAM_CRUSH:
*gsn_ptr = gsn_bludgeons;
break;

case DAM_SMASH:
case DAM_SPEAR:
*gsn_ptr = gsn_pole_weapons;

case DAM_SLASH:
case DAM_SLICE:
*gsn_ptr = gsn_long_blades;
case DAM_THRUST:
*gsn_ptr = gsn_swords;
break;

case DAM_PIERCE:
case DAM_STAB:
*gsn_ptr = gsn_short_blades;
*gsn_ptr = gsn_daggers;
break;

case DAM_SMITE:
case DAM_WHIP:
*gsn_ptr = gsn_flexible_arms;
break;
case DAM_CLAW:
*gsn_ptr = gsn_talonous_arms;
break;
case DAM_POUND:
case DAM_CRUSH:
*gsn_ptr = gsn_bludgeons;
case DAM_BITE:
case DAM_STING:
case DAM_BLAST:
*gsn_ptr = gsn_exotic_arms;
break;

case DAM_BOLT:
case DAM_ARROW:
case DAM_DART:
case DAM_STONE:
case DAM_PEA:
*gsn_ptr = gsn_missile_weapons;
break;

case DAM_SHIELD:
*gsn_ptr = gsn_shieldwork;
break;
}

if (*gsn_ptr != -1)
bonus = (int)((LEARNED(ch, *gsn_ptr) - 50) / 10);

Expand Down Expand Up @@ -1863,7 +1872,7 @@ ch_ret damage(CHAR_DATA * ch, CHAR_DATA * victim, int dam, int dt)
dam = ris_damage(victim, dam, RIS_POISON);
else
if (dt == (TYPE_HIT + DAM_POUND) || dt == (TYPE_HIT + DAM_CRUSH)
|| dt == (TYPE_HIT + DAM_STONE) || dt == (TYPE_HIT + DAM_PEA))
|| dt == (TYPE_HIT + DAM_STONE) || dt == (TYPE_HIT + DAM_DART))
dam = ris_damage(victim, dam, RIS_BLUNT);
else
if (dt == (TYPE_HIT + DAM_STAB) || dt == (TYPE_HIT + DAM_PIERCE)
Expand Down
26 changes: 14 additions & 12 deletions src/mud.h
Original file line number Diff line number Diff line change
Expand Up @@ -2463,14 +2463,14 @@ struct pc_data
int timezone;
};

/*
* Damage types from the attack_table[]
*/
/* Damage types from the attack_table[] */

typedef enum
{
DAM_HIT, DAM_SLICE, DAM_STAB, DAM_SLASH, DAM_WHIP, DAM_CLAW,
DAM_BLAST, DAM_POUND, DAM_CRUSH, DAM_GREP, DAM_BITE, DAM_PIERCE,
DAM_SUCTION, DAM_BOLT, DAM_ARROW, DAM_DART, DAM_STONE, DAM_PEA
DAM_HIT, DAM_POUND, DAM_CRUSH, DAM_SMASH, DAM_SPEAR, DAM_PIERCE, DAM_STAB,
DAM_THRUST, DAM_SLICE, DAM_SLASH, DAM_CLEAVE, DAM_CHOP, DAM_SMITE,
DAM_WHIP, DAM_CLAW, DAM_BITE, DAM_STING, DAM_BLAST, DAM_BOLT,
DAM_ARROW, DAM_DART, DAM_STONE, DAM_SHIELD
} damage_types;

/*
Expand Down Expand Up @@ -3040,13 +3040,15 @@ extern short gsn_scribe;
extern short gsn_brew;
extern short gsn_climb;

extern short gsn_pugilism;
extern short gsn_long_blades;
extern short gsn_short_blades;
extern short gsn_flexible_arms;
extern short gsn_talonous_arms;

extern short gsn_bludgeons;
extern short gsn_pole_weapons;
extern short gsn_daggers;
extern short gsn_swords;
extern short gsn_axes;
extern short gsn_exotic_arms;
extern short gsn_missile_weapons;
extern short gsn_shieldwork;

extern short gsn_grip;
extern short gsn_slice;
Expand Down Expand Up @@ -3547,7 +3549,7 @@ extern const struct lck_app_type lck_app[26];

extern const struct race_type _race_table[MAX_RACE];
extern struct race_type *race_table[MAX_RACE];
extern const char *const attack_table[18];
extern const char *const attack_table[23];

extern const char **const s_message_table[18];
extern const char **const p_message_table[18];
Expand Down
3 changes: 0 additions & 3 deletions src/skills.c
Original file line number Diff line number Diff line change
Expand Up @@ -5966,9 +5966,6 @@ void do_fire(CHAR_DATA* ch, const char* argument)
case DAM_STONE:
msg = "You have no slingstones...\r\n";
break;
case DAM_PEA:
msg = "You have no peas...\r\n";
break;
}
send_to_char(msg, ch);
return;
Expand Down