CompatibilitywithGF.cs 558 B

123456789101112131415
  1. namespace OpenVIII
  2. {
  3. public static partial class Saves
  4. {
  5. public struct CompatibilitywithGF
  6. {
  7. private ushort value;
  8. public ushort Value => value;
  9. public static implicit operator CompatibilitywithGF(ushort d) => new CompatibilitywithGF {value = d};
  10. public static implicit operator ushort(CompatibilitywithGF d) => d.Value;
  11. public ushort Display => checked((ushort)((6000 - value) / 5));
  12. public override string ToString() => Display.ToString();
  13. }
  14. }
  15. }