geschenke geändert

This commit is contained in:
Katja Zedel 2002-12-22 09:13:23 +00:00
parent b67969464b
commit 65369038dd
3 changed files with 46 additions and 2 deletions

View File

@ -1985,6 +1985,12 @@ use_mistletoe(struct unit * user, const struct item_type * itype, int amount, co
return 0; return 0;
} }
static int
use_snowball(struct unit * user, const struct item_type * itype, int amount, const char * cmd)
{
return;
}
void void
init_oldpotions(void) init_oldpotions(void)
{ {
@ -2617,6 +2623,7 @@ register_resources(void)
register_function((pf_generic)use_bloodpotion, "usebloodpotion"); register_function((pf_generic)use_bloodpotion, "usebloodpotion");
register_function((pf_generic)use_foolpotion, "usefoolpotion"); register_function((pf_generic)use_foolpotion, "usefoolpotion");
register_function((pf_generic)use_mistletoe, "usemistletoe"); register_function((pf_generic)use_mistletoe, "usemistletoe");
register_function((pf_generic)use_snowball, "usesnowball");
register_function((pf_generic)give_horses, "givehorses"); register_function((pf_generic)give_horses, "givehorses");

View File

@ -34,8 +34,12 @@ presents(unit * senior)
{ {
item_type * itype; item_type * itype;
/* Geschenke für alle */ /* Geschenke für alle */
itype = olditemtype[(rand() % 4) + I_KEKS]; /* itype = olditemtype[(rand() % 4) + I_KEKS]; */
/* itype = it_find("mistletoe"); */ if (rand () % 4){
itype = it_find("snowball");
} else {
itype = it_find("snowman");
}
assert(itype!=NULL); assert(itype!=NULL);
i_change(&senior->items, itype, 1); i_change(&senior->items, itype, 1);
} }

View File

@ -82,4 +82,37 @@
</string> </string>
</strings> </strings>
<resource name="snowball">
<comment>xmas gimmik</comment>
<item notlost weight="0">
<function name="use" value="usesnowball"></function>
</item>
</resource>
<strings>
<string name="snowball">
<text locale="de">Schneeball</text>
<text locale="en">snowball</text>
</string>
<string name="snowball_p">
<text locale="de">Schneebälle</text>
<text locale="en">snowball</text>
</string>
</strings>
<resource name="snowman">
<comment>xmas gimmik</comment>
<item notlost weight="1">
</item>
</resource>
<strings>
<string name="snowman">
<text locale="de">Schneemann</text>
<text locale="en">snowman</text>
</string>
<string name="snowman_p">
<text locale="de">Schneemänner</text>
<text locale="en">snowmen</text>
</string>
</strings>