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

bastion-siege-logic

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bastion-siege-logic - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

22

dist/gamescreen/gamescreen.players.js

@@ -15,5 +15,7 @@ "use strict";

function allianceBattleStart(content) {
if (contentFilter.includesAll(content, 'Your ally ', ' attacked ', ' help ')) {
const defenceMatch = /Your ally (.+) was attacked by (.+) from /.exec(content);
const attackMatch = /Your ally (.+) attacked (.+) from /.exec(content);
if (contentFilter.includesAll(content, 'Your ally ', ' attacked ')) {
const indexOf = content.indexOf(' from ');
const shortenedContent = indexOf < 0 ? content : content.slice(0, indexOf);
const defenceMatch = /Your ally (.+) was attacked by (.+)/.exec(shortenedContent);
const attackMatch = /Your ally (.+) attacked (.+)/.exec(shortenedContent);
const allyMatch = defenceMatch ? defenceMatch : attackMatch;

@@ -32,7 +34,9 @@ const enemyMatch = defenceMatch ? defenceMatch : attackMatch;

}
if (contentFilter.includesAll(content, ' союзник', ' атаковал ', ' Ты можешь ')) {
const regex = /союзник.? (.+) атаковал (.+) из /;
const attack = /атаке/.test(content);
const ally = regexHelper.getPlayer(content, regex, 1);
const enemy = regexHelper.getPlayer(content, regex, 2);
if (contentFilter.includesAll(content, ' союзник', ' атаковал ')) {
const indexOf = content.indexOf(' из ');
const shortenedContent = indexOf < 0 ? content : content.slice(0, indexOf);
const regex = /союзник.? (.+) атаковал (.+)$/;
const attack = /Твой/.test(content);
const ally = regexHelper.getPlayer(shortenedContent, regex, 1);
const enemy = regexHelper.getPlayer(shortenedContent, regex, 2);
return { allianceBattleStart: {

@@ -93,3 +97,3 @@ attack,

if (isEnglish || isRussian) {
const karma = regexHelper.getNumberStrict(content, `(\\d+)${emoji_1.EMOJI.karma}`);
const karma = regexHelper.getOptionalNumber(content, `(\\d+)${emoji_1.EMOJI.karma}`) || 0;
const terra = regexHelper.getNumberStrict(content, `(\\d+)${emoji_1.EMOJI.terra}`);

@@ -96,0 +100,0 @@ if (isEnglish) {

{
"name": "bastion-siege-logic",
"version": "1.3.1",
"version": "1.3.2",
"description": "",

@@ -41,3 +41,3 @@ "license": "MIT",

"eslint-config-xo-typescript": "^0.9.0",
"nyc": "^13.3.0",
"nyc": "^14.0.0",
"ts-node": "^8.0.2",

@@ -44,0 +44,0 @@ "typescript": "^3.4.2",

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