Exemplo n.º 1
0
        public static JObject MapMonster(JObject monster, Dictionary <long, long> monster_id_mapping, long?storage_id)
        {
            JObject optimizer_monster = null;

            if (monster_id_mapping != null)
            {
                optimizer_monster = new JObject()
                {
                    { "id", monster_id_mapping[(long)monster["unit_id"]] },
                    { "name", $"{MonsterName((long)monster["unit_master_id"], "Unknown name")}{(((long)monster["building_id"] == storage_id) ? " (In Storage)" : "")}" },
                    { "level", monster["unit_level"] },
                    { "unit_id", monster["unit_id"] },
                    { "master_id", monster["unit_master_id"] },
                    { "stars", monster["class"] },
                    { "attribute", MonsterAttribute((int)monster["attribute"]) },
                    { "b_hp", 15 * (long)monster["con"] },
                    { "b_atk", monster["atk"] },
                    { "b_def", monster["def"] },
                    { "b_spd", monster["spd"] },
                    { "b_crate", monster["critical_rate"] },
                    { "b_cdmg", monster["critical_damage"] },
                    { "b_res", monster["resist"] },
                    { "b_acc", monster["accuracy"] },
                };
            }
            return(optimizer_monster);
        }
        public List <Monster> GetRandomMonsters(int count)
        {
            List <MonsterTitle> monsterTitles = GetAllMonsterTitles();
            List <MonsterName>  monsterNames  = GetAllMonsterNames();
            List <MonsterModel> monsterModels = GetAllMonsterModels();

            Random r = new Random();

            List <Monster> randomMonsters = new List <Monster>();

            for (int i = 0; i < count; i++)
            {
                MonsterTitle randomMonsterTitle = monsterTitles[r.Next(monsterTitles.Count - 1)];
                MonsterName  randomMonsterName  = monsterNames[r.Next(monsterNames.Count - 1)];
                MonsterModel randomMonsterModel = monsterModels[r.Next(monsterModels.Count - 1)];

                int monsterId = Int32.Parse("" + randomMonsterModel.MonsterModelId + randomMonsterTitle.MonsterTitleId + randomMonsterName.MonsterNameId);
                Console.WriteLine(monsterId);

                Monster m = new Monster(monsterId, randomMonsterModel, randomMonsterTitle, randomMonsterName);

                randomMonsters.Add(m);
            }

            return(randomMonsters);
        }
Exemplo n.º 3
0
 public void AddMonsterCounter(MonsterName label, int amount = 1)
 {
     for (int i = 0; i < processingObjective.Count; i++)
     {
         processingObjective[i].AddMonsterCounter(label, amount);
     }
 }
Exemplo n.º 4
0
 public void SubstractMonsterCounter(MonsterName label, int amount = 1)
 {
     foreach (ObjectivePointer item in processingObjective)
     {
         item.AddMonsterCounter(label, -amount);
     }
 }
Exemplo n.º 5
0
    /**
     * Fungsi ini digunakan untuk mengecek task yang diambil, jika task telah selesai
     * di objective maka akan memanggil StartNextObjectives() untuk memanggil objective baru
     */
    public bool CheckTask(GameObject target, MonsterName monsterName = MonsterName.All)
    {
        Objective o = QuestDictionary.Instance.GetObjective(label);

        if (o == null)
        {
            return(false);
        }

        Task _currentTask = o.GetTask(_index);

        if (_currentTask == null)
        {
            return(false);
        }

        if (currentTask.monsters.Length == 0)
        {
            currentTask.monsters = new MosnterRequire[_currentTask.monsters.Length];
            for (int i = 0; i < _currentTask.monsters.Length; i++)
            {
                currentTask.monsters[i]       = new MosnterRequire();
                currentTask.monsters[i].label = _currentTask.monsters[i].label;

                // cek mosnter
                if (monsterName != MonsterName.All && currentTask.monsters[i].label == monsterName)
                {
                    currentTask.monsters[i].amount = 1;
                }
                else
                {
                    currentTask.monsters[i].amount = 0;
                }
            }
        }

        if (!_currentTask.CheckRequirement(target, currentTask.monsters))
        {
            return(false);
        }

        // memnyelesaikan current task
        _currentTask.CompletedTask();

        // Index bertambah karena requirement terpenuhi
        _index++;

        Debug.Log("Index sekarang adalah " + _index);

        if (isCompleted)
        {
            status = QuestStatus.Finished;
            Debug.Log("Finish satu");
            StartNextObjectives();
        }

        return(true);
    }
Exemplo n.º 6
0
    public void ResetMonsterCounter(MonsterName label = MonsterName.All)
    {
        if (_index < 0 || _index >= tasks.Length)
        {
            return;
        }

        currentTask.AddMonsterCounter(label, -1000);
    }
Exemplo n.º 7
0
    public void SubstactMonsterCounter(MonsterName label, int amount = 1)
    {
        if (_index < 0 || _index >= tasks.Length)
        {
            return;
        }

        currentTask.AddMonsterCounter(label, -amount);
    }
Exemplo n.º 8
0
    public MonsterBase GetSpecificMonster(MonsterName name)
    {
        if (monsterPool == null)
        {
            return(null);
        }

        return(monsterPool.GetSpecificMonster(name));
    }
Exemplo n.º 9
0
    //슬라임용
    public MonsterBase SpawnSpecificMonsterInModule(MonsterName name, Vector3 spawnPos)
    {
        MonsterBase spawnMonster = MonsterManager.Instance.SpawnSpecificMonster(name, spawnPos);

        if (spawnMonster != null && monsterList != null)
        {
            spawnMonster.SetMapModule(this);
            AddtoMonsterList(spawnMonster);
        }

        return(spawnMonster);
    }
Exemplo n.º 10
0
 public MonsterBase GetSpecificMonster(MonsterName name)
 {
     if (pool == null)
     {
         return(null);
     }
     if (pool.ContainsKey(name) == false)
     {
         return(null);
     }
     return(pool[name].GetItem());
 }
Exemplo n.º 11
0
    public MonsterDB GetMonsterData(MonsterName key)
    {
        if (MonsterDB == null)
        {
            return(null);
        }
        if (MonsterDB.ContainsKey(key) == false)
        {
            return(null);
        }

        return(MonsterDB[key]);
    }
Exemplo n.º 12
0
 public void AddMonsterCounter(MonsterName label, int amount)
 {
     for (int i = 0; i < monsters.Length; i++)
     {
         if (monsters[i].label == label || label == MonsterName.All)
         {
             monsters[i].amount += amount;
             if (monsters[i].amount < 0)
             {
                 monsters[i].amount = 0;
             }
         }
     }
 }
Exemplo n.º 13
0
    public void CheckProgressingObjective(GameObject target, MonsterName monsterName = MonsterName.All)
    {
        // check all progresive quest
        for (int i = 0; i < processingObjective.Count; i++)
        {
            processingObjective[i].CheckTask(target, monsterName);
        }

        // remove all finished objective
        for (int i = 0; i < processingObjective.Count; i++)
        {
            if (processingObjective[i].isCompleted)
            {
                processingObjective.RemoveAt(i);
            }
        }
    }
Exemplo n.º 14
0
        public override Dictionary <string, object> SaveToDict()
        {
            var dict = new Dictionary <string, object>();

            dict.Add(GDMConstants.SchemaKey, "Monsters");

            dict.Merge(true, HealthPoints.ToGDEDict(HealthPointsKey));
            dict.Merge(true, BasicMeleeLow.ToGDEDict(BasicMeleeLowKey));
            dict.Merge(true, BasicDistanceLow.ToGDEDict(BasicDistanceLowKey));
            dict.Merge(true, BasicMagicLow.ToGDEDict(BasicMagicLowKey));
            dict.Merge(true, SpecialAbilityAdditive.ToGDEDict(SpecialAbilityAdditiveKey));
            dict.Merge(true, MonsterName.ToGDEDict(MonsterNameKey));
            dict.Merge(true, MonsterType.ToGDEDict(MonsterTypeKey));
            dict.Merge(true, MonsterDescription.ToGDEDict(MonsterDescriptionKey));
            dict.Merge(true, DifficultyLevel.ToGDEDict(DifficultyLevelKey));
            dict.Merge(true, SpecialAbility.ToGDEDict(SpecialAbilityKey));
            return(dict);
        }
Exemplo n.º 15
0
    public MonsterBase SpawnSpecificMonster(MonsterName name, Vector3 SpawnPosit)
    {
        MonsterBase monster = ObjectManager.Instance.GetSpecificMonster(name);

        if (monster == null)
        {
            return(null);
        }

        monster.transform.position = SpawnPosit;

        if (monster.isInitialize == false)
        {
            monster.FirstInitializeMonster();
        }

        monster.ResetMonster();
        return(monster);
    }
Exemplo n.º 16
0
    public void Initialize()
    {
        if (nowStageData == null)
        {
            return;
        }

        if (nowStageData.spawnEnemyList == null)
        {
            return;
        }

        for (int i = 0; i < nowStageData.spawnEnemyList.Count; i++)
        {
            MonsterName monsterName = nowStageData.spawnEnemyList[i];
            ObjectPool <MonsterBase> monsterPool = null;

            string     path = string.Format("Prefabs/Monsters/{0}", monsterName.ToString());
            GameObject obj  = Resources.Load <GameObject>(path);

            if (obj == null)
            {
                return;
            }

            monsterPool = new ObjectPool <MonsterBase>(parent, obj, 1);

            if (monsterPool != null)
            {
                if (pool.ContainsKey(monsterName) == false)
                {
                    pool.Add(monsterName, monsterPool);
                }
            }
        }
    }
Exemplo n.º 17
0
    public MonsterName GetRandomMonster()
    {
        MonsterName RandomKey = randomGenerator.GetRandomData();

        return(RandomKey);
    }
Exemplo n.º 18
0
        public override void ProcessRequest(object sender, SWEventArgs args)
        {
            if (!new string[] { "HubUserLogin", "GuestLogin" }.Contains((string)args.ResponseJson["command"]))
            {
                return;
            }

            JObject        wizard   = (JObject)args.ResponseJson["wizard_info"];
            List <JObject> monsters = ((JArray)args.ResponseJson["unit_list"]).Cast <JObject>().ToList();
            List <JObject> runes    = ((JArray)args.ResponseJson["runes"]).Cast <JObject>().ToList();
            List <JObject> crafts   = ((JArray)args.ResponseJson["rune_craft_item_list"]).Cast <JObject>().ToList();

            Optimizer optimizer = new Optimizer();

            optimizer.tvalue    = args.Response.TValue;
            optimizer.wizard_id = (long)wizard["wizard_id"];
            optimizer.deco_list = args.ResponseJson["deco_list"];

            long?storage_id = null;

            foreach (JObject building in args.ResponseJson["building_list"])
            {
                if ((long)building["building_master_id"] == 25)
                {
                    storage_id = (long)building["building_id"];
                    break;
                }
            }

            Dictionary <long, long> monster_id_mapping = new Dictionary <long, long>();
            Dictionary <long, long> rune_id_mapping    = new Dictionary <long, long>();

            int craft_id = 1;

            foreach (var craft in crafts
                     .OrderBy(c => (long)c["craft_type"])
                     .ThenBy(c => (long)c["craft_item_id"]))
            {
                optimizer.crafts.Add(SWPlugin.MapCraft(craft, craft_id));
                craft_id++;
            }

            int rune_id = 1;

            foreach (var rune in runes
                     .OrderBy(r => (long)r["set_id"])
                     .ThenBy(r => (long)r["slot_no"]))
            {
                rune_id_mapping[(long)rune["rune_id"]] = rune_id;
                rune_id++;
            }

            int monster_id = 1;

            foreach (var monster in monsters
                     .OrderBy(m => (m["building_id"].Equals(storage_id) ? 1 : 0))
                     .ThenBy(m => 6 - (long)m["class"])
                     .ThenBy(m => 40 - (long)m["unit_level"])
                     .ThenBy(m => (long)m["attribute"])
                     .ThenBy(m => 1 - ((((long)m["unit_master_id"]) / 10) % 10))
                     .ThenBy(m => (long)m["unit_id"]))
            {
                monster_id_mapping[(long)monster["unit_id"]] = monster_id;
                monster_id++;

                JEnumerable <JToken> monster_runes;
                var rr = monster["runes"];

                JObject jo = rr as JObject;
                if (jo != null)
                {
                    monster_runes = (JEnumerable <JToken>)jo.Values();
                }
                else
                {
                    monster_runes = rr.Children();
                }

                foreach (var rune in monster_runes
                         .OrderBy(r => (long)r["slot_no"]))
                {
                    rune_id_mapping[(long)rune["rune_id"]] = rune_id;
                    rune_id++;
                }
            }

            foreach (var rune in runes)
            {
                var optimizer_rune = MapRune(rune, rune_id_mapping[(long)rune["rune_id"]]);

                optimizer.runes.Add(optimizer_rune);
            }

            foreach (var monster in monsters)
            {
                var optimizer_monster = MapMonster(monster, monster_id_mapping, storage_id);

                optimizer.mons.Add(optimizer_monster);

                JEnumerable <JToken> monster_runes;
                var rr = monster["runes"];

                JObject jo = rr as JObject;
                if (jo != null)
                {
                    monster_runes = (JEnumerable <JToken>)jo.Values();
                }
                else
                {
                    monster_runes = rr.Children();
                }

                foreach (var rune in monster_runes)
                {
                    var optimizer_rune = MapRune((JObject)rune, rune_id_mapping[(long)rune["rune_id"]], monster_id_mapping[(long)monster["unit_id"]], (long)monster["unit_master_id"]);

                    optimizer_rune["monster_n"] = $"{MonsterName((long)monster["unit_master_id"], "Unknown name")}{(((long)monster["building_id"] == storage_id) ? " (In Storage)" : "")}";

                    optimizer.runes.Add(optimizer_rune);
                }
            }

            File.WriteAllText($"{(int)wizard["wizard_id"]}-optimizer.json", JsonConvert.SerializeObject(optimizer, Formatting.Indented));
            Console.WriteLine("Generated optimizer.json");
        }
Exemplo n.º 19
0
 public Monster(MonsterName name, Random levelGenerator)
 {
     Name  = name;
     Level = levelGenerator.Next(1, 10);
 }
Exemplo n.º 20
0
 public MonsterSpawnData(Vector2 _point, MonsterName _name)
 {
     name       = _name;
     spawnPoint = _point;
     dead       = false;
 }
Exemplo n.º 21
0
        public Monster CurrentMonster(MonsterName currentMonster)
        {
            Monster m = new Monster();

            if (currentMonster == MonsterName.Egg)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Fresh;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.activeTimes    = ActiveTimes.Egg;
                m.baseWeight     = 1;
                m.digivolveTo_01 = MonsterName.Botamon;
                m.partnerSprite  = Egg;
            }

            if (currentMonster == MonsterName.Botamon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Fresh;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.activeTimes    = ActiveTimes.Fresh;
                m.baseWeight     = 5;
                m.digivolveTo_01 = MonsterName.Koromon;
                m.partnerSprite  = Botamon;
            }
            else if (currentMonster == MonsterName.Koromon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.InTraining;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.activeTimes    = ActiveTimes.DayEarly;
                m.baseWeight     = 5;
                m.digivolveTo_01 = MonsterName.Agumon;
                m.digivolveTo_02 = MonsterName.Gabumon;
                m.partnerSprite  = Koromon;
            }

            #region Agumon line
            else if (currentMonster == MonsterName.Agumon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Rookie;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Reptile;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.DayEarly;
                m.baseWeight     = 15;
                m.digivolveTo_01 = MonsterName.Greymon;
                m.digivolveTo_02 = MonsterName.Tyrannomon;
                m.digivolveTo_03 = MonsterName.Cyclonemon;
                m.digivolveTo_04 = MonsterName.Flarerizamon;
                m.digivolveTo_05 = MonsterName.Numemon;
                m.partnerSprite  = Agumon;
            }

            else if (currentMonster == MonsterName.Greymon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.DayEarly;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.Metalgreymon;
                m.partnerSprite  = Greymon;
            }

            else if (currentMonster == MonsterName.Metalgreymon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Cyborg;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.element_03     = Element.Mech;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Metalgreymon;
            }

            else if (currentMonster == MonsterName.Skullgreymon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Skeleton;
                m.element_01     = Element.Fire;
                m.element_03     = Element.Darkness;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Skullgreymon;
            }


            else if (currentMonster == MonsterName.Tyrannomon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Data;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.Evening;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.Mastertyrannomon;
                m.digivolveTo_02 = MonsterName.Metaltyrannomon;
                m.digivolveTo_03 = MonsterName.Extyrannomon;
                m.partnerSprite  = Tyrannomon;
            }

            else if (currentMonster == MonsterName.Mastertyrannomon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Mastertyrannomon;
            }

            else if (currentMonster == MonsterName.Metaltyrannomon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Cyborg;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.element_03     = Element.Battle;
                m.activeTimes    = ActiveTimes.Evening;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Metaltyrannomon;
            }

            else if (currentMonster == MonsterName.Extyrannomon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Puppet;
                m.element_01     = Element.Earth;
                m.element_02     = Element.Darkness;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 20;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Extyrannomon;
            }

            else if (currentMonster == MonsterName.Cyclonemon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Dragon;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.element_03     = Element.Darkness;
                m.element_04     = Element.Filth;
                m.activeTimes    = ActiveTimes.Evening;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.Datamon;
                m.digivolveTo_02 = MonsterName.Megadramon;
                m.partnerSprite  = Cyclonemon;
            }

            else if (currentMonster == MonsterName.Datamon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Machine;
                m.element_01     = Element.Mech;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 20;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Datamon;
            }

            else if (currentMonster == MonsterName.Megadramon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Cyborg;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Air;
                m.element_03     = Element.Mech;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 50;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Megadramon;
            }

            else if (currentMonster == MonsterName.Flarerizamon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Data;
                m.type           = Type.Dragon;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 20;
                m.digivolveTo_01 = MonsterName.Gigadramon;
                m.partnerSprite  = Flarerizamon;
            }

            else if (currentMonster == MonsterName.Gigadramon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Cyborg;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Air;
                m.element_03     = Element.Mech;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 50;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Gigadramon;
            }
            #endregion

            #region Gabumon line
            else if (currentMonster == MonsterName.Gabumon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Rookie;
                m.attribute      = Attribute.Data;
                m.type           = Type.Reptile;
                m.element_01     = Element.Ice;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 15;
                m.digivolveTo_01 = MonsterName.Garurumon;
                m.digivolveTo_02 = MonsterName.Drimogemon;
                m.digivolveTo_03 = MonsterName.Monochromon;
                m.digivolveTo_04 = MonsterName.Numemon;
                m.partnerSprite  = Gabumon;
            }

            else if (currentMonster == MonsterName.Garurumon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Beast;
                m.element_01     = Element.Ice;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.Weregarurumon;
                m.partnerSprite  = Garurumon;
            }

            else if (currentMonster == MonsterName.Weregarurumon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Reptile;
                m.element_01     = Element.Ice;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Weregarurumon;
            }

            else if (currentMonster == MonsterName.Mammothmon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Beast;
                m.element_01     = Element.Ice;
                m.element_02     = Element.Earth;
                m.activeTimes    = ActiveTimes.Morning;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Mammothmon;
            }

            else if (currentMonster == MonsterName.Drimogemon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Data;
                m.type           = Type.Beast;
                m.element_01     = Element.Earth;
                m.activeTimes    = ActiveTimes.NightEarly;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.Giromon;
                m.partnerSprite  = Drimogemon;
            }

            else if (currentMonster == MonsterName.Giromon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Vaccine;
                m.type           = Type.Machine;
                m.element_01     = Element.Mech;
                m.activeTimes    = ActiveTimes.Morning;
                m.baseWeight     = 10;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Giromon;
            }

            else if (currentMonster == MonsterName.Monochromon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Data;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Earth;
                m.activeTimes    = ActiveTimes.DayEarly;
                m.baseWeight     = 40;
                m.digivolveTo_01 = MonsterName.Triceramon;
                m.partnerSprite  = Monochromon;
            }

            else if (currentMonster == MonsterName.Triceramon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Ultimate;
                m.attribute      = Attribute.Data;
                m.type           = Type.Dinosaur;
                m.element_01     = Element.Fire;
                m.element_02     = Element.Battle;
                m.activeTimes    = ActiveTimes.Evening;
                m.baseWeight     = 30;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Triceramon;
            }
            #endregion

            #region Special
            else if (currentMonster == MonsterName.Numemon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Mutant;
                m.element_01     = Element.Filth;
                m.activeTimes    = ActiveTimes.DayEarly;
                m.baseWeight     = 15;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Numemon;
            }

            else if (currentMonster == MonsterName.Sukamon)
            {
                m.monsterName    = currentMonster;
                m.stage          = Stage.Champion;
                m.attribute      = Attribute.Virus;
                m.type           = Type.Mutant;
                m.element_01     = Element.Filth;
                m.activeTimes    = ActiveTimes.DayLate;
                m.baseWeight     = 15;
                m.digivolveTo_01 = MonsterName.none;
                m.partnerSprite  = Sukamon;
            }
            #endregion

            nextMonster = m.digivolveTo_01;
            stage       = m.stage;
            return(m);
        }
Exemplo n.º 22
0
        public bool evolveToRequirements(MonsterName m)
        {
            if (m == MonsterName.Koromon)
            {
                return(true);
            }

            #region Rookies
            if (m == MonsterName.Agumon)
            {
                if (playerData.careMistakes <= 2)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Gabumon)
            {
                if (playerData.careMistakes > 2)
                {
                    return(true);
                }
            }
            #endregion

            #region Champions
            if (m == MonsterName.Greymon)
            {
                if (playerData.careMistakes < 1)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Tyrannomon)
            {
                if (playerData.careMistakes < 5)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Cyclonemon)
            {
                if (playerData.careMistakes > 1 && playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Flarerizamon)
            {
                if (playerData.careMistakes < 5 && playerData.weight < 20)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Garurumon)
            {
                if (playerData.careMistakes < 1)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Drimogemon)
            {
                if (playerData.careMistakes < 5 && playerData.happiness > 100)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Monochromon)
            {
                if (playerData.careMistakes < 5 && playerData.weight > 30)
                {
                    return(true);
                }
            }
            #endregion

            #region Ultimates

            if (m == MonsterName.Metalgreymon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Metalgreymon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Skullgreymon)
            {
                if (playerData.careMistakes > 5 && playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Mastertyrannomon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Metaltyrannomon)
            {
                if (playerData.careMistakes > 5 && playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Extyrannomon)
            {
                if (playerData.careMistakes < 5 && playerData.weight < 20)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Datamon)
            {
                if (playerData.careMistakes < 10 && playerData.weight < 30)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Megadramon)
            {
                if (playerData.careMistakes < 10 && playerData.weight > 30)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Gigadramon)
            {
                if (playerData.careMistakes < 10 && playerData.weight > 30)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Weregarurumon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Mammothmon)
            {
                if (playerData.careMistakes < 10 && playerData.weight > 30)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Giromon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }

            if (m == MonsterName.Triceramon)
            {
                if (playerData.careMistakes < 10)
                {
                    return(true);
                }
            }
            #endregion

            #region Specials
            if (m == MonsterName.Numemon)
            {
                if (playerData.careMistakes > 1)
                {
                    return(true);
                }
            }
            #endregion

            return(false);
        }