… | |
… | |
400 | |
400 | |
401 | /** |
401 | /** |
402 | * This function just checks whether who can handle equipping an item |
402 | * This function just checks whether who can handle equipping an item |
403 | * with item_power. |
403 | * with item_power. |
404 | */ |
404 | */ |
405 | |
405 | static bool |
406 | bool |
|
|
407 | check_item_power (object *who, int item_power) |
406 | check_item_power (object *who, int item_power) |
408 | { |
407 | { |
409 | if (who->type == PLAYER |
408 | if (who->type == PLAYER |
410 | && item_power |
409 | && item_power |
411 | && item_power + who->contr->item_power > settings.item_power_factor * who->level) |
410 | && item_power + who->contr->item_power > settings.item_power_factor * who->level) |
… | |
… | |
707 | /** |
706 | /** |
708 | * Handles the applying of improve/prepare/enchant weapon scroll. |
707 | * Handles the applying of improve/prepare/enchant weapon scroll. |
709 | * Checks a few things (not on a non-magic square, marked weapon, ...), |
708 | * Checks a few things (not on a non-magic square, marked weapon, ...), |
710 | * then calls improve_weapon to do the dirty work. |
709 | * then calls improve_weapon to do the dirty work. |
711 | */ |
710 | */ |
712 | int |
711 | static int |
713 | check_improve_weapon (object *op, object *tmp) |
712 | check_improve_weapon (object *op, object *tmp) |
714 | { |
713 | { |
715 | object *otmp; |
714 | object *otmp; |
716 | |
715 | |
717 | if (op->type != PLAYER) |
716 | if (op->type != PLAYER) |
… | |
… | |
985 | * Handle apply on containers. |
984 | * Handle apply on containers. |
986 | * By Eneq(@csd.uu.se). |
985 | * By Eneq(@csd.uu.se). |
987 | * Moved to own function and added many features [Tero.Haatanen@lut.fi] |
986 | * Moved to own function and added many features [Tero.Haatanen@lut.fi] |
988 | * added the alchemical cauldron to the code -b.t. |
987 | * added the alchemical cauldron to the code -b.t. |
989 | */ |
988 | */ |
990 | int |
989 | static int |
991 | apply_container (object *op, object *sack) |
990 | apply_container (object *op, object *sack) |
992 | { |
991 | { |
993 | if (op->type != PLAYER || !op->contr->ns) |
992 | if (op->type != PLAYER || !op->contr->ns) |
994 | return 0; /* This might change */ |
993 | return 0; /* This might change */ |
995 | |
994 | |
… | |
… | |
2415 | /** |
2414 | /** |
2416 | * Designed primarily to light torches/lanterns/etc. |
2415 | * Designed primarily to light torches/lanterns/etc. |
2417 | * Also burns up burnable material too. First object in the inventory is |
2416 | * Also burns up burnable material too. First object in the inventory is |
2418 | * the selected object to "burn". -b.t. |
2417 | * the selected object to "burn". -b.t. |
2419 | */ |
2418 | */ |
2420 | void |
2419 | static void |
2421 | apply_lighter (object *who, object *lighter) |
2420 | apply_lighter (object *who, object *lighter) |
2422 | { |
2421 | { |
2423 | object *item; |
2422 | object *item; |
2424 | int is_player_env = 0; |
2423 | int is_player_env = 0; |
2425 | |
2424 | |