Skip to content

Commit

Permalink
small cargo switches to impulse drive at level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Sep 3, 2018
1 parent f319155 commit 4777c46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func (b BaseShip) GetBaseSpeed() int {
// GetSpeed ...
func (b BaseShip) GetSpeed(techs Researches) int {
techDriveLvl := 0
if b.ID == SmallCargoID && techs.ImpulseDrive >= 5 {
return int(float64(b.BaseSpeed) + (float64(b.BaseSpeed)*0.2)*float64(techs.ImpulseDrive))
}
if minLvl, ok := b.Requirements[CombustionDrive.ID]; ok {
techDriveLvl = techs.CombustionDrive
if techDriveLvl < minLvl {
Expand Down

0 comments on commit 4777c46

Please sign in to comment.