mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-18 16:02:43 +00:00
rebalance MIRV
This commit is contained in:
@@ -126,7 +126,7 @@ export class DefaultConfig implements Config {
|
||||
};
|
||||
case UnitType.MIRV:
|
||||
return {
|
||||
cost: () => 5_000_000,
|
||||
cost: () => 10_000_000,
|
||||
territoryBound: false,
|
||||
};
|
||||
case UnitType.MIRVWarhead:
|
||||
|
||||
@@ -26,9 +26,8 @@ export class MirvExecution implements Execution {
|
||||
|
||||
private nuke: Unit;
|
||||
|
||||
private mirvRange = 500;
|
||||
private warheadCount = 1000;
|
||||
// private warheadRange = 5;
|
||||
private mirvRange = 1500;
|
||||
private warheadCount = 500;
|
||||
|
||||
private random: PseudoRandom;
|
||||
|
||||
@@ -92,7 +91,7 @@ export class MirvExecution implements Execution {
|
||||
|
||||
private separate() {
|
||||
const dsts: TileRef[] = [this.dst];
|
||||
let attempts = 1000;
|
||||
let attempts = 10000;
|
||||
while (attempts > 0 && dsts.length < this.warheadCount) {
|
||||
attempts--;
|
||||
const potential = this.randomLand(this.dst);
|
||||
@@ -106,6 +105,7 @@ export class MirvExecution implements Execution {
|
||||
(a, b) =>
|
||||
this.mg.manhattanDist(b, this.dst) - this.mg.manhattanDist(a, this.dst)
|
||||
);
|
||||
console.log(`got ${dsts.length} dsts!!`);
|
||||
|
||||
for (const [i, dst] of dsts.entries()) {
|
||||
this.mg.addExecution(
|
||||
|
||||
@@ -104,7 +104,7 @@ export class NukeExecution implements Execution {
|
||||
let magnitude;
|
||||
switch (this.type) {
|
||||
case UnitType.MIRVWarhead:
|
||||
magnitude = { inner: 10, outer: 14 };
|
||||
magnitude = { inner: 20, outer: 25 };
|
||||
break;
|
||||
case UnitType.AtomBomb:
|
||||
magnitude = { inner: 15, outer: 40 };
|
||||
|
||||
Reference in New Issue
Block a user