Details
- Reviewers
Silier wraitii - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP23759: [PetraAI] Do not try to attack entities which can't be attacked.
Test by spectating PetraAI vs PetraAI matches or by playing against PetraAI.
- No warnings should appear.
- The AI should react as before to units entering the base's vicinity.
- When cheating and using an invulnerable, uncapturable entity, the AI should not try to attack it.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 9415 Build 15667: Vulcan Build Jenkins Build 15666: Vulcan Build (Windows) Build 15665: arc lint + arc unit
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | 169| 169| plan.removeUnit(gameState, ent); | 170| 170| } | 171| 171| | 172| |-/* | | 172|+ /* | 173| 173| // TODO be sure that all units in the transport need the cancelation | 174| 174| if (!ent.position()) // this unit must still be in a transport plan ... try to cancel it | 175| 175| { binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | 654| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 456| 456| }); | 457| 457| if (!canAttack) | 458| 458| return; | 459| |- }; | | 459|+ } | 460| 460| potentialDefenders.push(ent.id()); | 461| 461| }); | 462| 462| binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 969| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 459| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 772| 772| return true; | 773| 773| if (!MatchesClassList(target.classes(), restrictedClasses)) | 774| 774| return true; | 775| |- }; | | 775|+ } | 776| 776| | 777| 777| return false; | 778| 778| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 834| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 851| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 981| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 775| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 139| 139| { | 140| 140| priority = 90; | 141| 141| // basically we want a mix of citizen soldiers so our barracks have a purpose, and champion units. | 142| |- this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | | 142|+ this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | 143| 143| "interests": [["strength", 3]] }; | 144| 144| this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | 145| 145| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 141| 141| // basically we want a mix of citizen soldiers so our barracks have a purpose, and champion units. | 142| 142| this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | 143| 143| "interests": [["strength", 3]] }; | 144| |- this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | | 144|+ this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | 145| 145| "interests": [["strength", 3]] }; | 146| 146| this.unitStat.ChampRangedInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Ranged", "Champion"], | 147| 147| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 145| 145| "interests": [["strength", 3]] }; | 146| 146| this.unitStat.ChampRangedInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Ranged", "Champion"], | 147| 147| "interests": [["strength", 3]] }; | 148| |- this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | | 148|+ this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | 149| 149| "interests": [["strength", 3]] }; | 150| 150| this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 147| 147| "interests": [["strength", 3]] }; | 148| 148| this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | 149| 149| "interests": [["strength", 3]] }; | 150| |- this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | | 150|+ this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | 152| 152| this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 149| 149| "interests": [["strength", 3]] }; | 150| 150| this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | 152| |- this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | | 152|+ this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | 154| 154| this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 151| 151| "interests": [["strength", 2]] }; | 152| 152| this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | 154| |- this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | | 154|+ this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 153| 153| "interests": [["strength", 2]] }; | 154| 154| this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | 156| |- this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | | 156|+ this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| 158| this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| |- this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | | 158|+ this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | 160| 160| this.neededShips = 5; | 161| 161| } | | [NORMAL] ESLintBear (key-spacing): | | Extra space before value for key 'targetSize'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| |- this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | | 158|+ this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | 160| 160| this.neededShips = 5; | 161| 161| } | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 164| 164| priority = 70; | 165| 165| this.unitStat.RangedInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Ranged"], | 166| 166| "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; | 167| |- this.unitStat.MeleeInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Melee"], | | 167|+ this.unitStat.MeleeInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Melee"], | 168| 168| "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; | 169| 169| this.unitStat.Cavalry = { "priority": 1, "minSize": 2, "targetSize": 6, "batchSize": 2, "classes": ["Cavalry", "CitizenSoldier"], | 170| 170| "interests": [["strength", 1]] }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1143|1143| |1144|1144| if (blocker && blocker.hasClass("StoneWall")) |1145|1145| { |1146| |-/* if (this.hasSiegeUnits()) | |1146|+ /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149|1149| return blocker; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1145|1145| { |1146|1146| /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148| |- this.isBlocked = true; | |1148|+ this.isBlocked = true; |1149|1149| return blocker; |1150|1150| /* } |1151|1151| return undefined; */ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1146|1146| /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149| |- return blocker; | |1149|+ return blocker; |1150|1150| /* } |1151|1151| return undefined; */ |1152|1152| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149|1149| return blocker; |1150| |-/* } | |1150|+ /* } |1151|1151| return undefined; */ |1152|1152| } |1153|1153| else if (blocker) | | [NORMAL] ESLintBear (operator-assignment): | | Assignment can be replaced with operator assignment. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1548|1548| range = 30 + ent.attackRange("Ranged").max; |1549|1549| else if (ent.hasClass("Cavalry")) |1550|1550| range += 30; |1551| |- range = range * range; | |1551|+ range *= range; |1552|1552| let entAccess = m.getLandAccess(gameState, ent); |1553|1553| // Checking for gates if we're a siege unit. |1554|1554| if (siegeUnit) binaries/data/mods/public/simulation/ai/petra/attackPlan.js |2180| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/filters.js | 234| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/petra/attackManager.js | 808| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/200/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 234| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | 169| 169| plan.removeUnit(gameState, ent); | 170| 170| } | 171| 171| | 172| |-/* | | 172|+ /* | 173| 173| // TODO be sure that all units in the transport need the cancelation | 174| 174| if (!ent.position()) // this unit must still be in a transport plan ... try to cancel it | 175| 175| { binaries/data/mods/public/simulation/ai/petra/defenseArmy.js | 654| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 456| 456| }); | 457| 457| if (!canAttack) | 458| 458| return; | 459| |- }; | | 459|+ } | 460| 460| potentialDefenders.push(ent.id()); | 461| 461| }); | 462| 462| binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 969| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 459| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 139| 139| { | 140| 140| priority = 90; | 141| 141| // basically we want a mix of citizen soldiers so our barracks have a purpose, and champion units. | 142| |- this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | | 142|+ this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | 143| 143| "interests": [["strength", 3]] }; | 144| 144| this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | 145| 145| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 141| 141| // basically we want a mix of citizen soldiers so our barracks have a purpose, and champion units. | 142| 142| this.unitStat.RangedInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Ranged", "CitizenSoldier"], | 143| 143| "interests": [["strength", 3]] }; | 144| |- this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | | 144|+ this.unitStat.MeleeInfantry = { "priority": 0.7, "minSize": 5, "targetSize": 20, "batchSize": 5, "classes": ["Infantry", "Melee", "CitizenSoldier"], | 145| 145| "interests": [["strength", 3]] }; | 146| 146| this.unitStat.ChampRangedInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Ranged", "Champion"], | 147| 147| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 145| 145| "interests": [["strength", 3]] }; | 146| 146| this.unitStat.ChampRangedInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Ranged", "Champion"], | 147| 147| "interests": [["strength", 3]] }; | 148| |- this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | | 148|+ this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | 149| 149| "interests": [["strength", 3]] }; | 150| 150| this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 147| 147| "interests": [["strength", 3]] }; | 148| 148| this.unitStat.ChampMeleeInfantry = { "priority": 1, "minSize": 3, "targetSize": 18, "batchSize": 3, "classes": ["Infantry", "Melee", "Champion"], | 149| 149| "interests": [["strength", 3]] }; | 150| |- this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | | 150|+ this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | 152| 152| this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 149| 149| "interests": [["strength", 3]] }; | 150| 150| this.unitStat.RangedCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Ranged", "CitizenSoldier"], | 151| 151| "interests": [["strength", 2]] }; | 152| |- this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | | 152|+ this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | 154| 154| this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 151| 151| "interests": [["strength", 2]] }; | 152| 152| this.unitStat.MeleeCavalry = { "priority": 0.7, "minSize": 4, "targetSize": 20, "batchSize": 4, "classes": ["Cavalry", "Melee", "CitizenSoldier"], | 153| 153| "interests": [["strength", 2]] }; | 154| |- this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | | 154|+ this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 153| 153| "interests": [["strength", 2]] }; | 154| 154| this.unitStat.ChampRangedCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Ranged", "Champion"], | 155| 155| "interests": [["strength", 3]] }; | 156| |- this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | | 156|+ this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| 158| this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| |- this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | | 158|+ this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | 160| 160| this.neededShips = 5; | 161| 161| } | | [NORMAL] ESLintBear (key-spacing): | | Extra space before value for key 'targetSize'. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 155| 155| "interests": [["strength", 3]] }; | 156| 156| this.unitStat.ChampMeleeCavalry = { "priority": 1, "minSize": 3, "targetSize": 15, "batchSize": 3, "classes": ["Cavalry", "Melee", "Champion"], | 157| 157| "interests": [["strength", 2]] }; | 158| |- this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | | 158|+ this.unitStat.Hero = { "priority": 1, "minSize": 0, "targetSize": 1, "batchSize": 1, "classes": ["Hero"], | 159| 159| "interests": [["strength", 2]] }; | 160| 160| this.neededShips = 5; | 161| 161| } | | [NORMAL] ESLintBear (no-multi-spaces): | | Multiple spaces found before '='. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | 164| 164| priority = 70; | 165| 165| this.unitStat.RangedInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Ranged"], | 166| 166| "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; | 167| |- this.unitStat.MeleeInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Melee"], | | 167|+ this.unitStat.MeleeInfantry = { "priority": 1, "minSize": 6, "targetSize": 16, "batchSize": 3, "classes": ["Infantry", "Melee"], | 168| 168| "interests": [["canGather", 1], ["strength", 1.6], ["costsResource", 0.3, "stone"], ["costsResource", 0.3, "metal"]] }; | 169| 169| this.unitStat.Cavalry = { "priority": 1, "minSize": 2, "targetSize": 6, "batchSize": 2, "classes": ["Cavalry", "CitizenSoldier"], | 170| 170| "interests": [["strength", 1]] }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1143|1143| |1144|1144| if (blocker && blocker.hasClass("StoneWall")) |1145|1145| { |1146| |-/* if (this.hasSiegeUnits()) | |1146|+ /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149|1149| return blocker; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1145|1145| { |1146|1146| /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148| |- this.isBlocked = true; | |1148|+ this.isBlocked = true; |1149|1149| return blocker; |1150|1150| /* } |1151|1151| return undefined; */ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1146|1146| /* if (this.hasSiegeUnits()) |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149| |- return blocker; | |1149|+ return blocker; |1150|1150| /* } |1151|1151| return undefined; */ |1152|1152| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 0. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1147|1147| { */ |1148|1148| this.isBlocked = true; |1149|1149| return blocker; |1150| |-/* } | |1150|+ /* } |1151|1151| return undefined; */ |1152|1152| } |1153|1153| else if (blocker) | | [NORMAL] ESLintBear (operator-assignment): | | Assignment can be replaced with operator assignment. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/attackPlan.js |1548|1548| range = 30 + ent.attackRange("Ranged").max; |1549|1549| else if (ent.hasClass("Cavalry")) |1550|1550| range += 30; |1551| |- range = range * range; | |1551|+ range *= range; |1552|1552| let entAccess = m.getLandAccess(gameState, ent); |1553|1553| // Checking for gates if we're a siege unit. |1554|1554| if (siegeUnit) binaries/data/mods/public/simulation/ai/petra/attackPlan.js |2180| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. binaries/data/mods/public/simulation/ai/petra/attackManager.js | 808| }(PETRA); | | [MAJOR] ESLintBear (no-use-before-define): | | 'PETRA' was used before it was defined. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/316/display/redirect
binaries/data/mods/public/simulation/ai/petra/defenseManager.js | ||
---|---|---|
447 | this should be elsewhere here you find first army in which one cannot attack enemy and cut of potential defender | |
456 | maybe let canAttack = armiesNeeding[i].army.foeEntities.some(eEnt => { return ent.canAttackTarget(gameState.getEntityById(eEnt)); }); |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 234| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 465| 465| ent.canAttackTarget(gameState.getEntityById(eEnt))); | 466| 466| if (!canAttack) | 467| 467| return; | 468| |- }; | | 468|+ } | 469| 469| | 470| 470| let aMin; | 471| 471| let distMin; binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 462| » » » for·(let·i·=·0;·i·<·armiesNeeding.length;·++i) | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 468| » » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/713/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 234| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 472| 472| ent.canAttackTarget(gameState.getEntityById(eEnt))); | 473| 473| if (canAttack) | 474| 474| break; | 475| |- }; | | 475|+ } | 476| 476| if (!canAttack) | 477| 477| continue; | 478| 478| binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 469| » » » » for·(let·i·=·0;·i·<·armiesNeeding.length;·++i) | | [NORMAL] ESLintBear (no-shadow): | | 'i' is already declared in the upper scope. binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 475| » » » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/714/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 234| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/721/display/redirect
binaries/data/mods/public/simulation/ai/common-api/entity.js | ||
---|---|---|
748 | Maybe: /** * Derived from Attack.js' similary named function. * @returns {boolean} Whether an entity can attack a target. */ |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/502/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1017/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/939/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 586| 586| } | 587| 587| continue; | 588| 588| } | 589| |- | | 589|+ | 590| 590| // TODO integrate other ships later, need to be sure it is accessible. | 591| 591| if (target.hasClass("Ship")) | 592| 592| continue; Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1457/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/35/display/redirect
sorry, i should notice earlier
binaries/data/mods/public/simulation/ai/petra/attackPlan.js | ||
---|---|---|
1355 | this is broken if only available attack is capture and PETRA.allowCapture(gameState, ent, attacker) returns false and another cases too. | |
1706–1707 | wrong. attacker cannot be assigned when it can be refused by L1713 or L1711, even worse, this is invalidating previous valid targets in case this one returns invalid entity |
- Check whether we are allowed to capture.
- Other inline by @Angen.
binaries/data/mods/public/simulation/ai/petra/attackPlan.js | ||
---|---|---|
1328–1331 | I guess this can be removed now? |
binaries/data/mods/public/simulation/ai/petra/attackPlan.js | ||
---|---|---|
1328–1331 | actually can not :) |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 469| 469| if (!armiesNeeding[a].army.foeEntities.some(eEnt => { | 470| 470| let eEntID = gameState.getEntityById(eEnt); | 471| 471| return ent.canAttackTarget(eEntID, PETRA.allowCapture(gameState, ent, eEntID)); | 472| |- })) | | 472|+ })) | 473| 473| continue; | 474| 474| | 475| 475| let dist = API3.SquareVectorDistance(ent.position(), armiesNeeding[a].army.foePosition); | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 588| 588| } | 589| 589| continue; | 590| 590| } | 591| |- | | 591|+ | 592| 592| // TODO integrate other ships later, need to be sure it is accessible. | 593| 593| if (target.hasClass("Ship")) | 594| 594| continue; Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2179/display/redirect
binaries/data/mods/public/simulation/ai/petra/attackPlan.js | ||
---|---|---|
1644 | this would lead to the similar behaviour as in https://trac.wildfiregames.com/ticket/5741. |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 469| 469| if (!armiesNeeding[a].army.foeEntities.some(eEnt => { | 470| 470| let eEntID = gameState.getEntityById(eEnt); | 471| 471| return ent.canAttackTarget(eEntID, PETRA.allowCapture(gameState, ent, eEntID)); | 472| |- })) | | 472|+ })) | 473| 473| continue; | 474| 474| | 475| 475| let dist = API3.SquareVectorDistance(ent.position(), armiesNeeding[a].army.foePosition); | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 588| 588| } | 589| 589| continue; | 590| 590| } | 591| |- | | 591|+ | 592| 592| // TODO integrate other ships later, need to be sure it is accessible. | 593| 593| if (target.hasClass("Ship")) | 594| 594| continue; Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2376/display/redirect
binaries/data/mods/public/simulation/ai/petra/attackManager.js | ||
---|---|---|
183 | ERROR: JavaScript error: simulation/ai/petra/entityExtend.js line 138 TypeError: target.isCapturable is not a function PETRA.allowCapture@simulation/ai/petra/entityExtend.js:138:7 PETRA.AttackManager.prototype.assignBombers@simulation/ai/petra/attackManager.js:183:42 PETRA.AttackManager.prototype.update@simulation/ai/petra/attackManager.js:381:3 PETRA.HQ.prototype.update@simulation/ai/petra/headquarters.js:2772:3 PETRA.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:118:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2 |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 469| 469| if (!armiesNeeding[a].army.foeEntities.some(eEnt => { | 470| 470| let eEntID = gameState.getEntityById(eEnt); | 471| 471| return ent.canAttackTarget(eEntID, PETRA.allowCapture(gameState, ent, eEntID)); | 472| |- })) | | 472|+ })) | 473| 473| continue; | 474| 474| | 475| 475| let dist = API3.SquareVectorDistance(ent.position(), armiesNeeding[a].army.foePosition); | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 588| 588| } | 589| 589| continue; | 590| 590| } | 591| |- | | 591|+ | 592| 592| // TODO integrate other ships later, need to be sure it is accessible. | 593| 593| if (target.hasClass("Ship")) | 594| 594| continue; Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2375/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... binaries/data/mods/public/simulation/ai/common-api/filters.js | 162| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 469| 469| if (!armiesNeeding[a].army.foeEntities.some(eEnt => { | 470| 470| let eEntID = gameState.getEntityById(eEnt); | 471| 471| return ent.canAttackTarget(eEntID, PETRA.allowCapture(gameState, ent, eEntID)); | 472| |- })) | | 472|+ })) | 473| 473| continue; | 474| 474| | 475| 475| let dist = API3.SquareVectorDistance(ent.position(), armiesNeeding[a].army.foePosition); | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/petra/defenseManager.js | 588| 588| } | 589| 589| continue; | 590| 590| } | 591| |- | | 591|+ | 592| 592| // TODO integrate other ships later, need to be sure it is accessible. | 593| 593| if (target.hasClass("Ship")) | 594| 594| continue; | | [NORMAL] ESLintBear (no-extra-semi): | | Unnecessary semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/ai/common-api/entity.js | 767| 767| let restrictedClasses = this.get("Attack/" + type + "/RestrictedClasses/_string"); | 768| 768| if (!restrictedClasses || !MatchesClassList(target.classes(), restrictedClasses)) | 769| 769| return true; | 770| |- }; | | 770|+ } | 771| 771| | 772| 772| return false; | 773| 773| }, binaries/data/mods/public/simulation/ai/common-api/entity.js | 829| » » if·(this.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 846| » » if·(this.position()·!==·undefined·&&·unitToFleeFrom.position()·!==·undefined)·{ | | [NORMAL] ESLintBear (brace-rules/brace-on-same-line): | | Opening curly brace appears on the same line as controlling statement. binaries/data/mods/public/simulation/ai/common-api/entity.js | 976| }(API3); | | [MAJOR] ESLintBear (no-use-before-define): | | 'API3' was used before it was defined. binaries/data/mods/public/simulation/ai/common-api/entity.js | 770| » » }; | | [NORMAL] JSHintBear: | | Unnecessary semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2377/display/redirect