Commit 4d472b0a authored by Big Bad Waffle's avatar Big Bad Waffle

Merge branch 'v0.1.10' into 'master'

V0.1.10

Closes #562, #563, #565, #560, #559, #537, #540, #539, #536, #534, #533, #532, #524, #530, #525, #528, #523, #519, #518, #517, #515, #516, #507, #97, #497, #498, #263, #496, #488, #491, #490, #492, and #438

See merge request !279
parents 82008a53 7d95b384
......@@ -2,5 +2,7 @@ node_modules
storage.db
*.sublime-project
*.sublime-workspace
*.css
creds.js
sheetsConfig.js
!helpers/item-tooltip/styles.css
......@@ -32,21 +32,6 @@ $(function () {
},
spritesheet: '../../src/client/images/items.png',
sprite: [0, 4]
}, {
name: `Knight's Leather Glove`,
type: 'Chainmail Glove',
rqr: {
level: 20,
dex: 150
},
quality: 3,
stats: {
Vitality: '[20 - 35]',
Dexterity: '[150 - 220]',
'100% chance to be not owned by Entranog': null
},
spritesheet: '../../src/client/images/items.png',
sprite: [0, 3]
}];
for (var i = 0; i < items.length - 1; i++) {
......
body {
background-color: #2d2136;
padding: 10px;
margin: 0px;
}
@font-face
{
font-family: bitty;
src: url('../../src/client/fonts/bitty.ttf');
}
.tooltip {
background-color: #3c3f4c;
text-align: center;
padding: 10px;
margin-bottom: 10px;
font-family: bitty;
width: 400px;
}
.sprite-box {
margin: 0 auto;
height: 64px;
width: 64px;
margin-bottom: 15px;
background-color: #2d2136;
padding: 5px;
}
.sprite {
height: 64px;
}
.name.q0 {
color: #fafcfc;
}
.name.q1 {
color: #3fa7dd;
}
.name.q2 {
color: #ffeb38;
}
.name.q3 {
color: #a24eff;
}
.name.q4 {
color: #ff6942;
}
.type {
color: #69696e;
margin-bottom: 15px;
}
.rqr {
color: #fafcfc;
margin-bottom: 15px;
}
.stats {
color: #929398;
}
.stat {
margin-bottom: 5px;
}
.stat:before {
content: '*';
margin-right: 5px;
}
......@@ -7,13 +7,12 @@ define([
) {
var spells = config.spells;
var max = true;
var max = false;
var maxTarget = false;
spells['harvest life'] = {
statType: ['str', 'int'],
statMult: 1.34,
element: 'physical',
statMult: 0.76,
auto: true,
cdMax: 6,
manaCost: 0,
......@@ -27,8 +26,7 @@ define([
var bloodBarrierMult = 1.25;
spells['skeleton melee'] = {
statType: ['str', 'int'],
statMult: 0.46 * bloodBarrierMult,
element: 'physical',
statMult: 0.27 * bloodBarrierMult,
auto: true,
cdMax: 5,
manaCost: 0,
......@@ -38,52 +36,52 @@ define([
}
};
var level = 5;
var level = 20;
var hp = [
30.07,
30.58,
31.94,
34.61,
39,
45.55,
54.70,
66.86,
82.49,
102,
125.83,
154.42,
188.18,
227.57,
273,
324.91,
383.74,
449.90,
523.85,
606
32.70,
65.40,
98.10,
130.80,
163.50,
196.20,
228.90,
261.60,
294.30,
327.00,
359.70,
392.40,
425.10,
457.80,
490.50,
523.20,
555.90,
588.60,
621.30,
654.00
];
var hpMax = [
91.25,
96.50,
110.75,
138.50,
184.25,
252.50,
347.75,
474.50,
637.25,
840.50,
1088.75,
1386.50,
1738.25,
2148.50,
2621.75,
3162.50,
3775.25,
4464.50,
5234.75,
6090.50
160.48,
324.53,
489.90,
660.79,
841.44,
1036.21,
1249.50,
1485.85,
1749.87,
2046.32,
2380.05,
2756.08,
3179.54,
3655.72,
4190.09,
4788.27,
5456.08,
6199.50,
7024.73,
7938.17
];
return {
......@@ -117,7 +115,6 @@ define([
elementArcanePercent: 0,
elementFrostPercent: 0,
elementPoisonPercent: 0,
elementPhysicalPercent: 0,
elementHolyPercent: 0,
elementFirePercent: 0
}
......@@ -131,7 +128,6 @@ define([
elementArcaneResist: 0,
elementFrostResist: 0,
elementPoisonResist: 0,
elementPhysicalResist: 0,
elementHolyResist: 0,
elementFireResist: 0
}
......@@ -143,18 +139,17 @@ define([
if (!stat.push)
stat = [stat];
var minStat = 1 + (0.00477 * Math.pow(level, 2.8));
var maxStat = 3 + (0.3825 * Math.pow(level, 1.83));
var minStat = level;
var maxStat = level * 5;
var mult = (stat.length == 1) ? 1 : 0.5;
var mult = (stat.length == 1) ? 1 : 1;
stat.forEach(s => config.source.stats.values[s] = (max ? maxStat : minStat) * mult);
var amount = combat.getDamage(config).amount;
var duration = c.random.i_duration;
if (duration) {
if (duration)
amount *= max ? duration[1] : duration[0];
}
amount /= c.cdMax;
......
src/client/images/abilityIcons.png

4.79 KB | W: | H:

src/client/images/abilityIcons.png

5.18 KB | W: | H:

src/client/images/abilityIcons.png
src/client/images/abilityIcons.png
src/client/images/abilityIcons.png
src/client/images/abilityIcons.png
  • 2-up
  • Swipe
  • Onion skin
src/client/images/items.png

13.8 KB | W: | H:

src/client/images/items.png

13.5 KB | W: | H:

src/client/images/items.png
src/client/images/items.png
src/client/images/items.png
src/client/images/items.png
  • 2-up
  • Swipe
  • Onion skin
src/client/images/mobs.png

2.84 KB | W: | H:

src/client/images/mobs.png

2.88 KB | W: | H:

src/client/images/mobs.png
src/client/images/mobs.png
src/client/images/mobs.png
src/client/images/mobs.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,13 +9,6 @@ define([
items: [],
init: function (blueprint) {
this.items.forEach(function (i) {
if ((i.stats) && (i.stats.hpMax)) {
i.stats.vit = i.stats.hpMax;
delete i.stats.hpMax;
}
});
events.emit('onGetItems', this.items);
},
extend: function (blueprint) {
......@@ -35,11 +28,6 @@ define([
var nItem = newItems[i];
var nId = nItem.id;
if ((nItem.stats) && (nItem.stats.hpMax)) {
nItem.stats.vit = nItem.stats.hpMax;
delete nItem.stats.hpMax;
}
var findItem = items.find(function (item) {
return (item.id == nId);
});
......
......@@ -93,21 +93,11 @@ define([
},
getSpell: function (number) {
var spellNumber = -1;
if (number == 1) {
spellNumber = 0;
} else if (number == 2)
spellNumber = 1;
else if (number == 3)
spellNumber = 2;
else if (number == 4)
spellNumber = 3;
if (spellNumber == -1)
return;
var spellNumber = (number == ' ') ? 0 : number;
var spell = this.spells[spellNumber];
var spell = this.spells.find(function (s) {
return (s.id == spellNumber);
});
if (!spell)
return null;
......@@ -218,7 +208,7 @@ define([
data: {
action: 'spell',
priority: true,
spell: key - 1,
spell: spell.id,
auto: spell.auto,
target: target,
self: this.shiftDown
......
......@@ -5,7 +5,6 @@ define([
) {
var stats = {
'vit': 'vitality',
'hpMax': 'vitality',
'regenHp': 'health regeneration',
'manaMax': 'maximum mana',
'regenMana': 'mana regeneration',
......@@ -29,14 +28,13 @@ define([
'elementFrostPercent': 'increased frost damage',
'elementFirePercent': 'increased fire damage',
'elementHolyPercent': 'increased holy damage',
'elementPhysicalPercent': 'increased physical damage',
'elementPoisonPercent': 'increased poison damage',
'elementAllResist': 'all resistance',
'elementArcaneResist': 'arcane resistance',
'elementFrostResist': 'frost resistance',
'elementFireResist': 'fire resistance',
'elementHolyResist': 'holy resistance',
'elementPhysicalResist': 'physical resistance',
'elementPoisonResist': 'poison resistance',
'elementAllResist': 'all resistance',
......
......@@ -20,6 +20,10 @@ define([
events.on('onGetObject', this.onGetObject.bind(this));
events.on('onRezone', this.onRezone.bind(this));
events.on('onChangeHoverTile', this.getLocation.bind(this));
//Get saved value for showNames, or use the value set above
var showNames = window.localStorage.getItem('iwd_opt_shownames');
this.showNames = showNames ? (showNames == 'true') : this.showNames;
},
getLocation: function (x, y) {
......@@ -46,7 +50,7 @@ define([
events.emit('onMobHover', mob);
},
getClosest: function (x, y, maxDistance, reverse, fromMob, callback) {
getClosest: function (x, y, maxDistance, reverse, fromMob) {
var objects = this.objects;
var oLen = objects.length;
......@@ -72,6 +76,8 @@ define([
return (aDistance - bDistance);
});
list = list.filter((o) => ((o.aggro) && (o.aggro.faction != window.player.aggro.faction)));
if (!fromMob)
return list[0];
......@@ -296,6 +302,9 @@ define([
if (key == 'v') {
this.showNames = !this.showNames;
//Set new value in localStorage for showNames
window.localStorage.setItem('iwd_opt_shownames', this.showNames);
var showNames = this.showNames;
var objects = this.objects;
......
......@@ -101,8 +101,10 @@ define([
if (l == 'tileSprites') {
layers[l] = new pixi.Container();
layers[l].layer = 'tiles';
} else
} else {
layers[l] = new pixi.Container();
layers[l].layer = l;
}
this.stage.addChild(layers[l])
}, this);
......@@ -289,6 +291,11 @@ define([
},
clean: function () {
this.stage.removeChild(this.layers.hiders);
this.layers.hiders = new pixi.Container();
this.layers.hiders.layer = 'hiders';
this.stage.addChild(this.layers.hiders);
var container = this.layers.tileSprites;
this.stage.removeChild(container);
......@@ -297,7 +304,11 @@ define([
this.stage.addChild(container);
this.stage.children.sort(function (a, b) {
if (a.layer == 'tiles')
if (a.layer == 'hiders')
return 1;
else if (b.layer == 'hiders')
return -1;
else if (a.layer == 'tiles')
return -1;
else if (b.layer == 'tiles')
return 1;
......@@ -676,45 +687,6 @@ define([
obj.sprite.position.y = obj.y;
obj.sprite.width = obj.w;
obj.sprite.height = obj.h;
return;
var points = obj.sprite.graphicsData[0].shape.points;
if (!points)
return;
graphics.clear();
graphics.beginFill(obj.color || '0x48edff', fillAlpha);
if (obj.strokeColor)
graphics.lineStyle(scaleMult, obj.strokeColor);
graphics.drawRect(0, 0, obj.w, obj.h);
/*graphics.moveTo(obj.x, obj.y);
graphics.lineTo(obj.x + obj.w, obj.y);
graphics.lineTo(obj.x + obj.w, obj.y + obj.h);
graphics.lineTo(obj.x, obj.y + obj.h);
graphics.lineTo(obj.x, obj.y);*/
graphics.endFill();
graphics.position.x = obj.x;
graphics.position.y = obj.y;
/*obj.sprite.dirty = true;
obj.sprite.clearDirty = true;
points[0] = obj.x;
points[1] = obj.y;
points[2] = obj.x + obj.w;
points[3] = obj.y;
points[4] = obj.x + obj.w;
points[5] = obj.y + obj.h;
points[6] = obj.x;
points[7] = obj.y + obj.h;
points[8] = obj.x;
points[9] = obj.y;*/
},
buildObject: function (obj) {
......
......@@ -28,7 +28,8 @@ define([
'animBoss',
'white',
'ray',
'images/skins/0001.png'
'images/skins/0001.png',
'images/skins/0010.png'
],
sprites: {},
ready: false,
......
const {
app,
BrowserWindow
} = require('electron')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 800,
height: 600,
frame: true,
title: 'Isleward'
});
win.maximize();
// and load the index.html of the app.
//win.loadURL(`http://default-environment.9ymkeaciiv.eu-west-1.elasticbeanstalk.com/index.html`)
win.loadURL(`http://localhost:4000/index.html`)
// Open the DevTools.
//win.webContents.openDevTools()
// Emitted when the window is closed.
win.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
win = null
})
}
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) {
createWindow()
}
})
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
\ No newline at end of file
......@@ -14,6 +14,7 @@ define([
events.on('onEnterGame', this.onEnterGame.bind(this));
events.on('onKeyDown', this.onKeyDown.bind(this));
events.on('onResize', this.onResize.bind(this));
},
onEnterGame: function () {
events.clearQueue();
......@@ -63,7 +64,6 @@ define([
return;
this.getTemplate(type, options);
$(window).on('resize', this.onResize.bind(this));
},
getTemplate: function (type, options) {
require([this.root + 'ui/templates/' + type + '/' + type], this.onGetTemplate.bind(this, options));
......
......@@ -20,13 +20,6 @@ define([
selected: null,
deleteCount: 0,
classSprites: {
warrior: [1, 1],
wizard: [2, 0],
thief: [6, 0],
cleric: [4, 0]
},
postRender: function () {
this.find('.btnPlay').on('click', this.onPlayClick.bind(this));
this.find('.btnNew').on('click', this.onNewClick.bind(this));
......
......@@ -16,7 +16,7 @@ define([
centered: true,
classSprites: null,
class: 'wizard',
class: null,
costume: 0,
skinId: null,
......@@ -27,7 +27,11 @@ define([
uiFactory.build('tooltips');
this.find('.txtClass').on('click', this.changeClass.bind(this));
this.find('.txtClass')
.on('click', this.changeClass.bind(this))
.on('mousemove', this.onClassHover.bind(this))
.on('mouseleave', this.onClassUnhover.bind(this));
this.find('.txtCostume').on('click', this.changeCostume.bind(this));
this.find('.btnBack').on('click', this.back.bind(this));
......@@ -59,6 +63,9 @@ define([
this.costume = -1;
this.class = 'owl';
this.find('.txtClass').html('Owl');
this.changeCostume({
target: this.find('.txtCostume')
});
......@@ -77,12 +84,10 @@ define([
events.emit('onShowTooltip', text, el[0], pos);
$('.uiTooltips .tooltip').addClass('bright');
},
onProphecyUnhover: function (e) {
var el = $(e.currentTarget);
events.emit('onHideTooltip', el[0]);
},
onProphecyClick: function (e) {
var el = $(e.currentTarget);
var pName = el.attr('prophecy');
......@@ -137,38 +142,68 @@ define([
this.el.find('.message').html(result);
},
onClassHover: function (e) {
var el = $(e.currentTarget);
var pos = {
x: e.clientX + 25,
y: e.clientY
};
var text = ({
owl: `The wise Owl guides you; granting you the focus needed to cast spells. <br /><br />Upon level up, you gain 1 Intellect.`,
bear: `The towering Bear strenghtens you; lending force to your blows. <br /><br />Upon level up, you gain 1 Strength.`,