```
refactor(common/cool/coolconfig): 修改RPC配置字段类型 将RPC字段从uint16类型更改为string类型的Address字段, 以支持更灵活的地址配置。同时更新了配置初始化逻辑, 从server.rpc改为server.address作为配置键。 ```
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
// 可以抵挡n点伤害
|
||||
@@ -20,16 +22,17 @@ func (e *Effect49) DamageSubEx(t *info.DamageZone) bool {
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
//fmt.Println("Effect49_o", t.Damage)
|
||||
if t.Type == info.DamageType.Red {
|
||||
if e.Args()[0].Cmp(t.Damage) == -1 {
|
||||
t.Damage = t.Damage.Sub(e.Args()[0])
|
||||
}
|
||||
if t.Type != info.DamageType.Red {
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
//fmt.Println("Effect49_n", t.Damage)
|
||||
if t.Damage.Cmp(e.Args()[0]) > -1 {
|
||||
t.Damage = t.Damage.Sub(e.Args()[0])
|
||||
} else {
|
||||
t.Damage = alpacadecimal.Zero
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user