~ruther/NosSmooth

8d2f86cb04d163df82596552769113f47e5ed1a9 — Rutherther 2 years ago 205a84f
fix(combat): do not return successfully when walk position is equal to target position
M Extensions/NosSmooth.Extensions.Combat/NosSmooth.Extensions.Combat.csproj => Extensions/NosSmooth.Extensions.Combat/NosSmooth.Extensions.Combat.csproj +3 -3
@@ 5,10 5,10 @@
        <Nullable>enable</Nullable>
        <LangVersion>10</LangVersion>
        <TargetFramework>net7.0</TargetFramework>
        <Version>0.0.2</Version>
        <Version>0.0.3</Version>
        <Description>Manages NosSmooth combat state, currently exposing a simple technique to kill one enemy at a time.</Description>
        <AssemblyVersion>0.0.2</AssemblyVersion>
        <FileVersion>0.0.2</FileVersion>
        <AssemblyVersion>0.0.3</AssemblyVersion>
        <FileVersion>0.0.3</FileVersion>
        <RepositoryUrl>https://github.com/Rutherther/NosSmooth/</RepositoryUrl>
        <PackageLicenseExpression>MIT</PackageLicenseExpression>
    </PropertyGroup>

M Extensions/NosSmooth.Extensions.Combat/Operations/WalkInRangeOperation.cs => Extensions/NosSmooth.Extensions.Combat/Operations/WalkInRangeOperation.cs +1 -1
@@ 68,7 68,7 @@ public record WalkInRangeOperation
            }

            var closePosition = GetClosePosition(currentPosition.Value, position.Value, distance);
            if (closePosition == position)
            if (closePosition == currentPosition)
            {
                return Result.FromSuccess();
            }