… | |
… | |
1028 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1028 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1029 | contr->encumbrance += (int) 3 *tmp->weight / 1000; |
1029 | contr->encumbrance += (int) 3 *tmp->weight / 1000; |
1030 | |
1030 | |
1031 | break; |
1031 | break; |
1032 | |
1032 | |
1033 | case SKILL_TOOL: |
|
|
1034 | if (chosen_skill) |
|
|
1035 | LOG (llevDebug, "fix_player, op %s has multiple skills applied\n", &name); |
|
|
1036 | |
|
|
1037 | chosen_skill = tmp; |
|
|
1038 | break; |
|
|
1039 | |
|
|
1040 | case SHIELD: |
1033 | case SHIELD: |
1041 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1034 | if (settings.spell_encumbrance == TRUE && type == PLAYER) |
1042 | contr->encumbrance += (int) tmp->weight / 2000; |
1035 | contr->encumbrance += (int) tmp->weight / 2000; |
1043 | case RING: |
1036 | case RING: |
1044 | case AMULET: |
1037 | case AMULET: |
… | |
… | |
1578 | CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL); |
1571 | CLEAR_FLAG (skill_obj, FLAG_CAN_USE_SKILL); |
1579 | skill_obj->stats.exp = 0; |
1572 | skill_obj->stats.exp = 0; |
1580 | skill_obj->level = 1; |
1573 | skill_obj->level = 1; |
1581 | insert_ob_in_ob (skill_obj, op); |
1574 | insert_ob_in_ob (skill_obj, op); |
1582 | |
1575 | |
1583 | if (op->contr) |
1576 | if (player *pl = op->contr) |
1584 | { |
1577 | { |
1585 | op->contr->last_skill_ob [skill_obj->subtype] = skill_obj; |
1578 | pl->last_skill_ob [skill_obj->subtype] = skill_obj; |
1586 | if (op->contr->ns) |
1579 | if (pl->ns) |
1587 | op->contr->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous |
1580 | pl->ns->last_skill_exp[skill_obj->subtype] = -1;//TODO: should be made superfluous |
1588 | } |
1581 | } |
1589 | |
1582 | |
1590 | return skill_obj; |
1583 | return skill_obj; |
1591 | } |
1584 | } |
1592 | |
1585 | |