예제 #1
0
    private void ExecShieldBash(Character player, Character target, CriticalType critical)
    {
        Debug.Log(MethodBase.GetCurrentMethod());
        bool success = ExecNormalAttack(player, target, SecondaryLogic.ShieldBash(player), critical);

        if (success)
        {
            if (target.IsResistStun)
            {
                StartAnimation(target.objGroup.gameObject, Fix.EFFECT_RESIST_STUN, Fix.COLOR_NORMAL);
                return;
            }

            target.objBuffPanel.AddBuff(prefab_Buff, Fix.EFFECT_STUN, SecondaryLogic.ShieldBash_Turn(player), 0, 0);
            StartAnimation(target.objGroup.gameObject, Fix.EFFECT_STUN, Fix.COLOR_NORMAL);
        }
    }
예제 #2
0
    private double DamageFromCommand(Character player, string command_name)
    {
        double result = 0;

        if (command_name == Fix.NORMAL_ATTACK)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.NormalAttack(player);
        }
        else if (command_name == Fix.MAGIC_ATTACK)
        {
            result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.MagicAttack(player);
        }
        else if (command_name == Fix.FIRE_BALL)
        {
            result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.FireBall(player);
        }
        else if (command_name == Fix.ICE_NEEDLE)
        {
            result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.IceNeedle(player);
        }
        else if (command_name == Fix.SHADOW_BLAST)
        {
            result = PrimaryLogic.MagicAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.ShadowBlast(player);
        }
        else if (command_name == Fix.STRAIGHT_SMASH)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.StraightSmash(player);
        }
        else if (command_name == Fix.SHIELD_BASH)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.ShieldBash(player);
        }
        else if (command_name == Fix.HUNTER_SHOT)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.HunterShot(player);
        }
        else if (command_name == Fix.VENOM_SLASH)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.VenomSlash(player);
        }
        else if (command_name == Fix.MULTIPLE_SHOT)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.MultipleShot(player);
        }
        else if (command_name == Fix.CIRCLE_SLASH)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.CircleSlash(player);
        }
        else if (command_name == Fix.DOUBLE_SLASH)
        {
            result = PrimaryLogic.PhysicalAttack(player, PrimaryLogic.ValueType.Random) * SecondaryLogic.NormalAttack(player);
        }

        return(result);
    }