Revival of the GrimoireJS project

This commit is contained in:
Russell Champoux committed 2015-01-20 16:33:27 -05:00
1 parent 6845ce4a5f
commit c190be3236
20 files changed
+3652

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
/*global _:false */
/*global Grimoire:true */
'use strict';
Grimoire.getDeities = function() {
//list of deities and their allignments
//dieties['lawful/neutral/chaotic']['good/neutral/evil'] = [gods]
return {
'lawful': {
'good' : ['Erastil', 'Iomedae', 'Torag'],
'neutral' : ['Abadar', 'Irori'],
'evil' : ['Asmodeus', 'Zon-Kuthon']
},
'neutral': {
'good' : ['Sarenrae'],
'neutral' : ['Gozreh', 'Pharasma', 'Nethys'],
'evil' : ['Urgathoa', 'Norgorber'],
},
'chaotic' : {
'good' : ['Desna', 'Cayden Cailean'],
'neutral' : ['Gorum', 'Calistria'],
'evil' : ['Lamashtu', 'Rovagug'],
},
};
};
Grimoire.getDeity = function(alignment1, alignment2) {
if(alignment1 === undefined) alignment1 = _.sample(['lawful', 'neutral', 'chaotic']);
if(alignment2 === undefined) alignment2 = _.sample(['good', 'neutral', 'evil']);
return _.sample(Grimoire.getDeities()[alignment1][alignment2]);
};