Hero icons now show up on the world map on levels where you can unlock them.
This commit is contained in:
parent
f8661c4a96
commit
94a400bfd8
3 changed files with 34 additions and 0 deletions
app
|
@ -199,6 +199,15 @@ $gameControlMargin: 30px
|
||||||
&.started .glyphicon-star
|
&.started .glyphicon-star
|
||||||
left: 0.5px
|
left: 0.5px
|
||||||
|
|
||||||
|
img.hero-portrait
|
||||||
|
width: 120%
|
||||||
|
position: absolute
|
||||||
|
bottom: 75%
|
||||||
|
left: 75%
|
||||||
|
border: 1px solid black
|
||||||
|
border-radius: 100%
|
||||||
|
background: white
|
||||||
|
|
||||||
|
|
||||||
.level-shadow
|
.level-shadow
|
||||||
z-index: 1
|
z-index: 1
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled);
|
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled);
|
||||||
- seenNext = seenNext || next;
|
- seenNext = seenNext || next;
|
||||||
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
|
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
|
||||||
|
if level.unlocksHero && !level.unlockedHero
|
||||||
|
img.hero-portrait(src=level.unlocksHero.img)
|
||||||
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
||||||
if level.requiresSubscription
|
if level.requiresSubscription
|
||||||
img.star(src="/images/pages/play/star.png")
|
img.star(src="/images/pages/play/star.png")
|
||||||
|
|
|
@ -141,6 +141,9 @@ module.exports = class WorldMapView extends RootView
|
||||||
level.color = 'rgb(255, 80, 60)'
|
level.color = 'rgb(255, 80, 60)'
|
||||||
if level.requiresSubscription
|
if level.requiresSubscription
|
||||||
level.color = 'rgb(80, 130, 200)'
|
level.color = 'rgb(80, 130, 200)'
|
||||||
|
if level.unlocksHero
|
||||||
|
level.color = 'rgb(0,0,0)'
|
||||||
|
level.unlockedHero = level.unlocksHero.originalID in (me.get('earned')?.heroes or [])
|
||||||
level.hidden = level.locked or level.disabled
|
level.hidden = level.locked or level.disabled
|
||||||
|
|
||||||
## put lower levels in last, so in the world map they layer over one another properly.
|
## put lower levels in last, so in the world map they layer over one another properly.
|
||||||
|
@ -441,6 +444,10 @@ dungeon = [
|
||||||
y: 10.70
|
y: 10.70
|
||||||
nextLevels:
|
nextLevels:
|
||||||
continue: 'the-raised-sword'
|
continue: 'the-raised-sword'
|
||||||
|
unlocksHero: {
|
||||||
|
img: '/file/db/thang.type/53e12be0d042f23505c3023b/portrait.png'
|
||||||
|
originalID: '53e12be0d042f23505c3023b'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name: 'Favorable Odds'
|
name: 'Favorable Odds'
|
||||||
|
@ -779,6 +786,10 @@ forest = [
|
||||||
x: 38
|
x: 38
|
||||||
y: 72
|
y: 72
|
||||||
requiresSubscription: true
|
requiresSubscription: true
|
||||||
|
unlocksHero: {
|
||||||
|
img: '/file/db/thang.type/52fc0ed77e01835453bd8f6c/portrait.png'
|
||||||
|
originalID: '52fc0ed77e01835453bd8f6c'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name: 'Swift Dagger'
|
name: 'Swift Dagger'
|
||||||
|
@ -817,6 +828,10 @@ forest = [
|
||||||
x: 47
|
x: 47
|
||||||
y: 71
|
y: 71
|
||||||
requiresSubscription: true
|
requiresSubscription: true
|
||||||
|
unlocksHero: {
|
||||||
|
img: '/file/db/thang.type/52fbf74b7e01835453bd8d8e/portrait.png'
|
||||||
|
originalID: '529ec584c423d4e83b000014'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name: 'Touch of Death'
|
name: 'Touch of Death'
|
||||||
|
@ -887,6 +902,10 @@ forest = [
|
||||||
x: 74.5
|
x: 74.5
|
||||||
y: 92
|
y: 92
|
||||||
requiresSubscription: true
|
requiresSubscription: true
|
||||||
|
unlocksHero: {
|
||||||
|
img: '/file/db/thang.type/5466d449417c8b48a9811e83/portrait.png'
|
||||||
|
originalID: '5466d449417c8b48a9811e83'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name: 'Rich Forager'
|
name: 'Rich Forager'
|
||||||
|
@ -898,6 +917,10 @@ forest = [
|
||||||
continue: 'siege-of-stonehold'
|
continue: 'siege-of-stonehold'
|
||||||
x: 80
|
x: 80
|
||||||
y: 88
|
y: 88
|
||||||
|
unlocksHero: {
|
||||||
|
img: '/file/db/thang.type/52e9adf7427172ae56002172/portrait.png'
|
||||||
|
originalID: '52e9adf7427172ae56002172'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name: 'Siege of Stonehold'
|
name: 'Siege of Stonehold'
|
||||||
|
|
Reference in a new issue