adaneslavo / More-Unique-Components-for-VP

Adds 3rd and 4th unique component to each civilization.
1 stars 6 forks source link

Oppidium #56

Closed Infixo closed 6 years ago

Infixo commented 6 years ago
  1. What are OppidumGarrisonBefore and OppidumGarrisonAfter supposed to do? Because now they don't do anything, probably just generating errors (nil arguments in 2nd one).
  2. OppidumAddsHP. The loop in lines 14-35 - what is it supposed to do? Same about 37-62. Are you looking for the closest city? If so, just use Map.PlotDistance(iX1, iY1, iX2, iY2). Pseudo-code.
    impX,impY = improvement coords
    iMin = 999999 closestCity = nil
    for city in player-cities do
    dist = Map.PlotDistance(impX, impY, cityX, cityY)
    if dist < iMin then iMin = dist, closestCity = city end
    end

    After that you can also add some checking if it is 2 or 3 tiles away, etc.

adaneslavo commented 6 years ago

Before and after should make attacking unit stay on tile it started attack from.

adaneslavo commented 6 years ago

Im looking for all not the closest city in range 1 then in range 2.

Infixo commented 6 years ago
  1. You need to add declaration for coordinates outside of functions.
  2. AI will never place it in between cities to get extra bonus, so it is for humans to exploit. Make the bonus to „nearby city” and simplify the code.
adaneslavo commented 6 years ago

Oki doki.