コード例 #1
0
        public static Dictionary <STATTYPE, Stat> CreatePlayerStat()
        {
            Dictionary <STATTYPE, Stat> Stats     = new Dictionary <STATTYPE, Stat>();
            AttackPowerStat             attackPow = new AttackPowerStat(2, 2);
            AttackRangeStat             attackRan = new AttackRangeStat(1, 3);
            HealthStat      healthStat            = new HealthStat(2, 2);
            ActionPointStat actionPStat           = new ActionPointStat(0, 4);

            Stats.Add(attackPow.StatType, attackPow);
            Stats.Add(attackRan.StatType, attackRan);
            Stats.Add(healthStat.StatType, healthStat);
            Stats.Add(actionPStat.StatType, actionPStat);

            return(Stats);
        }
コード例 #2
0
        public static Dictionary <STATTYPE, Stat> CreateKimbokoZStat()
        {
            Dictionary <STATTYPE, Stat> Stats     = new Dictionary <STATTYPE, Stat>();
            AttackPowerStat             attackPow = new AttackPowerStat(11, 11);
            AttackRangeStat             attackRan = new AttackRangeStat(1, 3);
            MoveRangeStat   moveRan     = new MoveRangeStat(1, 3);
            HealthStat      healthStat  = new HealthStat(11, 11);
            ActionPointStat actionPStat = new ActionPointStat(0, 1);

            Stats.Add(attackPow.StatType, attackPow);
            Stats.Add(attackRan.StatType, attackRan);
            Stats.Add(healthStat.StatType, healthStat);
            Stats.Add(actionPStat.StatType, actionPStat);
            Stats.Add(moveRan.StatType, moveRan);
            return(Stats);
        }
コード例 #3
0
        public static Dictionary <STATTYPE, Stat> CreateKimbokoCombineStat(List <Kimboko> combineKimbokos)
        {
            Dictionary <STATTYPE, ActualMax> groupStat = new Dictionary <STATTYPE, ActualMax>();

            // RECORRER LA LISTA DE KIMBOKOS
            for (int i = 0; i < combineKimbokos.Count; i++)
            {
                // RECORRER EL DICCIONARIO DE SUS STATS
                foreach (KeyValuePair <STATTYPE, Stat> stat in combineKimbokos[i].Stats)
                {
                    if (groupStat.ContainsKey(stat.Key))
                    {
                        switch (stat.Key)
                        {
                        case STATTYPE.ATTACKPOW:
                        case STATTYPE.HEALTH:
                            // TANTO ATK POW COMO HP SE SUMAN EL ACTUAL Y EL MAX
                            groupStat[stat.Key].Actual += stat.Value.ActualStatValue;
                            groupStat[stat.Key].Max    += stat.Value.MaxStatValue;
                            break;

                        case STATTYPE.ATTACKRANGE:
                        case STATTYPE.MOVERANGE:
                            if (groupStat[stat.Key].Max < stat.Value.MaxStatValue)
                            {
                                groupStat[stat.Key].Max = stat.Value.MaxStatValue;
                            }
                            if (groupStat[stat.Key].Actual < stat.Value.ActualStatValue)
                            {
                                groupStat[stat.Key].Actual = stat.Value.ActualStatValue;
                            }
                            break;

                        default:
                            break;
                        }
                    }
                    else
                    {
                        groupStat.Add(stat.Key, new ActualMax(stat.Value.ActualStatValue, stat.Value.MaxStatValue));
                    }
                }
            }

            // AGREGO LOS STATS A AL DICCIONARIO
            Dictionary <STATTYPE, Stat> Stats = new Dictionary <STATTYPE, Stat>();

            if (groupStat.ContainsKey(STATTYPE.ATTACKPOW))
            {
                AttackPowerStat attackPow = new AttackPowerStat(groupStat[STATTYPE.ATTACKPOW].Actual, groupStat[STATTYPE.ATTACKPOW].Max);
                Stats.Add(attackPow.StatType, attackPow);
            }
            if (groupStat.ContainsKey(STATTYPE.ATTACKRANGE))
            {
                AttackRangeStat attackRan = new AttackRangeStat(groupStat[STATTYPE.ATTACKRANGE].Actual, groupStat[STATTYPE.ATTACKRANGE].Max);
                Stats.Add(attackRan.StatType, attackRan);
            }
            if (groupStat.ContainsKey(STATTYPE.MOVERANGE))
            {
                MoveRangeStat moveRan = new MoveRangeStat(groupStat[STATTYPE.MOVERANGE].Actual, groupStat[STATTYPE.MOVERANGE].Max);
                Stats.Add(moveRan.StatType, moveRan);
            }
            if (groupStat.ContainsKey(STATTYPE.HEALTH))
            {
                HealthStat healthStat = new HealthStat(groupStat[STATTYPE.HEALTH].Actual, groupStat[STATTYPE.HEALTH].Max);
                Stats.Add(healthStat.StatType, healthStat);
            }

            // ZX = 116 - ZY = 132 SOLO 1/1
            int points = CombineKimbokoRules.PuntuateKimbokoList(combineKimbokos);

            if (points == 116 || points == 132)
            {
                ActionPointStat actionPStat = new ActionPointStat(0, 1);
                Stats.Add(actionPStat.StatType, actionPStat);
            }
            else
            {
                ActionPointStat actionPStat = new ActionPointStat(0, 2);
                Stats.Add(actionPStat.StatType, actionPStat);
            }
            return(Stats);
        }