Added Missile ThangType kind and a couple misc hero data tweaks.

This commit is contained in:
Nick Winter 2014-10-30 15:56:49 -07:00
parent 47c090f7c7
commit cec8350232
3 changed files with 13 additions and 3 deletions
app
lib/world
schemas/models
server/levels/thangs

View file

@ -323,6 +323,7 @@ module.exports.thangNames = thangNames =
'Letholdus'
]
'Potion Master': [
'Omar'
'Snake'
'Amaranth'
'Zander'
@ -379,3 +380,12 @@ module.exports.thangNames = thangNames =
'Helena'
'Philips'
]
'Ninja': [
'Amara'
]
'Sorcerer': [
'Pender'
]
'Samurai': [
'Hattori'
]

View file

@ -105,7 +105,7 @@ _.extend ThangTypeSchema.properties,
shapes: c.object {title: 'Shapes', additionalProperties: ShapeObjectSchema}
containers: c.object {title: 'Containers', additionalProperties: ContainerObjectSchema}
animations: c.object {title: 'Animations', additionalProperties: RawAnimationObjectSchema}
kind: c.shortString {enum: ['Unit', 'Floor', 'Wall', 'Doodad', 'Misc', 'Mark', 'Item', 'Hero'], default: 'Misc', title: 'Kind'}
kind: c.shortString {enum: ['Unit', 'Floor', 'Wall', 'Doodad', 'Misc', 'Mark', 'Item', 'Hero', 'Missile'], default: 'Misc', title: 'Kind'}
terrains: c.array {title: 'Terrains', description: 'If specified, limits this ThangType to levels with matching terrains.', uniqueItems: true}, c.terrainString
gems: {type: 'integer', minimum: 0, title: 'Gem Cost', description: 'How many gems this item or hero costs.'}
heroClass: {type: 'string', enum: ['Warrior', 'Ranger', 'Wizard'], title: 'Hero Class', description: 'What class this is (if a hero) or is restricted to (if an item). Leave undefined for most items.'}

View file

@ -62,8 +62,8 @@ ThangTypeHandler = class ThangTypeHandler extends Handler
query.kind = 'Item'
query.gems = {$exists: true} # Items without gems don't show up anywhere
else if req.query.view is 'heroes'
#query.kind = 'Hero' # TODO: when all the heroes are tagged, just use this
query.original = {$in: _.values heroes} # TODO: when all the heroes are tagged, don't do this
#query.kind = 'Hero' # TODO: when ChooseHeroView is refactored, just use this
query.original = {$in: _.values heroes} # TODO: when ChooseHeroView is refactored, don't do this
else if req.query.view is 'i18n-coverage'
query.i18nCoverage = {$exists: true}