修改属性计算
This commit is contained in:
parent
2b59b99946
commit
3c439e2aa2
@ -380,17 +380,17 @@ func (this *ModelHero) PropertyCompute(uid, heroId string) map[string]int32 {
|
||||
}
|
||||
|
||||
curHp := hero.Property[comm.Hp]
|
||||
exprHp := fmt.Sprintf("%v + %v * %v/1000 + %v * %v",
|
||||
exprHp := fmt.Sprintf("%v + %v * %v/1000 + %v * %v/1000",
|
||||
(curHp + lvGrow.Hp), heroLvCfg.Hp, lvGrow.Hpgrow, heroStarCfg.Hp, stargrowCfg.StarupHp)
|
||||
hp, _ := mengine.ParseAndExec(exprHp)
|
||||
|
||||
curAtk := hero.Property[comm.Atk]
|
||||
exprAtk := fmt.Sprintf("%v +%v * %v/1000 + %v * %v",
|
||||
exprAtk := fmt.Sprintf("%v +%v * %v/1000 + %v * %v/1000",
|
||||
(curAtk + lvGrow.Atk), heroLvCfg.Atk, lvGrow.Atkgrow, heroStarCfg.Atk, stargrowCfg.StarupAtk)
|
||||
atk, _ := mengine.ParseAndExec(exprAtk)
|
||||
|
||||
curDef := hero.Property[comm.Def]
|
||||
exprDef := fmt.Sprintf("%v +%v * %v/1000 + %v * %v",
|
||||
exprDef := fmt.Sprintf("%v +%v * %v/1000 + %v * %v/1000",
|
||||
(curDef + lvGrow.Def), heroLvCfg.Def, lvGrow.Defgrow, heroStarCfg.Def, stargrowCfg.StarupDef)
|
||||
def, _ := mengine.ParseAndExec(exprDef)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user