mirror of
https://github.com/RussellChamp/GrimoireJS.git
synced 2026-10-27 22:42:32 +00:00
Updated the printing of deities and intelligent items
This commit is contained in:
1 parent
d8b4dd54e3
commit
9060276ee7
2 files changed
+9
-2
No files matched your search
+8
-1
@@ -26,5 +26,12 @@ Grimoire.getDeities = function() {
|
|||||||
Grimoire.getDeity = function(alignment1, alignment2) {
|
Grimoire.getDeity = function(alignment1, alignment2) {
|
||||||
if(alignment1 === undefined) alignment1 = _.sample(['lawful', 'neutral', 'chaotic']);
|
if(alignment1 === undefined) alignment1 = _.sample(['lawful', 'neutral', 'chaotic']);
|
||||||
if(alignment2 === undefined) alignment2 = _.sample(['good', 'neutral', 'evil']);
|
if(alignment2 === undefined) alignment2 = _.sample(['good', 'neutral', 'evil']);
|
||||||
return _.sample(Grimoire.getDeities()[alignment1][alignment2]);
|
var alignmentString = "";
|
||||||
|
if(alignment1 === 'neutral' && alignment2 === 'neutral') {
|
||||||
|
alignmentString = ' (true neutral)';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
alignmentString = ' (' + alignment1 + ' ' + alignment2 + ')';
|
||||||
|
}
|
||||||
|
return _.sample(Grimoire.getDeities()[alignment1][alignment2]) + alignmentString;
|
||||||
};
|
};
|
||||||
+1
-1
@@ -356,7 +356,7 @@ Intelligence.getItemIntelligence = function(basePrice) {
|
|||||||
if(this.purpose.description) {
|
if(this.purpose.description) {
|
||||||
retStr += ';Purpose: ' + this.purpose.description;
|
retStr += ';Purpose: ' + this.purpose.description;
|
||||||
this.dedicatedPowers.forEach(function(p, index) {
|
this.dedicatedPowers.forEach(function(p, index) {
|
||||||
retStr += ((index === 0) ? ', Dedicated Powers: ' : ', ') + p.description;
|
retStr += ((index === 0) ? ';Dedicated Powers: ' : ', ') + p.description;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
retStr += ';Cost: ' + this.cost;
|
retStr += ';Cost: ' + this.cost;
|
||||||
|
|||||||
Reference in new issue
Block a user