Currently, avoid overflow checks if adding a resistance will go over 100 percent. If it does, it will completely nullify it. In addition, it only calculates based on the order the resistances are added. This means if you get a 15 percent resistance, then a 90 percent resistance, you will get only 15 percent. Maybe change it so either it goes from highest to lowest, or it works so that any amount over 99 percent is unused.
Currently, avoid overflow checks if adding a resistance will go over 100 percent. If it does, it will completely nullify it. In addition, it only calculates based on the order the resistances are added. This means if you get a 15 percent resistance, then a 90 percent resistance, you will get only 15 percent. Maybe change it so either it goes from highest to lowest, or it works so that any amount over 99 percent is unused.