示例#1
0
        public void FireBall(Unit caster, Unit target)
        {
            string spellName      = "Fire Ball";
            string effectType     = "hRegen";
            double manaRequirment = 0.25 * caster.MaxMana;
            int    effect         = 1;
            double damage         = target.MaxHP * 0.05 + caster.CurrentMagicPower * 0.7 - target.CurrentRessistanceValue * 0.8;

            spellCheck.NegativeEffectCheck(caster, target, manaRequirment, effect, effectType);
            spellCheck.SpellDamageCheck(caster, target, manaRequirment, damage, spellName);
        }
        public void ThornBlast(Unit caster, Unit target)
        {
            string spellName      = "Thorn Blast";
            string effectType     = "Armor";
            double manaRequirment = 0.35 * caster.MaxMana;
            double effect         = target.ArmorValue * 0.3;
            double damage         = target.MaxHP * 0.05 + caster.CurrentMagicPower * 0.8 - target.CurrentRessistanceValue;

            spellCheck.NegativeEffectCheck(caster, target, manaRequirment, effect, effectType);
            spellCheck.SpellDamageCheck(caster, target, manaRequirment, damage, spellName);
        }
        public void ShadowTouch(Unit caster, Unit target)
        {
            string spellName      = "Shadow Touch";
            string effectType     = "Res";
            double manaRequirment = 0.25 * caster.MaxMana;
            double effect         = 3;
            double damage         = target.MaxHP * 0.08 + caster.CurrentMana * 0.10 - target.CurrentRessistanceValue;

            spellCheck.NegativeEffectCheck(caster, target, manaRequirment, effect, effectType);
            spellCheck.SpellDamageCheck(caster, target, manaRequirment, damage, spellName);
        }
        public void ManaDrain(Unit caster, Unit target)
        {
            string spellName          = "Mana Drain";
            string buffType           = "Mana";
            string negativeEffectType = "Mana";
            double buffEffect         = 0.25 * target.MaxMana;
            double negativeEffect     = 0.25 * target.MaxMana;
            double manaRequirment     = 0.10 * caster.MaxHP;

            spellCheck.NegativeEffectCheck(caster, target, manaRequirment, negativeEffect, negativeEffectType);
            spellCheck.BuffCheck(caster, caster, manaRequirment, buffEffect, spellName, buffType);
        }
示例#5
0
        public void HeadSmash(Unit caster, Unit target)
        {
            string spellName      = "Head Smash";
            string effectType     = "SelfHP";
            double manaRequirment = 0.5 * caster.MaxMana;
            double effect         = 0.08 * caster.MaxHP;
            double damage         = caster.CurrentAttackPower * 1.5 - target.CurrentArmorValue;

            if (caster.CurrentHP > effect)
            {
                spellCheck.NegativeEffectCheck(caster, caster, manaRequirment, effect, effectType);
                spellCheck.PhysicalDamageCheck(caster, target, manaRequirment, damage, spellName);
                Console.WriteLine($"{caster.Name} lost HP : {effect:f2} due to the effect of {spellName}!!");
                Console.WriteLine();
            }
            else
            {
                Console.WriteLine($"Cannot use {spellName}!");
                Console.WriteLine();
            }
        }