Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/productivity/simultaneous-attack/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// attack thing with many thing at the same time

var pg = df.getProcgenUtils();
import * as pg from "https://cdn.skypack.dev/@darkforest_eth/procedural";

// removes all the child nodes of an element
var removeAllChildNodes = (parent) => {
Expand Down Expand Up @@ -64,7 +64,7 @@ var simultaneousAttack = (target, sources) => {
// maybe somehow show the plugin user this error?
if (Math.floor(energyArriving) <= 0)
return;
df.move(attacker.locationId, target.locationId, Math.floor(attacker.energy * 0.5), 0);
df.move(attacker.locationId, target.locationId, Math.floor(attacker.energy * 0.5), 0, null, false);
// waits for the duration of the longest move - the duration of the move itself to be sent. * 1k is to convert seconds to ms
}, (longestMove - planetMove.time) * 1e3));
}
Expand Down