Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var recipes = [["Armor","Wing"],["Weapon","Claw"],["Helmet","Eye"],["Staff","Leg"],["Gloves","Feather"]];
- for(var j=0;j<recipes.length;j++){
- if(cube.filter(function( obj ) { return (obj.type == recipes[j][0] && obj.tier == "tier-magic") ;}).length &&
- cube.filter(function( obj ) { return obj.type == "Coal";}).length &&
- cube.filter(function( obj ) { return obj.type == recipes[j][1];}).length)
- {
- var ival = 0;
- for (var i = 0; i < cube.length; ++i) {
- if (cube[i].type == recipes[j][0])
- {
- var ival = cube[i].val * 4 + rnd(1,lvl);
- }
- }
- var item = new Item(recipes[j][0],ival,"tier-demonic");
- inv.push(item);
- log('You\'ve crafted a demonic item!');
- cube=[];
- updateEq();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement