Skip to content

Improve attack resolution and info #271

@myangelkamikaze

Description

@myangelkamikaze

image
image
image

Current attack resolution is limited to 1 attack, this improvement aims to show them all. Additionally, their probability and accuracy are also added.

The implementation on the English side is here: https://github.com/gre4bee/ElectronicObserver/tree/netcoreapp3.1/ElectronicObserver/Utility/Data

Text display starts here: https://github.com/gre4bee/ElectronicObserver/blob/netcoreapp3.1/ElectronicObserver/Window/FormFleet.cs#L662

The implementation needs the following things:

  1. enable C# 8, half of the code is switch expressions, rewriting them is too much work
  2. System.ValueTuple NuGet package or raising dotnet framework version to 4.7.0, tuples are used in a few places, however they can be replaced if neither of these options are available
  3. I'm using separate project for an enum of ship and equipment IDs, I'd like to add this to have statically typed IDs but this can be replaced by ints
  4. the implementation uses interfaces so it can be tested with moq, since I have no intention of bringing unit tests along, this can be changed to concrete types
  5. enable NRT, I have them enabled but I can simply remove the extra ? if this is not desired

Points 1, 2 and 3 are highly desired, 4 and 5 aren't really important, I'll make the PR when there's a decision on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions