using System;

namespace FrostFireRivals
{
    class Speletajs
    {
        private string name;
        private int dmg;
        private int cd;
        private int range;
        private int def;
        private double hp;

        public Speletajs(string name, int dmg, int cd, int range, int def, double hp)
        {
            this.name = name;
            this.dmg = dmg;
            this.cd = cd;
            this.range = range;
            this.def = def;
            this.hp = hp;
        }

        public string GetName() { return name; }
        public double GetHP() { return hp; }
        public void SetHP(double value) { hp = value; }

        public void SuperPunch()
        {
            double spDamage = this.dmg + this.range;
            Console.WriteLine(this.name + " izpilda Super Punch!");
            Console.WriteLine("Uzbrukuma jauda: " + spDamage);
        }

        public void TitanShield()
        {
            double tsValue = (this.def * 2) + (this.hp / this.cd);
            Console.WriteLine(this.name + " aktivize Titan Shield!");
            Console.WriteLine("Vairoga izturiba: " + Math.Round(tsValue, 2));
        }
    }

    class Magija
    {
        private string name;
        private int dps;
        private int cd;
        private int kedmg;
        private int radiuss;

        public Magija(string name, int dps, int cd, int kedmg, int radiuss)
        {
            this.name = name;
            this.dps = dps;
            this.cd = cd;
            this.kedmg = kedmg;
            this.radiuss = radiuss;
        }

        public void FireSplash(Speletajs uzbrucejs, Speletajs merkis)
        {
            double totalDmg = this.dps + this.kedmg;
            merkis.SetHP(merkis.GetHP() - totalDmg);
            Console.WriteLine(uzbrucejs.GetName() + " izmanto " + this.name + " pret " + merkis.GetName());
            Console.WriteLine("Nodariti " + totalDmg + " bojajumi.");
            Console.WriteLine(merkis.GetName() + " atlikusais HP: " + Math.Round(merkis.GetHP(), 2));
        }

        public void Freezelocks(Speletajs uzbrucejs, Speletajs merkis)
        {
            double freezeDamage = (double)(this.cd + this.kedmg) / this.radiuss;
            merkis.SetHP(merkis.GetHP() - freezeDamage);
            Console.WriteLine(uzbrucejs.GetName() + " iesalde " + merkis.GetName() + "!");
            Console.WriteLine("Nodariti " + Math.Round(freezeDamage, 2) + " bojajumi.");
            Console.WriteLine(merkis.GetName() + " atlikusais HP: " + Math.Round(merkis.GetHP(), 2));
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Speletajs isagi = new Speletajs("Isagi", 90, 15, 50, 60, 200);
            Speletajs kaiser = new Speletajs("Kaiser", 200, 30, 100, 42, 130);

            Magija fire = new Magija("Fire", 20, 30, 50, 5);
            Magija freeze = new Magija("Freeze", 10, 20, 25, 12);

            Console.WriteLine("--- Frost Fire Rivals ---");
            Console.WriteLine();
            
            isagi.SuperPunch();
            Console.WriteLine();

            kaiser.TitanShield();
            Console.WriteLine();

            fire.FireSplash(isagi, kaiser);
            Console.WriteLine();

            freeze.Freezelocks(kaiser, isagi);
            Console.WriteLine();
        }
    }
}