… | |
… | |
595 | object::drain_specific_stat (int deplete_stats) |
595 | object::drain_specific_stat (int deplete_stats) |
596 | { |
596 | { |
597 | object *tmp; |
597 | object *tmp; |
598 | archetype *at; |
598 | archetype *at; |
599 | |
599 | |
600 | at = archetype::find (ARCH_DEPLETION); |
600 | at = archetype::find (shstr_depletion); |
601 | if (!at) |
601 | if (!at) |
602 | { |
602 | { |
603 | LOG (llevError, "Couldn't find archetype depletion.\n"); |
603 | LOG (llevError, "Couldn't find archetype depletion.\n"); |
604 | return; |
604 | return; |
605 | } |
605 | } |
… | |
… | |
625 | * via an applied bad_luck object. |
625 | * via an applied bad_luck object. |
626 | */ |
626 | */ |
627 | void |
627 | void |
628 | object::change_luck (int value) |
628 | object::change_luck (int value) |
629 | { |
629 | { |
630 | archetype *at = archetype::find ("luck"); |
630 | archetype *at = archetype::find (shstr_luck); |
631 | if (!at) |
631 | if (!at) |
632 | LOG (llevError, "Couldn't find archetype luck.\n"); |
632 | LOG (llevError, "Couldn't find archetype luck.\n"); |
633 | else |
633 | else |
634 | { |
634 | { |
635 | object *tmp = present_arch_in_ob (at, this); |
635 | object *tmp = present_arch_in_ob (at, this); |
… | |
… | |
1948 | |
1948 | |
1949 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
1949 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
1950 | if (tmp->type == SKILL && tmp->stats.exp) |
1950 | if (tmp->type == SKILL && tmp->stats.exp) |
1951 | { |
1951 | { |
1952 | percentage_loss = tmp->stats.exp * settings.death_penalty_ratio / 100; |
1952 | percentage_loss = tmp->stats.exp * settings.death_penalty_ratio / 100; |
1953 | level_loss = tmp->stats.exp - levels[MAX (0, tmp->level - settings.death_penalty_level)]; |
1953 | level_loss = tmp->stats.exp - levels [max (0, tmp->level - settings.death_penalty_level)]; |
1954 | |
1954 | |
1955 | /* With the revised exp system, you can get cases where |
1955 | /* With the revised exp system, you can get cases where |
1956 | * losing several levels would still require that you have more |
1956 | * losing several levels would still require that you have more |
1957 | * exp than you currently have - this is true if the levels |
1957 | * exp than you currently have - this is true if the levels |
1958 | * tables is a lot harder. |
1958 | * tables is a lot harder. |