Hey folks, me again. Back with another question. In the section below you'll see two attributes, physical_strength_score, and melee_damage_bonus. <input class="ability" name="attr_physical_strength_score" type="number" value='0'>
<input class="" name="attr_melee_damage_bonus" type="number" value='0'>
According to the rules of the game, the melee_damage_bonus is determined by looking up, in a table, the melee_damage_bonus that corresponds to the physical_strength_score. Here's that table: attr_physical_strength_score attr_melee_damage_bonus
1 to 5 -4 6 to 10 -3
11 to 15 -2
16 to 20 -1
21 to 25 -1
26 to 35 -1
36 to 40 -1
41 to 45 0
46 to 50 0
51 to 55 0
56 to 60 1
61 to 65 1
66 to 70 2
71 to 75 3
76 to 85 3
86 to 90 4
91 to 95 5
96 to 100 6
101 to 110 7
111 to 120 8
121 to 130 9
131 to 140 10
141 to 150 11
151 to 160 12
161 to 170 14
171 to 180 15
181 to 190 16
191 to 200 17
201 to 210 18
211 to 220 19 Lets just say that the asymmetry of this table is included so that the only answer is a table lookup, even though I just wish that were true. How would I write a table lookup function for this? I could probably edit any table lookup function so that it fits my purpose. I just haven't found an example that works. Thank you for reading = ).