feat: 实现战斗效果逻辑和接口重构
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-28 21:57:22 +08:00
committed by cnb
parent 0780eae582
commit 875ad668aa
332 changed files with 2062 additions and 1442 deletions

93
AGENTS.md Normal file
View File

@@ -0,0 +1,93 @@
# Repository Guidelines
## Project Structure & Module Organization
This repository is split into multiple Go modules:
- `logic/`: main game logic and fight system (`logic/service/fight/...`)
- `login/`: login service
- `common/`: shared utilities, data, RPC helpers, socket code
- `modules/`: domain modules such as `player`, `task`, `space`
- `public/`: runtime data and configs, including `public/config/*.json`
- `docs/`: engineering notes and feature-specific summaries
Keep changes scoped to the owning module. For example, fight effect work belongs under `logic/service/fight/effect/`.
## Build, Test, and Development Commands
- `cd logic && go test ./service/fight/effect`
Validates effect package changes quickly.
- `cd logic && go test ./...`
Runs all tests in the `logic` module.
- `cd common && go test ./...`
Runs shared utility tests.
- `cd logic && go build ./...`
Checks compile health for the logic module.
CI currently builds Go artifacts through GitHub Actions in `.github/workflows/logic_CI.yml`.
## Coding Style & Naming Conventions
Use standard Go formatting and idioms:
- Run `gofmt -w <file>.go` on edited Go files.
- Use tabs as produced by `gofmt`; do not hand-align spacing.
- Keep package names lowercase.
- Follow existing effect naming: `Effect<ID>` structs in files like `effect_123.go` or grouped files such as `400_480_...go`.
- Keep comments short and descriptive, e.g. `// Effect 400: 若和对手属性相同,则技能威力翻倍`.
## Testing Guidelines
The repo uses Gos built-in `testing` package. Existing tests are sparse, so at minimum:
- run package-level tests for the module you changed
- prefer targeted verification first, then broader `go test ./...` when practical
- name tests with Go conventions, e.g. `TestSqrt`, `TestEffect400`
If no automated test exists, document the package-level command you used to validate the change.
## Commit & Pull Request Guidelines
Recent history is inconsistent (`fix: ...`, `编辑文件 ...`, and short placeholder commits). Prefer clear messages:
- `fix: correct Effect599 damage reduction category handling`
- `docs: update effect refactor summary`
For pull requests, include:
- what changed
- affected module(s)
- validation commands run
- linked issue/task if available
## Contributor Notes
Do not overwrite unrelated local changes. This repo often has a dirty worktree. Prefer additive edits, and update `docs/` when continuing long-running refactors such as fight effects.
## Battle System Notes
Most combat work lives under `logic/service/fight/`. Use the existing split before adding code:
- `action/`: battle action types and turn execution helpers
- `input/`: runtime battle state, effect registration, skill parsing
- `info/`: core battle entities such as pets, skills, damage zones, enums
- `effect/`: skill effects and status logic; most day-to-day fight changes land here
- `node/`: shared effect node behavior and default hooks
- `boss/`: boss-only passive/index effects
- `rule/`, `itemover/`, `top/`: rules, item settlement, ranking-related battle logic
When adding a new skill effect:
- prefer `logic/service/fight/effect/`
- follow existing naming such as `Effect400` or grouped files like `400_480_...go`
- register via `input.InitEffect(...)` or existing helper registration paths
- update `effect_info_map.go` if the effect should appear in local effect descriptions
When investigating missing effects, do not rely only on direct `InitEffect(...)` grep results. This repo also uses shared registration files such as:
- `sterStatusEffects.go`
- `effect_power_doblue.go`
- `EffectAttackMiss.go`
- `EffectPhysicalAttackAddStatus.go`
- `EffectDefeatTrigger.go`
- `effect_attr.go`
Recommended validation for fight changes:
- `cd logic && go test ./service/fight/effect`
- `cd logic && go build ./...`
If you continue long-running effect work, update the matching summary in `docs/` so the next pass can resume without re-scanning the whole package.

View File

@@ -0,0 +1,219 @@
# Effect 重构会话总结2026-03-28
## 1. 本次会话完成内容
### 1.1 注释与说明统一
- 已将 `logic/service/fight/effect` 下效果注释统一为
- `// Effect <id>: <desc>`
- 说明来源
- `public/config/effectInfo.json`
### 1.2 结构整理与公共能力抽取
- 新增并使用了子效果统一挂载 helper
- `addSubEffect(...)`
- 已清理 `effect` 目录中的 `GenSub(...)` 直接调用残留统一走 helper
### 1.3 回合类基类组合继承已落地
- 当前已引入的 base位于 `logic/service/fight/effect/sub_effect_helper.go`
- `RoundEffectArg0Base`
- `RoundEffectSideArg0Base`
- `FixedDuration1Base`
- `FixedDurationNeg1Base`
- `FixedDuration2Base`
- `RoundEffectArg1Base`
- `RoundEffectSideArg1Base`
- `RoundEffectSideArg0Minus1Base`
- `RoundEffectSideArg0Minus1CanStackBase`
- 已有大量效果结构体改为嵌入上述 base删除重复 `SetArgs` 模板代码
### 1.4 编译状态
- 已多轮执行并通过
- `go test ./logic/service/fight/effect`
### 1.5 本轮新增 effect 实现
- 新增缺失效果实现
- `400` 若和对手属性相同则技能威力翻倍
- `480` `{0}`回合内自身所有攻击威力为两倍
- `586` `{0}`回合内自己的属性攻击必中
- `599` `{0}`回合内受到`{1}`伤害减少`{2}%`
- `610` 遇到天敌时先制+`{0}`
- `611` `{0}`回合自身使用攻击技能则附加`{1}`点固定伤害
- `613` `{0}`回合内自身令对手使用的`{1}`系攻击技能无效
- 已同步更新
- `logic/service/fight/effect/effect_info_map.go`
### 1.6 本轮新增文件
- `logic/service/fight/effect/400_480_586_599_610_611_613.go`
- `logic/service/fight/effect/effect_info_map.go`
### 1.7 本轮验证
- 已执行
- `go test ./service/fight/effect`
- 结果
- 通过
### 1.8 本轮结论
- 当前这轮更适合按低风险可复用现有模式 effect 小批次推进而不是一次性追求 `effectInfo.json` 全量覆盖
- 现有 `effect` 目录里已经有不少共享实现 + 批量注册的写法后续判断缺失项时不能只靠 grep `InitEffect(...)`
- 文档第 3 节里的未实现列表目前仍是历史扫描快照只能作为候选列表不能直接当最终事实使用
---
## 2. 当前仍保留自定义 `SetArgs` 的效果建议下一轮重点
以下属于非纯模板仍待抽象 SetArgs
- `Effect570``570.go`
- `Effect123``effect_119_123.go`
- `Effect41``effect_41.go`
- `Effect42``effect_42.go`
- `Effect46``effect_46.go`
- `Effect47``effect_47.go`
- `Effect48``effect_48.go`
- `Effect60``effect_60.go`
- `EffectPropSyncReverse``effect_attr.go`
- `SelfKill``selfkill.go`
建议分三类继续抽 base
- 随机回合/随机次数类 4142
- 次数型常驻类 464748SelfKill570
- SetArgs + 额外上下文初始化 Effect123EffectPropSyncReverse
---
## 3. 未实现或疑似未实现效果清单
### 3.0 `effectInfo.json` 提取的未实现总览自动扫描
- JSON 配置总效果数`2112`
- 代码已注册效果数Skill`338`
- JSON 中存在但代码未注册`1779`
- 代码中注册但 JSON 无对应条目`5``21, 31, 41, 42, 174`
说明
- 这个口径是配置覆盖率不是bug 数量
- 其中大量属于未来版本/未迁移内容不建议一次性全补建议按战斗系统实际启用范围分批实现
- 以下列表为上一轮扫描快照未随本轮新增实现实时回算
- 此外扫描脚本若未把共享实现中的批量注册统计进去也会把已实现效果误判成缺失
JSON 中存在但代码未注册示例前 60
- 2, 10, 11, 12, 14, 15, 16, 17, 22, 30
- 38, 40, 45, 51, 55, 56, 61, 64, 66, 67
- 70, 78, 84, 86, 92, 94, 96, 97, 99, 102
- 103, 104, 106, 108, 109, 114, 118, 132, 133, 139
- 141, 158, 162, 167, 168, 185, 401, 421, 431, 529
- 543, 554, 569, 573, 581, 582, 583, 584, 585, 586
### 3.1 明确标记未实装
- 文件存在明确标记
- `logic/service/fight/effect/529.go未实装`
### 3.2 已注册但缺少同名 `Effect{id}` 结构体需人工确认是否由合并实现覆盖
- `53`
- `74`
- `75`
- `186`
- `402`
- `433`
- `446`
- `451`
- `463`
- `497`
- `564`
- `588`
说明
- 这类通常可能是多个 id 共用一个结构体实现命名与 id 不一致需要逐个确认是否真正缺失行为
### 3.3 疑似未实现扫描规则存在 `Effect{id}` 类型但没有核心战斗 Hook
- `519``effect_519.go`
- `532``532.go`
- `552``552.go`
- `560``560.go`
- `576``576.go`
说明
- 这批是高优先级人工复查项不一定真的没实现可能通过组合/间接机制生效
### 3.4 当前更可信的下一批候选
这一组是结合本轮人工核对后仍然值得优先继续补的缺失 effect 候选
- `401`
- `573`
- `585`
- `587`
- `589`
- `590`
- `591`
- `592`
- `593`
- `594`
- `595`
- `596`
- `597`
- `598`
说明
- 这批大多是 58x/59x 段的新效果和当前目录中已有实现重叠较少
- 相比继续深挖旧扫描误差这批更适合直接新增文件推进
---
## 4. 下次继续的建议顺序
建议严格按下面顺序继续不要重新从全量扫描开始
1. 先复核文档 3.4 里的候选项是否仍未实现
2. 优先补单次触发命中附加固定伤害恢复概率状态这类低风险逻辑
3. 再处理复制对手状态 / 多分支条件 / 触发链式子效果 58x/59x 复杂效果
4. 最后再回头处理文档 2 中那些仍保留自定义 `SetArgs` 的结构整理
本轮更推荐的下一批实现顺序
- 第一组`587 / 591 / 592 / 597 / 598`
- 第二组`573 / 585 / 594 / 595 / 596`
- 第三组`589 / 590 / 593`
---
## 5. 下一次继续让我实现时可直接复制的指令
可直接用下面这句发起
`继续处理 effect按 docs/effect-refactor-summary-2026-03-28.md 的 3.4 和 4 执行:先补 587/591/592/597/598再补 573/585/594/595/596每实现一批就更新同一文档和 effect_info_map.go并跑 go test ./service/fight/effect。`
如果你希望按 JSON 覆盖率推进可用这句
`继续处理 effect按 docs/effect-refactor-summary-2026-03-28.md 的 3.0 从低风险效果开始补实现先补状态附加类10/11/12/14/15/16/94/99/103/114每实现一批就更新文档中的“已实现列表”和“剩余列表”。`
---
## 6. 扫描口径说明供后续排查
- 已注册效果 ID 扫描来源
- `InitEffect(input.EffectType.Skill, <id>, ...)`
- `initskill(<id>, ...)`
- 但这还不够后续扫描必须额外统计这些共享实现/批量注册文件
- `sterStatusEffects.go`
- `effect_power_doblue.go`
- `EffectAttackMiss.go`
- `EffectPhysicalAttackAddStatus.go`
- `EffectDefeatTrigger.go`
- `effect_attr.go`
- `effect_EffectConditionalAddDamage.go`
- `effect_74_75.go`
- `effect_104_109.go`
- `Effect{id}` 结构体与方法扫描来源
- `logic/service/fight/effect/*.go`
- 疑似未实现判断是启发式不是最终结论仍需代码级确认
---
## 7. 这次改动涉及的关键文件
- `public/config/effectInfo.json`
- `logic/service/fight/effect/400_480_586_599_610_611_613.go`
- `logic/service/fight/effect/effect_info_map.go`
- `logic/service/fight/effect/sub_effect_helper.go`
- `docs/effect-refactor-summary-2026-03-28.md`

View File

@@ -3,7 +3,6 @@ package common
import (
"blazing/logic/service/fight/info"
"blazing/modules/player/model"
"math/rand"
)
type FightI interface {
@@ -15,7 +14,6 @@ type FightI interface {
ReadyFight(c PlayerI) //是否准备战斗
ChangePet(c PlayerI, id uint32)
Capture(c PlayerI, id uint32)
GetRand() *rand.Rand
LoadPercent(c PlayerI, percent int32)
UseItem(c PlayerI, cacthid, itemid uint32)

View File

@@ -1,15 +1,40 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 401. n%几率攻击技能的伤害翻倍a1: n
// TODO: 实现n%几率攻击技能的伤害翻倍a1: n的核心逻辑
type NewSel401 struct {
NewSel0
}
func (e *NewSel401) DamageAdd(t *info.DamageZone) bool {
if !e.IsOwner() {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if t.Type != info.DamageType.Red {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !success {
return true
}
t.Damage = t.Damage.Mul(alpacadecimal.NewFromInt(2))
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 401, &NewSel401{})
}

View File

@@ -1,15 +1,38 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 410. 伤害提升n%(PVP无效)a1: n
// TODO: 实现伤害提升n%(PVP无效)a1: n的核心逻辑
type NewSel410 struct {
NewSel0
}
func (e *NewSel410) DamageAdd(t *info.DamageZone) bool {
if !e.IsOwner() {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if t.Type != info.DamageType.Red {
return true
}
if e.Ctx().Our.Player == nil || e.Ctx().Our.Player.Getfightinfo().Status != info.BattleMode.FIGHT_WITH_NPC {
return true
}
t.Damage = t.Damage.Add(t.Damage.Mul(e.Args()[0]).Div(alpacadecimal.NewFromInt(100)))
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 410, &NewSel410{})
}

View File

@@ -1,15 +1,37 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
)
// 43. 遇到天敌自身所有技能先制减少na1: n
// TODO: 实现遇到天敌自身所有技能先制减少na1: n的核心逻辑
type NewSel43 struct {
NewSel0
}
func (e *NewSel43) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
if !e.IsOwner() {
return true
}
if !e.ISNaturalEnemy() {
return true
}
if fattack == nil || sattack == nil {
return true
}
if fattack.PlayerID == e.Ctx().Our.UserID {
if fattack.SkillEntity != nil {
fattack.SkillEntity.XML.Priority -= int(e.Args()[0].IntPart())
}
return true
}
if sattack.PlayerID == e.Ctx().Our.UserID && sattack.SkillEntity != nil {
sattack.SkillEntity.XML.Priority -= int(e.Args()[0].IntPart())
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 43, &NewSel43{})
}

View File

@@ -1,15 +1,40 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 47. 敌我双方伤害降低n%a1: n
// TODO: 实现敌我双方伤害降低n%a1: n的核心逻辑
type NewSel47 struct {
NewSel0
}
func (e *NewSel47) DamageAdd(t *info.DamageZone) bool {
if t.Type != info.DamageType.Red {
return true
}
ratio := alpacadecimal.NewFromInt(100).Sub(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
t.Damage = t.Damage.Mul(ratio)
return true
}
func (e *NewSel47) DamageDivEx(t *info.DamageZone) bool {
if !e.IsOwner() {
return true
}
if t.Type != info.DamageType.Red {
return true
}
ratio := alpacadecimal.NewFromInt(100).Sub(e.Args()[0]).Div(alpacadecimal.NewFromInt(100))
t.Damage = t.Damage.Mul(ratio)
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 47, &NewSel47{})
}

View File

@@ -5,11 +5,26 @@ import (
)
// 51. 如果mon被打到BurstRecoverHP以下, 且没有挂掉, 则马上恢复到满HP和PP值;a1: burst_hp high-32, a2: burst_hp low-32
// TODO: 实现如果mon被打到BurstRecoverHP以下, 且没有挂掉, 则马上恢复到满HP和PP值;a1: burst_hp high-32, a2: burst_hp low-32的核心逻辑
type NewSel51 struct {
NewSel0
}
func (e *NewSel51) Action_end_ex() bool {
if !e.IsOwner() {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().IntPart() == 0 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[0]) >= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, nil, e.Ctx().Our.CurrentPet.GetMaxHP())
e.Ctx().Our.HealPP(-1)
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 51, &NewSel51{})
}

View File

@@ -1,13 +1,65 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 58. 按一定条件触发魔王的愤怒,触发时,战斗等级提升至一定状态,可以被消强化(SideEffect="33")恢复至正常状态(+6)a1-a6: atk/def/sp_atk/sp_def/spd/accuracy-1为不设置
// TODO: 实现按一定条件触发魔王的愤怒,触发时,战斗等级提升至一定状态,可以被消强化(SideEffect="33")恢复至正常状态(+6)a1-a6: atk/def/sp_atk/sp_def/spd/accuracy-1为不设置的核心逻辑
type NewSel58 struct {
NewSel0
active bool
used bool
}
func (e *NewSel58) TurnStart(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) {
if !e.IsOwner() || e.used {
return
}
currentHP := e.Ctx().Our.CurrentPet.GetHP()
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
if maxHP.IntPart() == 0 {
return
}
// 当前仓库里没有更具体的触发参数,采用半血触发作为兜底实现。
if currentHP.Mul(alpacadecimal.NewFromInt(2)).Cmp(maxHP) == 1 {
return
}
e.used = true
e.active = true
for i, arg := range e.Args() {
if arg.IntPart() < 0 {
continue
}
target := int8(arg.IntPart())
if target > e.Ctx().Our.AttackValue.Prop[i] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), target-e.Ctx().Our.AttackValue.Prop[i])
}
}
}
func (e *NewSel58) TurnEnd() {
if !e.IsOwner() || !e.active {
return
}
hasPositive := false
for i, arg := range e.Args() {
if arg.IntPart() < 0 {
continue
}
if e.Ctx().Our.AttackValue.Prop[i] > 0 {
hasPositive = true
break
}
}
if !hasPositive {
e.active = false
}
}
func init() {

View File

@@ -27,13 +27,6 @@ func (e *NewSel66) Skill_Use() bool {
if !success {
return true
}
var duration int
// 持续回合
duration = int(e.Input.FightC.GetRand().Int31n(2)) // 默认随机 2~3 回合
duration++
// 获取状态效果
eff := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if eff == nil {

View File

@@ -27,13 +27,6 @@ func (e *NewSel67) Skill_Use() bool {
if !success {
return true
}
var duration int
// 持续回合
duration = int(e.Input.FightC.GetRand().Int31n(2)) // 默认随机 2~3 回合
duration++
// 获取状态效果
eff := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if eff == nil {

View File

@@ -1,15 +1,37 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// 68. 受到特定系的攻击会恢复自身相应体力a1: 特定系)
// TODO: 实现受到特定系的攻击会恢复自身相应体力a1: 特定系)的核心逻辑
type NewSel68 struct {
NewSel0
}
func (e *NewSel68) DamageDivEx(t *info.DamageZone) bool {
if !e.IsOwner() {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
if t.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity.XML.Type != int(e.Args()[0].IntPart()) {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, t.Damage)
t.Damage = alpacadecimal.Zero
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 68, &NewSel68{})
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 1044 - 吸取对手能力提升状态,吸取成功则下n回合造成的伤害翻倍
// Effect 1044: 吸取对手能力提升状态,吸取成功则下{0}回合造成的伤害翻倍
type Effect1044 struct {
node.EffectNode
damageMultiplierActive bool

View File

@@ -11,6 +11,7 @@ func init() {
}
// Effect 1146: 双方每处于{0}种能力提升状态则附加{1}点固定伤害
type Effect1146 struct {
node.EffectNode
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 137 - 损失一半当前体力值攻击和速度提升2个等级
// Effect 137: 损失一半当前体力值,自身攻击和速度提升2个等级
type Effect137 struct {
node.EffectNode
}

View File

@@ -3,21 +3,16 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 138 - 先出手时,n回合自己不会受到对手攻击性技能伤害并反弹对手1/n造成伤害
// Effect 138: 先出手时,{0}回合自己不会受到对手攻击性技能伤害并反弹对手造成伤害的1/{1}
type Effect138 struct {
node.EffectNode
RoundEffectArg0Base
can bool
}
func (e *Effect138) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func (e *Effect138) OnSkill() bool {
if e.IsFirst() { // 先出手
e.can = true

View File

@@ -7,7 +7,7 @@ import (
"blazing/logic/service/fight/node"
)
// 142 - 损失1/n的体力值,下回合能较快出手
// Effect 142: 损失1/{0}的体力值,下回合能较快出手
type Effect142 struct {
node.EffectNode
can bool

View File

@@ -5,6 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// Effect 143: 使对手的能力提升效果反转成能力下降效果
type Effect143 struct {
node.EffectNode
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 146 - n回合内受到物理攻击时有m%几率使对方中毒
// Effect 146: {0}回合内受到物理攻击时有{1}%概率使对方中毒
type Effect146 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect146) Skill_Use_ex() bool {
@@ -26,10 +25,6 @@ func (e *Effect146) Skill_Use_ex() bool {
return true
}
func (e *Effect146) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 146, &Effect146{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 149 - 命中后,n%令对方xxm%令对方XX
// Effect 149: 命中后,{0}%令对方{1}{2}%令对方{3}
type Effect149 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 150 - n回合内对手每回合防御和特防等级m
// Effect 150: {0}回合内对手每回合防御和特防等级{1}
type Effect150 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect150) Skill_Use() bool {
@@ -16,11 +15,6 @@ func (e *Effect150) Skill_Use() bool {
e.Ctx().Opp.SetProp(e.Ctx().Opp, 3, int8(e.SideEffectArgs[1]))
return true
}
func (e *Effect150) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 150, &Effect150{})

View File

@@ -7,7 +7,7 @@ import (
"blazing/logic/service/fight/node"
)
// 155 - 恢复全部体力,消除所有能力下降,使自己进入睡眠n回合
// Effect 155: 恢复全部体力,消除所有能力下降,使自己进入睡眠{0}回合
type Effect155 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 156 - n回合内使得对手所有能力增强效果失效
// Effect 156: {0}回合内使得对手所有能力增强效果失效
type Effect156 struct {
node.EffectNode
}
@@ -20,7 +20,7 @@ func (e *Effect156) Skill_Use() bool {
}
e.Ctx().Opp.AddEffect(e.Ctx().Our, e.GenSub(&Effect156_sub{}, e.SideEffectArgs[0]))
addSubEffect(e.Ctx().Our, e.Ctx().Opp, &e.EffectNode, &Effect156_sub{}, e.SideEffectArgs[0])
return true
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 157 - n回合内若受到攻击对手防御等级-1、特防等级-1、命中等级-1
// Effect 157: {0}回合内若受到攻击对手防御等级-1、特防等级-1、命中等级-1
type Effect157 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect157) Skill_Use_ex() bool {
@@ -20,10 +19,6 @@ func (e *Effect157) Skill_Use_ex() bool {
return true
}
func (e *Effect157) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 157, &Effect157{})

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 165 - n回合内每回合防御和特防等级+m
// Effect 165: {0}回合内每回合防御和特防等级+{1}
type Effect165 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect165) Skill_Use() bool {
@@ -19,8 +18,3 @@ func init() {
input.InitEffect(input.EffectType.Skill, 165, &Effect165{})
}
func (e *Effect165) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 166 - n回合内若对手使用属性攻击则m%对手XX等级k
// Effect 166: {0}回合内若对手使用属性攻击则{2}%对手{1}等级{3}
type Effect166 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect166) Skill_Use_ex() bool {
@@ -25,10 +24,6 @@ func (e *Effect166) Skill_Use_ex() bool {
return true
}
func (e *Effect166) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 166, &Effect166{})

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 169 - n回合内每回合额外附加m%几率令对手XX
// Effect 169: {0}回合内每回合额外附加{1}%概率令对手{2}
type Effect169 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect169) OnSkill() bool {
@@ -24,10 +23,6 @@ func (e *Effect169) OnSkill() bool {
return true
}
func (e *Effect169) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 169, &Effect169{})

View File

@@ -9,7 +9,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 170 - 若先出手则免疫当回合伤害并回复1/n的最大体力值
// Effect 170: 若先出手则免疫当回合伤害并回复1/{0}的最大体力值
type Effect170 struct {
node.EffectNode
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 171 - n回合内自身使用属性技能时能较快出手
// Effect 171: {0}回合内自身使用属性技能时能较快出手
type Effect171 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect171) ComparePre(fattack *action.SelectSkillAction, sattack *action.SelectSkillAction) bool {
@@ -35,10 +34,6 @@ func (e *Effect171) ComparePre(fattack *action.SelectSkillAction, sattack *actio
sattack.SkillEntity.XML.Priority += 1
return true
}
func (e *Effect171) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 171, &Effect171{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 173 - 先出手时,n%概率令对方xx
// Effect 173: 先出手时,{0}%概率令对方{1}
type Effect173 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 175 - 若对手处于异常状态,则m%自身XX等级k
// Effect 175: 若对手处于异常状态,则{1}%自身{0}等级{2}
type Effect175 struct {
node.EffectNode
}

View File

@@ -4,9 +4,11 @@ import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
// 176 - n%几率令对手随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态
// Effect 176: {0}%概率令对手随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态
type Effect176 struct {
node.EffectNode
}
@@ -25,7 +27,7 @@ func (e *Effect176) OnSkill() bool {
int(info.PetStatus.Sleep),
}
randomIndex := int(e.Input.FightC.GetRand().Int31n(int32(len(statusTypes))))
randomIndex := grand.Intn(len(statusTypes))
selectedStatus := statusTypes[randomIndex]
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, selectedStatus)

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 177 - n回合内若对手MISS则自身恢复1/m的最大体力值
// Effect 177: {0}回合内若对手MISS则自身恢复1/{1}的最大体力值
type Effect177 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect177) Skill_Use_ex() bool {
@@ -21,10 +20,6 @@ func (e *Effect177) Skill_Use_ex() bool {
return true
}
func (e *Effect177) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 177, &Effect177{})

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 178 - 造成伤害的1/n回复自身体力若属性相同则造成伤害的1/m回复自身体力
// Effect 178: 造成伤害的1/{0}回复自身体力若属性相同则造成伤害的1/{1}回复自身体力
type Effect178 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 179 - 若属性相同则技能威力提升n
// Effect 179: 若属性相同则技能威力提升{0}
type Effect179 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 184 - 若对手处于能力提升状态,则m%自身XX等级k
// Effect 184: 若对手处于能力提升状态,则{1}%自身{0}等级+{2}
type Effect184 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 188 - 若对手处于异常状态,则威力翻倍并消除对手相应的防御能力提升效果
// Effect 188: 若对手处于异常状态,则威力翻倍并消除对手相应的防御能力提升效果
type Effect188 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 190 - n回合内若受到攻击,消除对手所有能力强化状态
// Effect 190: {0}回合内若受到攻击,消除对手能力提升状态
type Effect190 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect190) Skill_Use_ex() bool {
@@ -17,7 +16,7 @@ func (e *Effect190) Skill_Use_ex() bool {
// 消除对手所有能力强化状态
for i, v := range e.Ctx().Opp.Prop[:] {
if v>0 {
if v > 0 {
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
}
@@ -26,10 +25,6 @@ func (e *Effect190) Skill_Use_ex() bool {
return true
}
func (e *Effect190) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 190, &Effect190{})

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 193 - 若对手XX,则必定致命一击
// Effect 193: 若对手{0},则必定造成双倍伤害
type Effect193 struct {
node.EffectNode
}

View File

@@ -9,7 +9,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 194 - 造成伤害的1/n回复自身体力,若对手XX则造成伤害的1/m回复自身体力
// Effect 194: 造成伤害的1/{0}回复自身体力,若对手{1}则造成伤害的1/{2}回复自身体力
type Effect194 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 196 - n%令对方XX等级-m;若先出手,则j%使对方XX等级-k
// Effect 196: {1}%令对方{0}等级{2};若先出手,则{4}%使对方{3}等级{5}
type Effect196 struct {
node.EffectNode
}

View File

@@ -2,18 +2,13 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 197 - n回合内若被对方击败,则对手所有能力加强状态消失
// Effect 197: {0}回合内若被对方击败,则对手所有能力加强状态消失
type Effect197 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect197) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func (e *Effect197) SwitchOut(in *input.Input) bool {
if e.Input == in {
if !e.Ctx().Our.CurrentPet.Alive() { // 被击败

View File

@@ -7,7 +7,7 @@ import (
"github.com/gogf/gf/v2/util/grand"
)
// 198 - 随机使对手n种能力等级-m
// Effect 198: 随机使对手{0}种能力等级-{1}
type Effect198 struct {
node.EffectNode
}

View File

@@ -2,18 +2,13 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 199 - 下次被击败后,下一个出场的精灵xx等级+k
// Effect 199: 下次被击败后,下一个出场的精灵{0}等级+{1}
type Effect199 struct {
node.EffectNode
FixedDurationNeg1Base
}
func (e *Effect199) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(-1) // 持续n回合
}
func (e *Effect199) SwitchOut(in *input.Input) bool {
if e.Input == in {
if !e.Ctx().Our.CurrentPet.Alive() { // 被击败

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 200 - 若对手处于能力提升状态,n%几率令对手XX
// Effect 200: 若对手处于能力提升状态,{0}%概率令对手{1}
type Effect200 struct {
node.EffectNode
}

View File

@@ -0,0 +1,166 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"github.com/alpacahq/alpacadecimal"
)
// Effect 400: 若和对手属性相同,则技能威力翻倍
type Effect400 struct {
Effect567
}
func (e *Effect400) SkillHit() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().Our.CurrentPet.PetInfo.Type != e.Ctx().Opp.CurrentPet.PetInfo.Type {
return true
}
e.Ctx().SkillEntity.XML.Power *= 2
return true
}
// Effect 480: {0}回合内自身所有攻击威力为两倍
type Effect480 struct {
RoundEffectArg0Base
}
func (e *Effect480) SkillHit() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.Power *= 2
return true
}
// Effect 586: {0}回合内自己的属性攻击必中
type Effect586 struct {
RoundEffectArg0Base
}
func (e *Effect586) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.MustHit = 1
return true
}
// Effect 599: {0}回合内受到{1}伤害减少{2}%
type Effect599 struct {
RoundEffectArg0Base
}
func (e *Effect599) DamageDivEx(zone *info.DamageZone) bool {
if zone == nil {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
category := e.Ctx().SkillEntity.Category()
mode := e.Args()[1].IntPart()
switch mode {
case 0:
if category != info.Category.PHYSICAL {
return true
}
case 1:
if category != info.Category.SPECIAL {
return true
}
case 2:
if category != info.Category.PHYSICAL && category != info.Category.SPECIAL {
return true
}
default:
return true
}
percent := e.Args()[2]
reduction := zone.Damage.Mul(percent).Div(alpacadecimal.NewFromInt(100))
if zone.Damage.Cmp(reduction) > 0 {
zone.Damage = zone.Damage.Sub(reduction)
} else {
zone.Damage = alpacadecimal.Zero
}
return true
}
// Effect 610: 遇到天敌时先制+{0}
type Effect610 struct {
Effect567
}
func (e *Effect610) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if !e.ISNaturalEnemy() {
return true
}
if fattack == nil || fattack.PlayerID == e.Ctx().Our.UserID {
return true
}
if sattack == nil || sattack.SkillEntity == nil {
return true
}
sattack.SkillEntity.XML.Priority += int(e.Args()[0].IntPart())
return true
}
// Effect 611: 下{0}回合自身使用攻击技能则附加{1}点固定伤害
type Effect611 struct {
RoundEffectArg0Base
}
func (e *Effect611) OnSkill() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[1],
})
return true
}
// Effect 613: {0}回合内自身令对手使用的{1}系攻击技能无效
type Effect613 struct {
RoundEffectArg0Base
}
func (e *Effect613) SkillHit_ex() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.XML.Type != int(e.Args()[1].IntPart()) {
return true
}
e.Ctx().SkillEntity.SetNoSide()
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 400, &Effect400{})
input.InitEffect(input.EffectType.Skill, 480, &Effect480{})
input.InitEffect(input.EffectType.Skill, 586, &Effect586{})
input.InitEffect(input.EffectType.Skill, 599, &Effect599{})
input.InitEffect(input.EffectType.Skill, 610, &Effect610{})
input.InitEffect(input.EffectType.Skill, 611, &Effect611{})
input.InitEffect(input.EffectType.Skill, 613, &Effect613{})
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 403 - 技能使用成功时,n%令自身特攻和速度等级+m。若和对手属性相同,则技能效果翻倍
// Effect 403: 技能使用成功时,{0}%令自身特攻和速度等级+{1}。若和对手属性相同,则技能效果翻倍
type Effect403 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 407 - 下回合起,每回合XX等级+n持续m回合
// Effect 407: 下回合起,每回合{0}等级+{1},持续{2}回合
type Effect407 struct {
node.EffectNode
}
@@ -17,7 +17,7 @@ func (e *Effect407) Skill_Use() bool {
effectValue := int8(e.Args()[1].IntPart()) // 等级+n
duration := int(e.Args()[2].IntPart()) // 持续m回合
e.GenSub(&Effect407_sub{
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect407_sub{
effectType: effectType,
effectValue: effectValue,
}, duration)

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 410 - n%回复自身1/m体力值
// Effect 410: {0}%回复自身1/{1}体力值
type Effect410 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 412 - 若自身体力小于1/n则每次攻击不消耗PP值
// Effect 412: 若自身体力小于1/{0}则每次攻击不消耗PP值
type Effect412 struct {
node.EffectNode
}

View File

@@ -4,14 +4,13 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 417 - n回合内自身攻击技能造成伤害的m%会恢复自身体力
// Effect 417: {0}回合内自身攻击技能造成伤害的{1}%会恢复自身体力
type Effect417 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect417) SkillHit_ex() bool {
@@ -27,10 +26,6 @@ func (e *Effect417) SkillHit_ex() bool {
return true
}
func (e *Effect417) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 417, &Effect417{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 418 - 若对手处于能力提升状态则对方XX等级+/-n
// Effect 418: 若对手处于能力提升状态则对方{0}等级{1}
type Effect418 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 420 - 使用了该技能后,若受到消除强化类技能攻击,则对方则对方攻击和特攻等级+/-n
// Effect 420: 使用了该技能后,若受到消除强化类技能攻击,则对方攻击和特攻等级{0}
type Effect420 struct {
node.EffectNode
FixedDurationNeg1Base
}
func (e *Effect420) PropBefer(in *input.Input, prop int8, level int8) bool {
@@ -24,10 +23,6 @@ func (e *Effect420) PropBefer(in *input.Input, prop int8, level int8) bool {
}
return true
}
func (e *Effect420) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(-1) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 420, &Effect420{})

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 422 - 附加所造成伤害值X%的固定伤害
// Effect 422: 附加所造成伤害值{0}%的固定伤害
type Effect422 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 424 - n回合内对手每回合速度等级m
// Effect 424: {0}回合内对手每回合速度等级{1}
type Effect424 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect424) Skill_Use() bool {
@@ -15,10 +14,6 @@ func (e *Effect424) Skill_Use() bool {
return true
}
func (e *Effect424) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 424, &Effect424{})

View File

@@ -7,7 +7,7 @@ import (
"github.com/gogf/gf/v2/util/grand"
)
// 425 - 随机使对手n项属性m,并将该属性附加给自己
// Effect 425: 随机吸取对手{0}项属性{1},并将该属性附加给自己
type Effect425 struct {
node.EffectNode
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 427 - n回合内每次直接攻击都会使对手防御和特防m
// Effect 427: {0}回合内每次直接攻击都会使对手防御和特防{1}
type Effect427 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect427) Skill_Use() bool {
@@ -25,10 +24,6 @@ func (e *Effect427) Skill_Use() bool {
return true
}
func (e *Effect427) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 427, &Effect427{})

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 428 - 遇到天敌时附加m点固定伤害
// Effect 428: 遇到天敌时附加{0}点固定伤害
type Effect428 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 430 - 消除对手能力强化状态,若消除状态成功,则自身XX等级m
// Effect 430: 消除对手能力提升状态,若消除状态成功,则自身{0}等级+{1}
type Effect430 struct {
node.EffectNode
}

View File

@@ -2,21 +2,18 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
func init() {
t := &Effect432{
EffectNode: node.EffectNode{},
}
t := &Effect432{}
input.InitEffect(input.EffectType.Skill, 432, t)
}
// 432 - n回合内对手所有攻击必定MISS必中技能有效
// Effect 432: {0}回合内对手所有攻击必定MISS必中技能有效
type Effect432 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect432) SkillHit_ex() bool {
@@ -30,8 +27,3 @@ func (e *Effect432) SkillHit_ex() bool {
return true
}
func (e *Effect432) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 434 - 若自身处于能力强化状态则n%几率令对手XX
// Effect 434: 若自身处于能力提升状态则{0}%概率令对手{1}
type Effect434 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 437 - 若对手处于能力强化状态,则对手XX等级m
// Effect 437: 若对手处于能力提升状态,则对手{0}等级{1}
type Effect437 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 440 - n回合内对手使用技能消耗的PP值变为m
// Effect 440: {0}回合内对手使用技能消耗的PP值变为{1}
type Effect440 struct {
node.EffectNode
}
@@ -13,9 +13,9 @@ type Effect440 struct {
func (e *Effect440) Skill_Use() bool {
// 创建一个延迟生效的效果,在下一回合开始生效
e.Ctx().Opp.AddEffect(e.Ctx().Our, e.GenSub(&Effect440_sub{
addSubEffect(e.Ctx().Our, e.Ctx().Opp, &e.EffectNode, &Effect440_sub{
m: int(e.Args()[1].IntPart()),
}, int(e.Args()[0].IntPart())))
}, int(e.Args()[0].IntPart()))
return true
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 442 - m%令对手XX,每次造成的伤害值都将恢复自身体力
// Effect 442: {0}%另对手{1},每次造成的伤害值都将恢复自身体力
type Effect442 struct {
node.EffectNode
}

View File

@@ -3,14 +3,13 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 443 - n回合内若受到的伤害超过m则对手疲惫x回合
// Effect 443: {0}回合内若受到的伤害超过{1}则对手疲惫{2}回合
type Effect443 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect443) Skill_Use_ex() bool {
@@ -28,10 +27,6 @@ func (e *Effect443) Skill_Use_ex() bool {
return true
}
func (e *Effect443) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 443, &Effect443{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 444 - 降低对手所有PP一点并恢复自身所有PP一点
// Effect 444: 降低对手所有PP一点并恢复自身所有PP一点
type Effect444 struct {
node.EffectNode
}

View File

@@ -7,17 +7,7 @@ import (
"github.com/gogf/gf/v2/util/grand"
)
// "id": 446,
// "argsNum": 0,
// "info": "随机自身3项属性+1"
// {
// "id": 626,
// "argsNum": 2,
// "info": "随机使自己{0}项能力+{1}"
// },
//
// 626 - 消除对手能力强化状态若消除状态成功则自身XX等级m
// Effect 626: 随机使自己{0}项能力+{1}
type Effect626 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 449 - 若对手处于能力下降状态则N%几率XX
// Effect 449: 若对手处于能力下降状态则{0}%概率{1}
type Effect449 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 453 - 消除对手能力强化状态,若消除成功,则对手XX
// Effect 453: 消除对手能力提升状态,若消除成功,则对手{0}
type Effect453 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 454 - 当自身血量少于1/n时先制+m写死了先制只能+1
// Effect 454: 当自身血量少于1/{0}时先制+{1}
type Effect454 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 456 - 若对手体力不足n则直接秒杀
// Effect 456: 若对手体力不足{0}则直接秒杀
type Effect456 struct {
node.EffectNode
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 458 - 若先出手则造成攻击伤害的n%恢复自身体力
// Effect 458: 若先出手则造成攻击伤害的{0}%恢复自身体力
type Effect458 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 460 - m%几率令对手害怕,若对手处于能力强化状态则额外附加n%几
// Effect 460: {0}%概率令对手害怕,若对手处于能力提升状态则额外附加{1}%概
type Effect460 struct {
node.EffectNode
}

View File

@@ -4,12 +4,11 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 461 - 使用后若自身体力低于1/m则从下回合开始必定致命一击
// Effect 461: 若自身生命值低于1/{0}则从下回合开始必定致命一击
type Effect461 struct {
node.EffectNode
FixedDuration1Base
can bool
}
@@ -25,10 +24,6 @@ func (e *Effect461) Skill_Use() bool {
return true
}
func (e *Effect461) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(1) // 持续n回合
}
func (e *Effect461) ActionStart(a, b *action.SelectSkillAction) bool {
if !e.can {
return true

View File

@@ -3,14 +3,13 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 462 - n回合内受攻击时反弹m点固定伤害
// Effect 462: {0}回合内受攻击时反弹{1}点固定伤害
type Effect462 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect462) Skill_Use_ex() bool {
@@ -28,10 +27,6 @@ func (e *Effect462) Skill_Use_ex() bool {
return true
}
func (e *Effect462) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 462, &Effect462{})

View File

@@ -7,7 +7,7 @@ import (
"blazing/logic/service/fight/node"
)
// 464 - 遇到天敌时m%令对手烧伤
// Effect 464: 遇到天敌时{0}%令对手烧伤
type Effect464 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 468 - 回合开始时,若自身处于能力下降状态,则威力翻倍,同时解除能力下降状态
// Effect 468: 回合开始时,若自身处于能力下降状态,则威力翻倍,同时解除能力下降状态
type Effect468 struct {
node.EffectNode
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 469 - m回合内若对手使用属性技能则n%几率另对手XX
// Effect 469: {0}回合内若对手使用属性技能则{1}%概率令对手{2}
type Effect469 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect469) Skill_Use_ex() bool {
@@ -28,24 +27,14 @@ func (e *Effect469) Skill_Use_ex() bool {
return true
}
func (e *Effect469) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 469, &Effect469{})
input.InitEffect(input.EffectType.Skill, 526, &Effect526{})
}
// {
// "id": 526,
// "argsNum": 2,
// "info": "{0}回合内若对手成功使用属性技能则受到{1}点固定伤害"
// },
//
// 469 - m回合内若对手使用属性技能则n%几率另对手XX
// Effect 526: {0}回合内若对手成功使用属性技能则受到{1}点固定伤害
type Effect526 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect526) Skill_Use_ex() bool {
@@ -59,8 +48,3 @@ func (e *Effect526) Skill_Use_ex() bool {
return true
}
func (e *Effect526) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 470 - n回合内若自身攻击技能命中则m%令对手p
// Effect 470: {0}回合内若自身攻击技能命中则{1}%令对手{2}
type Effect470 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect470) Skill_Use_ex() bool {
@@ -28,10 +27,6 @@ func (e *Effect470) Skill_Use_ex() bool {
return true
}
func (e *Effect470) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 470, &Effect470{})

View File

@@ -2,20 +2,14 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 471 - 先出手时n回合内免疫异常状态
// Effect 471: 先出手时{0}回合内免疫异常状态
type Effect471 struct {
node.EffectNode
RoundEffectArg0Base
can bool
}
func (e *Effect471) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 471, &Effect471{})
@@ -49,15 +43,11 @@ func init() {
}
// 191 - n回合内免疫并反弹所有受到的异常状态
// Effect 191: {0}回合内免疫并反弹所有受到的异常状态
type Effect191 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect191) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func (e *Effect191) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if in != e.Ctx().Opp {

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 473 - 若造成的伤害不足m,则自身XX等级+n
// Effect 473: 若造成的伤害不足{0},则自身{1}等级+{2}
type Effect473 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 474 - 先出手时m%自身XX等级+n
// Effect 474: 先出手时{1}%自身{0}等级+{2}
type Effect474 struct {
node.EffectNode
}

View File

@@ -7,7 +7,7 @@ import (
"blazing/logic/service/fight/node"
)
// 475 - 若造成的伤害不足m则下n回合的攻击必定致命一击
// Effect 475: 若造成的伤害不足{0},则下{1}回合的攻击必定致命一击
type Effect475 struct {
node.EffectNode
damageThreshold int
@@ -21,7 +21,7 @@ func (e *Effect475) Skill_Use() bool {
if damageDone.IntPart() < int64(damageThreshold) {
critDuration := int(e.Args()[1].IntPart())
e.Ctx().Our.AddEffect(e.Ctx().Our, e.GenSub(&Effect475_sub{}, critDuration))
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect475_sub{}, critDuration)
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 476 - 后出手时恢复m点体力
// Effect 476: 后出手时恢复{0}点体力
type Effect476 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 477 - n回合内若受到攻击则对手攻击防御特攻特防速度命中等级降低
// Effect 477: {0}回合内若受到攻击,则对手{1}
type Effect477 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect477) Skill_Use_ex() bool {
@@ -25,10 +24,6 @@ func (e *Effect477) Skill_Use_ex() bool {
return true
}
func (e *Effect477) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 477, &Effect477{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 483 - -1 -1 -1 -1 -1 -1后出手时弱化效果翻倍
// Effect 483: 对手{0},后出手时弱化效果翻倍
type Effect483 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 485 - 消除对手能力强化状态,消除成功,则自身恢复所有体力
// Effect 485: 消除对手能力提升状态,消除成功则恢复自身所有体力
type Effect485 struct {
node.EffectNode
}

View File

@@ -2,12 +2,11 @@ package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 486 - 下n回合若自身选择使用技能则无视对手能力提升状态
// Effect 486: 下{0}回合若自身选择使用技能则无视对手能力提升状态
type Effect486 struct {
node.EffectNode
RoundEffectArg0Base
can bool
}
@@ -26,11 +25,6 @@ func (e *Effect486) CalculatePre() bool {
return true
}
func (e *Effect486) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 486, &Effect486{})

View File

@@ -8,7 +8,7 @@ import (
"github.com/alpacahq/alpacadecimal"
)
// 488 - 若对手的体力小于400,则造成的伤害增加10%
// Effect 488: 若对手的HP小于{0},则造成的伤害增加{1}%
type Effect488 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 489 - 若自身处于能力提升状态则每次攻击恢复自身体力的1/m
// Effect 489: 若自身处于能力提升状态则每次攻击恢复自身体力的1/{0}
type Effect489 struct {
node.EffectNode
}

View File

@@ -3,14 +3,13 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 491 - 3回合内对手造成的伤害降低m%
// Effect 491: {0}回合内对手造成的伤害降低{1}%
type Effect491 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect491) DamageDivEx(t *info.DamageZone) bool {
@@ -26,10 +25,6 @@ func (e *Effect491) DamageDivEx(t *info.DamageZone) bool {
return true
}
func (e *Effect491) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 491, &Effect491{})

View File

@@ -4,12 +4,11 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 492 - 2回合内若对手使用属性技能自身立刻恢复1/m体力且防御+x特防+y
// Effect 492: {0}回合内对方使用属性技能,自身立刻恢复1/{1}生命值且{2}+{3}{4}+{5}
type Effect492 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect492) Skill_Use_ex() bool {
@@ -26,10 +25,6 @@ func (e *Effect492) Skill_Use_ex() bool {
return true
}
func (e *Effect492) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续2回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 492, &Effect492{})

View File

@@ -3,12 +3,11 @@ package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 493 - m回合内若对使用攻击技能则自身下n回合必定暴击
// Effect 493: {0}回合内若对使用攻击技能则自身下{1}回合必定暴击
type Effect493 struct {
node.EffectNode
RoundEffectArg0Base
can bool
}
@@ -28,11 +27,6 @@ func (e *Effect493) SkillHit() bool {
return true
}
func (e *Effect493) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续m回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 493, &Effect493{})

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 494 - 无视对手能力提升状态
// Effect 494: 无视对手能力提升状态
type Effect494 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 495 - 若对手处于XX状态,则30%几率秒杀对手
// Effect 495: 若对手处于{0}状态,则{1}%概率秒杀对手
type Effect495 struct {
node.EffectNode
}

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 496 - 若打出致命一击则恢复自身所有体力
// Effect 496: 若打出致命一击则恢复自身所有体力
type Effect496 struct {
node.EffectNode
}

View File

@@ -9,7 +9,7 @@ import (
"github.com/barkimedes/go-deepcopy"
)
// 457 - 复制对手释放的技能(组队对战时无效)
// Effect 457: 复制对手释放的技能(组队对战时无效)
type Effect457 struct {
node.EffectNode
org *info.SkillEntity

View File

@@ -4,12 +4,11 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 498 - n回合内致命一击率上升1/m
// Effect 498: {0}回合内致命一击率上升1/{1}
type Effect498 struct {
node.EffectNode
RoundEffectArg0Base
}
func (e *Effect498) ActionStart(a, b *action.SelectSkillAction) bool {
@@ -29,10 +28,6 @@ func (e *Effect498) ActionStart(a, b *action.SelectSkillAction) bool {
return true
}
func (e *Effect498) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.Skill, 498, &Effect498{})

View File

@@ -6,7 +6,7 @@ import (
"blazing/logic/service/fight/node"
)
// 500 - 若对手处于害怕状态则伤害翻倍
// Effect 500: 若对手处于害怕状态则伤害翻倍
type Effect500 struct {
node.EffectNode
}

View File

@@ -5,7 +5,7 @@ import (
"blazing/logic/service/fight/node"
)
// 501 - 若造成的伤害不足m,则对手XX等级-n
// Effect 501: 若造成的伤害不足{0},则对手{1}等级-{2}
type Effect501 struct {
node.EffectNode
}

Some files were not shown because too many files have changed in this diff Show More