根据提供的code differences信息,我无法看到具体的代码变更内容。由于code differences部分为空白,我将提供一个通用的示例格式:
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
``` docs(readme): 更新文档说明 - 添加了项目使用说明 - 补充了配置项解释 - 修正了错误的示例代码 ``` 注意:由于没有具体的代码差异信息,无法生成准确的commit
This commit is contained in:
50
logic/service/fight/effect/475.go
Normal file
50
logic/service/fight/effect/475.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
// 475 - 若造成的伤害不足m,则下n回合的攻击必定致命一击
|
||||
type Effect475 struct {
|
||||
node.EffectNode
|
||||
damageThreshold int
|
||||
critDuration int
|
||||
}
|
||||
|
||||
func (e *Effect475) Skill_Use() bool {
|
||||
damageThreshold := int(e.Args()[0].IntPart())
|
||||
damageDone := e.Ctx().Our.SumDamage
|
||||
|
||||
if damageDone.IntPart() < int64(damageThreshold) {
|
||||
critDuration := int(e.Args()[1].IntPart())
|
||||
e.GenSub(&Effect475_sub{}, critDuration)
|
||||
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect475_sub struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect475_sub) ActionStart(a, b *action.SelectSkillAction) bool {
|
||||
|
||||
//fmt.Println(e.Ctx().SkillEntity)
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
e.Ctx().SkillEntity.XML.CritRate = 16
|
||||
|
||||
return true
|
||||
}
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 475, &Effect475{})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user