Comparing version 0.1.1 to 0.1.2
@@ -172,5 +172,5 @@ 'use strict'; | ||
} else if (group.undead > 0 && group.key != 'spy') { | ||
var _attack = group.getAttack() / 3; | ||
var _attack = group.getAttack() / 5; | ||
if (_attack > 0) { | ||
actions.push([_attack, group.skill, group.key, group.i, parseInt(group.undead / 3)]); | ||
actions.push([_attack, group.skill, group.key, group.i, parseInt(group.undead / 5)]); | ||
} | ||
@@ -177,0 +177,0 @@ } |
@@ -59,6 +59,4 @@ 'use strict'; | ||
var attackersActions = attackers.chooseActions(round); | ||
attackers.processAllActions(attackersActions, defenders.defensiveAttackPower(), defendersActions, round); | ||
defenders.processAllActions(defendersActions, attackers.attackPower(), attackersActions, round); | ||
defendersActions = defenders.chooseActions(round); | ||
attackersActions = attackers.chooseActions(round); | ||
attackers.processAllActions(attackersActions, defenders.defensiveAttackPower(), defendersActions, round); | ||
} | ||
@@ -65,0 +63,0 @@ |
{ | ||
"name": "drugwars", | ||
"version": "0.1.01", | ||
"version": "0.1.02", | ||
"description": "A lightweight JavaScript library for DrugWars", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -155,5 +155,5 @@ import { orderBy } from 'lodash'; | ||
else if(group.undead > 0 && group.key != 'spy'){ | ||
const attack = group.getAttack()/3; | ||
const attack = group.getAttack()/5; | ||
if (attack > 0) { | ||
actions.push([attack, group.skill, group.key, group.i,parseInt(group.undead/3)]); | ||
actions.push([attack, group.skill, group.key, group.i,parseInt(group.undead/5)]); | ||
} | ||
@@ -160,0 +160,0 @@ } |
@@ -31,6 +31,5 @@ import Army from './army'; | ||
let attackersActions = attackers.chooseActions(round); | ||
attackers.processAllActions(attackersActions,defenders.defensiveAttackPower(),defendersActions,round); | ||
defenders.processAllActions(defendersActions,attackers.attackPower(),attackersActions,round); | ||
defendersActions = defenders.chooseActions(round); | ||
attackersActions = attackers.chooseActions(round); | ||
attackers.processAllActions(attackersActions,defenders.defensiveAttackPower(),defendersActions,round); | ||
} | ||
@@ -37,0 +36,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
2526229
10844