Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drugwars

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drugwars - npm Package Compare versions

Comparing version 0.1.53 to 0.1.55

15

lib/army.js

@@ -179,3 +179,3 @@ 'use strict';

if (defense_system) {
var _attack = _buildings2.default[defense_system.key].attack * Math.ceil(defense_system.lvl * 12);
var _attack = _buildings2.default[defense_system.key].attack * (defense_system.lvl * 12);
if (_attack > 120) _attack = 120;

@@ -191,3 +191,3 @@ for (var _i = 0; _i < parseInt(Math.ceil(defense_system.lvl / 5)); _i++) {

if (troops) {
var _attack2 = _buildings2.default[troops.key].attack * Math.ceil(troops.lvl * 10);
var _attack2 = _buildings2.default[troops.key].attack * (troops.lvl * 10);
if (_attack2 > 100) _attack2 = 100;

@@ -203,4 +203,7 @@ for (var _i2 = 0; _i2 < parseInt(Math.ceil(troops.lvl / 5)); _i2++) {

if (dogs) {
var _attack3 = _buildings2.default[dogs.key].attack * dogs.lvl;
actions.push([_attack3, { type: 'dog_attack', range: 10 }, _buildings2.default[dogs.key].name, 1, 1]);
var _attack3 = _buildings2.default[dogs.key].attack * (dogs.lvl * 5);
if (_attack3 > 100) _attack3 = 80;
for (var _i3 = 0; _i3 < parseInt(Math.ceil(dogs.lvl / 5)); _i3++) {
actions.push([_attack3, { type: 'dog_attack', range: 10 }, _buildings2.default[dogs.key].name, 1, 1]);
}
}

@@ -281,3 +284,3 @@ }

attack.dmg = action[0];
for (var _i3 = 0; _i3 < action[1].range; _i3 += 1) {
for (var _i4 = 0; _i4 < action[1].range; _i4 += 1) {
serie.push(attack);

@@ -298,3 +301,3 @@ }

attack.dmg = action[0];
for (var _i4 = 0; _i4 < action[1].range; _i4 += 1) {
for (var _i5 = 0; _i5 < action[1].range; _i5 += 1) {
serie.push(attack);

@@ -301,0 +304,0 @@ }

2

package.json
{
"name": "drugwars",
"version": "0.1.53",
"version": "0.1.55",
"description": "A lightweight JavaScript library for DrugWars",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -139,3 +139,3 @@ import { orderBy } from 'lodash';

if(defense_system){
let attack = dwbuildings[defense_system.key].attack * (Math.ceil(defense_system.lvl*12))
let attack = dwbuildings[defense_system.key].attack * (defense_system.lvl*12)
if(attack>120)

@@ -151,3 +151,3 @@ attack = 120;

if(troops){
let attack = dwbuildings[troops.key].attack * (Math.ceil(troops.lvl *10))
let attack = dwbuildings[troops.key].attack * (troops.lvl *10)
if(attack>100)

@@ -164,4 +164,9 @@ attack = 100;

if(dogs){
const attack = dwbuildings[dogs.key].attack * dogs.lvl
actions.push([attack, {type:'dog_attack',range:10}, dwbuildings[dogs.key].name, 1, 1]);
let attack = dwbuildings[dogs.key].attack * (dogs.lvl*5)
if(attack>100)
attack = 80;
for(let i=0;i<parseInt(Math.ceil(dogs.lvl/5));i++)
{
actions.push([attack, {type:'dog_attack',range:10}, dwbuildings[dogs.key].name, 1, 1]);
}
}

@@ -168,0 +173,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc