当前位置: 首页>>代码示例>>C#>>正文


C# PokemonData类代码示例

本文整理汇总了C#中PokemonData的典型用法代码示例。如果您正苦于以下问题:C# PokemonData类的具体用法?C# PokemonData怎么用?C# PokemonData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PokemonData类属于命名空间,在下文中一共展示了PokemonData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Client

        public Client(ClientIdentifier id)
        {
            Id = id;

            var stats = new Stats { Atk = 10, Def = 10, HP = 30, SpAtk = 10, SpDef = 10, Speed = 10 };
            var data = new PokemonData { Id = 0, Type1 = PokemonType.Normal, BaseStats = stats };

            var moveData = new MoveData
            {
                Name = "Move",
                Accuracy = 100,
                Damage = 120,
                DamageType = DamageCategory.Physical,
                PokemonType = PokemonType.Normal,
                PP = 20
            };

            for (int i = 0; i < 6; i++)
            {
                var pkmn = new Pokemon(data, stats) { Name = Id.Name + "_Pkmn" + i, Level = i + 20};
                for (int j = 0; j < 2; j++)
                    pkmn.SetMove(j, new Move(moveData));
                pkmn.Stats.HP = 30;
                pkmn.HP = 30;

                pokemons.Add(pkmn);
            }
        }
开发者ID:Nexus87,项目名称:PokeClone,代码行数:28,代码来源:Client.cs

示例2: CalculateCpMultiplier

 public static double CalculateCpMultiplier(PokemonData poke)
 {
     var baseStats = GetBaseStats(poke.PokemonId);
     return (baseStats.BaseAttack + poke.IndividualAttack)*
            Math.Sqrt(baseStats.BaseDefense + poke.IndividualDefense)*
            Math.Sqrt(baseStats.BaseStamina + poke.IndividualStamina);
 }
开发者ID:ChronoXNL,项目名称:NecroBot,代码行数:7,代码来源:PokemonInfo.cs

示例3: CalculatePokemonPerfection

 public static float CalculatePokemonPerfection(PokemonData poke)
 {
     if (poke != null)
         return (poke.IndividualAttack * 2 + poke.IndividualDefense + poke.IndividualStamina) / (4.0f * 15.0f) * 100.0f;
     else
         return 0;
 }
开发者ID:yuyutak,项目名称:PokemonGo-Bot-SimpleGUI,代码行数:7,代码来源:Logic.cs

示例4: PokemonCaught

        public static async Task PokemonCaught(PokemonData poke)
        {

            OnPokemonCaught(null, new PokemonCaughtArgs() { CaughtPokemon = poke });

            await PokemonCaughtReset.WaitAsync();
            PokemonCaughtReset.Reset();
        }
开发者ID:RedNax67,项目名称:GoBot,代码行数:8,代码来源:Events.cs

示例5: GetHighestCPofType

 public async Task<int> GetHighestCPofType(PokemonData pokemon)
 {
     var myPokemon = await GetPokemons();
     var pokemons = myPokemon.ToList();
     return pokemons.Where(x => x.PokemonId == pokemon.PokemonId)
         .OrderByDescending(x => x.Cp)
         .First().Cp;
 }
开发者ID:RDalziel,项目名称:Pokemon-Go-Bot,代码行数:8,代码来源:Inventory.cs

示例6: CalculateMinCp

 public static int CalculateMinCp(PokemonData poke)
 {
     return
         Math.Max(
             (int)
                 Math.Floor(0.1*CalculateMinCpMultiplier(poke)*
                            Math.Pow(poke.CpMultiplier + poke.AdditionalCpMultiplier, 2)), 10);
 }
开发者ID:ChronoXNL,项目名称:NecroBot,代码行数:8,代码来源:PokemonInfo.cs

示例7: GetHighestIVofType

 public async Task<IEnumerable<PokemonData>> GetHighestIVofType(PokemonData pokemon)
 {
     var myPokemon = await GetPokemons();
     var pokemons = myPokemon.ToList();
     return pokemons.Where(x => x.PokemonId == pokemon.PokemonId)
             .OrderByDescending(PokemonInfo.CalculatePokemonPerfection)
             .ThenBy(x => x.Cp)
             .ToList();
 }
开发者ID:Cenkyavuz,项目名称:PokemonGo-Bot,代码行数:9,代码来源:Inventory.cs

示例8: CalculatePokemonPerfection

        public static double CalculatePokemonPerfection(PokemonData poke)
        {
            if (Math.Abs(poke.CpMultiplier + poke.AdditionalCpMultiplier) <= 0)
                return (poke.IndividualAttack * 2 + poke.IndividualDefense + poke.IndividualStamina) / (4.0 * 15.0) * 100.0;

            var maxCp = CalculateMaxCpMultiplier(poke);
            var minCp = CalculateMinCpMultiplier(poke);
            var curCp = CalculateCpMultiplier(poke);

            return ((curCp - minCp) / (maxCp - minCp)) * 100.0;
        }
开发者ID:Cavaken,项目名称:PokemoGoBot-GottaCatchEmAll,代码行数:11,代码来源:PokemonInfo.cs

示例9: CalculatePokemonPerfection

        public static double CalculatePokemonPerfection(PokemonData poke)
        {
            if (poke.CpMultiplier + poke.AdditionalCpMultiplier == 0)
                return (poke.IndividualAttack * 2 + poke.IndividualDefense + poke.IndividualStamina) / (4.0 * 15.0) * 100.0;

            BaseStats baseStats = GetBaseStats(poke.PokemonId);
            var max_cp = CalculateMaxCPMultiplier(poke);
            var min_cp = CalculateMinCPMultiplier(poke);
            var cur_cp = CalculateCPMultiplier(poke);

            return ((cur_cp - min_cp) / (max_cp - min_cp)) * 100.0;
        }
开发者ID:CSGCoding,项目名称:NecroBot,代码行数:12,代码来源:PokemonInfo.cs

示例10: Transfer

        public async Task<TransferStatus> Transfer(PokemonData pokemon, float keepPerfectPokemonLimit = 80.0f)
        {
            if (Perfect(pokemon) >= keepPerfectPokemonLimit || pokemon.Favorite == 0) return TransferStatus.Ignored;

            var transferPokemonResponse = await PokemonClient.TransferPokemon(pokemon.Id);

            await Task.Delay(3000);
            if (transferPokemonResponse.Status == 1)
            {
                return TransferStatus.Success;
            }

            return TransferStatus.Fail;
        }
开发者ID:XibalbaTM,项目名称:PokeBot2,代码行数:14,代码来源:PokemonTransferer.cs

示例11: HandleEvent

 protected void HandleEvent(PokemonData pokemon, TransferStatus status)
 {
     if (status == TransferStatus.Success)
     {
         OnTransferSuccess(pokemon);
     }
     else if (status == TransferStatus.Fail)
     {
         OnTransferFailed(pokemon);
     }
     else if(status == TransferStatus.Ignored)
     {
         OnTransferIgnored(pokemon);
     }
 }
开发者ID:XibalbaTM,项目名称:PokeBot2,代码行数:15,代码来源:AllButStrongestTransferStrategy.cs

示例12: FromPokemonData

        public Pokemon FromPokemonData(PokemonData data)
        {
            if (data == null)
                return null;

            //var iStats = GenerateIV();

//            var stats = new Stats
//            {
//                HP = data.BaseStats.HP + iStats.HP,
//                Atk = data.BaseStats.Atk + iStats.Atk,
//                Def = data.BaseStats.Def + iStats.Def,
//                SpAtk = data.BaseStats.SpAtk + iStats.SpAtk,
//                SpDef = data.BaseStats.SpDef + iStats.SpDef,
//                Speed = data.BaseStats.Speed + iStats.Speed
//            };

            //var builder = new PokemonBuilder(data);
            //builder.SetIV (iStats).SetStats (stats);
            //return builder.Build ();
            throw new NotImplementedException();
        }
开发者ID:Nexus87,项目名称:PokeClone,代码行数:22,代码来源:Gen1CharRules.cs

示例13: GetHighestPokemonOfTypeByCp

 public async Task<PokemonData> GetHighestPokemonOfTypeByCp(PokemonData pokemon)
 {
     var myPokemon = await GetPokemons();
     var pokemons = myPokemon.ToList();
     return pokemons.Where(x => x.PokemonId == pokemon.PokemonId)
         .OrderByDescending(x => x.Cp)
         .FirstOrDefault();
 }
开发者ID:ChlckenWings,项目名称:NecroBot,代码行数:8,代码来源:Inventory.cs

示例14: GetPokemonMove2

 public static PokemonMove GetPokemonMove2(PokemonData poke)
 {
     var move2 = poke.Move2;
     return move2;
 }
开发者ID:ChronoXNL,项目名称:NecroBot,代码行数:5,代码来源:PokemonInfo.cs

示例15: GetPowerUpLevel

 public static int GetPowerUpLevel(PokemonData poke)
 {
     return (int) (GetLevel(poke)*2.0);
 }
开发者ID:ChronoXNL,项目名称:NecroBot,代码行数:4,代码来源:PokemonInfo.cs


注:本文中的PokemonData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。