forked from github/server
removed I_SWORD and I_RUSTY_SWORD from the source.
This commit is contained in:
parent
883840c460
commit
b65917bb97
8 changed files with 109 additions and 76 deletions
|
@ -38,6 +38,7 @@
|
|||
|
||||
/* kernel includes */
|
||||
#include <kernel/build.h>
|
||||
#include <kernel/equipment.h>
|
||||
#include <kernel/faction.h>
|
||||
#include <kernel/give.h>
|
||||
#include <kernel/item.h>
|
||||
|
@ -793,42 +794,32 @@ recruit_dracoids(unit * dragon, int size)
|
|||
{
|
||||
faction * f = dragon->faction;
|
||||
region * r = dragon->region;
|
||||
const struct item_type * weapon = NULL;
|
||||
order * new_order;
|
||||
const struct item * weapon = NULL;
|
||||
order * new_order = NULL;
|
||||
unit *un = createunit(r, f, size, new_race[RC_DRACOID]);
|
||||
|
||||
fset(un, UFL_ISNEW|UFL_MOVED);
|
||||
|
||||
name_unit(un);
|
||||
change_money(dragon, -un->number * 50);
|
||||
equip_unit(un, get_equipment("recruited_dracoid"));
|
||||
|
||||
set_level(un, SK_SPEAR, (3 + rand() % 4));
|
||||
set_level(un, SK_MELEE, (3 + rand() % 4));
|
||||
set_level(un, SK_LONGBOW, (2 + rand() % 3));
|
||||
|
||||
switch (rand() % 3) {
|
||||
case 0:
|
||||
weapon = olditemtype[I_LONGBOW];
|
||||
break;
|
||||
case 1:
|
||||
weapon = olditemtype[I_SWORD];
|
||||
break;
|
||||
default:
|
||||
weapon = olditemtype[I_SPEAR];
|
||||
break;
|
||||
}
|
||||
i_change(&un->items, weapon, un->number);
|
||||
if (weapon->rtype->wtype->flags & WTF_MISSILE) un->status = ST_BEHIND;
|
||||
else un->status = ST_FIGHT;
|
||||
|
||||
un->status = ST_FIGHT;
|
||||
for (weapon=un->items;weapon;weapon=weapon->next) {
|
||||
const weapon_type * wtype = weapon->type->rtype->wtype;
|
||||
if (wtype && (wtype->flags & WTF_MISSILE)) un->status = ST_BEHIND;
|
||||
sprintf(buf, "%s \"%s\"", keywords[K_STUDY],
|
||||
skillname(weapon->rtype->wtype->skill, f->locale));
|
||||
skillname(weapon->type->rtype->wtype->skill, f->locale));
|
||||
new_order = parse_order(buf, default_locale);
|
||||
}
|
||||
|
||||
if (new_order!=NULL) {
|
||||
#ifdef LASTORDER
|
||||
set_order(&un->lastorder, new_order);
|
||||
#else
|
||||
addlist(&un->orders, new_order);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static order *
|
||||
|
|
|
@ -1435,13 +1435,7 @@ randomevents(void)
|
|||
u = createunit(r, findfaction(MONSTER_FACTION), undead, rc);
|
||||
fset(u, UFL_ISNEW|UFL_MOVED);
|
||||
if ((rc == new_race[RC_SKELETON] || rc == new_race[RC_ZOMBIE]) && rand()%10 < 4) {
|
||||
set_item(u, I_RUSTY_SWORD, undead);
|
||||
if (rand()%10 < 3) {
|
||||
set_item(u, I_RUSTY_SHIELD, undead);
|
||||
}
|
||||
if (rand()%10 < 2) {
|
||||
set_item(u, I_RUSTY_CHAIN_MAIL, undead);
|
||||
}
|
||||
equip_unit(u, get_equipment("rising_undead"));
|
||||
}
|
||||
|
||||
for (i=0;i < MAXSKILLS;i++) {
|
||||
|
|
|
@ -3066,6 +3066,7 @@ make_summary(void)
|
|||
f = u->faction;
|
||||
if (u->faction->no != MONSTER_FACTION) {
|
||||
skill * sv;
|
||||
item * itm;
|
||||
|
||||
s->nunits++;
|
||||
s->playerpop += u->number;
|
||||
|
@ -3075,16 +3076,14 @@ make_summary(void)
|
|||
s->spielerpferde += get_item(u, I_HORSE);
|
||||
s->playermoney += get_money(u);
|
||||
s->armed_men += armedmen(u);
|
||||
s->waffen += get_item(u, I_SWORD);
|
||||
s->waffen += get_item(u, I_SPEAR);
|
||||
s->waffen += get_item(u, I_CATAPULT);
|
||||
s->waffen += get_item(u, I_CROSSBOW);
|
||||
s->waffen += get_item(u, I_LONGBOW);
|
||||
s->waffen += get_item(u, I_RUNESWORD);
|
||||
|
||||
s->ruestungen += get_item(u, I_CHAIN_MAIL);
|
||||
s->ruestungen += get_item(u, I_PLATE_ARMOR);
|
||||
|
||||
for (itm=u->items;itm;itm=itm->next) {
|
||||
if (itm->type->rtype->wtype) {
|
||||
s->waffen += itm->number;
|
||||
}
|
||||
if (itm->type->rtype->atype) {
|
||||
s->ruestungen += itm->number;
|
||||
}
|
||||
}
|
||||
s->artefakte += get_item(u, I_AMULET_OF_TRUE_SEEING);
|
||||
s->artefakte += get_item(u, I_RING_OF_INVISIBILITY);
|
||||
s->artefakte += get_item(u, I_SPHERE_OF_INVISIBILITY);
|
||||
|
|
|
@ -60,11 +60,8 @@ enum {
|
|||
WP_CROSSBOW,
|
||||
WP_SPEAR,
|
||||
WP_GREATSWORD,
|
||||
WP_SWORD,
|
||||
WP_LANCE,
|
||||
WP_RUSTY_SWORD,
|
||||
WP_RUSTY_GREATSWORD,
|
||||
WP_RUSTY_AXE,
|
||||
WP_RUSTY_HALBERD,
|
||||
WP_NONE,
|
||||
WP_MAX
|
||||
|
@ -125,12 +122,8 @@ static weapondata weapontable[WP_MAX + 1] =
|
|||
{0.00, "1d10+0", "1d12+2", I_SPEAR, SK_SPEAR, 0, 0, false, false, { RL_NONE, 0}, PIERCE },
|
||||
/* Zweihänder */
|
||||
{0.00, "2d8+3", "2d8+3", I_GREATSWORD, SK_MELEE, -1, -2, false, false, { RL_NONE, 0}, CUT },
|
||||
/* Schwert */
|
||||
{0.00, "1d9+2", "1d9+2", I_SWORD, SK_MELEE, 0, 0, false, false, { RL_NONE, 0}, CUT },
|
||||
/* Lanze */
|
||||
{0.00, "1d5", "2d6+5", I_LANCE, SK_SPEAR, 0, -2, false, false, { RL_NONE, 0}, PIERCE },
|
||||
/* Rostiges Schwert */
|
||||
{0.00, "1d9", "1d9", I_RUSTY_SWORD, SK_MELEE, -1, -1, false, false, { RL_NONE, 0}, CUT },
|
||||
/* Rostiger Zweihänder */
|
||||
{0.00, "2d8", "2d8", I_RUSTY_GREATSWORD, SK_MELEE, -2, -3, false, false, { RL_NONE, 0}, CUT },
|
||||
/* Rostige Hellebarde */
|
||||
|
|
|
@ -893,10 +893,6 @@ static t_item itemdata[MAXITEMS] = {
|
|||
{"Katapult", "Katapulte", "Katapult", "Katapulte"},
|
||||
IS_PRODUCT, SK_CARTMAKER, 5, {0, 10, 0, 0, 0, 0}, 10000, 0, FL_ITEM_NOTINBAG, NULL
|
||||
},
|
||||
{ /* I_SWORD */
|
||||
{"Schwert", "Schwerter", "Schwert", "Schwerter"},
|
||||
IS_PRODUCT, SK_WEAPONSMITH, 3, {1, 0, 0, 0, 0, 0}, 100, 0, 0, NULL
|
||||
},
|
||||
{ /* I_SPEAR */
|
||||
{"Speer", "Speere", "Speer", "Speere"},
|
||||
IS_PRODUCT, SK_WEAPONSMITH, 2, {0, 1, 0, 0, 0, 0}, 100, 0, 0, NULL
|
||||
|
@ -1094,10 +1090,6 @@ static t_item itemdata[MAXITEMS] = {
|
|||
{"Zauberbeutel", "Zauberbeutel", "Zauberbeutel", "Zauberbeutel"},
|
||||
IS_MAGIC, 0, 0, {0, 0, 0, 0, 0, 0}, 100, 0, FL_ITEM_NOTINBAG|FL_ITEM_NOTLOST, NULL
|
||||
},
|
||||
{ /* I_RUSTY_SWORD */
|
||||
{"Schartiges Schwert", "Schartige Schwerter", "Schartiges Schwert", "Schartige Schwerter"},
|
||||
IS_PRODUCT, SK_WEAPONSMITH, 3, {1, 0, 0, 0, 0, 0}, 100, 0, 0, NULL
|
||||
},
|
||||
{ /* I_RUSTY_SHIELD 42 */
|
||||
{"Rostiger Schild", "Rostige Schilde", "Rostiger Schild", "Rostige Schilde"},
|
||||
IS_PRODUCT, SK_ARMORER, 2, {1, 0, 0, 0, 0, 0}, 100, 0, 0, NULL
|
||||
|
@ -2094,6 +2086,13 @@ init_resources(void)
|
|||
static boolean initialized = false;
|
||||
if (initialized) return;
|
||||
initialized = true;
|
||||
|
||||
/* alte typen registrieren: */
|
||||
init_olditems();
|
||||
init_oldherbs();
|
||||
init_oldpotions();
|
||||
init_oldscores();
|
||||
|
||||
/* silver was never an item: */
|
||||
r_silver = new_resourcetype(&names[0], NULL, RTF_ITEM|RTF_POOLED);
|
||||
i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0);
|
||||
|
@ -2114,6 +2113,7 @@ init_resources(void)
|
|||
r_unit = new_resourcetype(&names[12], NULL, RTF_NONE);
|
||||
r_unit->uchange = res_changeperson;
|
||||
|
||||
oldresourcetype[R_SWORD] = rt_find("sword");
|
||||
oldresourcetype[R_SILVER] = r_silver;
|
||||
oldresourcetype[R_AURA] = r_aura;
|
||||
oldresourcetype[R_PERMAURA] = r_permaura;
|
||||
|
@ -2121,11 +2121,6 @@ init_resources(void)
|
|||
oldresourcetype[R_PEASANTS] = r_peasants;
|
||||
oldresourcetype[R_UNIT] = r_unit;
|
||||
|
||||
/* alte typen registrieren: */
|
||||
init_olditems();
|
||||
init_oldherbs();
|
||||
init_oldpotions();
|
||||
init_oldscores();
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -282,7 +282,6 @@ enum {
|
|||
I_HORSE,
|
||||
I_WAGON,
|
||||
I_CATAPULT,
|
||||
I_SWORD,
|
||||
I_SPEAR,
|
||||
I_CROSSBOW,
|
||||
I_LONGBOW,
|
||||
|
@ -338,7 +337,6 @@ enum {
|
|||
I_RING_OF_REGENERATION,
|
||||
I_TOADSLIME,
|
||||
I_BAG_OF_HOLDING,
|
||||
I_RUSTY_SWORD,
|
||||
I_RUSTY_SHIELD,
|
||||
I_RUSTY_CHAIN_MAIL,
|
||||
I_SACK_OF_CONSERVATION,
|
||||
|
@ -356,7 +354,6 @@ enum {
|
|||
R_HORSE,
|
||||
R_WAGON,
|
||||
R_CATAPULT,
|
||||
R_SWORD,
|
||||
R_SPEAR,
|
||||
R_CROSSBOW,
|
||||
R_LONGBOW,
|
||||
|
@ -404,7 +401,6 @@ enum {
|
|||
R_RING_OF_REGENERATION,
|
||||
R_TOADSLIME,
|
||||
R_BAG_OF_HOLDING,
|
||||
R_RUSTY_SWORD,
|
||||
R_RUSTY_SHIELD,
|
||||
R_RUSTY_CHAIN_MAIL,
|
||||
R_SACK_OF_CONSERVATION,
|
||||
|
@ -462,6 +458,7 @@ enum {
|
|||
|
||||
|
||||
R_UNIT, /* Einheit (gib x einheit) */
|
||||
R_SWORD, /* for spells */
|
||||
|
||||
MAX_RESOURCES, /* do not use outside item.c ! */
|
||||
NORESOURCE = (resource_t) - 1
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<item name="sword" amount="1"/>
|
||||
<item name="money" amount="d40+59"/>
|
||||
<subset chance="0.6">
|
||||
<set name="random_plate"/>
|
||||
<set name="item_plate"/>
|
||||
</subset>
|
||||
</set>
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
|||
<set name="random_bow" chance="0.25"/>
|
||||
</subset>
|
||||
<subset chance="0.4">
|
||||
<set name="random_chain"/>
|
||||
<set name="item_chain"/>
|
||||
</subset>
|
||||
<subset chance="0.3">
|
||||
<set name="random_rider"/>
|
||||
|
@ -153,18 +153,58 @@
|
|||
<item name="bow" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="random_plate">
|
||||
<item name="plate" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="random_chain">
|
||||
<item name="chainmail" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="random_rider">
|
||||
<item name="horse" amount="1"/>
|
||||
<skill name="sk_riding" level="d3"/>
|
||||
</set>
|
||||
|
||||
<set name="recruited_dracoid">
|
||||
<!-- dracoiden, von drachen rekrutiert -->
|
||||
<skill name="sk_spear" level="d4+2"/>
|
||||
<skill name="sk_melee" level="d4+2"/>
|
||||
<skill name="sk_bow" level="d3+1"/>
|
||||
<subset>
|
||||
<!-- dracoiden haben immer eine von drei waffen -->
|
||||
<set name="item_sword" chance="0.33"/>
|
||||
<set name="item_spear" chance="0.33"/>
|
||||
<set name="item_bow" chance="0.34"/>
|
||||
</subset>
|
||||
</set>
|
||||
|
||||
<set name="rising_undead">
|
||||
<!-- untote, von den graebern auferstanden -->
|
||||
<item name="rustysword" amount="1"/>
|
||||
<item name="rustychainmail" amount="d2-1"/>
|
||||
<subset chance="0.3">
|
||||
<set name="item_rustyshield"/>
|
||||
</subset>
|
||||
</set>
|
||||
|
||||
|
||||
<!-- single-item sets (that can be given a percentage-chance in a subset) -->
|
||||
<set name="item_plate">
|
||||
<item name="plate" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="item_spear">
|
||||
<item name="spear" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="item_bow">
|
||||
<item name="bow" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="item_sword">
|
||||
<item name="sword" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="item_chain">
|
||||
<item name="chainmail" amount="1"/>
|
||||
</set>
|
||||
|
||||
<set name="item_rustychain">
|
||||
<item name="rustychainmail" amount="1"/>
|
||||
</set>
|
||||
|
||||
</equipment>
|
||||
|
||||
|
|
|
@ -54,6 +54,30 @@
|
|||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="sword">
|
||||
<item weight="100">
|
||||
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
||||
<requirement type="iron" quantity="1"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="sk_melee">
|
||||
<damage type="rider" value="1d9+2"/>
|
||||
<damage type="footman" value="1d9+2"/>
|
||||
</weapon>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="rustysword">
|
||||
<item weight="100">
|
||||
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
||||
<requirement type="iron" quantity="1"/>
|
||||
</construction>
|
||||
<weapon cut="true" skill="sk_melee" offmod="-1" defmod="-1">
|
||||
<damage type="rider" value="1d9"/>
|
||||
<damage type="footman" value="1d9"/>
|
||||
</weapon>
|
||||
</item>
|
||||
</resource>
|
||||
|
||||
<resource name="axe">
|
||||
<item weight="200">
|
||||
<construction skill="sk_weaponsmithing" minskill="3" reqsize="1">
|
||||
|
|
Loading…
Reference in a new issue