mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
removing weird spacing
This commit is contained in:
parent
b4b3df51de
commit
8add2b4116
1 changed files with 124 additions and 124 deletions
|
|
@ -3,10 +3,10 @@ api = module.exports
|
||||||
moment = require 'moment'
|
moment = require 'moment'
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Gear (Weapons, Armor, Head, Shield)
|
Gear (Weapons, Armor, Head, Shield)
|
||||||
Item definitions: {index, text, notes, value, str, def, int, per, classes, type}
|
Item definitions: {index, text, notes, value, str, def, int, per, classes, type}
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
###
|
###
|
||||||
|
|
||||||
classes = ['warrior', 'rogue', 'healer', 'wizard']
|
classes = ['warrior', 'rogue', 'healer', 'wizard']
|
||||||
|
|
@ -236,8 +236,8 @@ gear =
|
||||||
springHealer: event: events.spring, specialClass: 'healer', text: 'Yellow Dog Ears', notes: 'Floppy but cute. Wanna play? Confers no stat bonus. Limited Edition 2014 Spring Gear.', value: 20
|
springHealer: event: events.spring, specialClass: 'healer', text: 'Yellow Dog Ears', notes: 'Floppy but cute. Wanna play? Confers no stat bonus. Limited Edition 2014 Spring Gear.', value: 20
|
||||||
|
|
||||||
###
|
###
|
||||||
The gear is exported as a tree (defined above), and a flat list (eg, {weapon_healer_1: .., shield_special_0: ...}) since
|
The gear is exported as a tree (defined above), and a flat list (eg, {weapon_healer_1: .., shield_special_0: ...}) since
|
||||||
they are needed in different froms at different points in the app
|
they are needed in different froms at different points in the app
|
||||||
###
|
###
|
||||||
api.gear =
|
api.gear =
|
||||||
tree: gear
|
tree: gear
|
||||||
|
|
@ -265,48 +265,48 @@ _.each gearTypes, (type) ->
|
||||||
api.gear.flat[key] = item
|
api.gear.flat[key] = item
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Potion
|
Potion
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
###
|
###
|
||||||
|
|
||||||
api.potion = type: 'potion', text: "Health Potion", notes: "Recover 15 Health (Instant Use)", value: 25, key: 'potion'
|
api.potion = type: 'potion', text: "Health Potion", notes: "Recover 15 Health (Instant Use)", value: 25, key: 'potion'
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Classes
|
Classes
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
###
|
###
|
||||||
|
|
||||||
api.classes = classes
|
api.classes = classes
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Gear Types
|
Gear Types
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
###
|
###
|
||||||
|
|
||||||
api.gearTypes = gearTypes
|
api.gearTypes = gearTypes
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Spells
|
Spells
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Text, notes, and mana are obvious. The rest:
|
Text, notes, and mana are obvious. The rest:
|
||||||
|
|
||||||
* {target}: one of [task, self, party, user]. This is very important, because if the cast() function is expecting one
|
* {target}: one of [task, self, party, user]. This is very important, because if the cast() function is expecting one
|
||||||
thing and receives another, it will cause errors. `self` is used for self buffs, multi-task debuffs, AOEs (eg, meteor-shower),
|
thing and receives another, it will cause errors. `self` is used for self buffs, multi-task debuffs, AOEs (eg, meteor-shower),
|
||||||
etc. Basically, use self for anything that's not [task, party, user] and is an instant-cast
|
etc. Basically, use self for anything that's not [task, party, user] and is an instant-cast
|
||||||
|
|
||||||
* {cast}: the function that's run to perform the ability's action. This is pretty slick - because this is exported to the
|
* {cast}: the function that's run to perform the ability's action. This is pretty slick - because this is exported to the
|
||||||
web, this function can be performed on the client and on the server. `user` param is self (needed for determining your
|
web, this function can be performed on the client and on the server. `user` param is self (needed for determining your
|
||||||
own stats for effectiveness of cast), and `target` param is one of [task, party, user]. In the case of `self` spells,
|
own stats for effectiveness of cast), and `target` param is one of [task, party, user]. In the case of `self` spells,
|
||||||
you act on `user` instead of `target`. You can trust these are the correct objects, as long as the `target` attr of the
|
you act on `user` instead of `target`. You can trust these are the correct objects, as long as the `target` attr of the
|
||||||
spell is correct. Take a look at habitrpg/src/models/user.js and habitrpg/src/models/task.js for what attributes are
|
spell is correct. Take a look at habitrpg/src/models/user.js and habitrpg/src/models/task.js for what attributes are
|
||||||
available on each model. Note `task.value` is its "redness". If party is passed in, it's an array of users,
|
available on each model. Note `task.value` is its "redness". If party is passed in, it's an array of users,
|
||||||
so you'll want to iterate over them like: `_.each(target,function(member){...})`
|
so you'll want to iterate over them like: `_.each(target,function(member){...})`
|
||||||
|
|
||||||
Note, user.stats.mp is docked after automatically (it's appended to functions automatically down below in an _.each)
|
Note, user.stats.mp is docked after automatically (it's appended to functions automatically down below in an _.each)
|
||||||
###
|
###
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -525,9 +525,9 @@ _.each api.spells, (spellClass) ->
|
||||||
api.special = api.spells.special
|
api.special = api.spells.special
|
||||||
|
|
||||||
###
|
###
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
Drops
|
Drops
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
###
|
###
|
||||||
|
|
||||||
api.dropEggs =
|
api.dropEggs =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue