reanming SK_SWORD -> SK_MELEE (since all the axes use it, too and I get confused so easily)

This commit is contained in:
Enno Rehling 2005-10-02 17:35:25 +00:00
parent 74f03ab496
commit 5358c876d2
7 changed files with 25 additions and 25 deletions

View File

@ -235,7 +235,7 @@ add_recruits(unit * u, int number, int wanted)
} }
if (unew->race == new_race[RC_URUK]) { if (unew->race == new_race[RC_URUK]) {
change_level(unew, SK_SWORD, 1); change_level(unew, SK_MELEE, 1);
change_level(unew, SK_SPEAR, 1); change_level(unew, SK_SPEAR, 1);
} }
if (unew->race->ec_flags & ECF_REC_HORSES) { if (unew->race->ec_flags & ECF_REC_HORSES) {
@ -245,8 +245,8 @@ add_recruits(unit * u, int number, int wanted)
if (i > 0) { if (i > 0) {
if (unew->race->bonus[SK_SPEAR] >= 0) if (unew->race->bonus[SK_SPEAR] >= 0)
change_level(unew, SK_SPEAR, i); change_level(unew, SK_SPEAR, i);
if (unew->race->bonus[SK_SWORD] >= 0) if (unew->race->bonus[SK_MELEE] >= 0)
change_level(unew, SK_SWORD, i); change_level(unew, SK_MELEE, i);
if (unew->race->bonus[SK_LONGBOW] >= 0) if (unew->race->bonus[SK_LONGBOW] >= 0)
change_level(unew, SK_LONGBOW, i); change_level(unew, SK_LONGBOW, i);
if (unew->race->bonus[SK_CROSSBOW] >= 0) if (unew->race->bonus[SK_CROSSBOW] >= 0)

View File

@ -803,7 +803,7 @@ recruit_dracoids(unit * dragon, int size)
change_money(dragon, -un->number * 50); change_money(dragon, -un->number * 50);
set_level(un, SK_SPEAR, (3 + rand() % 4)); set_level(un, SK_SPEAR, (3 + rand() % 4));
set_level(un, SK_SWORD, (3 + rand() % 4)); set_level(un, SK_MELEE, (3 + rand() % 4));
set_level(un, SK_LONGBOW, (2 + rand() % 3)); set_level(un, SK_LONGBOW, (2 + rand() % 3));
switch (rand() % 3) { switch (rand() % 3) {

View File

@ -343,7 +343,7 @@ get_allies(region * r, unit * u)
switch (rand() % 4) { switch (rand() % 4) {
case 0: case 0:
set_level(newunit, SK_SWORD, 1+rand()%3); set_level(newunit, SK_MELEE, 1+rand()%3);
set_item(newunit, I_SWORD, newunit->number); set_item(newunit, I_SWORD, newunit->number);
break; break;
case 1: case 1:
@ -405,7 +405,7 @@ get_allies(region * r, unit * u)
newunit = createunit(r, u->faction, rand() % 12 + 2, u->faction->race); newunit = createunit(r, u->faction, rand() % 12 + 2, u->faction->race);
set_string(&newunit->name, "Berber"); set_string(&newunit->name, "Berber");
set_money(newunit, (rand() % 30 + 20) * newunit->number); set_money(newunit, (rand() % 30 + 20) * newunit->number);
set_level(newunit, SK_SWORD, 1+rand()%2); set_level(newunit, SK_MELEE, 1+rand()%2);
set_item(newunit, I_SWORD, newunit->number); set_item(newunit, I_SWORD, newunit->number);
set_level(newunit, SK_TRADE, 1+rand()%3); set_level(newunit, SK_TRADE, 1+rand()%3);
set_level(newunit, SK_RIDING, 2+rand()%2); set_level(newunit, SK_RIDING, 2+rand()%2);
@ -414,25 +414,25 @@ get_allies(region * r, unit * u)
break; break;
case T_HIGHLAND: case T_HIGHLAND:
if (eff_skill(u, SK_SWORD, r) <= 1) { if (eff_skill(u, SK_MELEE, r) <= 1) {
return; return;
} }
newunit = createunit(r, u->faction, rand() % 8 + 2, u->faction->race); newunit = createunit(r, u->faction, rand() % 8 + 2, u->faction->race);
set_string(&newunit->name, "Hochlandbarbaren"); set_string(&newunit->name, "Hochlandbarbaren");
set_money(newunit, (rand() % 10 + 20) * newunit->number); set_money(newunit, (rand() % 10 + 20) * newunit->number);
set_level(newunit, SK_SWORD, 1+rand()%2); set_level(newunit, SK_MELEE, 1+rand()%2);
set_item(newunit, I_SWORD, newunit->number); set_item(newunit, I_SWORD, newunit->number);
break; break;
case T_MOUNTAIN: case T_MOUNTAIN:
if (eff_skill(u, SK_SWORD, r) <= 1 if (eff_skill(u, SK_MELEE, r) <= 1
|| eff_skill(u, SK_TRADE, r) <= 2) { || eff_skill(u, SK_TRADE, r) <= 2) {
return; return;
} }
newunit = createunit(r, u->faction, rand() % 6 + 2, u->faction->race); newunit = createunit(r, u->faction, rand() % 6 + 2, u->faction->race);
set_string(&newunit->name, "Bergbewohner"); set_string(&newunit->name, "Bergbewohner");
set_money(newunit, (rand() % 40 + 60) * newunit->number); set_money(newunit, (rand() % 40 + 60) * newunit->number);
set_level(newunit, SK_SWORD, 2+rand()%2); set_level(newunit, SK_MELEE, 2+rand()%2);
set_item(newunit, I_SWORD, newunit->number); set_item(newunit, I_SWORD, newunit->number);
set_level(newunit, SK_ARMORER, 2+rand()%2); set_level(newunit, SK_ARMORER, 2+rand()%2);
set_level(newunit, SK_TRADE, 1+rand()%3); set_level(newunit, SK_TRADE, 1+rand()%3);
@ -442,14 +442,14 @@ get_allies(region * r, unit * u)
break; break;
case T_GLACIER: case T_GLACIER:
if (eff_skill(u, SK_SWORD, r) <= 1 if (eff_skill(u, SK_MELEE, r) <= 1
|| eff_skill(u, SK_TRADE, r) <= 1) { || eff_skill(u, SK_TRADE, r) <= 1) {
return; return;
} }
newunit = createunit(r, u->faction, rand() % 4 + 2, u->faction->race); newunit = createunit(r, u->faction, rand() % 4 + 2, u->faction->race);
set_string(&newunit->name, "Eisleute"); set_string(&newunit->name, "Eisleute");
set_money(newunit, (rand() % 20 + 20) * newunit->number); set_money(newunit, (rand() % 20 + 20) * newunit->number);
set_level(newunit, SK_SWORD, 2+rand()%2); set_level(newunit, SK_MELEE, 2+rand()%2);
set_item(newunit, I_SWORD, newunit->number); set_item(newunit, I_SWORD, newunit->number);
set_level(newunit, SK_ARMORER, 2+rand()%2); set_level(newunit, SK_ARMORER, 2+rand()%2);
break; break;
@ -1288,7 +1288,7 @@ randomevents(void)
skill_t skill; skill_t skill;
int level; int level;
} skills [] = { } skills [] = {
{ SK_SWORD, 1 }, { SK_SPEAR, 1 }, { SK_TACTICS, 0 }, { SK_MELEE, 1 }, { SK_SPEAR, 1 }, { SK_TACTICS, 0 },
{ SK_LONGBOW, 0 }, { SK_CROSSBOW, 0 }, { SK_CATAPULT, 0 }, { SK_LONGBOW, 0 }, { SK_CROSSBOW, 0 }, { SK_CATAPULT, 0 },
{ SK_AUSDAUER, 0 }, { NOSKILL, 0 } { SK_AUSDAUER, 0 }, { NOSKILL, 0 }
}; };

View File

@ -649,7 +649,7 @@ learn(void)
warrior_skill = fspecial(u->faction, FS_WARRIOR); warrior_skill = fspecial(u->faction, FS_WARRIOR);
if(warrior_skill > 0) { if(warrior_skill > 0) {
if(sk == SK_CROSSBOW || sk == SK_LONGBOW if(sk == SK_CROSSBOW || sk == SK_LONGBOW
|| sk == SK_CATAPULT || sk == SK_SWORD || sk == SK_SPEAR || sk == SK_CATAPULT || sk == SK_MELEE || sk == SK_SPEAR
|| sk == SK_AUSDAUER || sk == SK_WEAPONLESS) || sk == SK_AUSDAUER || sk == SK_WEAPONLESS)
{ {
teach->value += u->number * (5+warrior_skill*5); teach->value += u->number * (5+warrior_skill*5);

View File

@ -106,11 +106,11 @@ static weapondata weapontable[WP_MAX + 1] =
* missile, is_magic */ * missile, is_magic */
{ {
/* Runenschwert */ /* Runenschwert */
{0.00, "3d10+10", "3d10+10", I_RUNESWORD, SK_SWORD, 2, 2, false, true, { RL_NONE, 0}, CUT }, {0.00, "3d10+10", "3d10+10", I_RUNESWORD, SK_MELEE, 2, 2, false, true, { RL_NONE, 0}, CUT },
/* Flammenschwert */ /* Flammenschwert */
{0.30, "3d6+10", "3d6+10", I_FIRESWORD, SK_SWORD, 1, 1, false, false, { RL_NONE, 0}, CUT }, {0.30, "3d6+10", "3d6+10", I_FIRESWORD, SK_MELEE, 1, 1, false, false, { RL_NONE, 0}, CUT },
/* Laenschwert */ /* Laenschwert */
{0.30, "3d6+10", "3d6+10", I_LAENSWORD, SK_SWORD, 1, 1, false, false, { RL_NONE, 0}, CUT }, {0.30, "3d6+10", "3d6+10", I_LAENSWORD, SK_MELEE, 1, 1, false, false, { RL_NONE, 0}, CUT },
/* Katapult */ /* Katapult */
{0.00, "3d10+5", "3d10+5", I_CATAPULT, SK_CATAPULT, 0, 0, true, false, { RL_CATAPULT, 5 }, BASH }, {0.00, "3d10+5", "3d10+5", I_CATAPULT, SK_CATAPULT, 0, 0, true, false, { RL_CATAPULT, 5 }, BASH },
/* Langbogen */ /* Langbogen */
@ -124,21 +124,21 @@ static weapondata weapontable[WP_MAX + 1] =
/* Speer */ /* Speer */
{0.00, "1d10+0", "1d12+2", I_SPEAR, SK_SPEAR, 0, 0, false, false, { RL_NONE, 0}, PIERCE }, {0.00, "1d10+0", "1d12+2", I_SPEAR, SK_SPEAR, 0, 0, false, false, { RL_NONE, 0}, PIERCE },
/* Zweihänder */ /* Zweihänder */
{0.00, "2d8+3", "2d8+3", I_GREATSWORD, SK_SWORD, -1, -2, false, false, { RL_NONE, 0}, CUT }, {0.00, "2d8+3", "2d8+3", I_GREATSWORD, SK_MELEE, -1, -2, false, false, { RL_NONE, 0}, CUT },
/* Schwert */ /* Schwert */
{0.00, "1d9+2", "1d9+2", I_SWORD, SK_SWORD, 0, 0, false, false, { RL_NONE, 0}, CUT }, {0.00, "1d9+2", "1d9+2", I_SWORD, SK_MELEE, 0, 0, false, false, { RL_NONE, 0}, CUT },
/* Lanze */ /* Lanze */
{0.00, "1d5", "2d6+5", I_LANCE, SK_SPEAR, 0, -2, false, false, { RL_NONE, 0}, PIERCE }, {0.00, "1d5", "2d6+5", I_LANCE, SK_SPEAR, 0, -2, false, false, { RL_NONE, 0}, PIERCE },
/* Rostiges Schwert */ /* Rostiges Schwert */
{0.00, "1d9", "1d9", I_RUSTY_SWORD, SK_SWORD, -1, -1, false, false, { RL_NONE, 0}, CUT }, {0.00, "1d9", "1d9", I_RUSTY_SWORD, SK_MELEE, -1, -1, false, false, { RL_NONE, 0}, CUT },
/* Rostiger Zweihänder */ /* Rostiger Zweihänder */
{0.00, "2d8", "2d8", I_RUSTY_GREATSWORD, SK_SWORD, -2, -3, false, false, { RL_NONE, 0}, CUT }, {0.00, "2d8", "2d8", I_RUSTY_GREATSWORD, SK_MELEE, -2, -3, false, false, { RL_NONE, 0}, CUT },
/* Rostige Hellebarde */ /* Rostige Hellebarde */
{0.00, "2d6", "2d6", I_RUSTY_HALBERD, SK_SPEAR, -2, 1, false, false, { RL_NONE, 0}, CUT }, {0.00, "2d6", "2d6", I_RUSTY_HALBERD, SK_SPEAR, -2, 1, false, false, { RL_NONE, 0}, CUT },
/* Unbewaffnet */ /* Unbewaffnet */
{0.00, "1d5+0", "1d6+0", I_WOOD, SK_SWORD, 0, 0, false, false, { RL_NONE, 0}, BASH }, {0.00, "1d5+0", "1d6+0", I_WOOD, SK_MELEE, 0, 0, false, false, { RL_NONE, 0}, BASH },
/* Dummy */ /* Dummy */
{0.00, "0d0+0", "0d0+0", I_WOOD, SK_SWORD, 0, 0, false, false, { RL_NONE, 0}, 0 } {0.00, "0d0+0", "0d0+0", I_WOOD, SK_MELEE, 0, 0, false, false, { RL_NONE, 0}, 0 }
}; };
weapon_type * oldweapontype[WP_MAX]; weapon_type * oldweapontype[WP_MAX];

View File

@ -602,7 +602,7 @@ weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
if (skill<=0) { if (skill<=0) {
/* wenn kein waffenloser kampf, dann den rassen-defaultwert */ /* wenn kein waffenloser kampf, dann den rassen-defaultwert */
if(u->race == new_race[RC_URUK]) { if(u->race == new_race[RC_URUK]) {
int sword = effskill(u, SK_SWORD); int sword = effskill(u, SK_MELEE);
int spear = effskill(u, SK_SPEAR); int spear = effskill(u, SK_SPEAR);
skill = max(sword, spear) - 3; skill = max(sword, spear) - 3;
if (attacking) { if (attacking) {

View File

@ -588,7 +588,7 @@ enum {
SK_RIDING, SK_RIDING,
SK_ARMORER, SK_ARMORER,
SK_SHIPBUILDING, SK_SHIPBUILDING,
SK_SWORD, SK_MELEE,
SK_SAILING, SK_SAILING,
SK_SPEAR, SK_SPEAR,
SK_SPY, SK_SPY,