Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/KC3Kai/kancolle-replay in…
Browse files Browse the repository at this point in the history
…to gh-pages
  • Loading branch information
fourinone41 committed Nov 17, 2024
2 parents fe09e30 + 0ff59a4 commit 1bdb85a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/kcEQDATA.js
Original file line number Diff line number Diff line change
Expand Up @@ -8164,6 +8164,7 @@ var LBASDATA = {
544: { distance: 4, cost: 5 },
545: { distance: 6, cost: 8 },
546: { distance: 2, cost: 9 },
549: { distance: 3, cost: 5 },
};


Expand Down
9 changes: 7 additions & 2 deletions js/kcsim.js
Original file line number Diff line number Diff line change
Expand Up @@ -2268,6 +2268,11 @@ function AADefenceFighters(carriers,showplanes,APIkouku,eqtFilter) {
}
var randplus = Math.floor((Math.floor(1000*rplus)+1)*Math.random())/1000;
let modJet = ship.equips[j].isjet ? .6 : 1;
if (eqtFilter == 'isfighter' && [AUTOGYRO,ASWPLANE].includes(ship.equips[j].type) && !ship.equips[j].is20th) { //estimate
if (ship.airState() == -2) modJet = .9;
else if (ship.airState() == -1) modJet = .5;
else modJet = .3;
}
lostcount = Math.floor(ship.planecount[j]*(rmin+randplus)*modJet);
} else {
var rmax;
Expand Down Expand Up @@ -2962,9 +2967,9 @@ function LBASPhase(lbas,alive2,subsalive2,isjetphase,APIkouku) {
var eq = lbas.equips[i];
if (!eq.isPlane) continue;
let isASWPlane = MECHANICS.LBASBuff && eq.ASW >= 7;
let isSurfacePlane = (eq.isdivebomber || eq.istorpbomber) && (eq.is20th || (eq.type != ASWPLANE && eq.type != AUTOGYRO));
let isSurfacePlane = (eq.isdivebomber || eq.istorpbomber) && (eq.DIVEBOMB || (eq.type != ASWPLANE && eq.type != AUTOGYRO));
if (!isSurfacePlane && !isASWPlane) continue;
if (defenders.length && isSurfacePlane) {
if (defenders.length && (eq.isdivebomber || eq.istorpbomber)) {
var defender = defenders[Math.floor(Math.random()*defenders.length)];
var supportMod = 1;
var shotProp = (Math.random() < .5)? Math.floor(getAAShotProp(defender,lbas.planecount[i],eq.aaResistShip)*supportMod) : 0;
Expand Down

0 comments on commit 1bdb85a

Please sign in to comment.