mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
Other civ you're at war with is always at least Enemy, if not Unforgivable
This commit is contained in:
parent
24a71b16f2
commit
cf9194f767
@ -97,6 +97,7 @@ class DiplomacyManager() {
|
|||||||
fun opinionOfOtherCiv() = diplomaticModifiers.values.sum()
|
fun opinionOfOtherCiv() = diplomaticModifiers.values.sum()
|
||||||
|
|
||||||
fun relationshipLevel(): RelationshipLevel {
|
fun relationshipLevel(): RelationshipLevel {
|
||||||
|
|
||||||
if(civInfo.isPlayerCivilization() && otherCiv().isPlayerCivilization())
|
if(civInfo.isPlayerCivilization() && otherCiv().isPlayerCivilization())
|
||||||
return RelationshipLevel.Neutral // People make their own choices.
|
return RelationshipLevel.Neutral // People make their own choices.
|
||||||
|
|
||||||
@ -107,12 +108,18 @@ class DiplomacyManager() {
|
|||||||
// maybe we need to average their views of each other? That makes sense to me.
|
// maybe we need to average their views of each other? That makes sense to me.
|
||||||
|
|
||||||
val opinion = opinionOfOtherCiv()
|
val opinion = opinionOfOtherCiv()
|
||||||
|
if(opinion<-80) return RelationshipLevel.Unforgivable
|
||||||
|
if(opinion<-40) return RelationshipLevel.Enemy
|
||||||
|
|
||||||
|
// This is here because when you're at war you can either be enemy OR unforgivable,
|
||||||
|
// depending on the opinion
|
||||||
|
if(civInfo.isAtWarWith(otherCiv()))
|
||||||
|
return RelationshipLevel.Enemy
|
||||||
|
|
||||||
|
if(opinion<-15) return RelationshipLevel.Competitor
|
||||||
if(opinion>80) return RelationshipLevel.Ally
|
if(opinion>80) return RelationshipLevel.Ally
|
||||||
if(opinion>40) return RelationshipLevel.Friend
|
if(opinion>40) return RelationshipLevel.Friend
|
||||||
if(opinion>15) return RelationshipLevel.Favorable
|
if(opinion>15) return RelationshipLevel.Favorable
|
||||||
if(opinion<-80) return RelationshipLevel.Unforgivable
|
|
||||||
if(opinion<-40) return RelationshipLevel.Enemy
|
|
||||||
if(opinion<-15) return RelationshipLevel.Competitor
|
|
||||||
return RelationshipLevel.Neutral
|
return RelationshipLevel.Neutral
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user