✨ feat(gvg): 复活队伍
This commit is contained in:
@@ -118,11 +118,19 @@ export function calBattleScoreByCe(isSuccess: boolean, lineupCe: number) {
|
||||
return isSuccess? winScore: 0;
|
||||
}
|
||||
|
||||
export async function teamBreak(city: GVGCityType, team: GVGTeamType) {
|
||||
if(team.durability > 0) return team
|
||||
let areaId = getBirthAreaOfCity(city, team.leagueCode);
|
||||
team = await GVGTeamModel.teamBreak(team.teamCode, team.isRobot, team.maxDurability, areaId);
|
||||
return team;
|
||||
export async function getTechReviveMinus(configId: number, leagueCode: string) {
|
||||
let leaguePrepare = await GVGLeaguePrepareModel.findByLeague(configId, leagueCode);
|
||||
let minusCd = 0;
|
||||
let activeTech = leaguePrepare?.activeTech||[];
|
||||
for(let techId of activeTech) {
|
||||
let dicTech = gameData.gvgTech.get(techId);
|
||||
if(dicTech && dicTech.type == GVG_TECH_TYPE.BATTLE_REVIVE_GAP) {
|
||||
minusCd = dicTech.param[0];
|
||||
}
|
||||
}
|
||||
let cd = GVG.GVG_DEFAULT_REVIVE_CD - minusCd;
|
||||
if(cd < 0) cd = 0;
|
||||
return cd;
|
||||
}
|
||||
|
||||
export function getGVGWarId(defenseTeam: GVGTeamType) {
|
||||
|
||||
Reference in New Issue
Block a user