fix melee attacks

This commit is contained in:
2025-01-17 23:40:33 +09:00
parent 9345c7af04
commit 8e95bc141c
4 changed files with 25 additions and 14 deletions
+8 -6
View File
@@ -94,13 +94,13 @@ function laneScenario() {
midWallStart.clone().add(midWallThickness),
]
const midNorthWallOffset = new Vector2(-400, 400)
const midNorthWallOffset = new Vector2(-450, 450)
const midNorthWallPoints = midWallPoints.map((p) => p.clone().add(midNorthWallOffset))
const midNorthWall = new Terrain(midNorthWallPoints)
midNorthWall.id = 'midNorthWall'
game.addTerrain(midNorthWall)
const midSouthWallOffset = new Vector2(0, 0)
const midSouthWallOffset = new Vector2(50, -50)
const midSouthWallPoints = midWallPoints.map((p) => p.clone().add(midSouthWallOffset))
const midSouthWall = new Terrain(midSouthWallPoints)
midSouthWall.id = 'midSouthWall'
@@ -116,12 +116,14 @@ function laneScenario() {
game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: false, route: redRoute })))
}
if ([(3 * game.tickRate), (4 * game.tickRate), (5 * game.tickRate)].includes(game.currentTick % (30 * game.tickRate))) {
game.spawnEntity(new Entity(Template.minion(Team.blue, { ranged: true, route: blueRoute })))
game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: true, route: redRoute })))
}
// if ([(3 * game.tickRate), (4 * game.tickRate), (5 * game.tickRate)].includes(game.currentTick % (30 * game.tickRate))) {
// game.spawnEntity(new Entity(Template.minion(Team.blue, { ranged: true, route: blueRoute })))
// game.spawnEntity(new Entity(Template.minion(Team.red, { ranged: true, route: redRoute })))
// }
}
game.logic = gameLogic
player1.abilities[0] = 'melee_attack'
}
app.listen(port, () => {