Exemplo n.º 1
0
        public void ManaWeaponAttack(Mortal receiver)
        {
            float baseDamage = Damage + 3;

            //receiver.Mana -= 5;
            receiver.Health -= (baseDamage * 1);
        }
Exemplo n.º 2
0
 public void Heal(Mortal character)
 {
     if (spellCost(25))
     {
         character.Health = (float)Math.Abs(character.Intelligence * ((rand.NextDouble() + .6) * Level));
     }
 }
Exemplo n.º 3
0
 public void Meteor(Mortal receiver)
 {
     if (spellCost(50))
     {
         receiver.Health -= (float)Math.Abs(30 * (Level * .2));
     }
 }
Exemplo n.º 4
0
 public void Fireball(Mortal receiver)
 {
     if (spellCost(20))
     {
         float baseDamage = (float)Math.Abs((5 + ((Intelligence + Wisdom) * .2)) * (rand.NextDouble() + 2.7 * Level));
         receiver.Health -= baseDamage;
     }
 }
Exemplo n.º 5
0
 public void Spark(Mortal receiver)
 {
     if (spellCost(10))
     {
         float baseDamage = (float)Math.Abs(((6 + ((Intelligence + Wisdom) * .33) * (rand.NextDouble() + 2.8 * Level))));
         receiver.Health -= baseDamage;
     }
 }
Exemplo n.º 6
0
 public void BloodMagic(Mortal character, Mortal receiver)
 {
     if (character.Health - 50 >= 0)
     {
         character.Health -= 50;
         receiver.Health  -= (float)Math.Abs(40 * (Level * .4));
     }
 }
Exemplo n.º 7
0
 public void IceBlast(Mortal receiver)
 {
     if (spellCost(30))
     {
         float baseDamage = (float)Math.Abs((6 + ((Intelligence + Wisdom * .4)) * (rand.NextDouble() * 3 + Level)));
         receiver.Health -= baseDamage;
     }
 }
Exemplo n.º 8
0
        public void SimpleAttack(Mortal receiver)
        {
            float baseDamage = Math.Abs(Str * 1.2f - receiver.Def);
            float randMax    = 1 + SIMPLEATTACK_RANDOM_AMT;
            float randMin    = 1 - SIMPLEATTACK_RANDOM_AMT;
            float randMult   = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
        }
 /*
  * //function to check if characters stats are below 0 ie mana,strength,etc
  * public void statCheck(Mortal Character, Mortal receiver)
  * {
  *  if(Character)
  * }
  */
 public void WeakenAttack(Mortal receiver)
 {
     if (receiver.Str <= 0)
     {
         return;
     }
     receiver.Str -= 1;
     Mana         -= 10;
 }
Exemplo n.º 10
0
 public void Attack2(Mortal receiver)
 {
     if (Mana != 0)
     {
         float baseDamage = (float)Math.Abs(Mana * .75 + Level);
         receiver.Health -= baseDamage;
         Mana             = 0;
     }
     return;
 }
Exemplo n.º 11
0
 public void WeakenAttack(Mortal receiver)
 {
     if (receiver.Str < 0)
     {
         return;
     }
     if (spellCost(15))
     {
         receiver.Str -= 1;
     }
 }
Exemplo n.º 12
0
        public void MagicAttack(Mortal receiver)
        {
            float strCoeffient  = 0.2f;
            float ManaCoeffient = 0.5f;

            if (Mana >= 5)
            {
                float baseDamage = 0;
                Mana = Mana - 5;
                switch (Game.GetGame().Character.ClassType)
                {
                case classSystem.SCRUM:
                    strCoeffient  = 0.5f;
                    ManaCoeffient = 0.3f;


                    break;

                case classSystem.WARRIOR:
                    strCoeffient  = 0.8f;
                    ManaCoeffient = 0.3f;
                    break;

                case classSystem.MAGICIAN:
                    Mana          = Mana - 5;
                    strCoeffient  = 0.5f;
                    ManaCoeffient = 1.0f;
                    break;

                case classSystem.ARCHER:
                    strCoeffient  = 0.5f;
                    ManaCoeffient = 0.5f;


                    break;

                default:
                    strCoeffient  = 0.1f;
                    ManaCoeffient = 0.1f;
                    break;
                }
                baseDamage = Math.Abs(Str * strCoeffient + ManaCoeffient * MaxMana - receiver.Def);
                float randMax  = 1 + SIMPLEATTACK_RANDOM_AMT;
                float randMin  = 1 - SIMPLEATTACK_RANDOM_AMT;
                float randMult = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;


                receiver.Health -= (baseDamage * randMult);
            }
            else
            {
                Console.WriteLine("YOU DONT HAVE ENOUGH MANA");
            }
        }
Exemplo n.º 13
0
        //all methods of attack
        #region Abilities
        public void SimpleAttack(Mortal receiver)
        {
            if (Str <= 0)
            {
                return;
            }
            float baseDamage = Math.Abs(9 + (Strength * .9f - receiver.Def));
            float randMax    = 1 + SIMPLEATTACK_RANDOM_AMT;
            float randMin    = 1 - SIMPLEATTACK_RANDOM_AMT;
            float randMult   = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
        }
Exemplo n.º 14
0
        public void BigStab(Mortal receiver)
        {
            if (Str <= 0)
            {
                return;
            }
            float baseDamage = Math.Abs(4 + (Strength * 2.8f - receiver.Def));
            float randMax    = 1 + .6f;
            float randMin    = 1 - .4f;
            float randMult   = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
        }
Exemplo n.º 15
0
        public void EnemyAttack(Mortal receiver)
        {
            if (Str <= 0)
            {
                return;
            }

            float baseDamage = (float)Math.Abs(2.2 * receiver.Level + (Str * 1.9f - receiver.Def));
            float randMax    = 1 + SIMPLEATTACK_RANDOM_AMT;
            float randMin    = 1 - SIMPLEATTACK_RANDOM_AMT;
            float randMult   = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
        }
Exemplo n.º 16
0
        public void SimpleAttack(Mortal receiver)
        {
            float baseDamage = Math.Max(GetModifiedStat("Str") * 1.2f - receiver.GetModifiedStat("Def"), 0);

            // add weapon damage if applicable
            if (EquippedWeapon != null && EquippedWeapon.Type == WeaponType.Physical)
            {
                baseDamage += EquippedWeapon.DamageModifier;
            }

            float randMax  = 1 + SIMPLEATTACK_RANDOM_AMT;
            float randMin  = 1 - SIMPLEATTACK_RANDOM_AMT;
            float randMult = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
        }
Exemplo n.º 17
0
        public void MagicAttack(Mortal receiver, Mortal sender)
        {
            float baseDamage = Math.Max(GetModifiedStat("Str") * 1.5f - receiver.GetModifiedStat("Def"), 0);

            // add weapon damage if applicable
            if (EquippedWeapon != null && EquippedWeapon.Type == WeaponType.Magical)
            {
                baseDamage += EquippedWeapon.DamageModifier;
            }

            float randMax  = 1 + MAGICATTACK_RANDOM_AMT;
            float randMin  = 1 - MAGICATTACK_RANDOM_AMT;
            float randMult = (float)(rand.NextDouble() * (randMax - randMin)) + randMin;

            receiver.Health -= (baseDamage * randMult);
            sender.Mana     -= 5;
        }
Exemplo n.º 18
0
 public void Heal(Mortal receiver)
 {
     receiver.Health += 5;
     receiver.Mana   -= 5;
 }
Exemplo n.º 19
0
 public void Heal(Mortal receiver)
 {
     receiver.Health += 15;
 }
Exemplo n.º 20
0
        public void SimpleAttack(Mortal receiver, Weapon weapon = null)
        {
            Boolean dodge  = false;
            Random  random = new Random();

            if (receiver is GameLibrary.Character)
            {
                int randomNumber = random.Next(0, 100);
                if (Game.GetGame().Character.ClassType == classSystem.ARCHER)
                {
                    if (Game.GetGame().Character.Luck *3 > randomNumber)
                    {
                        dodge = true;
                    }
                }
                else
                {
                    if (Game.GetGame().Character.Luck > randomNumber)
                    {
                        dodge = true;
                    }
                }
            }

            if (!dodge)
            {
                float baseDamage   = 0;
                float strCoeffient = 1.0f;
                switch (Game.GetGame().Character.ClassType)
                {
                case classSystem.SCRUM:
                    strCoeffient = 1.0f;

                    break;

                case classSystem.WARRIOR:

                    strCoeffient = 2.0f;
                    break;

                case classSystem.MAGICIAN:

                    strCoeffient = 0.7f;
                    break;

                case classSystem.ARCHER:
                    strCoeffient = 1.2f;


                    break;

                default:
                    baseDamage = 0;

                    break;
                }
                baseDamage = Math.Abs(Str * strCoeffient - receiver.Def);

                if (Game.GetGame().Character.ClassType == classSystem.ARCHER)
                {
                    if (Game.GetGame().Character.Luck > random.Next(0, 100))
                    {
                        Console.WriteLine(baseDamage);
                        baseDamage = baseDamage * (100f + 5.0f * Game.GetGame().Character.Luck) / 100.0f;
                        Console.WriteLine(baseDamage);
                    }
                }
                float randMax = 1 + SIMPLEATTACK_RANDOM_AMT;
                float randMin = 1 - SIMPLEATTACK_RANDOM_AMT;
                float randMult;
                if (weapon != null)
                {
                    if (weapon.wID == 3)
                    {
                        randMult = (float)((rand.NextDouble() * (randMax - randMin)) + randMin * (float)weapon.damMod);
                        double chance = rand.NextDouble();
                        if (chance < .15)
                        {
                            randMult *= (float)2.0;
                        }
                    }
                    else
                    {
                        randMult = (float)((rand.NextDouble() * (randMax - randMin)) + randMin * (float)weapon.damMod);
                    }
                }
                else
                {
                    randMult = (float)((rand.NextDouble() * (randMax - randMin)) + randMin);
                }



                if (receiver.Speed > 0)
                {
                }
                receiver.Health -= (baseDamage * randMult);
            }
        }
Exemplo n.º 21
0
 public abstract void OnEquipped(Mortal equipper);
Exemplo n.º 22
0
 public abstract void OnUnequipped(Mortal unequipper);
Exemplo n.º 23
0
        public void WeaponAttack(Mortal reciever)
        {
            Character character = Game.GetGame().Character;

            reciever.Health = reciever.Health - (character.Str * 2);
        }
Exemplo n.º 24
0
 public void Attack2(Mortal receiver)
 {
     receiver.Health = 0;
 }
Exemplo n.º 25
0
 public void Mercy(Mortal receiver)
 {
     Mana            = 0;
     receiver.Health = 1;
 }
Exemplo n.º 26
0
 public void PocketSand(Mortal receiver)
 {
     receiver.Health -= 1;
 }
Exemplo n.º 27
0
        //public float Health { get; protected set; }


        public void SimpleWeaponAttack(Mortal receiver)
        {
            float baseDamage = Damage;

            receiver.Health -= (baseDamage * 1);
        }