龙属性问题
This commit is contained in:
parent
336b60f3f8
commit
5bf499430c
@ -115,6 +115,7 @@ func (this *ModelDragon) CreateDragon(session comm.IUserSession, dragons map[str
|
||||
dragon.Property["sprint"] = c.Sprint
|
||||
dragon.Property["acceleration"] = c.Acceleration
|
||||
dragon.Property["deceleration"] = c.Deceleration
|
||||
dragon.Property["energyrecover"] = c.Energyrecover
|
||||
dragon.Property["caddtime"] = c.Caddtime
|
||||
dragon.Property["csubtime"] = c.Csubtime
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ func (this *Dragon) CreateRobotDragon(dragonid string, lv int32) (dragon *pb.DBD
|
||||
dragon.Property["sprint"] = c.Sprint
|
||||
dragon.Property["acceleration"] = c.Acceleration
|
||||
dragon.Property["deceleration"] = c.Deceleration
|
||||
dragon.Property["energyrecover"] = c.Energyrecover
|
||||
// dragon.Property["itemsprint"] = c.Itemsprint
|
||||
dragon.Property["caddtime"] = c.Caddtime
|
||||
dragon.Property["csubtime"] = c.Csubtime
|
||||
@ -186,6 +187,7 @@ func (this *Dragon) GMModifyDragonLv(uid string, cid string, lv int32) (dragon *
|
||||
dragon.Property["sprint"] = c.Sprint
|
||||
dragon.Property["acceleration"] = c.Acceleration
|
||||
dragon.Property["deceleration"] = c.Deceleration
|
||||
dragon.Property["energyrecover"] = c.Energyrecover
|
||||
dragon.Property["caddtime"] = c.Caddtime
|
||||
dragon.Property["csubtime"] = c.Csubtime
|
||||
update["property"] = dragon.Property
|
||||
|
@ -146,6 +146,17 @@ func (this *Room) AiOperator() {
|
||||
this.player2.Energy += v.CurEnergy
|
||||
v.CurEnergy = this.player2.Energy
|
||||
}
|
||||
for _, v := range szMap { //
|
||||
fmt.Printf("================\n")
|
||||
var v1 int
|
||||
for index := Width - 1; index >= 0; index-- {
|
||||
for j := 0; j < Height; j++ {
|
||||
v1 = index + j*7
|
||||
fmt.Printf("%d:%d ", v.Data[v1].Oid, v.Data[v1].Cid)
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
}
|
||||
}
|
||||
// 广播消息
|
||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||
Mpadata: szMap,
|
||||
@ -381,18 +392,17 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
||||
this.round++
|
||||
}
|
||||
|
||||
// for _, v := range szMap { //
|
||||
// fmt.Printf("================\n")
|
||||
// var v1 int
|
||||
// for index := Width - 1; index >= 0; index-- {
|
||||
// for j := 0; j < Height; j++ {
|
||||
// v1 = index + j*7
|
||||
// fmt.Printf("%d ", v.Data[v1].Cid)
|
||||
|
||||
// }
|
||||
// fmt.Printf("\n")
|
||||
// }
|
||||
// }
|
||||
for _, v := range szMap { //
|
||||
fmt.Printf("================\n")
|
||||
var v1 int
|
||||
for index := Width - 1; index >= 0; index-- {
|
||||
for j := 0; j < Height; j++ {
|
||||
v1 = index + j*7
|
||||
fmt.Printf("%d:%d ", v.Data[v1].Oid, v.Data[v1].Cid)
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
}
|
||||
}
|
||||
// 广播消息
|
||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "operatorrst", &pb.EntertainOperatorRstPush{
|
||||
Mpadata: szMap,
|
||||
@ -582,7 +592,7 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
|
||||
res = append(res, conf.Rewards...)
|
||||
for _, v := range res {
|
||||
if v.A == "attr" && v.T == "consumeexp" {
|
||||
if winner == this.player1 {
|
||||
if winner.Userinfo.Uid == this.player1.Userinfo.Uid {
|
||||
this.player1.Score += v.N
|
||||
} else {
|
||||
this.player2.Score += v.N
|
||||
|
@ -738,39 +738,6 @@ func (this *MapData) SkillUp(pos int32, color int32, skillid int32, value int32,
|
||||
return
|
||||
}
|
||||
|
||||
func (this *MapData) SetMap() {
|
||||
sz2 := []int32{
|
||||
3, 1, 2, 2, 1, 3, 1,
|
||||
5, 1, 2, 3, 1, 2, 2,
|
||||
2, 42, 3, 4, 3, 1, 6,
|
||||
1, 3, 3, 4, 2, 3, 6,
|
||||
1, 5, 6, 5, 6, 1, 4,
|
||||
6, 6, 3, 6, 3, 48, 3,
|
||||
3, 3, 1, 3, 5, 2, 5,
|
||||
}
|
||||
var pos int
|
||||
for index := Width - 1; index >= 0; index-- {
|
||||
for j := 0; j < Height; j++ {
|
||||
Color := sz2[pos]
|
||||
Cid := sz2[pos]
|
||||
if sz2[pos] > 6 {
|
||||
conf, err := this.module.configure.GetGameBlockByKey(sz2[pos])
|
||||
if err == nil {
|
||||
Color = conf.Color
|
||||
Cid = conf.Key
|
||||
this.Plat[index+j*Height].Special = conf.Type
|
||||
}
|
||||
}
|
||||
this.Plat[index+j*Height].Color = Color
|
||||
this.Plat[index+j*Height].Cid = Cid
|
||||
pos++
|
||||
}
|
||||
}
|
||||
this.CheckAndRefreshPlat()
|
||||
// this.SetIndelibilityPlat()
|
||||
|
||||
}
|
||||
|
||||
// 校验当前地图 有没有能消除的
|
||||
func (this *MapData) CheckAndRefreshPlat() (bEliminate bool) {
|
||||
bEliminate = false
|
||||
|
@ -91,7 +91,7 @@ func Test_Main(t *testing.T) {
|
||||
m.InitMap(nil, 1)
|
||||
|
||||
//m.SkillUp(24, 1, 3, 7, true)
|
||||
m.SetMap()
|
||||
|
||||
b := m.GetFireBoom(1, 7)
|
||||
fmt.Printf("xxxx %d\n", b)
|
||||
var vids int
|
||||
|
Loading…
Reference in New Issue
Block a user