public override void UpdateInPlayerAround(BattlePokemonData pokemon)
        {
            int h = pokemon.Health / 8;

            h = Math.Min(h, pokemon.curHealth);
            //考虑特性
            if (AbilityManager.AbilityImpacts.ContainsKey(pokemon.ShowAbility))
            {
                AbilityManager.AbilityImpacts[pokemon.ShowAbility]
                .OnAbnomalCauseDamage
                (
                    pokemon, ref h
                );
            }
            DebugHelper.Log(
                new StringBuilder(40)
                .AppendFormat("{0}因为中毒受到了", pokemon.Ename)
                .Append(h)
                .Append("伤害")
                .ToString());
            pokemon.curHealth -= h;

            if (1 == pokemon.curHealth)
            {
                pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Normal);
            }
        }
 public override void UpdateInPlayerAround(BattlePokemonData pokemon)
 {
     SleepTimeDict[pokemon.ID] -= 1;
     if (0 == SleepTimeDict[pokemon.ID])
     {
         pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Normal);
     }
 }
Exemplo n.º 3
0
 public override void OnBeAttacked(BattlePokemonData self, Skill skill, BattlePokemonData attackPokemon, ref int avoid)
 {
     if (SkillType.物理 == skill.type && attackPokemon.Abnormal != AbnormalStateEnum.Normal)
     {
         if (RandomService.game.Int(0, 100) < 30)
         {
             DebugHelper.LogFormat("{0}触发了{1}的静态特性,{0}麻痹了", attackPokemon.Ename, self.Ename);
             attackPokemon.SetAbnormalStateEnum(AbnormalStateEnum.Paralysis);
         }
     }
 }
 public override void OnBeAttacked(
     BattlePokemonData self, Skill skill, BattlePokemonData attackPokemon,
     ref bool IsIngnore)
 {
     if (PokemonType.电 == skill.att)
     {
         IsIngnore = true;
         attackPokemon.SetAbnormalStateEnum(AbnormalStateEnum.Paralysis);
         StatModifiers stat = self.StatModifiers;
         stat.EnergyPower  += 1;
         self.StatModifiers = stat;
         DebugHelper.LogFormat("{0}具有避雷针特性,电属性技能对{0}无效,被电属性招式击中时,特攻提升1级", self.Ename);
     }
 }
        public override bool CanAction(BattlePokemonData pokemon)
        {
            bool isfalg = RandomService.game.Float(0, 5) < 1;

            if (isfalg)
            {
                DebugHelper.LogFormat("{0}冰冻状态解除", pokemon.Ename);
                pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Normal);
            }
            else
            {
                DebugHelper.LogFormat("{0}冰冻了无法行动", pokemon.Ename);
            }
            return(isfalg);
        }
Exemplo n.º 6
0
 public override void HitEffect(BattlePokemonData pokemon)
 {
     pokemon.SetAbnormalStateEnum(AbnormalStateEnum.BadlyPoison);
 }
Exemplo n.º 7
0
 public override void HitEffect(BattlePokemonData pokemon)
 {
     pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Frostbite);
 }
Exemplo n.º 8
0
 public override void HitEffect(BattlePokemonData pokemon)
 {
     pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Paralysis);
 }
Exemplo n.º 9
0
 public override void HitEffect(BattlePokemonData pokemon)
 {
     pokemon.SetAbnormalStateEnum(AbnormalStateEnum.Sleeping);
 }