Exemplo n.º 1
0
        public BaseRelic GetRelic(string relic)
        {
            RelicType result;

            if (Enum.TryParse <RelicType>(relic, out result))
            {
                switch (result)
                {
                case RelicType.Attack:
                    tempBaseRelic = new AttackRelic();
                    break;

                case RelicType.Health:
                    tempBaseRelic = new HealthRelic();
                    break;

                case RelicType.Speed:
                    tempBaseRelic = new SpeedRelic();
                    break;

                case RelicType.Accuracy:
                    tempBaseRelic = new AccuracyRelic();
                    break;
                }
            }

            return(tempBaseRelic);
        }
Exemplo n.º 2
0
        public string GetRelicStat(RelicType type, RelicStat stat)
        {
            switch (type)
            {
            case RelicType.Attack:
                tempBaseRelic = new AttackRelic();
                break;

            case RelicType.Health:
                tempBaseRelic = new HealthRelic();
                break;

            case RelicType.Speed:
                tempBaseRelic = new SpeedRelic();
                break;

            case RelicType.Accuracy:
                tempBaseRelic = new AccuracyRelic();
                break;
            }

            switch (stat)
            {
            case RelicStat.PartitionKey:
                return(tempBaseRelic.PartitionKey);

            case RelicStat.RowKey:
                return(tempBaseRelic.RowKey);

            case RelicStat.Stat2Mod:
                return(tempBaseRelic.Stat2Mod.ToString());

            case RelicStat.ModValue:
                return(tempBaseRelic.ModValue.ToString());

            case RelicStat.Desc:
                return(tempBaseRelic.Desc);

            default:
                return("No Stat Defined");    // No Stat Defined
            }
        }