mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
Update sheet_RMU_v1.0.html
This commit is contained in:
@@ -10772,164 +10772,6 @@ on('change:vegetationclear', function() {
|
||||
});
|
||||
});
|
||||
|
||||
// <!---- Parse the treasures out of the treasure codes ---->
|
||||
on('change:treasurecode', function() {
|
||||
//console.log('------------looks like we got us some treasure, lads---------------');
|
||||
getAttrs(['treasurecode'], function(values) {
|
||||
//console.log('/* ---------- treasurecode: '+values.treasurecode+' ------------ */');
|
||||
var treasure='';
|
||||
var count=0;
|
||||
if((values.treasurecode)==null)
|
||||
values.treasurecode = '-';
|
||||
//console.log('/* 0---------- treasurecode: '+values.treasurecode+' ---- treasure: '+values.treasure+'---count:'+values.count+' ------------ */');
|
||||
if(values.treasurecode.includes('a')) {
|
||||
//console.log('------------it be an a, eh?---------------');
|
||||
count=values.treasurecode.split('a').length-1;
|
||||
//console.log('/* 1---------- treasure: '+values.treasure+'---count:'+values.count+' ------------ */');
|
||||
treasure += count+'x Items= Very Poor & '+ count+'x Wealth = Very Poor; ';
|
||||
//console.log('/* 2---------- treasure: '+values.treasure+'---count:'+values.count+' ------------ */');
|
||||
}
|
||||
if(values.treasurecode.includes('b')){
|
||||
count=values.treasurecode.split('b').length-1;
|
||||
treasure += count+'x Items= Very Poor & '+ count+'x Wealth = Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('c')){
|
||||
count=values.treasurecode.split('c').length-1;
|
||||
treasure += count+'x Items= Very Poor & '+ count+'x Wealth = Normal; ';
|
||||
}
|
||||
if(values.treasurecode.includes('d')){
|
||||
count=values.treasurecode.split('d').length-1;
|
||||
treasure += count+'x Items= Very Poor & '+ count+'x Wealth = Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('e')){
|
||||
count=values.treasurecode.split('e').length-1;
|
||||
treasure += count+'x Items= Very Poor & '+ count+'x Wealth = Very Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('f')){
|
||||
count=values.treasurecode.split('f').length-1;
|
||||
treasure += count+'x Items= Poor & '+ count+'x Wealth = Very Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('g')){
|
||||
count=values.treasurecode.split('g').length-1;
|
||||
treasure += count+'x Items= Poor & '+ count+'x Wealth = Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('h')){
|
||||
count=values.treasurecode.split('h').length-1;
|
||||
treasure += count+'x Items= Poor & '+ count+'x Wealth = Normal; ';
|
||||
}
|
||||
if(values.treasurecode.includes('i')){
|
||||
count=values.treasurecode.split('i').length-1;
|
||||
treasure += count+'x Items= Poor & '+ count+'x Wealth = Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('j')){
|
||||
count=values.treasurecode.split('j').length-1;
|
||||
treasure += count+'x Items= Poor & '+ count+'x Wealth = Very Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('k')){
|
||||
count=values.treasurecode.split('k').length-1;
|
||||
treasure += count+'x Items= Normal & '+ count+'x Wealth = Very Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('l')){
|
||||
count=values.treasurecode.split('l').length-1;
|
||||
treasure += count+'x Items= Normal & '+ count+'x Wealth = Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('m')){
|
||||
count=values.treasurecode.split('m').length-1;
|
||||
treasure += count+'x Items= Normal & '+ count+'x Wealth = Normal; ';
|
||||
}
|
||||
if(values.treasurecode.includes('n')){
|
||||
count=values.treasurecode.split('n').length-1;
|
||||
treasure += count+'x Items= Normal & '+ count+'x Wealth = Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('o')){
|
||||
count=values.treasurecode.split('o').length-1;
|
||||
treasure += count+'x Items= Normal & '+ count+'x Wealth = Very Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('p')){
|
||||
count=values.treasurecode.split('p').length-1;
|
||||
treasure += count+'x Items= Rich & '+ count+'x Wealth = Very Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('q')){
|
||||
count=values.treasurecode.split('q').length-1;
|
||||
treasure += count+'x Items= Rich & '+ count+'x Wealth = Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('r')){
|
||||
count=values.treasurecode.split('r').length-1;
|
||||
treasure += count+'x Items= Rich & '+ count+'x Wealth = Normal; ';
|
||||
}
|
||||
if(values.treasurecode.includes('s')){
|
||||
count=values.treasurecode.split('s').length-1;
|
||||
treasure += count+'x Items= Rich & '+ count+'x Wealth = Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('t')){
|
||||
count=values.treasurecode.split('t').length-1;
|
||||
treasure += count+'x Items= Rich & '+ count+'x Wealth = Very Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('u')){
|
||||
count=values.treasurecode.split('u').length-1;
|
||||
treasure += count+'x Items= Very Rich & '+ count+'x Wealth = Very Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('v')){
|
||||
count=values.treasurecode.split('v').length-1;
|
||||
treasure += count+'x Items= Very Rich & '+ count+'x Wealth = Poor; ';
|
||||
}
|
||||
if(values.treasurecode.includes('w')){
|
||||
count=values.treasurecode.split('w').length-1;
|
||||
treasure += count+'x Items= Very Rich & '+ count+'x Wealth = Normal; ';
|
||||
}
|
||||
if(values.treasurecode.includes('x')){
|
||||
count=values.treasurecode.split('x').length-1;
|
||||
treasure += count+'x Items= Very Rich & '+ count+'x Wealth = Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('y')){
|
||||
count=values.treasurecode.split('y').length-1;
|
||||
treasure += count+'x Items= Very Rich & '+ count+'x Wealth = Very Rich; ';
|
||||
}
|
||||
if(values.treasurecode.includes('z')){
|
||||
count=values.treasurecode.split('z').length-1;
|
||||
treasure += count+'x Items= Special & '+ count+'x Wealth = Special; ';
|
||||
}
|
||||
if(values.treasurecode.includes('*'))
|
||||
treasure += 'Special, see description. ';
|
||||
if(values.treasurecode.includes('-'))
|
||||
treasure = '--';
|
||||
if(values.treasurecode.includes(' '))
|
||||
treasure = '-';
|
||||
setAttrs({
|
||||
npctreasure: treasure
|
||||
});
|
||||
});
|
||||
});
|
||||
// npctreasure= the treasures
|
||||
// treasurecode= the codes
|
||||
// "Special; see description" = *
|
||||
// "Items= Very Poor; Wealth = Very Poor;" = a
|
||||
// "Items= Very Poor; Wealth = Poor;" = b
|
||||
// "Items= Very Poor; Wealth = Normal;" = c
|
||||
// "Items= Very Poor; Wealth = Rich;" = d
|
||||
// "Items= Very Poor; Wealth = Very Rich;" = e
|
||||
// "Items= Poor; Wealth = Very Poor;" = f
|
||||
// "Items= Poor; Wealth = Poor;" = g
|
||||
// "Items= Poor; Wealth = Normal;" = h
|
||||
// "Items= Poor; Wealth = Rich;" = i
|
||||
// "Items= Poor; Wealth = Very Rich;" = j
|
||||
// "Items= Normal; Wealth = Very Poor;" = k
|
||||
// "Items= Normal; Wealth = Poor;" = l
|
||||
// "Items= Normal; Wealth = Normal;" = m
|
||||
// "Items= Normal; Wealth = Rich;" = n
|
||||
// "Items= Normal; Wealth = Very Rich;" = o
|
||||
// "Items= Rich; Wealth = Very Poor;" = p
|
||||
// "Items= Rich; Wealth = Poor;" = q
|
||||
// "Items= Rich; Wealth = Normal;" = r
|
||||
// "Items= Rich; Wealth = Rich;" = s
|
||||
// "Items= Rich; Wealth = Very Rich;" = t
|
||||
// "Items= Very Rich; Wealth = Very Poor;" = u
|
||||
// "Items= Very Rich; Wealth = Poor;" = v
|
||||
// "Items= Very Rich; Wealth = Normal;" = w
|
||||
// "Items= Very Rich; Wealth = Rich;" = x
|
||||
// "Items= Very Rich; Wealth = Very Rich;" = y
|
||||
// "Items= Special; Wealth = Special;" = z
|
||||
|
||||
|
||||
// <!---- Parse the NPC JSON code to import an NPC ---->
|
||||
on('change:npcimportcheckbox', function(){
|
||||
|
||||
Reference in New Issue
Block a user