forum-ch-17
Advanced tools
Comparing version 0.0.20 to 0.0.21
{ | ||
"name": "forum-ch-17", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "vueComponents.js", |
@@ -41,3 +41,3 @@ Vue.component('listado-poderes', { | ||
Vue.component('cuerpo-expediente', { | ||
props: ['race', 'group', 'rank', 'attributes', 'efforts', 'proficienciesGeneral', 'proficienciesCombat', 'powers', 'equipment'], | ||
props: ['race', 'group', 'rank', 'attributes', 'efforts', 'generalProficiencies', 'combatProficiencies', 'powers', 'equipment'], | ||
computed: { | ||
@@ -170,3 +170,3 @@ characterBonus() { | ||
}); | ||
}).flat(); | ||
}); | ||
}, | ||
@@ -173,0 +173,0 @@ characterPowers() { |
@@ -1,1 +0,1 @@ | ||
Vue.component("listado-poderes",{props:["type"],data(){return{list:forumPowers[this.type].filter(e=>!1===e.hidden)}},template:'\n <ul>\n <li v-for="item in list" :key="item.name">\n <strong>{{ item.name }}</strong><br>\n <template v-for="(message, index) in item.content" :key="index">\n <span v-html="message"></span>. \n </template>\n </li>\n </ul>\n '}),Vue.component("listado-tienda",{props:["type"],data(){return{list:forumItems[this.type].filter(e=>!1===e.hidden)}},template:'\n <ul>\n <li v-for="item in list" :key="item.name">\n <strong>{{ item.name }} (<em>{{ item.price }}</em>)</strong><br>\n <span v-html="item.description"></span>. \n <template v-for="(message, index) in item.content" :key="index">\n <span v-html="message"></span>. \n </template>\n </li>\n </ul>\n '}),Vue.component("cuerpo-expediente",{props:["race","group","rank","attributes","efforts","proficienciesGeneral","proficienciesCombat","powers","equipment"],computed:{characterBonus(){const e=parseInt(this.rank);return e<1?0:e<4?2:e<7?4:6},characterHearts(){const e=parseInt(this.rank);return e<5?1:e<10?5:7},characterAttributes(){return this.attributes.split(",").map((e,t)=>{let r,a;switch(t){case 1:r="Destreza",a="DES";break;case 2:r="Constitución",a="CON";break;case 3:r="Inteligencia",a="INT";break;case 4:r="Sabiduría",a="SAB";break;case 5:r="Carisma",a="CAR";break;default:r="Fuerza",a="FUE"}return{name:r,short:a,value:parseInt(e)}})},characterEfforts(){return this.efforts.split(",").map((e,t)=>{let r,a;switch(t){case 1:r="Avanzado",a=4;break;case 2:r="Tecnológico",a=6;break;case 3:r="Biótico",a=6;break;case 4:r="Crítico",a=8;break;default:r="Básico",a=2}return{name:r,value:a+parseInt(e)}})},characterGeneralSkills(){const e={FUE:["Atletismo"],DES:["Juego de Manos","Manejo de Vehículos","Sigilo"],INT:["Ciencia","Electrónica","Historia"],SAB:["Perspicacia","Supervivencia","Trato con Animales"],CAR:["Engaño","Intimidación","Persuasión"]},t=this.generalProficiencies.split(",");return Object.entries(e).map(e=>{const r=this.characterAttributes.find(t=>t.short=e[0]).value;return e[1].map(a=>({name:a,atribute:e[0],value:r+(t.indexOf(a)>-1?this.characterBonus:0)}))})},characterPowers(){return this.powers.split(",").sort().map(e=>e.trim())},characterEquipment(){return this.equipment.split(",").sort().map(e=>e.trim())}},template:'\n <cuerpo-interior title="Características">\n <div class="character-hearts">\n <i class="fa-solid fa-heart"></i> x{{ characterHearts }}\n </div>\n <div class="character-bonus">\n +{{ characterBonus }}\n </div>\n <ul class="character-attributes">\n <li v-for="attribute in characterAttributes"><template v-if="attribute.value > 0">+</template>{{ attribute.value }} {{ attribute.name }}</li>\n </ul>\n <div class="character-proficiencies">\n </div>\n <ul class="character-efforts">\n <li v-for="effort in characterEfforts"><template v-if="effort.value > 0">+</template>{{ effort.value }} Esfuerzo {{ effort.name }}</li>\n </ul>\n <ul class="character-powers">\n <li v-for="power in characterPowers">{{ power }}</li>\n </ul>\n <ul class="character-equipment">\n <li v-for="item in characterEquipment">{{ item }}</li>\n </ul>\n </cuerpo-interior>\n '}); | ||
Vue.component("listado-poderes",{props:["type"],data(){return{list:forumPowers[this.type].filter(e=>!1===e.hidden)}},template:'\n <ul>\n <li v-for="item in list" :key="item.name">\n <strong>{{ item.name }}</strong><br>\n <template v-for="(message, index) in item.content" :key="index">\n <span v-html="message"></span>. \n </template>\n </li>\n </ul>\n '}),Vue.component("listado-tienda",{props:["type"],data(){return{list:forumItems[this.type].filter(e=>!1===e.hidden)}},template:'\n <ul>\n <li v-for="item in list" :key="item.name">\n <strong>{{ item.name }} (<em>{{ item.price }}</em>)</strong><br>\n <span v-html="item.description"></span>. \n <template v-for="(message, index) in item.content" :key="index">\n <span v-html="message"></span>. \n </template>\n </li>\n </ul>\n '}),Vue.component("cuerpo-expediente",{props:["race","group","rank","attributes","efforts","generalProficiencies","combatProficiencies","powers","equipment"],computed:{characterBonus(){const e=parseInt(this.rank);return e<1?0:e<4?2:e<7?4:6},characterHearts(){const e=parseInt(this.rank);return e<5?1:e<10?5:7},characterAttributes(){return this.attributes.split(",").map((e,t)=>{let r,a;switch(t){case 1:r="Destreza",a="DES";break;case 2:r="Constitución",a="CON";break;case 3:r="Inteligencia",a="INT";break;case 4:r="Sabiduría",a="SAB";break;case 5:r="Carisma",a="CAR";break;default:r="Fuerza",a="FUE"}return{name:r,short:a,value:parseInt(e)}})},characterEfforts(){return this.efforts.split(",").map((e,t)=>{let r,a;switch(t){case 1:r="Avanzado",a=4;break;case 2:r="Tecnológico",a=6;break;case 3:r="Biótico",a=6;break;case 4:r="Crítico",a=8;break;default:r="Básico",a=2}return{name:r,value:a+parseInt(e)}})},characterGeneralSkills(){const e={FUE:["Atletismo"],DES:["Juego de Manos","Manejo de Vehículos","Sigilo"],INT:["Ciencia","Electrónica","Historia"],SAB:["Perspicacia","Supervivencia","Trato con Animales"],CAR:["Engaño","Intimidación","Persuasión"]},t=this.generalProficiencies.split(",");return Object.entries(e).map(e=>{const r=this.characterAttributes.find(t=>t.short=e[0]).value;return e[1].map(a=>({name:a,atribute:e[0],value:r+(t.indexOf(a)>-1?this.characterBonus:0)}))})},characterPowers(){return this.powers.split(",").sort().map(e=>e.trim())},characterEquipment(){return this.equipment.split(",").sort().map(e=>e.trim())}},template:'\n <cuerpo-interior title="Características">\n <div class="character-hearts">\n <i class="fa-solid fa-heart"></i> x{{ characterHearts }}\n </div>\n <div class="character-bonus">\n +{{ characterBonus }}\n </div>\n <ul class="character-attributes">\n <li v-for="attribute in characterAttributes"><template v-if="attribute.value > 0">+</template>{{ attribute.value }} {{ attribute.name }}</li>\n </ul>\n <div class="character-proficiencies">\n </div>\n <ul class="character-efforts">\n <li v-for="effort in characterEfforts"><template v-if="effort.value > 0">+</template>{{ effort.value }} Esfuerzo {{ effort.name }}</li>\n </ul>\n <ul class="character-powers">\n <li v-for="power in characterPowers">{{ power }}</li>\n </ul>\n <ul class="character-equipment">\n <li v-for="item in characterEquipment">{{ item }}</li>\n </ul>\n </cuerpo-interior>\n '}); |
10280