Added TOTO

This commit is contained in:
texhno 2023-12-05 20:22:51 +01:00
parent 6e617b970e
commit f27f41dcea

View File

@ -23,7 +23,7 @@ const setStats: SetStats = (tank) => ({
type Attack = (_: ITank[], tank: ITank, tIndex: number, tanks: ITank[]) => ITank[]; type Attack = (_: ITank[], tank: ITank, tIndex: number, tanks: ITank[]) => ITank[];
const attack: Attack = (_acc, tank, _iTank, tanks) => { const attack: Attack = (_acc, tank, _iTank, tanks) => {
// Must refactor this imperative block // [TODO]: Refactor this imperative block
if (tank.attackDelay === 0) { if (tank.attackDelay === 0) {
const target = tanks[Math.floor(Math.random() * tanks.length)]; const target = tanks[Math.floor(Math.random() * tanks.length)];
const attackDamage = critMultiplier(tank.health) * tank.health / 100; const attackDamage = critMultiplier(tank.health) * tank.health / 100;