Added TOTO
This commit is contained in:
parent
6e617b970e
commit
f27f41dcea
2
Tank.ts
2
Tank.ts
@ -23,7 +23,7 @@ const setStats: SetStats = (tank) => ({
|
||||
|
||||
type Attack = (_: ITank[], tank: ITank, tIndex: number, tanks: ITank[]) => ITank[];
|
||||
const attack: Attack = (_acc, tank, _iTank, tanks) => {
|
||||
// Must refactor this imperative block
|
||||
// [TODO]: Refactor this imperative block
|
||||
if (tank.attackDelay === 0) {
|
||||
const target = tanks[Math.floor(Math.random() * tanks.length)];
|
||||
const attackDamage = critMultiplier(tank.health) * tank.health / 100;
|
||||
|
Loading…
Reference in New Issue
Block a user