new DiplomacyManager()
- Source:
Classes
Members
Config
- Source:
[undefined]
- Source:
betrayLapseTime
- Source:
betrayLapseTime
- Source:
betrayLapseTime
- Source:
betrayLapseTime
- Source:
betrayWeighting
- Source:
nextTributeRequest
- Source:
nextTributeUpdate
- Source:
nextTributeUpdate
- Source:
nextTributeUpdate
- Source:
receivedDiplomacyRequests
- Source:
sentDiplomacyRequestLapseTime
- Source:
sentDiplomacyRequestLapseTime
- Source:
sentDiplomacyRequests
- Source:
waitingToBetray
- Source:
waitingToBetray
- Source:
waitingToBetray
- Source:
waitingToBetray
- Source:
Methods
Deserialize()
- Source:
Serialize()
- Source:
changePlayerDiplomacy()
- Source:
checkEvents()
- Source:
checkRequestedTributes()
- Source:
checkSentDiplomacyRequests()
- Source:
handleDiplomacyRequest()
Do not become allies with a player if the game would be over.
Overall, be reluctant to become allies with any one player, but be more likely to accept neutral requests.
- Source:
init()
If there are any players that are allied/neutral with us but we are not allied/neutral with them,
treat this situation like an ally/neutral request.
- Source:
lastManStandingCheck()
If the "Last Man Standing" option is enabled, check if the only remaining players are allies or neutral.
If so, turn against the strongest first, but be more likely to first turn against neutral players, if there are any.
- Source:
sendDiplomacyRequest()
Try to become allies with a player who has a lot of mutual enemies in common with us.
TODO: Possibly let human players demand tributes from AIs who send diplomacy requests.
- Source:
tributes()
Check if any allied needs help (tribute) and sent it if we have enough resource
or ask for a tribute if we are in need and one ally can help
- Source:
update()
- Source: