New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

riseoflegends

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riseoflegends - npm Package Compare versions

Comparing version 0.0.74 to 0.0.75

lib/colors.json

31

lib/card_generator.js

@@ -79,11 +79,11 @@ 'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _colors = require('./colors.json');
// CARD
var _colors2 = _interopRequireDefault(_colors);
var gears = { armor: _armor2.default, belt: _belt2.default, hair: _hair2.default, hat: _hat2.default, necklace: _necklace2.default, pant: _pant2.default, ring: _ring2.default, shoes: _shoes2.default, weapon: _weapon2.default };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//V1 items
var gears = { armor: _armor2.default, belt: _belt2.default, hair: _hair2.default, hat: _hat2.default, necklace: _necklace2.default, pant: _pant2.default, ring: _ring2.default, shoes: _shoes2.default, weapon: _weapon2.default }; // CARD
var actives = { common: _skill_physical2.default, ice: _skill_weapon2.default, fire: _skill_fire2.default, poison: _skill_chemical2.default };

@@ -203,20 +203,6 @@ var maxSeeds = 30;

newCard.passive_skills = this.passive_skill(seeds.splice(0, 1), seeds.splice(0, 1), newCard.quality, newCard.family);
newCard.color = this.seedToColor(seeds.splice(0, 1)[0]);
newCard.color = this.color(seeds.splice(0, 1)[0]);
return newCard;
}
}, {
key: 'seedToColor',
value: function seedToColor(str) {
var hash = 0;
for (var i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
var color = '#';
for (var _i = 0; _i < 3; _i++) {
var value = hash >> _i * 8 & 0xFF;
color += ('00' + value.toString(16)).substr(-2);
}
return color;
}
}, {
key: 'type',

@@ -316,2 +302,9 @@ value: function type(seed) {

}, {
key: 'color',
value: function color(seed) {
var availColor = _colors2.default;
var randomIndex = _random2.default.number(seed).mod(availColor.length);
return randomIndex;
}
}, {
key: 'active_skill',

@@ -318,0 +311,0 @@ value: function active_skill(skill_seed, modifier_seed, quality, attack_type) {

{
"name": "riseoflegends",
"version": "0.0.74",
"version": "0.0.75",
"description": "A lightweight JavaScript library for riseoflegends",

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

@@ -21,4 +21,4 @@ // CARD

import poison from './skill_chemical.json';
import colors from './colors.json';
const gears = { armor, belt, hair, hat, necklace, pant, ring, shoes, weapon }

@@ -137,17 +137,5 @@

newCard.passive_skills = this.passive_skill(seeds.splice(0, 1), seeds.splice(0, 1), newCard.quality, newCard.family)
newCard.color = this.seedToColor(seeds.splice(0, 1)[0])
newCard.color = this.color(seeds.splice(0, 1)[0])
return newCard
}
seedToColor(str) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
let color = '#';
for (let i = 0; i < 3; i++) {
let value = (hash >> (i * 8)) & 0xFF;
color += ('00' + value.toString(16)).substr(-2);
}
return color;
}
type(seed) {

@@ -246,2 +234,7 @@ const rn = random.number(seed, {

}
color(seed) {
const availColor = colors
const randomIndex = random.number(seed).mod(availColor.length)
return randomIndex
}
active_skill(skill_seed, modifier_seed, quality, attack_type) {

@@ -248,0 +241,0 @@ const availActives = actives[attack_type]

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