Closed realacesu closed 10 months ago
Commit or otherwise version of the bot
Development Branch fb95b3319195d2c47a124194aae420cf911f7c5e
Describe the bug
IsAlly seems to be incorrectly implemented and/or called incorrectly resulting in towers and creeps attacking allies.
export function isAlly(playerName: string) { const playerMemory = Memory.players[playerName] if (!playerMemory) return false if (playerMemory[PlayerMemoryKeys.relationship] !== 'ally') return false return true }
PlayerMemory relationship key is not set with the current implementation.
Expected behaviour
IsAlly returns if the owner of an object is an ally PlayerMemory relationship key is also not set with the current implementation.
Potential fix
review isAlly function calls and setting the playerMemoryKey 'relationship' on initialize.
Applicable media
If using default settings and are on shard2, check Memory -> players -> MarvinTMB for index 5 AKA relationship.
https://i.imgur.com/vawoGSt.png
fix by #756
Commit or otherwise version of the bot
Development Branch fb95b3319195d2c47a124194aae420cf911f7c5e
Describe the bug
IsAlly seems to be incorrectly implemented and/or called incorrectly resulting in towers and creeps attacking allies.
PlayerMemory relationship key is not set with the current implementation.
Expected behaviour
IsAlly returns if the owner of an object is an ally PlayerMemory relationship key is also not set with the current implementation.
Potential fix
review isAlly function calls and setting the playerMemoryKey 'relationship' on initialize.
Applicable media
If using default settings and are on shard2, check Memory -> players -> MarvinTMB for index 5 AKA relationship.
https://i.imgur.com/vawoGSt.png