QA and tune final Meng Huo captures
This commit is contained in:
@@ -43,6 +43,10 @@ const nanzhongStabilizationSortie = ['zhuge-liang', 'zhao-yun', 'wang-ping', 'ma
|
||||
const mengHuoMainSortie = ['zhuge-liang', 'ma-liang', 'wang-ping', 'huang-quan', 'zhao-yun', 'ma-chao', 'huang-zhong'];
|
||||
const mengHuoSecondSortie = ['zhuge-liang', 'huang-quan', 'wang-ping', 'ma-liang', 'zhao-yun', 'huang-zhong', 'ma-chao'];
|
||||
const mengHuoThirdSortie = ['zhuge-liang', 'ma-liang', 'huang-quan', 'wang-ping', 'zhao-yun', 'ma-chao', 'huang-zhong'];
|
||||
const mengHuoFourthSortie = ['zhuge-liang', 'ma-liang', 'huang-quan', 'wang-ping', 'zhao-yun', 'ma-chao', 'ma-dai'];
|
||||
const mengHuoFifthSortie = ['zhuge-liang', 'huang-quan', 'ma-liang', 'wang-ping', 'zhao-yun', 'huang-zhong', 'ma-dai'];
|
||||
const mengHuoSixthSortie = ['zhuge-liang', 'ma-liang', 'huang-quan', 'wang-ping', 'zhao-yun', 'wei-yan', 'ma-dai'];
|
||||
const mengHuoFinalSortie = ['zhuge-liang', 'huang-quan', 'ma-liang', 'wang-ping', 'zhao-yun', 'ma-dai', 'huang-zhong'];
|
||||
|
||||
const earlyCampaignBattles = [
|
||||
{ no: 1, id: 'first-battle-zhuo-commandery', selected: [], targets: ['rebel-leader'], protected: ['liu-bei'] },
|
||||
@@ -403,6 +407,37 @@ const yilingCampaignBattles = [
|
||||
}
|
||||
];
|
||||
|
||||
const nanzhongFinalCampaignBattles = [
|
||||
{
|
||||
no: 51,
|
||||
id: 'fifty-first-battle-meng-huo-fourth-capture',
|
||||
selected: mengHuoFourthSortie,
|
||||
targets: ['menghuo-fourth-leader'],
|
||||
protected: ['zhuge-liang']
|
||||
},
|
||||
{
|
||||
no: 52,
|
||||
id: 'fifty-second-battle-meng-huo-fifth-capture',
|
||||
selected: mengHuoFifthSortie,
|
||||
targets: ['menghuo-fifth-leader'],
|
||||
protected: ['zhuge-liang']
|
||||
},
|
||||
{
|
||||
no: 53,
|
||||
id: 'fifty-third-battle-meng-huo-sixth-capture',
|
||||
selected: mengHuoSixthSortie,
|
||||
targets: ['menghuo-sixth-leader'],
|
||||
protected: ['zhuge-liang']
|
||||
},
|
||||
{
|
||||
no: 54,
|
||||
id: 'fifty-fourth-battle-meng-huo-final-capture',
|
||||
selected: mengHuoFinalSortie,
|
||||
targets: ['menghuo-final-leader'],
|
||||
protected: ['zhuge-liang']
|
||||
}
|
||||
];
|
||||
|
||||
const allRepresentativeBattles = [
|
||||
{ no: 1, id: 'first-battle-zhuo-commandery', selected: [], targets: ['rebel-leader'], protected: ['liu-bei'] },
|
||||
{
|
||||
@@ -469,7 +504,8 @@ const qaBattleSets = {
|
||||
refuge: refugeCampaignBattles,
|
||||
southern: southernCampaignBattles,
|
||||
hanzhong: hanzhongCampaignBattles,
|
||||
yiling: yilingCampaignBattles
|
||||
yiling: yilingCampaignBattles,
|
||||
nanzhongFinal: nanzhongFinalCampaignBattles
|
||||
};
|
||||
const qaSetName = process.env.QA_SET ?? 'representative';
|
||||
const qaBattleSet = qaBattleSets[qaSetName];
|
||||
@@ -841,7 +877,8 @@ async function playBattleWithoutDebugVictory(page, battle) {
|
||||
const focus = attack?.target ?? focusTarget(unit);
|
||||
const isProtected = protectedIds.has(unit.id);
|
||||
const shouldPress = isProtected && shouldPressProtected(unit);
|
||||
const threat = incomingThreat(unit, tile);
|
||||
const needsThreatCheck = isProtected || unit.hp <= Math.ceil(unit.maxHp * 0.55);
|
||||
const threat = needsThreatCheck ? incomingThreat(unit, tile) : 0;
|
||||
const canUseAttack = attack && (!isProtected || canTakeAttack(unit, attack, threat));
|
||||
const approach = focus ? -distance(unit, focus) * (isProtected ? (shouldPress ? 42 : 5) : 36) : 0;
|
||||
const attackScore = canUseAttack ? attack.score + (targetIds.has(attack.target.id) ? 2400 : 1350) : approach;
|
||||
|
||||
Reference in New Issue
Block a user