上传战斗优化
This commit is contained in:
parent
1cd38733aa
commit
7a331ccefb
File diff suppressed because it is too large
Load Diff
93
bin/json/game_itemlink.json
Normal file
93
bin/json/game_itemlink.json
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 122,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain122",
|
||||||
|
"text": "金币商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain122",
|
||||||
|
"text": "金币商店"
|
||||||
|
},
|
||||||
|
"jumpid": 122,
|
||||||
|
"icon": "icon_sd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 123,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain123",
|
||||||
|
"text": "钻石商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain123",
|
||||||
|
"text": "钻石商店"
|
||||||
|
},
|
||||||
|
"jumpid": 123,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 124,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain124",
|
||||||
|
"text": "友情商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain124",
|
||||||
|
"text": "友情商店"
|
||||||
|
},
|
||||||
|
"jumpid": 124,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 125,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain125",
|
||||||
|
"text": "竞技商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain125",
|
||||||
|
"text": "竞技商店"
|
||||||
|
},
|
||||||
|
"jumpid": 125,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 126,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain126",
|
||||||
|
"text": "公会商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain126",
|
||||||
|
"text": "公会商店"
|
||||||
|
},
|
||||||
|
"jumpid": 126,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1127,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain1127",
|
||||||
|
"text": "特殊商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain1127",
|
||||||
|
"text": "特殊商店"
|
||||||
|
},
|
||||||
|
"jumpid": 1127,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1128,
|
||||||
|
"title": {
|
||||||
|
"key": "jump_explain1128",
|
||||||
|
"text": "铁匠商店"
|
||||||
|
},
|
||||||
|
"desc": {
|
||||||
|
"key": "jump_explain1128",
|
||||||
|
"text": "铁匠商店"
|
||||||
|
},
|
||||||
|
"jumpid": 1128,
|
||||||
|
"icon": "zc_icon_04_ct"
|
||||||
|
}
|
||||||
|
]
|
@ -9,3 +9,123 @@ type (
|
|||||||
BattleFinish(out *pb.BattleFinishPush)
|
BattleFinish(out *pb.BattleFinishPush)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func AttributesTransBase(attr string) int32 {
|
||||||
|
basearrt := int32(0)
|
||||||
|
switch attr {
|
||||||
|
case "hp":
|
||||||
|
basearrt = 53
|
||||||
|
break
|
||||||
|
case "atk":
|
||||||
|
basearrt = 56
|
||||||
|
break
|
||||||
|
case "def":
|
||||||
|
basearrt = 59
|
||||||
|
break
|
||||||
|
case "hppro":
|
||||||
|
break
|
||||||
|
case "atkpro":
|
||||||
|
break
|
||||||
|
case "defpro":
|
||||||
|
break
|
||||||
|
case "speed":
|
||||||
|
basearrt = 62
|
||||||
|
break
|
||||||
|
case "cri":
|
||||||
|
basearrt = 65
|
||||||
|
break
|
||||||
|
case "cridam":
|
||||||
|
basearrt = 68
|
||||||
|
break
|
||||||
|
case "effhit":
|
||||||
|
basearrt = 71
|
||||||
|
break
|
||||||
|
case "effre":
|
||||||
|
basearrt = 74
|
||||||
|
break
|
||||||
|
case "losthold":
|
||||||
|
basearrt = 11
|
||||||
|
break
|
||||||
|
case "understand":
|
||||||
|
basearrt = 12
|
||||||
|
break
|
||||||
|
case "damre":
|
||||||
|
basearrt = 13
|
||||||
|
break
|
||||||
|
case "causedam":
|
||||||
|
basearrt = 14
|
||||||
|
break
|
||||||
|
case "treadd":
|
||||||
|
basearrt = 15
|
||||||
|
break
|
||||||
|
case "betreadd":
|
||||||
|
basearrt = 16
|
||||||
|
break
|
||||||
|
case "suckblood":
|
||||||
|
basearrt = 102
|
||||||
|
break
|
||||||
|
case "speedpro":
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return basearrt
|
||||||
|
}
|
||||||
|
|
||||||
|
func AttributesTransExt(attr string) int32 {
|
||||||
|
basearrt := int32(0)
|
||||||
|
switch attr {
|
||||||
|
case "hp":
|
||||||
|
basearrt = 77
|
||||||
|
break
|
||||||
|
case "atk":
|
||||||
|
basearrt = 80
|
||||||
|
break
|
||||||
|
case "def":
|
||||||
|
basearrt = 83
|
||||||
|
break
|
||||||
|
case "hppro":
|
||||||
|
break
|
||||||
|
case "atkpro":
|
||||||
|
break
|
||||||
|
case "defpro":
|
||||||
|
break
|
||||||
|
case "speed":
|
||||||
|
basearrt = 86
|
||||||
|
break
|
||||||
|
case "cri":
|
||||||
|
basearrt = 89
|
||||||
|
break
|
||||||
|
case "cridam":
|
||||||
|
basearrt = 92
|
||||||
|
break
|
||||||
|
case "effhit":
|
||||||
|
basearrt = 95
|
||||||
|
break
|
||||||
|
case "effre":
|
||||||
|
basearrt = 98
|
||||||
|
break
|
||||||
|
case "losthold":
|
||||||
|
basearrt = 11
|
||||||
|
break
|
||||||
|
case "understand":
|
||||||
|
basearrt = 12
|
||||||
|
break
|
||||||
|
case "damre":
|
||||||
|
basearrt = 13
|
||||||
|
break
|
||||||
|
case "causedam":
|
||||||
|
basearrt = 14
|
||||||
|
break
|
||||||
|
case "treadd":
|
||||||
|
basearrt = 15
|
||||||
|
break
|
||||||
|
case "betreadd":
|
||||||
|
basearrt = 16
|
||||||
|
break
|
||||||
|
case "suckblood":
|
||||||
|
basearrt = 102
|
||||||
|
break
|
||||||
|
case "speedpro":
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return basearrt
|
||||||
|
}
|
||||||
|
@ -672,20 +672,36 @@ func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, tid, pos int) (ro
|
|||||||
CaptainSkill: hero.CaptainSkill,
|
CaptainSkill: hero.CaptainSkill,
|
||||||
NormalSkill: hero.NormalSkill,
|
NormalSkill: hero.NormalSkill,
|
||||||
EquipSkill: hero.EquipSkill,
|
EquipSkill: hero.EquipSkill,
|
||||||
Property: make(map[string]int32),
|
Property: make(map[int32]int32),
|
||||||
}
|
}
|
||||||
for k, v := range hero.Property {
|
for k, v := range hero.Property {
|
||||||
role.Property[k] += v
|
arrt := AttributesTransBase(k)
|
||||||
|
role.Property[arrt] += v
|
||||||
|
if k == comm.Hp {
|
||||||
|
role.Currhp += v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for k, v := range hero.AddProperty {
|
for k, v := range hero.AddProperty {
|
||||||
role.Property[k] += v
|
arrt := AttributesTransExt(k)
|
||||||
|
role.Property[arrt] += v
|
||||||
|
if k == comm.Hp {
|
||||||
|
role.Currhp += v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v := range hero.JuexProperty {
|
for k, v := range hero.JuexProperty {
|
||||||
role.Property[k] += v
|
arrt := AttributesTransExt(k)
|
||||||
|
role.Property[arrt] += v
|
||||||
|
if k == comm.Hp {
|
||||||
|
role.Currhp += v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for k, v := range hero.HoroscopeProperty {
|
for k, v := range hero.HoroscopeProperty {
|
||||||
role.Property[k] += v
|
arrt := AttributesTransExt(k)
|
||||||
|
role.Property[arrt] += v
|
||||||
|
if k == comm.Hp {
|
||||||
|
role.Currhp += v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if hero.SuiteId != 0 { //主套装
|
if hero.SuiteId != 0 { //主套装
|
||||||
if suit, err := this.module.configure.Getequipsuit(hero.SuiteId); err != nil {
|
if suit, err := this.module.configure.Getequipsuit(hero.SuiteId); err != nil {
|
||||||
@ -703,7 +719,6 @@ func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, tid, pos int) (ro
|
|||||||
role.SubSuitSkill = suit.Skill
|
role.SubSuitSkill = suit.Skill
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
role.Currhp = role.Property[comm.Hp]
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -744,7 +759,7 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt
|
|||||||
Lv: hero.Lv,
|
Lv: hero.Lv,
|
||||||
CaptainSkill: hero.CaptainSkill,
|
CaptainSkill: hero.CaptainSkill,
|
||||||
NormalSkill: hero.NormalSkill,
|
NormalSkill: hero.NormalSkill,
|
||||||
Property: hero.Property,
|
Property: make(map[int32]int32),
|
||||||
Isboos: v.IsBoss,
|
Isboos: v.IsBoss,
|
||||||
Monsterid: v.Monster,
|
Monsterid: v.Monster,
|
||||||
}
|
}
|
||||||
@ -775,11 +790,15 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt
|
|||||||
roles[i].SubSuitSkill = suit.Skill
|
roles[i].SubSuitSkill = suit.Skill
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
roles[i].Property[comm.Hp] = int32(float32(roles[i].Property[comm.Hp]) * v.Hppro)
|
hero.Property[comm.Hp] = int32(float32(hero.Property[comm.Hp]) * v.Hppro)
|
||||||
roles[i].Property[comm.Atk] = int32(float32(roles[i].Property[comm.Atk]) * v.Atkpro)
|
hero.Property[comm.Atk] = int32(float32(hero.Property[comm.Atk]) * v.Atkpro)
|
||||||
roles[i].Property[comm.Def] = int32(float32(roles[i].Property[comm.Def]) * v.Defpro)
|
hero.Property[comm.Def] = int32(float32(hero.Property[comm.Def]) * v.Defpro)
|
||||||
roles[i].Property[comm.Speed] = monst.Speed
|
hero.Property[comm.Speed] = monst.Speed
|
||||||
roles[i].Currhp = roles[i].Property[comm.Hp]
|
for k, v := range hero.Property {
|
||||||
|
arrt := AttributesTransBase(k)
|
||||||
|
roles[i].Property[arrt] = v
|
||||||
|
}
|
||||||
|
roles[i].Currhp = hero.Property[comm.Hp]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ type BattleRole struct {
|
|||||||
NormalSkill []*SkillData `protobuf:"bytes,10,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
|
NormalSkill []*SkillData `protobuf:"bytes,10,rep,name=normalSkill,proto3" json:"normalSkill" bson:"normalSkill"` //普通技能
|
||||||
EquipSkill []*SkillData `protobuf:"bytes,11,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //普通技能
|
EquipSkill []*SkillData `protobuf:"bytes,11,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //普通技能
|
||||||
PandaBuff int32 `protobuf:"varint,12,opt,name=PandaBuff,proto3" json:"PandaBuff"` //熊猫buff技能id
|
PandaBuff int32 `protobuf:"varint,12,opt,name=PandaBuff,proto3" json:"PandaBuff"` //熊猫buff技能id
|
||||||
Property map[string]int32 `protobuf:"bytes,13,rep,name=property,proto3" json:"property" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 属性相关
|
Property map[int32]int32 `protobuf:"bytes,13,rep,name=property,proto3" json:"property" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //基础属性
|
||||||
Ishelp bool `protobuf:"varint,14,opt,name=ishelp,proto3" json:"ishelp"` //是否是助战英雄
|
Ishelp bool `protobuf:"varint,14,opt,name=ishelp,proto3" json:"ishelp"` //是否是助战英雄
|
||||||
Isboos int32 `protobuf:"varint,15,opt,name=isboos,proto3" json:"isboos"` //是否是boos
|
Isboos int32 `protobuf:"varint,15,opt,name=isboos,proto3" json:"isboos"` //是否是boos
|
||||||
Monsterid int32 `protobuf:"varint,16,opt,name=monsterid,proto3" json:"monsterid"` //怪物id
|
Monsterid int32 `protobuf:"varint,16,opt,name=monsterid,proto3" json:"monsterid"` //怪物id
|
||||||
@ -404,7 +404,7 @@ func (x *BattleRole) GetPandaBuff() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BattleRole) GetProperty() map[string]int32 {
|
func (x *BattleRole) GetProperty() map[int32]int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Property
|
return x.Property
|
||||||
}
|
}
|
||||||
@ -694,7 +694,7 @@ var file_battle_battle_db_proto_rawDesc = []byte{
|
|||||||
0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05,
|
0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x52, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70,
|
0x52, 0x06, 0x63, 0x75, 0x72, 0x72, 0x68, 0x70, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70,
|
||||||
0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74,
|
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74,
|
||||||
0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70,
|
0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70,
|
||||||
|
Loading…
Reference in New Issue
Block a user