mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Add two starting new heroes. Fix #2753 again for now.
This commit is contained in:
parent
1a31692775
commit
a4654f613d
7 changed files with 32 additions and 12 deletions
|
@ -970,3 +970,11 @@ module.exports.thangNames = thangNames =
|
|||
'Yasuo'
|
||||
'Yi'
|
||||
]
|
||||
'Champion': [
|
||||
# Female
|
||||
'Ida'
|
||||
]
|
||||
'Duelist': [
|
||||
# Male
|
||||
'Alejandro'
|
||||
]
|
||||
|
|
|
@ -27,8 +27,10 @@ module.exports = class ThangType extends CocoModel
|
|||
sorcerer: '52fd1524c7e6cf99160e7bc9'
|
||||
necromancer: '55652fb3b9effa46a1f775fd'
|
||||
'dark-wizard': ''
|
||||
duelist: '57588f09046caf2e0012ed41'
|
||||
champion: '575848b522179b2800efbfbf'
|
||||
@heroClasses:
|
||||
Warrior: ['captain', 'knight', 'samurai', 'raider', 'goliath', 'guardian']
|
||||
Warrior: ['champion', 'duelist', 'captain', 'knight', 'samurai', 'raider', 'goliath', 'guardian']
|
||||
Ranger: ['ninja', 'forest-archer', 'trapper', 'pixie', 'assassin']
|
||||
Wizard: ['librarian', 'potion-master', 'sorcerer', 'necromancer', 'dark-wizard']
|
||||
@items:
|
||||
|
@ -243,6 +245,9 @@ module.exports = class ThangType extends CocoModel
|
|||
map = {
|
||||
"Assassin": "Ritic"
|
||||
"Captain": "Anya"
|
||||
"Champion": "Ida"
|
||||
"Dark Wizard": "Usara"
|
||||
"Duelist": "Alejandro"
|
||||
"Forest Archer": "Naria"
|
||||
"Goliath": "Okar"
|
||||
"Guardian": "Illia"
|
||||
|
@ -250,13 +255,12 @@ module.exports = class ThangType extends CocoModel
|
|||
"Librarian": "Hushbaum"
|
||||
"Necromancer": "Nalfar"
|
||||
"Ninja": "Amara"
|
||||
"Pixie": "Zana"
|
||||
"Potion Master": "Omarn"
|
||||
"Raider": "Arryn"
|
||||
"Samurai": "Hattori"
|
||||
"Sorcerer": "Pender"
|
||||
"Trapper": "Senick"
|
||||
"Champion": "Ida"
|
||||
"Duelist": "Alejandro"
|
||||
}
|
||||
map[@get('name')]
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ module.exports = class User extends CocoModel
|
|||
Math.floor gemsEarned + gemsPurchased - gemsSpent
|
||||
|
||||
heroes: ->
|
||||
heroes = (me.get('purchased')?.heroes ? []).concat([ThangType.heroes.captain, ThangType.heroes.knight])
|
||||
heroes = (me.get('purchased')?.heroes ? []).concat([ThangType.heroes.captain, ThangType.heroes.knight, ThangType.heroes.champion, ThangType.heroes.duelist])
|
||||
#heroes = _.values ThangType.heroes if me.isAdmin()
|
||||
heroes
|
||||
items: -> (me.get('earned')?.items ? []).concat(me.get('purchased')?.items ? []).concat([ThangType.items['simple-boots']])
|
||||
|
|
|
@ -72,10 +72,10 @@ $heroCanvasHeight: 275px
|
|||
|
||||
#hero-carousel
|
||||
width: 750px
|
||||
height: 386px
|
||||
height: 436px
|
||||
position: absolute
|
||||
left: 34px
|
||||
top: 117px
|
||||
top: 67px
|
||||
|
||||
.carousel-indicator-container
|
||||
position: relative
|
||||
|
@ -90,10 +90,15 @@ $heroCanvasHeight: 275px
|
|||
.hero-indicator
|
||||
width: 97px
|
||||
height: 98px
|
||||
margin: 0 -11px
|
||||
margin: 0 -11px -20px -11px
|
||||
position: relative
|
||||
background: url(/images/pages/play/modal/hero-portrait.png)
|
||||
border: none
|
||||
float: left
|
||||
|
||||
&:nth-child(15), &:nth-child(16)
|
||||
float: right
|
||||
|
||||
&.active
|
||||
background: url(/images/pages/play/modal/hero-portrait-selected.png)
|
||||
z-index: 5
|
||||
|
@ -244,7 +249,7 @@ $heroCanvasHeight: 275px
|
|||
a.left, a.right
|
||||
color: rgb(74,61,51)
|
||||
position: absolute
|
||||
top: 195px
|
||||
top: 245px
|
||||
width: 40px
|
||||
height: 84px
|
||||
font-size: 24px
|
||||
|
|
|
@ -100,8 +100,10 @@ module.exports = class LevelHUDView extends CocoView
|
|||
@stage?.stopTalking()
|
||||
|
||||
createProperties: ->
|
||||
if @thang.id in ['Hero Placeholder', 'Hero Placeholder 1']
|
||||
name = {knight: 'Tharin', captain: 'Anya', librarian: 'Hushbaum', sorcerer: 'Pender', 'potion-master': 'Omarn', samurai: 'Hattori', ninja: 'Amara', raider: 'Arryn', goliath: 'Okar', guardian: 'Illia', pixie: 'Zana', assassin: 'Ritic', necromancer: 'Nalfar', 'dark-wizard': 'Usara'}[@thang.type] ? 'Hero'
|
||||
if @options.level.get('type') in ['game-dev']
|
||||
name = 'Game' # TODO: we don't need the HUD at all
|
||||
else if @thang.id in ['Hero Placeholder', 'Hero Placeholder 1']
|
||||
name = @thangType?.getHeroShortName() or 'Hero'
|
||||
else
|
||||
name = @thang.hudName or (if @thang.type then "#{@thang.id} - #{@thang.type}" else @thang.id)
|
||||
utils.replaceText @$el.find('.thang-name'), name
|
||||
|
|
|
@ -676,8 +676,8 @@ module.exports = class InventoryModal extends ModalView
|
|||
|
||||
|
||||
heroGenders =
|
||||
male: ['knight', 'samurai', 'trapper', 'potion-master', 'goliath', 'assassin', 'necromancer']
|
||||
female: ['captain', 'ninja', 'forest-archer', 'librarian', 'sorcerer', 'raider', 'guardian', 'pixie', 'dark-wizard']
|
||||
male: ['knight', 'samurai', 'trapper', 'potion-master', 'goliath', 'assassin', 'necromancer', 'duelist']
|
||||
female: ['captain', 'ninja', 'forest-archer', 'librarian', 'sorcerer', 'raider', 'guardian', 'pixie', 'dark-wizard', 'champion']
|
||||
|
||||
gear =
|
||||
'simple-boots': '53e237bf53457600003e3f05'
|
||||
|
|
|
@ -176,6 +176,7 @@ module.exports = class PlayHeroesModal extends ModalView
|
|||
m = multiplier
|
||||
m *= 0.75 if fullHero.get('slug') in ['knight', 'samurai', 'librarian', 'sorcerer', 'necromancer'] # These heroes are larger for some reason. Shrink 'em.
|
||||
m *= 0.4 if fullHero.get('slug') is 'goliath' # Just too big!
|
||||
m *= 0.9 if fullHero.get('slug') is 'champion' # Gotta fit her hair in there
|
||||
layer.container.scaleX = layer.container.scaleY = m
|
||||
layer.container.children[0].x = 160/m
|
||||
layer.container.children[0].y = 250/m
|
||||
|
|
Loading…
Reference in a new issue