DeletedUser
Guest
The constant is 900 seconds.... that is my hint
from the difference between the different ship types I get a constant of 0:05:00.
But I can't get the distance right.
900 seconds, world speed 1 >> 300 seconds, world speed 3 (Chi). That's the 5 minutes I mentioned.
Am I right about the circles around the islands? Is the centre the average of the cities? And the radius that of the furthest city?
...You will then need to adjust it to go between different islands as well, but first start on your own island.
Shared Function Calculate(TargetTown As Data.Entity.TableItem.Town, HomeTown As Data.Entity.TableItem.Town, Speed As Integer, Lighthouse As Boolean, Cartography As Boolean, WorldSpeed As Double, UnitSpeed As Double) As TimeSpan
Speed = Speed * UnitSpeed
Dim CalcX As Integer = 0
Dim CalcY As Integer = 0
Dim Distance As Decimal = 0
Dim ReturnSeconds As Integer = 0
Dim Bonus As Decimal = 1
If Lighthouse = True Then
Bonus += 0.15
End If
If Cartography = True Then
Bonus += 0.1
End If
CalcX = (TargetTown.TownOffsetX) - (HomeTown.TownOffsetX)
CalcY = (TargetTown.TownOffsetY) - (HomeTown.TownOffsetY)
Distance = Math.Pow(CalcX, 2) + Math.Pow(CalcY, 2)
Distance = Math.Sqrt(Distance)
Distance = Distance * 10
Distance = Math.Round(Distance)
Distance = Distance / 10
Distance = Math.Floor(Distance)
ReturnSeconds = Math.Floor((Distance * 50) / (Speed * Bonus))
ReturnSeconds += (900 / WorldSpeed)
Dim ReturnTimeSpan As New TimeSpan(0, 0, ReturnSeconds)
Return ReturnTimeSpan
End Function
ok. maybe it works different in Excel.
I cannot figure out the inter island factor.