Пример #1
0
        public override string hitFighter(IFighter victime, int part)
        {
            Random random       = new Random(DateTime.Now.Millisecond);
            int    randomNumber = random.Next(0, 100);
            string res          = "Siren " + Name;
            int    damage       = 0;

            if (randomNumber >= 0 && randomNumber < 80)
            {
                damage = 20;
                res   += " paid ordinary punch ";
            }
            else if (randomNumber >= 80 && randomNumber < 100)
            {
                damage = 10;
                res   += " paid a week punch but she splat venom " + victime.poisoning(2);
            }


            return(res + victime.GetHit(this, part, damage));
        }
Пример #2
0
        public override string GetHit(IFighter attacker, int part, int damage)
        {
            string log = "Siren " + Name;

            //log += checkPoison(); сирена ядовита сама и не отравляеться

            log += " block a " + bodyparts[blockedPart] + " and have attacked " + bodyparts[part];
            if (blockedPart != part)
            {
                Random random       = new Random(DateTime.Now.Millisecond);
                int    randomNumber = random.Next(0, 100);
                if (randomNumber >= 0 && randomNumber < 80)
                {
                    increaseHP(damage);
                    return(log + " and have a dammage ");
                }
                else if (randomNumber >= 80 && randomNumber < 90)
                {
                    return(log + " but she flew ");
                }
                else if (randomNumber >= 90 && randomNumber < 100)
                {
                    increaseHP(damage);
                    return(log + " and have a dammage, but her blood fell on the enemy and poisoned him " + attacker.poisoning(2));
                }
            }
            return(log + " and don't have dammage ");
        }