feat(gvg): 投石车攻击对手范围调整

This commit is contained in:
luying
2023-02-28 10:51:18 +08:00
parent 78777a1437
commit 9d369ee0a9
6 changed files with 77 additions and 60 deletions

View File

@@ -33,18 +33,14 @@ class GVGBattleData {
return teams.slice(0, 20);
}
public findCatapultAttackTeam(areaIds: number[], leagueCode: string) {
let teamsByArea = new Map<number, string[]>();
for(let areaId of areaIds) {
let teams: string[] = [];
let teamCodes = this.areaToTeams.get(areaId)||new Set();
for(let teamCode of teamCodes) {
let team = this.teams.get(teamCode);
if(team && team.leagueCode != leagueCode && !team.isRobot) teams.push(teamCode);
}
teamsByArea.set(areaId, teams);
public findCatapultAttackTeam(areaId: number, leagueCode: string) {
let teams: string[] = [];
let teamCodes = this.areaToTeams.get(areaId)||new Set();
for(let teamCode of teamCodes) {
let team = this.teams.get(teamCode);
if(team && team.leagueCode != leagueCode && !team.isRobot) teams.push(teamCode);
}
return teamsByArea;
return teams;
}
public leaveCity(roleId: string) {