|
|
@@ -47,34 +47,50 @@ cc.Class({
|
|
|
this.item_name = "左手拳套";
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "攻击"; //主属性类型
|
|
|
+
|
|
|
//白 * (白色装备:主属性1)
|
|
|
if (gradetype == 0) {
|
|
|
+ this.spriteFrame_name = "left_gloves1";
|
|
|
this.item_master_value = 1;
|
|
|
this.item_Attached_num = 0; //附属属性数量
|
|
|
- this.item_Attached_type = 0; //10种类型附属属性
|
|
|
- this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ if (this.item_Attached_num == 0) return;
|
|
|
+ else {
|
|
|
+ for (let i = 0; i < this.item_Attached_num; i++) {
|
|
|
+ this.item_Attached_type[i] = 0; //10种类型附属属性
|
|
|
+
|
|
|
+ this.item_Attached_value[i] = 0; //附属属性类型值
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
+ this.spriteFrame_name = "left_gloves2";
|
|
|
this.item_master_value = this.random_num(1, 2); //主属性值
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
+ this.spriteFrame_name = "left_gloves3";
|
|
|
this.item_master_value = this.random_num(1, 3); //主属性值
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
+ this.spriteFrame_name = "left_gloves4";
|
|
|
this.item_master_value = this.random_num(1, 4); //主属性值
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
+
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -82,6 +98,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "left_gloves5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 1) {
|
|
|
@@ -89,7 +106,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "连击率"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "right_gloves1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -97,6 +120,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "right_gloves2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -104,6 +128,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "right_gloves3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -111,6 +136,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "right_gloves4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -118,6 +144,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "right_gloves5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 2) {
|
|
|
@@ -125,7 +152,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "防御"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "clothes1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -133,6 +166,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "clothes2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -140,6 +174,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "clothes3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -147,6 +182,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "clothes4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -154,6 +190,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "clothes5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 3) {
|
|
|
@@ -161,7 +198,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "血量"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "trousers1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -169,6 +212,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "trousers2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -176,6 +220,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "trousers3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -183,6 +228,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "trousers4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -190,6 +236,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "trousers5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 4) {
|
|
|
@@ -197,7 +244,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "蓝量"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "belt1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -205,6 +258,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "belt2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -212,6 +266,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "belt3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -219,6 +274,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "belt4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -226,6 +282,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "belt5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 5) {
|
|
|
@@ -233,7 +290,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "格挡回血量"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "helmet1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -241,6 +304,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "helmet2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -248,6 +312,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "helmet3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -255,6 +320,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "helmet4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -262,6 +328,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "helmet5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 6) {
|
|
|
@@ -269,7 +336,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "暴击率"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "necklace1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -277,6 +350,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "necklace2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -284,6 +358,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "necklace3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -291,6 +366,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "necklace4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -298,6 +374,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "necklace5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 7) {
|
|
|
@@ -305,7 +382,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "闪避回蓝量"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "shoe1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -313,6 +396,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "shoe2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -320,6 +404,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "shoe3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -327,6 +412,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "shoe4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -334,6 +420,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "shoe5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 8) {
|
|
|
@@ -341,7 +428,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "被动回蓝"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "wristsupport1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -349,6 +442,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "wristsupport2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -356,6 +450,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "wristsupport3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -363,6 +458,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "wristsupport4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -370,6 +466,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "wristsupport5";
|
|
|
}
|
|
|
}
|
|
|
if (item_type == 9) {
|
|
|
@@ -377,7 +474,13 @@ cc.Class({
|
|
|
this.item_grade = 0;
|
|
|
this.item_master_type = "被动回血"; //主属性类型
|
|
|
//白 * (白色装备:主属性1)
|
|
|
- if (gradetype == 0) { this.item_master_value = 1; }
|
|
|
+ if (gradetype == 0) {
|
|
|
+ this.item_master_value = 1;
|
|
|
+ this.item_Attached_num = 0; //附属属性数量
|
|
|
+ this.item_Attached_type = 0; //10种类型附属属性
|
|
|
+ this.item_Attached_value = 0; //附属属性类型值
|
|
|
+ this.spriteFrame_name = "kneecap1";
|
|
|
+ }
|
|
|
//* (绿色装备:主属性随机1-2,随机一条副属性1-1)
|
|
|
//绿 主属性值随机1-2 随机副属性条数 副属性随机属性 副属性随机属性值
|
|
|
if (gradetype == 1) {
|
|
|
@@ -385,6 +488,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 1); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "kneecap2";
|
|
|
}
|
|
|
//蓝* (蓝色装备:主属性随机1-3,随机一条副属性1-2)
|
|
|
if (gradetype == 2) {
|
|
|
@@ -392,6 +496,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(1, 1); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 2); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "kneecap3";
|
|
|
}
|
|
|
//黄 * (黄色装备:主属性随机1-4,随机两条副属性1-3)
|
|
|
if (gradetype == 3) {
|
|
|
@@ -399,6 +504,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(2, 2); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 3); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "kneecap4";
|
|
|
}
|
|
|
//红 * (红色装备:主属性随机1-5,随机三条副属性1-4)
|
|
|
if (gradetype == 4) {
|
|
|
@@ -406,6 +512,7 @@ cc.Class({
|
|
|
this.item_Attached_num = this.random_num(3, 3); //附属属性数量
|
|
|
this.item_Attached_type = this.random_num(0, 9); //10种类型附属属性
|
|
|
this.item_Attached_value = this.random_num(1, 4); //附属属性类型值
|
|
|
+ this.spriteFrame_name = "kneecap5";
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -415,6 +522,19 @@ cc.Class({
|
|
|
random_num(minnum, maxnum) {
|
|
|
return Math.floor(Math.random() * (maxnum - minnum + 1)) + minnum;
|
|
|
},
|
|
|
+
|
|
|
+ _item_name(itemnum) { //物品名字
|
|
|
+ if (itemnum == 0) return "左手拳套";
|
|
|
+ if (itemnum == 1) return "右手拳套";
|
|
|
+ if (itemnum == 2) return "衣服";
|
|
|
+ if (itemnum == 3) return "裤子";
|
|
|
+ if (itemnum == 4) return "腰带";
|
|
|
+ if (itemnum == 5) return "头盔";
|
|
|
+ if (itemnum == 6) return "项链";
|
|
|
+ if (itemnum == 7) return "鞋子";
|
|
|
+ if (itemnum == 8) return "手套";
|
|
|
+ if (itemnum == 9) return "护膝";
|
|
|
+ }
|
|
|
// //随机品级
|
|
|
// random_grade(maxnum) { //max 5
|
|
|
// return Math.floor(Math.random() * maxnum); //[0-4]
|