Skip to content

Commit

Permalink
Crosstraining tweaks. Random crosstraining bonuses stop once a skill …
Browse files Browse the repository at this point in the history
…can be advanced. I also slightly reduced bonuses for using a BASIC or SKILLED weapon. EXPERT skill still grants a very nice chance of crosstraining.
  • Loading branch information
elunna committed Oct 26, 2023
1 parent 3e93116 commit 0aa4490
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2801,24 +2801,19 @@ rnd_crosstrain(int skill)
case P_UNSKILLED:
return;
case P_BASIC:
/* If skill is basic, 1 in 9 chance of training related */
if (rn2(9))
if (rn2(13))
return;
break;
case P_SKILLED:
/* If skill is skilled, 1 in 6 chance of training related */
if (rn2(6))
if (rn2(7))
return;
break;
case P_EXPERT:
/* If skill is expert, 1 in 3 chance of training related */
if (rn2(3))
return;
break;
}
if (Luck < 0)
return;


for (int i = P_FIRST_WEAPON; i <= P_LAST_WEAPON; i++) {
if (i == skill)
continue;
Expand All @@ -2827,6 +2822,10 @@ rnd_crosstrain(int skill)
continue;
if (!can_practice(i))
continue;
/* Players need to advance once a skill reaches 100% to keep benefiting */
if ((int) P_ADVANCE(i) >=
practice_needed_to_advance(P_SKILL(i)))
continue;
/* Fudge factor to spread out the skills */
if (Luck > 2 ? !rn2(4) : rn2(4))
continue;
Expand Down

0 comments on commit 0aa4490

Please sign in to comment.