From 239f94697f6cf49243499290094774eb84b0e757 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 10 Dec 2014 10:37:57 -0800 Subject: [PATCH 1/6] Fixed IE hero lock image. --- app/styles/play/modal/play-heroes-modal.sass | 3 +++ app/templates/play/modal/play-heroes-modal.jade | 5 ++++- app/views/play/modal/PlayHeroesModal.coffee | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/styles/play/modal/play-heroes-modal.sass b/app/styles/play/modal/play-heroes-modal.sass index 4aa7d6c0c..2d6b90894 100644 --- a/app/styles/play/modal/play-heroes-modal.sass +++ b/app/styles/play/modal/play-heroes-modal.sass @@ -110,6 +110,9 @@ $heroCanvasHeight: 265px background-color: goldenrod @include filter(contrast(50%) brightness(65%)) + &.ie + @include opacity(0.35) + .lock-indicator position: absolute width: 40% diff --git a/app/templates/play/modal/play-heroes-modal.jade b/app/templates/play/modal/play-heroes-modal.jade index 827df7b1e..9f0fc4afb 100644 --- a/app/templates/play/modal/play-heroes-modal.jade +++ b/app/templates/play/modal/play-heroes-modal.jade @@ -20,7 +20,10 @@ li(data-hero-id=hero.get('original'), title=hero.name, data-slide-to=index, data-target="#hero-carousel", class="hero-indicator hero-index-" + index + (hero.locked ? " locked" : "") + (hero.purchasable ? " purchasable" : "") + (hero.restricted ? " restricted" : "")) .hero-avatar if hero.locked && !hero.purchasable - img.lock-indicator(src="/images/pages/game-menu/lock.png", draggable="false") + if isIE + img.lock-indicator(src="/images/pages/game-menu/lock-processed.png", draggable="false") + else + img.lock-indicator(src="/images/pages/game-menu/lock.png", draggable="false") .carousel-inner for hero in heroes div(class="item hero-item" + (hero.locked ? " locked" : "") + (hero.purchasable ? " purchasable" : "") + (hero.restricted ? " restricted" : ""), data-hero-id=hero.get('original')) diff --git a/app/views/play/modal/PlayHeroesModal.coffee b/app/views/play/modal/PlayHeroesModal.coffee index 94b99f61a..837ecbb64 100644 --- a/app/views/play/modal/PlayHeroesModal.coffee +++ b/app/views/play/modal/PlayHeroesModal.coffee @@ -69,11 +69,13 @@ module.exports = class PlayHeroesModal extends ModalView context.confirmButtonI18N = @confirmButtonI18N context.visibleHero = @visibleHero context.gems = me.gems() + context.isIE = @isIE() context afterRender: -> super() return unless @supermodel.finished() + @$el.find('.hero-avatar').addClass 'ie' if @isIE() heroes = @heroes.models @$el.find('.hero-indicator').each -> heroID = $(@).data('hero-id') From f8661c4a96d17cdc3f15f8c9dd72cc75e498b029 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 10 Dec 2014 10:40:10 -0800 Subject: [PATCH 2/6] Added the lock image, actually. --- .../images/pages/game-menu/lock-processed.png | Bin 0 -> 2343 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/assets/images/pages/game-menu/lock-processed.png diff --git a/app/assets/images/pages/game-menu/lock-processed.png b/app/assets/images/pages/game-menu/lock-processed.png new file mode 100644 index 0000000000000000000000000000000000000000..bb038b4b09a72c8cc6e7d736eda705e7d7643e1d GIT binary patch literal 2343 zcmeAS@N?(olHy`uVBq!ia0vp^wjj*G1|;Q@5?=x-#^NA%Cx&(BWPltN@yw8jk_cZP ztK|G#y~LFKq*T3%+ybB~1_ql7D*7iAWdWaj57fXq!y$}cUkRZ;?3 z1P4%e<`($+!mY|HhWZQWL;Z@x0)0b01O41weQY|5OM+4nj>M|7IHa;5RX-@TIKQ+g zITff}8Jj`CfWz+qY??|k({NZ0k^#FL9wtC9+W;-`^|f+IEy^rQO>ryA&jkleL1IyH zD#($xN-$R<>jG&6d($d2uec;JFFDoI#SUnaUS?*Bm8FHbv5Aqnxw(a*tD&K*iG`)5 zo29F(k)gAtg{!5Tp^ZLH2jm%U<#%^?^Z)+!t1I#0|EDbzCr-Tm`}gmK%*j72Y;9}x{vGaq@$>J$>BqLU ztf?6}QO-r|V-sHDg1-m*T@I8d5f@O@9%D)-dS4U(JzKh)_JrpixOeYfowxVt%gV}I zeG0B#zixk@am7oI`ho(3$ZmyY&(ze^f-;Y)tE<~Poh%Y|)oyQVyLWNR=g*&)s+F8M z?KR6#_?6(3r%!jj-1_n3N7XaBmp@;*VQyyjt#wxMlBG+J?z`9#!n(G?K;q7^J7Tu} zz1x`@84hwYPd^&;2lc^}KCH%|$ESyxEvh^G5G;iv_b!Y`)78 z*0$lx)xwC?lRkEZx<`MUc*#{OwQue2J$q{6jtDFa(bUu1r>it)x|z1Nx5v5(7jKm3 zebCZ#YHwN^)e?6igTvffx%)+$i}sg$Vn$L?Po*=LZQr(U-@ntZzt+XY#{ON{o@{hp z^?J+lt*JFjB9ia!b#r&$efrcX55Y$&Zx0+`xV+b5qWhDm%LZH#0&)q4Roo2D##dK8 zdG>7C<4+IFx#dsruBzPd&Gqu^l|8CcCAC&>=;GeK;N%mh34w)*ds{msMN5}3TUlAj zHTY@P&&|!veVfj(W{)3_eCD@yRb9?^-@bkGi;caTSQr=^8_OtGA6Yr4q-wUD(uM9`Te@V)hZrl4x!YVWS5G!ObxI=ML61?NbM0-eeQbQwV_N$sT-5OU z!=*fJ+7jar+}B^WpJZ&-5EDQ|Db zQKy%-=H}nq!YwwrRE8UGK4AZ1PpaCc$qWx)T;%mE5vzK0Wq$Ydi?TN#zqlcO@N1`R zdCDD4x9W_tvTq@Eb^F+l9uxf&qdjr&(h9D|abP0l+XkK Dlk}yr literal 0 HcmV?d00001 From 94a400bfd83f7a53a150124fe82c941a4f4dc88d Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 10 Dec 2014 10:44:25 -0800 Subject: [PATCH 3/6] Hero icons now show up on the world map on levels where you can unlock them. --- app/styles/play/world-map-view.sass | 9 +++++++++ app/templates/play/world-map-view.jade | 2 ++ app/views/play/WorldMapView.coffee | 23 +++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/app/styles/play/world-map-view.sass b/app/styles/play/world-map-view.sass index 4cb0b62af..a3b5ec389 100644 --- a/app/styles/play/world-map-view.sass +++ b/app/styles/play/world-map-view.sass @@ -199,6 +199,15 @@ $gameControlMargin: 30px &.started .glyphicon-star 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 z-index: 1 diff --git a/app/templates/play/world-map-view.jade b/app/templates/play/world-map-view.jade index 7b65c7b52..57599a8af 100644 --- a/app/templates/play/world-map-view.jade +++ b/app/templates/play/world-map-view.jade @@ -11,6 +11,8 @@ - var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled); - 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)' : '')) + 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) if level.requiresSubscription img.star(src="/images/pages/play/star.png") diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 8e4b451c0..627def668 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -141,6 +141,9 @@ module.exports = class WorldMapView extends RootView level.color = 'rgb(255, 80, 60)' if level.requiresSubscription 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 ## put lower levels in last, so in the world map they layer over one another properly. @@ -441,6 +444,10 @@ dungeon = [ y: 10.70 nextLevels: continue: 'the-raised-sword' + unlocksHero: { + img: '/file/db/thang.type/53e12be0d042f23505c3023b/portrait.png' + originalID: '53e12be0d042f23505c3023b' + } } { name: 'Favorable Odds' @@ -779,6 +786,10 @@ forest = [ x: 38 y: 72 requiresSubscription: true + unlocksHero: { + img: '/file/db/thang.type/52fc0ed77e01835453bd8f6c/portrait.png' + originalID: '52fc0ed77e01835453bd8f6c' + } } { name: 'Swift Dagger' @@ -817,6 +828,10 @@ forest = [ x: 47 y: 71 requiresSubscription: true + unlocksHero: { + img: '/file/db/thang.type/52fbf74b7e01835453bd8d8e/portrait.png' + originalID: '529ec584c423d4e83b000014' + } } { name: 'Touch of Death' @@ -887,6 +902,10 @@ forest = [ x: 74.5 y: 92 requiresSubscription: true + unlocksHero: { + img: '/file/db/thang.type/5466d449417c8b48a9811e83/portrait.png' + originalID: '5466d449417c8b48a9811e83' + } } { name: 'Rich Forager' @@ -898,6 +917,10 @@ forest = [ continue: 'siege-of-stonehold' x: 80 y: 88 + unlocksHero: { + img: '/file/db/thang.type/52e9adf7427172ae56002172/portrait.png' + originalID: '52e9adf7427172ae56002172' + } } { name: 'Siege of Stonehold' From 87c34e81c67d07c8705904fd016dce893305fd16 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 10 Dec 2014 11:00:52 -0800 Subject: [PATCH 4/6] Using new border image popover backgrounds. --- .../images/level/popover_background.png | Bin 2483 -> 3411 bytes .../level/popover_border_background.png | Bin 0 -> 2388 bytes app/styles/common/common.sass | 4 ++-- app/styles/play/level/tome/spell_debug.sass | 4 ++-- app/styles/play/level/tome/spell_list.sass | 4 ++-- .../level/tome/spell_list_entry_thangs.sass | 4 ++-- .../play/level/tome/spell_palette_entry.sass | 4 ++-- app/styles/play/level/tome/spell_toolbar.sass | 4 ++-- app/styles/play/level/tome/tome.sass | 4 ++-- app/styles/play/world-map-view.sass | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 app/assets/images/level/popover_border_background.png diff --git a/app/assets/images/level/popover_background.png b/app/assets/images/level/popover_background.png index 214edeaae2c9a0bae405430a51bfbed510944016..f87ea6d4b24412bd7cb047195e9967de4e05ff6e 100644 GIT binary patch literal 3411 zcmb_f3pkW%8~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FB)s-gf=IxCVPyt?j(F#*`gTb zNg(AFD@X3-Ahw9_UUY?dPS;ohqN8%pBl#^|BudB=Ub-#33DAvzfGnp%i zKV7Pjuch{}`iG-Y`)@m(*vdqo933-k{iCm!*I28619k@L_W~dPle)ZZu1XNU_uayl zdj%s?7hvj>0jn%|`=PHb?+1!rh%BR{;xczdfN#e6hzkAI2OAA>JKL=Z&yX$UJ^9#u z&0myC#=1i{cZQg5r!7!AK3ExFsU(K#KFshooZ{@-Gc-1(IML*G^2` z#9E8YrwcF69~bQy3h01_4W^f9HTnVD(kp>Gz@Yz*mxg9Wux{4{fA zBiO6Nhpc%ny=x4jxY#yt*@xpG8JmsESrZ6w`_-&2_ZbmguAA6c#@KayWL1&R*i17> Z1GK%gMd?@sbzFQ#QQW;rm2Tll{{eU+4zmCN diff --git a/app/assets/images/level/popover_border_background.png b/app/assets/images/level/popover_border_background.png new file mode 100644 index 0000000000000000000000000000000000000000..e74234591bf2a9d02459b4effd6cde70191343b0 GIT binary patch literal 2388 zcmV-a39I&rP)Ule1DIJk3?2O zRU}v#yvVc*5)>*S70K*s+LEqXf6^)TJY(WF|DSa9{N}xx_wKpp+;h&o7a<~2 zX(Inok`Q~6O6FU9w-dS4@I3r|)42A9l5r*bYp#tdnXI|TDKcN9hr~Lz5Bh(_=-W3O zq}TBV+Z{F9+V1yTUYs<3^qgU&+k503rrb1)BH=*8??eyh`dA0u)@Mhy>oUEh1xJmJ zGFfO5S-Js!|E|%Pex}!Y?niwt7>?35bq?~~w_oVv%YQm9*Kgcv`NeoVDxX}Kl;K@F z*Zk%eFMTd2-a2J_ZTy`v{jBT%`bxjk%)MFt`QANA+519Lb`R~)f8(BwPBT5cdgKpU z54{39OYa9tb69f2XD&ZLkIt_Gq*iA=-6Sd(MiyL=z(+w9R4qFpVG%xcC{)8 zX}rnosNr2ZR31TbQ+8o^hVm+D6KZh!`$Ap?m`5{brTVSY}hPW?tMm(giK zEIyzIDx8zG0f%^?Y$>s6i}?J0ZClOft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014 11:22:41 -0800 Subject: [PATCH 5/6] Tweaked SpriteParser to be smarter about finding root MovieClips and shifting their bounds. --- app/lib/sprites/SpriteParser.coffee | 36 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/app/lib/sprites/SpriteParser.coffee b/app/lib/sprites/SpriteParser.coffee index 361dc8411..5bdc183aa 100644 --- a/app/lib/sprites/SpriteParser.coffee +++ b/app/lib/sprites/SpriteParser.coffee @@ -37,14 +37,7 @@ module.exports = class SpriteParser blocks = @findBlocks ast, source containers = _.filter blocks, {kind: 'Container'} movieClips = _.filter blocks, {kind: 'MovieClip'} - if movieClips.length - # First movie clip is root, so do it last - movieClips = movieClips[1 ... movieClips.length].concat([movieClips[0]]) - - # first container isn't necessarily root... actually the last one is root in blue-cart -# else if containers.length -# # First container is root, so do it last -# containers = containers[1 ... containers.length].concat([containers[0]]) + mainClip = _.last(movieClips) ? _.last(containers) @animationName = mainClip.name for container, index in containers @@ -69,17 +62,24 @@ module.exports = class SpriteParser break continue unless container.bounds and instructions.length @addContainer {c: instructions, b: container.bounds}, container.name + + childrenMovieClips = [] + for movieClip, index in movieClips - if index is 0 - for bounds in movieClip.frameBounds - bounds[0] -= @width / 2 - bounds[1] -= @height / 2 - movieClip.bounds[0] -= @width / 2 - movieClip.bounds[1] -= @height / 2 + lastBounds = null + # fill in bounds which are null... + for bounds, boundsIndex in movieClip.frameBounds + if not bounds + movieClip.frameBounds[boundsIndex] = _.clone(lastBounds) + else + lastBounds = bounds + localGraphics = @getGraphicsFromBlock(movieClip, source) [shapeKeys, localShapes] = @getShapesFromBlock movieClip, source localContainers = @getContainersFromMovieClip movieClip, source, true localAnimations = @getAnimationsFromMovieClip movieClip, source, true + for animation in localAnimations + childrenMovieClips.push(animation.gn) localTweens = @getTweensFromMovieClip movieClip, source, localShapes, localContainers, localAnimations @addAnimation { shapes: localShapes @@ -90,6 +90,14 @@ module.exports = class SpriteParser bounds: movieClip.bounds frameBounds: movieClip.frameBounds }, movieClip.name + + for movieClip in movieClips + if movieClip.name not in childrenMovieClips + for bounds in movieClip.frameBounds + bounds[0] -= @width / 2 + bounds[1] -= @height / 2 + movieClip.bounds[0] -= @width / 2 + movieClip.bounds[1] -= @height / 2 @saveToModel() return movieClips[0]?.name From 84cdc5d15005cdf13737b66a7271ae56a1eff7a4 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 10 Dec 2014 11:28:06 -0800 Subject: [PATCH 6/6] Undisabled new adventurer levels. --- app/views/play/WorldMapView.coffee | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 627def668..f474a249b 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -930,11 +930,9 @@ forest = [ description: 'Unlock the desert world, if you are strong enough to win this epic battle!' nextLevels: continue: 'the-dunes' - disabled: not me.isAdmin() x: 85.5 y: 83.5 adventurer: true - requiresSubscription: true } { name: 'Multiplayer Treasure Grove' @@ -966,7 +964,6 @@ desert = [ description: 'Behold, the desert, full of glory, danger, and sand. Lots of sand.' nextLevels: continue: 'the-mighty-sand-yak' - disabled: not me.isAdmin() x: 8.47 y: 21.93 adventurer: true @@ -980,7 +977,6 @@ desert = [ description: 'Test your nerves by dodging huge sand yaks on the open dunes!' nextLevels: continue: 'oasis' - disabled: not me.isAdmin() x: 16.56 y: 27.77 adventurer: true @@ -994,7 +990,6 @@ desert = [ description: 'Run a gauntlet of sand yaks to reach oasis and quench your thirst!' #nextLevels: # continue: '' - disabled: not me.isAdmin() x: 23.35 y: 31.60 adventurer: true