Help with BurgZergArcade, dice question

I have a list of attributes and want each of them to have 3 dice rolls. Right now, I can only figure out how to get 3 dice rolls overall.

		for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++){
			GUI.Label (new Rect(10, 95 + (cnt * LineHeight), 70, LineHeight), ((AttributeName)cnt).ToString ());
			GUI.Label (new Rect(85, 95 + (cnt * LineHeight), 30, LineHeight), _protag.GetPrimaryAttribute(cnt).AcceptedValue.ToString ());
			if(rollsLeft == 3){
			if(GUI.Button (new Rect(125, 95 + (cnt * LineHeight), 40, LineHeight), "Die")){
					dRoll1 = ((int)(UnityEngine.Random.Range(1.0f, 20.0f)));
					_protag.GetPrimaryAttribute(cnt).BaseValue = dRoll1;
					rollsLeft--;}
				Debug.Log (dRoll1.ToString());
			}
			if(rollsLeft == 2){
			if(GUI.Button (new Rect(125, 95 + (cnt * LineHeight), 40, LineHeight), "Do")){
					dRoll2 = ((int)(UnityEngine.Random.Range(1.0f, 20.0f)));
						rollsLeft--;
					Debug.Log (dRoll2.ToString());
					if(dRoll2 > dRoll1){
						_protag.GetPrimaryAttribute(cnt).BaseValue = dRoll2;

					}
				}}
			if(rollsLeft == 1){
			if(GUI.Button (new Rect(125, 95 + (cnt * LineHeight), 40, LineHeight), "Dee")){
					dRoll3 = ((int)(UnityEngine.Random.Range(1.0f, 20.0f)));
						rollsLeft--;
					Debug.Log (dRoll3.ToString());
					if(dRoll3 > dRoll2 && dRoll3 > dRoll1){
						_protag.GetPrimaryAttribute(cnt).BaseValue = dRoll3;

					}
				}}
			if(rollsLeft < 1){
			if(GUI.Button (new Rect(125, 95 + (cnt * LineHeight), 40, LineHeight), "Doh")){

		}
		}
		}

@Edit

I read your question a few times and may be what you need is a dictionary to store the rollsLeft value for each attribute. Actually you should consider splitting your code into several classes but a dictionary should also do it.

Define the initial value of rollsLeft:

using System.Collections.Generic;

// YourType should be a unique identifier - may be the name of the attribute as a string
public Dictionary<YourType, int> rollsLeftForAttribute = new Dictionary<YourType, int>();

void Start ()
{
    for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++)
    {
        rollsLeftForAttribute[attributeName] = rollsLeft;
    }
}

Then instead of checking for rollsLeft and decrementing it’s value you should check for rollsLeftForAttribute[attributeName] within the loop e.g.:

for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++)
{
    ...
    if (rollsLeftForAttribute[attributeName] == 3) 
    {
        if (GUI.Button (new Rect (125, 95 + (cnt * LineHeight), 40, LineHeight), "Die")
        {
            ...
            rollsLeftForAttribute[attributeName]--;
        }
    }
    ...
}