When a value is updated in a certain element of the object, the changes are applied in all elements. This is caused by the declaration of teamMovesEffectiveness, where every element is declared as a pointer of typeEffectiveness. In fact, only typeEffectiveness is updated.
The fix is to change the declaration of teamMovesEffectiveness.
When a value is updated in a certain element of the object, the changes are applied in all elements. This is caused by the declaration of teamMovesEffectiveness, where every element is declared as a pointer of typeEffectiveness. In fact, only typeEffectiveness is updated. The fix is to change the declaration of teamMovesEffectiveness.