Comparing version 0.1.68 to 0.1.69
@@ -209,3 +209,3 @@ 'use strict'; | ||
} | ||
this.groups.forEach(function (group) { | ||
if (round !== 1) this.groups.forEach(function (group) { | ||
if (group.undead > 0 && group.key != 'spy' && round != 1 || group.spec.range > 4 || group.spec.skill.type === 'tastynasty' || group.key === 'hobo') { | ||
@@ -212,0 +212,0 @@ var _attack4 = group.getAttack(); |
@@ -53,3 +53,3 @@ 'use strict'; | ||
var round = 0; | ||
while (attackers.alive && defenders.alive && round < 6 || this.defendersBuildings.find(function (b) { | ||
while (attackers.alive && defenders.alive && round < 7 || this.defendersBuildings.find(function (b) { | ||
return b.key === 'hidden_mines' && b.lvl > 0; | ||
@@ -56,0 +56,0 @@ }) && round === 0) { |
{ | ||
"name": "drugwars", | ||
"version": "0.1.68", | ||
"version": "0.1.69", | ||
"description": "A lightweight JavaScript library for DrugWars", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -125,3 +125,4 @@ import { orderBy } from 'lodash'; | ||
} | ||
} else if (this.buildings) { | ||
} | ||
else if (this.buildings) { | ||
if (round === 2 || round === 4 || round === 6) { | ||
@@ -159,2 +160,3 @@ let defense_system = this.buildings.find(b => b.key === 'defense_system' && b.lvl > 0) | ||
} | ||
if(round !== 1) | ||
this.groups.forEach(group => { | ||
@@ -161,0 +163,0 @@ if (group.undead > 0 && group.key != 'spy' && round != 1 || group.spec.range > 4 || group.spec.skill.type === 'tastynasty' || group.key === 'hobo') { |
@@ -32,3 +32,3 @@ import Army from './army'; | ||
let round = 0; | ||
while (attackers.alive && defenders.alive && round < 6 || (this.defendersBuildings.find(b => b.key === 'hidden_mines' && b.lvl > 0) && round === 0)) { | ||
while (attackers.alive && defenders.alive && round < 7 || (this.defendersBuildings.find(b => b.key === 'hidden_mines' && b.lvl > 0) && round === 0)) { | ||
round += 1; | ||
@@ -35,0 +35,0 @@ this.log.add(`<div class="round">Round ${round} Attacker AP : ${attackers.attackPower(this.attackersTrainings)}% - Defender AP : ${defenders.defensiveAttackPower(this.defendersTrainings)}%</div>`); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
17075
3010363