소스 검색

Merge branch '532-rename-class-spirit' into 'v0.1.10'

Resolve "Rename Class to Spirit"

See merge request Isleward/isleward!270
tags/v0.1.10^2
Big Bad Waffle 6 년 전
부모
커밋
ca395d7dbd
13개의 변경된 파일241개의 추가작업 그리고 160개의 파일을 삭제
  1. +0
    -7
      src/client/ui/templates/characters/characters.js
  2. +31
    -6
      src/client/ui/templates/createCharacter/createCharacter.js
  3. +1
    -1
      src/client/ui/templates/createCharacter/styles.less
  4. +1
    -1
      src/client/ui/templates/online/template.html
  5. +3
    -3
      src/client/ui/templates/tooltips/styles.less
  6. +1
    -1
      src/server/components/spellbook.js
  7. +117
    -123
      src/server/config/animations.js
  8. +13
    -13
      src/server/config/classes.js
  9. +2
    -2
      src/server/config/maps/tutorial/map.json
  10. +72
    -0
      src/server/config/spirits.js
  11. +0
    -1
      src/server/mods/class-necromancer/index.js
  12. +0
    -1
      src/server/mods/event-halloween/index.js
  13. +0
    -1
      src/server/mods/event-xmas/index.js

+ 0
- 7
src/client/ui/templates/characters/characters.js 파일 보기

@@ -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));


+ 31
- 6
src/client/ui/templates/createCharacter/createCharacter.js 파일 보기

@@ -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,8 +63,8 @@ define([

this.costume = -1;

this.class = 'wizard';
this.find('.txtClass').html('Wizard');
this.class = 'owl';
this.find('.txtClass').html('Owl');

this.changeCostume({
target: this.find('.txtCostume')
@@ -80,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');
@@ -140,9 +142,30 @@ 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.`,
lynx: `The nimble Lynx hastens you; allowing your strikes to land true. <br /><br />Upon level up, you gain 1 Dexterity.`
})[this.class];

events.emit('onShowTooltip', text, el[0], pos, 200);
$('.uiTooltips .tooltip').addClass('bright');
},
onClassUnhover: function (e) {
var el = $(e.currentTarget);
events.emit('onHideTooltip', el[0]);
},
changeClass: function (e) {
var el = $(e.target);
var classes = ['wizard', 'warrior', 'thief'];
var classes = ['owl', 'bear', 'lynx'];
var nextIndex = (classes.indexOf(this.class) + 1) % classes.length;
this.costume = -1;

@@ -151,6 +174,8 @@ define([
el.html(newClass[0].toUpperCase() + newClass.substr(1));

this.class = newClass;

this.onClassHover(e);
},

changeCostume: function (e) {


+ 1
- 1
src/client/ui/templates/createCharacter/styles.less 파일 보기

@@ -48,7 +48,7 @@

.txtClass {
&:before {
content: 'Class: ';
content: 'Spirit: ';
}
}



+ 1
- 1
src/client/ui/templates/online/template.html 파일 보기

@@ -7,7 +7,7 @@
<div class="heading">
<div class="col">level</div>
<div class="col">name</div>
<div class="col">class</div>
<div class="col">spirit</div>
</div>
</div>
</div>


+ 3
- 3
src/client/ui/templates/tooltips/styles.less 파일 보기

@@ -11,12 +11,12 @@
text-align: justify;

&.bright {
background-color: @blueC;
color: @white;
background-color: @grayB;
color: @black;
}

.hidden {
display: none;
}
}
}
}

+ 1
- 1
src/server/components/spellbook.js 파일 보기

@@ -106,7 +106,7 @@ define([
else if (sheetName.indexOf('/') > -1)
animation = animations.mobs[sheetName];
else
animation = animations.classes[this.obj.class];
animation = animations.classes;

if ((animation) && (animation[this.obj.cell]) && (animation[this.obj.cell][animationName])) {
builtSpell.animation = extend(true, {}, animation[this.obj.cell][animationName]);


+ 117
- 123
src/server/config/animations.js 파일 보기

@@ -8,138 +8,132 @@ define([
events.emit('onBeforeGetAnimations', this);
},
classes: {
wizard: {
'2': {
hitStaff: {
sheet: 'animChar',
row: 1,
col: 5,
frames: 3,
frameDelay: 4
},
raiseStaff: {
sheet: 'animChar',
row: 0,
col: 3,
frames: 5,
frameDelay: 3
}
'2': {
hitStaff: {
sheet: 'animChar',
row: 1,
col: 5,
frames: 3,
frameDelay: 4
},
raiseStaff: {
sheet: 'animChar',
row: 0,
col: 3,
frames: 5,
frameDelay: 3
}
},
'3': {
hitStaff: {
sheet: 'animChar',
row: 0,
col: 0,
frames: 3,
frameDelay: 4
},
raiseStaff: {
sheet: 'animChar',
row: 1,
col: 0,
frames: 5,
frameDelay: 3
}
},
'4': {
hitStaff: {
sheet: 'animChar',
row: 2,
col: 5,
frames: 3,
frameDelay: 5
},
'3': {
hitStaff: {
sheet: 'animChar',
row: 0,
col: 0,
frames: 3,
frameDelay: 4
},
raiseStaff: {
sheet: 'animChar',
row: 1,
col: 0,
frames: 5,
frameDelay: 3
}
raiseStaff: {
sheet: 'animChar',
row: 2,
col: 0,
frames: 5,
frameDelay: 4
}
},
'5': {
hitStaff: {
sheet: 'animChar',
row: 3,
col: 0,
frames: 3,
frameDelay: 5
},
raiseStaff: {
sheet: 'animChar',
row: 3,
col: 3,
frames: 5,
frameDelay: 4
}
},
'6': {
hitSword: {
sheet: 'animChar',
row: 5,
col: 5,
frames: 3,
frameDelay: 5
},
'4': {
hitStaff: {
sheet: 'animChar',
row: 2,
col: 5,
frames: 3,
frameDelay: 5
},
raiseStaff: {
sheet: 'animChar',
row: 2,
col: 0,
frames: 5,
frameDelay: 4
}
raiseHands: {
sheet: 'animChar',
row: 5,
col: 0,
frames: 5,
frameDelay: 5
}
},
'7': {
hitSword: {
sheet: 'animChar',
row: 4,
col: 0,
frames: 3,
frameDelay: 5
},
'5': {
hitStaff: {
sheet: 'animChar',
row: 3,
col: 0,
frames: 3,
frameDelay: 5
},
raiseStaff: {
sheet: 'animChar',
row: 3,
col: 3,
frames: 5,
frameDelay: 4
}
raiseHands: {
sheet: 'animChar',
row: 4,
col: 3,
frames: 5,
frameDelay: 6
}
},
thief: {
'6': {
hitSword: {
sheet: 'animChar',
row: 5,
col: 5,
frames: 3,
frameDelay: 5
},
raiseHands: {
sheet: 'animChar',
row: 5,
col: 0,
frames: 5,
frameDelay: 5
}
'9': {
hitSword: {
sheet: 'animChar',
row: 6,
col: 0,
frames: 3,
frameDelay: 5
},
'7': {
hitSword: {
sheet: 'animChar',
row: 4,
col: 0,
frames: 3,
frameDelay: 5
},
raiseHands: {
sheet: 'animChar',
row: 4,
col: 3,
frames: 5,
frameDelay: 6
}
raiseShield: {
sheet: 'animChar',
row: 7,
col: 0,
frames: 5,
frameDelay: 7
}
},
warrior: {
'9': {
hitSword: {
sheet: 'animChar',
row: 6,
col: 0,
frames: 3,
frameDelay: 5
},
raiseShield: {
sheet: 'animChar',
row: 7,
col: 0,
frames: 5,
frameDelay: 7
}
'10': {
hitSword: {
sheet: 'animChar',
row: 7,
col: 5,
frames: 3,
frameDelay: 5
},
'10': {
hitSword: {
sheet: 'animChar',
row: 7,
col: 5,
frames: 3,
frameDelay: 5
},
raiseShield: {
sheet: 'animChar',
row: 6,
col: 3,
frames: 5,
frameDelay: 7
}
raiseShield: {
sheet: 'animChar',
row: 6,
col: 3,
frames: 5,
frameDelay: 7
}
}
},


+ 13
- 13
src/server/config/classes.js 파일 보기

@@ -4,28 +4,28 @@ define([
events
) {
var classes = {
list: ['warrior', 'wizard', 'thief'],
list: ['bear', 'owl', 'lynx'],
portraits: {
warrior: {
bear: {
x: 0,
y: 0
},
wizard: {
owl: {
x: 2,
y: 0
},
thief: {
lynx: {
x: 3,
y: 0
}
},
spells: {
wizard: ['magic missile', 'ice spear'],
warrior: ['slash', 'charge'],
thief: ['flurry', 'smokebomb']
owl: ['magic missile', 'ice spear'],
bear: ['slash', 'charge'],
lynx: ['flurry', 'smokebomb']
},
stats: {
wizard: {
owl: {
values: {
hpMax: 50
},
@@ -34,7 +34,7 @@ define([
int: 1
}
},
warrior: {
bear: {
values: {
hpMax: 80
},
@@ -43,7 +43,7 @@ define([
str: 1
}
},
thief: {
lynx: {
values: {
hpMax: 70
},
@@ -54,9 +54,9 @@ define([
}
},
weapons: {
wizard: 'Gnarled Staff',
thief: 'Dagger',
warrior: 'Sword'
owl: 'Gnarled Staff',
lynx: 'Dagger',
bear: 'Sword'
},

getSpritesheet: function (className) {


+ 2
- 2
src/server/config/maps/tutorial/map.json 파일 보기

@@ -1918,7 +1918,7 @@
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>space<\/font> to toggle auto-attack. Remember to stand close if you are a Warrior, Thief or Necromancer.\"}"
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>space<\/font> to toggle auto-attack. Remember to stand close if you are using melee attacks.\"}"
},
"propertytypes":
{
@@ -1994,7 +1994,7 @@
"name":"",
"properties":
{
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>space<\/font> to toggle auto-attack. Remember to stand close if you are a Warrior, Thief or Necromancer.\"}"
"cpnNotice":"{\"maxLevel\": 1, \"msg\": \"The seagull's eyes are bloodshot and in its beak you see a glinting locket. It stole your family heirloom!<br \/><br \/>Click on it to target it then press <font class='color-green'>space<\/font> to toggle auto-attack. Remember to stand close if you are using melee attacks.\"}"
},
"propertytypes":
{


+ 72
- 0
src/server/config/spirits.js 파일 보기

@@ -0,0 +1,72 @@
define([
'../misc/events'
], function (
events
) {
var spirits = {
list: ['bear', 'owl', 'lynx'],
portraits: {
bear: {
x: 0,
y: 0
},
owl: {
x: 2,
y: 0
},
lynx: {
x: 3,
y: 0
}
},
spells: {
owl: ['magic missile', 'ice spear'],
bear: ['slash', 'charge'],
lynx: ['flurry', 'smokebomb']
},
stats: {
owl: {
values: {
hpMax: 50
},
vitScale: 10,
gainStats: {
int: 1
}
},
bear: {
values: {
hpMax: 80
},
vitScale: 10,
gainStats: {
str: 1
}
},
lynx: {
values: {
hpMax: 70
},
vitScale: 10,
gainStats: {
dex: 1
}
}
},
weapons: {
owl: 'Gnarled Staff',
lynx: 'Dagger',
bear: 'Sword'
},

getSpritesheet: function (className) {
return this.stats[className].spritesheet || 'characters';
},

init: function () {
events.emit('onBeforeGetClasses', classes);
}
};

return classes;
});

+ 0
- 1
src/server/mods/class-necromancer/index.js 파일 보기

@@ -143,7 +143,6 @@ define([
skins['1.8'] = {
name: 'Necromancer 1',
sprite: [0, 0],
class: 'wizard',
spritesheet: `${this.folderName}/images/inGameSprite.png`
};
},


+ 0
- 1
src/server/mods/event-halloween/index.js 파일 보기

@@ -106,7 +106,6 @@ define([
skins['3.0'] = {
name: 'Pumpkin-Head Necromancer',
sprite: [0, 0],
class: 'wizard',
spritesheet: `${this.folderName}/images/skins.png`
};
},


+ 0
- 1
src/server/mods/event-xmas/index.js 파일 보기

@@ -54,7 +54,6 @@ define([
skins['bearded wizard'] = {
name: 'Bearded Wizard',
sprite: [0, 0],
class: 'wizard',
spritesheet: `${this.folderName}/images/skins.png`
};
},


불러오는 중...
취소
저장