Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BaseUnit.kt #12990

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions core/src/com/unciv/models/ruleset/unit/BaseUnit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -508,16 +508,14 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction {
rangedPower /= 2
}
if (rangedPower > 0)
power = rangedPower
power = (rangedPower * range.toFloat().pow(0.3f)) // Apply a multiplier based on the range of the ranged unit

// Replicates the formula from civ V, which is a lower multiplier than probably intended, because math
// They did fix it in BNW so it was completely bugged and always 1, again math
power = (power * movement.toFloat().pow(0.3f))

if (hasUnique(UniqueType.SelfDestructs))
power /= 2
if (isNuclearWeapon())
power += 4000

// Uniques
val allUniques = rulesetUniqueObjects.asSequence() +
Expand Down Expand Up @@ -557,6 +555,9 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction {
else -> {}
}
}

if (isNuclearWeapon())
power += 4000 // Not subject to multiplications, to prevent extremely high nuke Force in mods

cachedForceEvaluation = power.toInt()
}
Expand Down
Loading