//Method to retrieve a new Stat, or create it if it's not already. public Stat createStat(AvailableStatistics _s, int num) { switch (_s) { case AvailableStatistics.STRENGTH: return(new Stat("Strength", num)); case AvailableStatistics.DEXTERITY: return(new Stat("Dexterity", num)); case AvailableStatistics.DETERMINATION: return(new Stat("Determination", num)); case AvailableStatistics.INTELLIGENCE: return(new Stat("Intelligence", num)); case AvailableStatistics.ATTACKS: return(new Stat("Attacks", num)); } return(null); }
//Implementation that allows overriding the default statistic, ex: intelligence-based weapons public Skill createSkill(string _s, AvailableStatistics _stat) { string temp = "Null"; switch (_stat) { case AvailableStatistics.DEXTERITY: temp = "Dexterity"; break; case AvailableStatistics.STRENGTH: temp = "Strength"; break; case AvailableStatistics.INTELLIGENCE: temp = "Intelligence"; break; case AvailableStatistics.DETERMINATION: temp = "Determination"; break; } return(new Skill(_s, temp)); }