feat: 实现大量技能效果及战斗逻辑修复
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-30 00:51:18 +08:00
committed by cnb
parent a7171e9ef4
commit 87fdccaddf
63 changed files with 5505 additions and 1090 deletions

28
.ide/help.md Normal file
View File

@@ -0,0 +1,28 @@
青氧,十九禁给
https://api.aibh.site/console 张晟 2922919493Zs.
RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | \
YES=1 bash -s -- --base-url https://api.aibh.site \
--api-key sk-foAHgsJtmanACECtBlFYZE2z4LkwBboEOYETO3ZdWvCxdmNr \
--mirror auto
https://api.gemai.cc/console/token 免费给部分额度 ,还有100块
https://zread.ai/tawer-blog/lmarena-2api/1-overview GLM web2 pai
https://crazyrouter.com/console 模型最便宜,看看能不能1:10
https://agentrouter.org/pricing 签到给,有175
kuaipao.ai 充了十块 cjf19970621 cjf19970621
充了十块
使用网址https://www.jnm.lol
使用文档https://fcnkhhtxb5iz.feishu.cn/docx/VyhcdKduJoNCK4x4l25ci10JnZf。
24小时自助faka点luckwk点cn
不要发违禁词看到会回消息长期稳定使用

View File

@@ -321,3 +321,130 @@ JSON 中存在但代码未注册(示例前 60 项):
### 10.4 本轮同步更新
- `logic/service/fight/effect/effect_info_map.go`
- `docs/effect-unimplemented-tasks/task-009-effects-642-646.md` 已完成可从任务目录移除
---
## 11. 2026-03-29 增量记录
### 11.1 本轮补齐的 effect
- `769` 若对手不处于异常状态则造成的攻击伤害额外提升`{0}%`
- `770` 若对手处于异常状态则恢复自身全部体力
- `771` `{0}`回合内每次使用攻击技能都有`{1}%`概率使对手进入任意一种异常状态
- `772` `{0}`回合内若对手使用攻击技能则有`{1}%`概率随机进入烧伤冻伤中毒麻痹害怕睡眠中的一种异常状态
- `773` 若自身体力低于对手则与对手互换体力
### 11.2 实现口径
- `769` 复用 `1103` 的条件增伤写法 `SkillHit()` 中仅对攻击技能生效并在对手不存在任意异常状态时追加威力百分比
- `770` 按技能结算后触发处理落在 `Skill_Use()`满足对手处于异常状态时直接回复自身满体力
- `771` 作为回合类自身增益实现持续期间在 `OnSkill()` 针对每次攻击技能按概率给对手附加一项随机异常状态
- `772` 参照 `559` defender 侧监听时机落在 `Skill_Use_ex()`对手使用攻击技能时按概率附加六选一异常状态
- `773` 复用 `529` 的直接改写当前体力思路在满足自身体力低于对手时交换双方当前体力并分别按各自最大体力上限截断
### 11.3 本轮新增文件
- `logic/service/fight/effect/769_773.go`
### 11.4 本轮同步更新
- `logic/service/fight/effect/effect_info_map.go`
- `docs/effect-unimplemented-tasks/task-032-effects-769-773.md` 已完成可从任务目录移除
---
## 12. 2026-03-29 增量记录
### 12.1 本轮补齐的 effect
- `1498` 随机附加烧伤冻伤失明失神中的 `{0}` 种异常状态未触发则自身下 `{1}` 回合造成的伤害提升 `{2}%`
- `1499` 体力低于最大体力的 `1/3` 时先制 `+3`
- `1500` 1 回合做 `{0}-{1}` 次攻击自身处于护盾状态下连击上限为 `{2}`
- `1501` 命中后为对手种下一颗黑暗之种
- `1502` 对手身上存在黑暗之种时先制 `+1`
### 12.2 实现口径
- `1498` 复用 `1111` 未触发则挂自身增伤子效果模式随机状态池按任务文案落为烧伤冻伤失明失神若本次一个状态都未成功挂上则给自身添加持续 `{1}` 回合的增伤子效果
- `1499` 复用现有条件先制写法 `ComparePre()` 中按当前体力是否低于最大体力 `1/3` 直接修改当前技能优先级
- `1500` 参照仓库现有多段技能处理口径不做逐段攻击而是在 `Damage_Mul()` 中按随机连击次数折算红伤倍率若自身当前存在护盾则用 `{2}` 约束连击上限
- `1501` 作为挂在 defender 身上的持久子效果实现命中后附加黑暗之种 4 `TurnEnd()` 随机扣 1 个技能 PP成熟后每回合所有技能 PP `-1`下场后清除
- `1502` `ComparePre()` 中检查对手是否持有 `1501` 的子效果存在时当前技能先制 `+1`
### 12.3 模型假设
- 仓库当前未注册失神状态本轮按状态 ID `29` 追加了一个最小可用实现行为复用 `StatusCannotAct`
- `1500` 仍受当前战斗模型限制只能按总连击数折算伤害不能表现逐段命中逐段触发的细粒度行为
### 12.4 本轮新增文件
- `logic/service/fight/effect/1498_1502.go`
### 12.5 本轮同步更新
- `logic/service/fight/effect/effect_info_map.go`
- `docs/effect-unimplemented-tasks/README.md`
- `docs/effect-unimplemented-tasks/task-177-effects-1498-1502.md` 已完成可从任务目录移除
### 12.6 本轮验证
- `cd /workspace/logic && go test ./service/fight/effect`
- `cd /workspace/logic && go build ./...`
---
## 13. 2026-03-29 增量记录
### 13.1 本轮补齐的 effect
- `1503` 清除对手身上的黑暗之种清除成功则令对手随机受到 `1-500` 点固定伤害
- `1504` `40%` 令对手诅咒若对手身上存在黑暗之种则概率翻倍
- `1505` 黑暗之种成长期时附加 `200` 点固定伤害黑暗之种长大后固定伤害翻倍
- `1506` 若对手不是龙系精灵则恢复自身 `{0}` 点体力
- `1507` `{0}` 回合内自身受到攻击则令对手随机进入 `{1}` 种异常状态未触发则消除对手回合类效果
### 13.2 实现口径
- `1503` 复用本轮新增的黑暗之种清理 helper `Skill_Use()` 中清除对手持有的 `1501` 子效果仅当成功清除时追加一次 `1-500` 的随机固定伤害
- `1504` 按任务文案直接实现为基础 `40%` 概率若对手当前仍持有黑暗之种则翻倍到 `80%`仓库尚无诅咒状态注册本轮补了一个最小可用的状态壳以承接后续联动
- `1505` 读取 `1501` 子效果当前成长阶段成长期附加 `200` 固定伤害成熟后附加 `400` 固定伤害若对手不存在黑暗之种则不触发
- `1506` 使用宠物当前系别组合判断是否包含龙系仅在对手主属性副属性均不为龙系时恢复自身体力
- `1507` 复用 `1228` defender 侧监听模式落在 `Skill_Use_ex()`对手使用攻击技能命中本体时随机附加若干异常状态若整段持续时间内一次都未成功触发则在最后一回合结束时清除对手回合类效果
### 13.3 模型假设
- 仓库当前缺少诅咒状态实现本轮按状态 ID `23` 注册了一个最小 `BaseStatus` 版本只提供状态存在性与常规下场清理不额外附带持续结算逻辑
- `1505` 黑暗之种成长期/长大后判断直接复用 `1501` 子效果内部阶段计数 4 次回合结束视为成长期 5 次起视为成熟
### 13.4 本轮新增文件
- `logic/service/fight/effect/1503_1507.go`
### 13.5 本轮同步更新
- `logic/service/fight/effect/effect_info_map.go`
- `docs/effect-unimplemented-tasks/README.md`
- `docs/effect-unimplemented-tasks/task-178-effects-1503-1507.md` 已完成可从任务目录移除
### 13.6 本轮验证
- `cd /workspace/logic && go test ./service/fight/effect`
- `cd /workspace/logic && go build ./...`
---
## 14. 2026-03-30 增量记录
### 14.1 本轮补齐的 effect
- `1508` 先出手时无视攻击免疫效果
- `1509` 令对手全属性-`{0}` 且随机 `{1}` 个技能 PP 值归零技能无效时消耗自身全部体力并令对手全属性-1然后对手下 3 次使用技能消耗的 PP 值为 3
- `1510` `{0}` 回合内对手主动切换精灵则登场精灵 `{1}%` 随机进入 `{2}` 种异常状态
- `1511` 先出手时免疫当回合受到的攻击伤害若对手为自身天敌则免疫并反弹给对手造成伤害值 `{0}%` 的百分比伤害
- `1512` 集结天幕四龙之神力使自身下 2 回合先制+3且攻击必定命中必定致命
### 14.2 实现口径
- `1508` 采用仓库现有模型下的局部支持方案若自身本次先出手且使用攻击技能则在伤害结算前临时屏蔽若干常见攻击伤害清零类 immunity effect并在技能结算结束后恢复
- `1509` 正常命中时直接令对手全属性下降并随机清空若干技能 PP若本次技能实体存在但 `AttackTime == 0`则按技能无效分支处理自损全部体力令对手全属性-1并给对手挂 3 PP 三倍消耗子效果
- `1510` 复用 `1562` 主动切换后对登场精灵生效模式效果挂在对手侧仅在对手主动切换下场时置 pending登场后按概率随机附加若干异常状态
- `1511` 复用 `170/1011` 的免疫伤害写法落在 `DamageLockEx()`若自身先出手则直接免疫本回合受到的红伤若对手同时为自身天敌则按原伤害值 `{0}%` 追加一次百分比伤害反弹
- `1512` 作为持续 2 回合的自身子效果实现 `ComparePre()` 中固定追加先制 `+3`并在 `ActionStart()` 中对攻击技能同时赋予必中与必定致命
### 14.3 模型假设
- `1508` 当前没有通用无视攻击免疫标记位本轮仅覆盖仓库内已识别的常见攻击免疫 effect`170/525/570/850/1011/1511`对其他未来新增或语义不同的 defender 侧免疫实现不保证自动生效
- `1509` 技能无效时按仓库现有口径解释为技能实体存在但本次结算后 `AttackTime == 0`不把被控未出手 PP 无法释放这类情况算作技能无效
### 14.4 本轮新增文件
- `logic/service/fight/effect/1508_1512.go`
### 14.5 本轮同步更新
- `logic/service/fight/effect/effect_info_map.go`
- `docs/effect-unimplemented-tasks/README.md`
- `docs/effect-unimplemented-tasks/task-179-effects-1508-1512.md` 已完成可从任务目录移除
### 14.6 本轮验证
- `cd /workspace/logic && go test ./service/fight/effect`
- `cd /workspace/logic && go build ./...`

View File

@@ -171,10 +171,6 @@
- `153`: `1378-1382` -> `task-153-effects-1378-1382.md`
- `154`: `1383-1387` -> `task-154-effects-1383-1387.md`
- `155`: `1388-1392` -> `task-155-effects-1388-1392.md`
- `156`: `1393-1397` -> `task-156-effects-1393-1397.md`
- `157`: `1398-1402` -> `task-157-effects-1398-1402.md`
- `158`: `1403-1407` -> `task-158-effects-1403-1407.md`
- `159`: `1408-1412` -> `task-159-effects-1408-1412.md`
- `160`: `1413-1417` -> `task-160-effects-1413-1417.md`
- `161`: `1418-1422` -> `task-161-effects-1418-1422.md`
- `162`: `1423-1427` -> `task-162-effects-1423-1427.md`
@@ -192,9 +188,6 @@
- `174`: `1483-1487` -> `task-174-effects-1483-1487.md`
- `175`: `1488-1492` -> `task-175-effects-1488-1492.md`
- `176`: `1493-1497` -> `task-176-effects-1493-1497.md`
- `177`: `1498-1502` -> `task-177-effects-1498-1502.md`
- `178`: `1503-1507` -> `task-178-effects-1503-1507.md`
- `179`: `1508-1512` -> `task-179-effects-1508-1512.md`
- `180`: `1513-1517` -> `task-180-effects-1513-1517.md`
- `181`: `1518-1522` -> `task-181-effects-1518-1522.md`
- `182`: `1523-1527` -> `task-182-effects-1523-1527.md`
@@ -226,11 +219,6 @@
- `208`: `1655-1659` -> `task-208-effects-1655-1659.md`
- `209`: `1660-1664` -> `task-209-effects-1660-1664.md`
- `210`: `1665-1669` -> `task-210-effects-1665-1669.md`
- `211`: `1670-1674` -> `task-211-effects-1670-1674.md`
- `212`: `1675-1679` -> `task-212-effects-1675-1679.md`
- `213`: `1680-1684` -> `task-213-effects-1680-1684.md`
- `214`: `1685-1689` -> `task-214-effects-1685-1689.md`
- `215`: `1690-1694` -> `task-215-effects-1690-1694.md`
- `216`: `1695-1699` -> `task-216-effects-1695-1699.md`
- `217`: `1700-1704` -> `task-217-effects-1700-1704.md`
- `218`: `1705-1709` -> `task-218-effects-1705-1709.md`

View File

@@ -1,35 +0,0 @@
# Task 004: Effects 615-619
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 615
- `argsNum`: `3`
- `info`: `{0}回合内使用技能恢复{1}点体力体力低于1/{2}时恢复至满`
### Effect 616
- `argsNum`: `2`
- `info`: `当自身血量少于1/3时先制+2`
### Effect 617
- `argsNum`: `2`
- `info`: `消耗自身所有体力给对手造成{0}-{1}点伤害,若造成伤害大于对手体力则对手必定留1点血`
### Effect 618
- `argsNum`: `2`
- `info`: `消耗自身所有体力,使下一只出战精灵{0}回合内每回合恢复{1}点体力`
### Effect 619
- `argsNum`: `2`
- `info`: `{0}回合令对手所有技能先制-{1}`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,38 +0,0 @@
# Task 005: Effects 621-625
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 621
- `argsNum`: `2`
- `info`: `消除对手能力上升状态,消除成功对手{0}{1}`
- `param`: `2,0,0`
### Effect 622
- `argsNum`: `7`
- `info`: `自身{0}{6}%概率强化效果翻倍`
- `param`: `0,0,0`
### Effect 623
- `argsNum`: `1`
- `info`: `消除自身能力下降状态,消除成功下{0}回合自身直接攻击必定暴击`
### Effect 624
- `argsNum`: `2`
- `info`: `消除对手能力上升状态,消除成功{0}回合内受到伤害减少{1}点`
### Effect 625
- `argsNum`: `6`
- `info`: `使对手{0},若对手处于弱化状态,弱化效果翻倍 `
- `param`: `0,0,0`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,45 +0,0 @@
# Task 006: Effects 627-631
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 627
- `argsNum`: `2`
- `info`: `对手处于能力提升状态时附加其{0}值{1}%的百分比伤害`
- `param`: `2,0,0`
### Effect 628
- `argsNum`: `1`
- `info`: `若对手处于能力下降状态则造成伤害的{0}%恢复体力`
### Effect 629
- `argsNum`: `2`
- `info`: `消除{0}状态,消除成功下回合自身先制+{1}`
- `param`: `10,0,0`
### Effect 630
- `argsNum`: `9`
- `info`: `{0}回合内{1}状态被消除,则有{2}%概率使对手{3}`
- `param`: `11,1,1|0,3,3`
### Effect 631
- `argsNum`: `2`
- `info`: `消除{0}状态,消除成功下回合造成伤害提升{1}%`
- `param`: `10,0,0`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明
## 完成记录
- 2026-03-29已在 `logic/service/fight/effect/627_631.go` 补齐 `627-631`
- 同步更新了 `logic/service/fight/effect/effect_info_map.go`
- 验证命令`cd /workspace/logic && go test ./service/fight/effect`

View File

@@ -1,45 +0,0 @@
# Task 007: Effects 632-636
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 632
- `argsNum`: `3`
- `info`: `造成伤害{0}{1},则下{2}回合必定暴击`
- `param`: `12,0,0`
### Effect 633
- `argsNum`: `3`
- `info`: `造成伤害{0}{1},则造成伤害的{2}%恢复体力`
- `param`: `12,0,0`
### Effect 634
- `argsNum`: `2`
- `info`: `若当前体力{0}对手,则造成伤害的{1}%恢复体力`
- `param`: `12,0,0`
### Effect 635
- `argsNum`: `1`
- `info`: `吸收对手能力上升状态,吸收成功,下回合先制+{0}`
### Effect 636
- `argsNum`: `2`
- `info`: `消除{0}状态,消除成功则令对手{1}`
- `param`: `10,0,0|1,1,1`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明
## 完成记录
- 2026-03-29已在 `logic/service/fight/effect/632_636.go` 补齐 `632-636`
- 同步更新了 `logic/service/fight/effect/effect_info_map.go`
- 验证命令`cd /workspace/logic && go test ./service/fight/effect`

View File

@@ -1,35 +0,0 @@
# Task 032: Effects 769-773
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 769
- `argsNum`: `1`
- `info`: `若对手不处于异常状态则造成的攻击伤害额外提升{0}%`
### Effect 770
- `argsNum`: `0`
- `info`: `若对手处于异常状态,则恢复自身全部体力`
### Effect 771
- `argsNum`: `2`
- `info`: `{0}回合内每次使用攻击技能都有{1}%概率使对手进入任意一种异常状态`
### Effect 772
- `argsNum`: `2`
- `info`: `{0}回合内若对手使用攻击技能则有{1}%概率随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态`
### Effect 773
- `argsNum`: `0`
- `info`: `若自身体力低于对手则与对手互换体力`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,37 +0,0 @@
# Task 060: Effects 911-915
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 911
- `argsNum`: `1`
- `info`: `全属性+{0},自身处于能力提升状态时强化效果翻倍`
### Effect 912
- `argsNum`: `1`
- `info`: `若对手处于能力下降则使对手随机{0}个技能的PP归零`
### Effect 913
- `argsNum`: `1`
- `info`: `消除对手回合类效果,消除成功则下回合自身造成的攻击伤害额外提升{0}%`
### Effect 914
- `argsNum`: `3`
- `info`: `若对手处于{0}状态则{1}回合内{2}%令对手使用的技能无效`
- `param`: `1,0,0`
### Effect 915
- `argsNum`: `3`
- `info`: `消除对手回合类效果,消除成功则自身下{0}回合攻击有{1}%使对手{2}`
- `param`: `1,2,2`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,37 +0,0 @@
# Task 087: Effects 1047-1051
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1047
- `argsNum`: `3`
- `info`: `{0}%令对手{1}未触发则吸取对手最大体力的1/{2}`
- `param`: `1,1,1`
### Effect 1048
- `argsNum`: `1`
- `info`: `若对手处于异常状态则自身造成的攻击伤害额外提升{0}%`
### Effect 1049
- `argsNum`: `1`
- `info`: `击败对手则自身全属性+{0}`
### Effect 1050
- `argsNum`: `3`
- `info`: `未击败对手则下{0}回合攻击使对手{1}%{2}`
- `param`: `1,2,2`
### Effect 1051
- `argsNum`: `2`
- `info`: `对手体力高于{0}则将对手体力减少到{1}`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 120: Effects 1213-1217
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1213
- `argsNum`: `2`
- `info`: `{0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害`
### Effect 1214
- `argsNum`: `1`
- `info`: `对手处于异常状态则吸取对手{0}点体力`
### Effect 1215
- `argsNum`: `1`
- `info`: `消除对手所有护盾效果,消除成功则使对手全属性-{0},自身体力低于对手时弱化效果翻倍`
### Effect 1216
- `argsNum`: `0`
- `info`: `反转对手能力提升状态反转成功则恢复自身所有体力和PP值`
### Effect 1217
- `argsNum`: `1`
- `info`: `消除对手能力提升状态,消除成功则对手下{0}次攻击技能无效`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 121: Effects 1218-1222
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1218
- `argsNum`: `2`
- `info`: `未击败对手则下{0}回合自身先制+{1}`
### Effect 1219
- `argsNum`: `0`
- `info`: `消除对手回合类效果,消除成功则下回合受到的伤害转化为自身体力`
### Effect 1220
- `argsNum`: `1`
- `info`: `消除对手能力提升状态,消除成功则下{0}回合自身攻击必定致命一击`
### Effect 1221
- `argsNum`: `1`
- `info`: `反转自身能力下降状态,反转成功则自身免疫下{0}次受到的异常状态`
### Effect 1222
- `argsNum`: `1`
- `info`: `先出手时使对手随机{0}个技能PP值归零`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 122: Effects 1223-1227
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1223
- `argsNum`: `3`
- `info`: `造成的攻击伤害若高于{0}则令自身下{1}回合所有技能先制+{2}`
### Effect 1224
- `argsNum`: `1`
- `info`: `消除对手回合类效果,消除成功则使自身下{0}回合必定致命一击`
### Effect 1225
- `argsNum`: `1`
- `info`: `对手处于能力下降时吸取对手最大体力的1/{0}`
### Effect 1226
- `argsNum`: `3`
- `info`: `{0}回合内受到攻击伤害降低{1}点,回合结束时若当回合未受到攻击伤害则吸取对手{2}点体力`
### Effect 1227
- `argsNum`: `2`
- `info`: `自身处于能力提升状态则有{0}%概率使对手{1},先出手时概率翻倍`
- `param`: `1,1,1`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 123: Effects 1228-1232
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1228
- `argsNum`: `2`
- `info`: `{0}回合内对手使用攻击技能则随机进入{1}种异常状态,未触发则消除对手回合类效果`
### Effect 1229
- `argsNum`: `1`
- `info`: `自身体力高于对手时附加自身当前体力1/{0}的百分比伤害`
### Effect 1230
- `argsNum`: `2`
- `info`: `自身体力低于对手时,下{0}次自身技能先制+{1}`
### Effect 1231
- `argsNum`: `3`
- `info`: `{0}%令对手{1}未触发则附加对手最大体力1/{2}的百分比伤害`
- `param`: `1,1,1`
### Effect 1232
- `argsNum`: `0`
- `info`: `反转自身能力下降状态,反转成功则附加给对手等同的能力下降状态`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 124: Effects 1233-1237
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1233
- `argsNum`: `3`
- `info`: `吸取对手最大体力的{0}%,每次使用增加{1}%,最高{2}%`
### Effect 1234
- `argsNum`: `1`
- `info`: `消除对手回合类效果,消除成功则对手全属性-{0}`
### Effect 1235
- `argsNum`: `3`
- `info`: `{0}回合内每回合{1}%闪避对手攻击,未触发则使对手随机{2}项技能PP值归零`
### Effect 1236
- `argsNum`: `2`
- `info`: `{0}回合内若对手使用攻击技能则造成伤害前附加对手最大体力1/{1}的百分比伤害`
### Effect 1237
- `argsNum`: `0`
- `info`: `使双方精灵所有技能PP值归零消除双方能力提升、下降状态以及回合类效果`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 125: Effects 1238-1242
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1238
- `argsNum`: `2`
- `info`: `全属性+{0},对手不为{1}系时强化效果翻倍`
- `param`: `22,1,1`
### Effect 1239
- `argsNum`: `2`
- `info`: `恢复自身最大体力的1/{0}自身体力低于1/{1}时造成等量百分比伤害`
### Effect 1240
- `argsNum`: `2`
- `info`: `当回合未击败对手则下{0}次自身技能附加自身最大体力1/{1}的百分比伤害`
### Effect 1241
- `argsNum`: `2`
- `info`: `吸取对手{0}点固定体力自身体力低于1/{1}时吸取效果翻倍`
### Effect 1242
- `argsNum`: `4`
- `info`: `{0}%的概率伤害为{1}倍,未触发则下次翻倍概率额外提升{2}%且伤害提升变为{3}倍`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 126: Effects 1243-1247
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1243
- `argsNum`: `0`
- `info`: `对手处于能力下降状态时先制+1`
### Effect 1244
- `argsNum`: `4`
- `info`: `随机附加{0}-{1}点固伤,对手处于能力下降状态时固伤变为{2}-{3}点`
### Effect 1245
- `argsNum`: `1`
- `info`: `若自身处于能力提升状态则附加给对手等同于自身能力提升状态的能力下降状态,若未满足或未触发则令对手随机{0}项技能PP值归零`
### Effect 1246
- `argsNum`: `1`
- `info`: `消除双方能力提升、下降状态,消除任意一方成功则令对手下{0}次使用的攻击技能无效`
### Effect 1247
- `argsNum`: `0`
- `info`: `先出手时使对手当回合内无法通过技能恢复自身体力`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 156: Effects 1393-1397
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1393
- `argsNum`: `4`
- `info`: `{0}回合内每回合使用技能则造成伤害前令对手防御-{1}、速度-{2}未触发则附加对手最大体力1/{3}的百分比伤害`
### Effect 1394
- `argsNum`: `2`
- `info`: `{0}回合内对手使用属性技能则随机进入{1}种异常状态`
### Effect 1395
- `argsNum`: `0`
- `info`: `若先出手则必定打出致命一击`
### Effect 1396
- `argsNum`: `4`
- `info`: `{0}回合内每回合吸取对手最大体力的1/{1}自身体力低于最大体力的1/{2}时转变为吸取对手最大体力的1/{3}`
### Effect 1397
- `argsNum`: `2`
- `info`: `全属性+{0}自身体力低于1/{1}时强化效果翻倍`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,39 +0,0 @@
# Task 157: Effects 1398-1402
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1398
- `argsNum`: `4`
- `info`: `消除对手能力提升状态,消除成功则{0}%令对手{1},未触发则{2}%令对手{3}`
- `param`: `1,1,1|1,3,3`
### Effect 1399
- `argsNum`: `2`
- `info`: `消除对手回合类效果,消除成功则对手{0},未触发则自身免疫下{1}次受到的异常状态`
- `param`: `1,0,0`
### Effect 1400
- `argsNum`: `3`
- `info`: `{0}回合内若自身回合类效果被消除则{1}%令对手{2}`
- `param`: `1,2,2`
### Effect 1401
- `argsNum`: `3`
- `info`: `后出手时{0}%令对手对手{1},未触发则使自身下{2}回合必定致命一击`
- `param`: `1,1,1`
### Effect 1402
- `argsNum`: `0`
- `info`: `技能威力提升1点不受其他威力提升/下降效果加成`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 158: Effects 1403-1407
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1403
- `argsNum`: `0`
- `info`: `技能威力提升4点不受其他威力提升/下降效果加成`
### Effect 1404
- `argsNum`: `0`
- `info`: `技能威力提升7点不受其他威力提升/下降效果加成`
### Effect 1405
- `argsNum`: `0`
- `info`: `技能威力提升10点不受其他威力提升/下降效果加成`
### Effect 1406
- `argsNum`: `0`
- `info`: `技能威力提升14点不受其他威力提升/下降效果加成`
### Effect 1407
- `argsNum`: `0`
- `info`: `技能威力提升17点不受其他威力提升/下降效果加成`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 159: Effects 1408-1412
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1408
- `argsNum`: `0`
- `info`: `技能威力提升20点不受其他威力提升/下降效果加成`
### Effect 1409
- `argsNum`: `0`
- `info`: `技能威力提升24点不受其他威力提升/下降效果加成`
### Effect 1410
- `argsNum`: `0`
- `info`: `技能威力提升27点不受其他威力提升/下降效果加成`
### Effect 1411
- `argsNum`: `0`
- `info`: `技能威力提升30点不受其他威力提升/下降效果加成`
### Effect 1412
- `argsNum`: `0`
- `info`: `自身体力低于300时必定先手`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 177: Effects 1498-1502
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1498
- `argsNum`: `3`
- `info`: `随机附加烧伤,冻伤,失明,失神中的{0}种异常状态,未触发则自身下{1}回合造成的伤害提升{2}%`
### Effect 1499
- `argsNum`: `0`
- `info`: `体力低于最大体力的1/3时先制+3`
### Effect 1500
- `argsNum`: `3`
- `info`: `1回合做{0}-{1}次攻击,自身处于护盾状态下连击上限为{2}`
### Effect 1501
- `argsNum`: `0`
- `info`: `命中后为对手种下一颗黑暗之种黑暗之种经过4回合逐渐成长每回合结束使对手随机1个技能PP值-1长大后使对手所有技能PP值-1`
### Effect 1502
- `argsNum`: `0`
- `info`: `对手身上存在黑暗之种时先制+1`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 178: Effects 1503-1507
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1503
- `argsNum`: `0`
- `info`: `清除对手身上的黑暗之种清除成功则令对手随机受到1-500点固定伤害`
### Effect 1504
- `argsNum`: `0`
- `info`: `40%令对手诅咒,若对手身上存在黑暗之种则概率翻倍`
### Effect 1505
- `argsNum`: `0`
- `info`: `黑暗之种成长期时附加200点固定伤害黑暗之种长大后固定伤害翻倍`
### Effect 1506
- `argsNum`: `1`
- `info`: `若对手不是龙系精灵则恢复自身{0}点体力`
### Effect 1507
- `argsNum`: `2`
- `info`: `{0}回合内自身受到攻击则令对手随机进入{1}种异常状态,未触发则消除对手回合类效果`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 179: Effects 1508-1512
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1508
- `argsNum`: `0`
- `info`: `先出手时无视攻击免疫效果`
### Effect 1509
- `argsNum`: `2`
- `info`: `令对手全属性-{0}且随机{1}个技能PP值归零技能无效时消耗自身全部体力并令对手全属性-1然后对手下3次使用技能消耗的PP值为3倍`
### Effect 1510
- `argsNum`: `3`
- `info`: `{0}回合内对手主动切换精灵则登场精灵{1}%随机进入{2}种异常状态`
### Effect 1511
- `argsNum`: `1`
- `info`: `先出手时免疫当回合受到的攻击伤害,若对手为自身天敌则免疫并反弹给对手造成伤害值{0}%的百分比伤害`
### Effect 1512
- `argsNum`: `0`
- `info`: `集结天幕四龙之神力使自身下2回合先制+3且攻击必定命中、必定致命`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 188: Effects 1553-1557
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1553
- `argsNum`: `2`
- `info`: `自身体力高于最大体力的1/{0}时攻击后附加造成伤害值{1}%的百分比伤害`
### Effect 1554
- `argsNum`: `3`
- `info`: `若自身当前体力低于最大体力的1/{0}则令自身{1}且免疫下{2}次受到的攻击`
- `param`: `1,1,1`
### Effect 1555
- `argsNum`: `1`
- `info`: `对手不处于能力提升时令对手所有技能PP值-{0}`
### Effect 1556
- `argsNum`: `3`
- `info`: `{0}回合内每回合{1}%闪避对手攻击,未触发则使对手全属性-{2}`
### Effect 1557
- `argsNum`: `1`
- `info`: `本回合未打出致命一击则令对手随机{0}个技能PP值归零`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 189: Effects 1558-1562
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1558
- `argsNum`: `2`
- `info`: `{0}回合若打出致命一击则造成的攻击伤害提升{1}%`
### Effect 1559
- `argsNum`: `2`
- `info`: `{0}回合内自身释放技能{1}%不消耗PP值`
### Effect 1560
- `argsNum`: `2`
- `info`: `将当回合护盾所承受的伤害值以百分比伤害的形式{0}%反弹给对手,若护盾未承受伤害值则使对手随机的{1}个技能PP值归零`
### Effect 1561
- `argsNum`: `2`
- `info`: `获得点数等同于双方最大体力差值的护盾,最高{0}点,护盾被击破时自身下{1}次使用的攻击技能附加与双方最大体力差护盾值相同的威力`
### Effect 1562
- `argsNum`: `5`
- `info`: `命中后{0}%令对手{1},触发后{2}回合内对手主动切换精灵则登场精灵{3}%进入{4}状态`
- `param`: `1,1,1|1,4,4`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 190: Effects 1563-1567
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1563
- `argsNum`: `3`
- `info`: `损失自身{0}点体力,给对手造成{1}点固定伤害,若自身体力不足{2}则损失全部体力且造成的固定伤害翻倍`
### Effect 1564
- `argsNum`: `2`
- `info`: `恢复自身{0}点体力,若自身满天赋值则{1}%附加等量百分比伤害`
### Effect 1565
- `argsNum`: `2`
- `info`: `{0}回合内每回合结束时使对手随机{1}个技能PP归零`
### Effect 1566
- `argsNum`: `1`
- `info`: `{0}回合内每回合结束后反转对手能力提升状态`
### Effect 1567
- `argsNum`: `0`
- `info`: `获得海洋的祝福使自身下2回合先制+2且攻击必定命中、必定致命`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 211: Effects 1670-1674
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1670
- `argsNum`: `3`
- `info`: `{0}%令对手{1},对手为自身天敌时概率提升{2}%,未触发则消除对手回合类效果`
- `param`: `1,1,1`
### Effect 1671
- `argsNum`: `2`
- `info`: `造成的攻击伤害不低于{0},若对手处于能力提升状态则造成的攻击伤害不低于{1}`
### Effect 1672
- `argsNum`: `1`
- `info`: `出手时若自身未满体力则吸取对手{0}点体力`
### Effect 1673
- `argsNum`: `2`
- `info`: `命中后{0}%的概率秒杀对手,未触发则造成的伤害不少于{1}`
### Effect 1674
- `argsNum`: `3`
- `info`: `{0}回合内每回合使用技能吸取对手最大体力的1/{1},若对手未受到百分比伤害则额外附加{2}点真实伤害`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,37 +0,0 @@
# Task 212: Effects 1675-1679
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1675
- `argsNum`: `1`
- `info`: `反转对手能力提升状态,反转成功则对手{0}回合内无法通过自身技能恢复体力`
### Effect 1676
- `argsNum`: `4`
- `info`: `{0}回合内每回合使用技能{1}%令对手{2},未触发则令自身全属性+{3}`
- `param`: `1,2,2`
### Effect 1677
- `argsNum`: `3`
- `info`: `附加给自身{0}点固定伤害致死时令自身残留1点体力附加给对手{1}点固定伤害,令自身下{2}次受到的攻击伤害转化为体力`
### Effect 1678
- `argsNum`: `1`
- `info`: `附加自身防御和特防能力提升总段数x{0}的固定伤害`
### Effect 1679
- `argsNum`: `4`
- `info`: `造成的伤害高于{0}则{1}%令对手{2}未触发则吸取对手最大体力的1/{3}`
- `param`: `1,2,2`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 213: Effects 1680-1684
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1680
- `argsNum`: `1`
- `info`: `对手不处于异常状态时附加{0}点真实伤害`
### Effect 1681
- `argsNum`: `2`
- `info`: `吸取对手能力提升状态,吸取成功则下{0}次受到的攻击伤害减少{1}点`
### Effect 1682
- `argsNum`: `4`
- `info`: `{0}%的概率伤害为{1}倍,未触发则令敌我双方全属性-{2}且下次翻倍概率额外提升{3}%`
### Effect 1683
- `argsNum`: `1`
- `info`: `{0}回合内自身的能力提升状态无法被消除或吸取`
### Effect 1684
- `argsNum`: `1`
- `info`: `{0}回合内对手的能力下降状态无法被解除或反转`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,36 +0,0 @@
# Task 214: Effects 1685-1689
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1685
- `argsNum`: `3`
- `info`: `1回合做{0}-{1}次攻击,对手处于异常状态时连击上限为{2}`
### Effect 1686
- `argsNum`: `2`
- `info`: `先出手时造成的攻击伤害提升{0}%,若对手当前体力值高于自身则伤害额外提升{1}%`
### Effect 1687
- `argsNum`: `1`
- `info`: `{0}回合内免疫并反弹所有受到的控制类异常状态`
### Effect 1688
- `argsNum`: `3`
- `info`: `消除敌我双方能力提升状态和回合类效果消除任意一项成功则吸取对手最大体力的1/{0}且{1}%令对手{2}`
- `param`: `1,2,2`
### Effect 1689
- `argsNum`: `2`
- `info`: `本回合未打出致命一击则恢复自己所有技能{0}点PP值并降低对手所有技能{1}点PP值`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -1,35 +0,0 @@
# Task 215: Effects 1690-1694
## 目标
- 补齐以下 5 或最后一组不足 5 当前判定未实现的 skill effect
- 实现位置优先放在 `logic/service/fight/effect/`
- effect 需要展示说明同步更新 `logic/service/fight/effect/effect_info_map.go`
- 完成后至少执行`cd /workspace/logic && go test ./service/fight/effect`
## Effect 列表
### Effect 1690
- `argsNum`: `1`
- `info`: `火之力量觉醒,使自身下{0}次攻击获得灼心之焰效果`
### Effect 1691
- `argsNum`: `2`
- `info`: `终阶源盾下{0}次被激活或被消耗则回合结束时附加{1}点固定伤害`
### Effect 1692
- `argsNum`: `2`
- `info`: `{0}%的概率造成伤害翻倍,终阶源盾处于激活状态时概率提升至{1}%`
### Effect 1693
- `argsNum`: `3`
- `info`: `{0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害,对手免疫百分比伤害时额外附加{2}点真实伤害`
### Effect 1694
- `argsNum`: `4`
- `info`: `随机吸取对手{0}-{1}点体力,若自身处于能力提升状态则效果转变为{2}-{3}点`
## 备注
- 该清单按当前仓库静态注册结果生成如果某个 effect 实际通过其他模块或运行时路径实现需要先复核后再落代码
- `201``445` 这类占位 effect优先补核心逻辑或补充明确的不可实现说明

View File

@@ -0,0 +1,139 @@
package effect
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"
)
// Effect 1047: {0}%令对手{1}未触发则吸取对手最大体力的1/{2}
type Effect1047 struct {
node.EffectNode
}
func (e *Effect1047) Skill_Use() bool {
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[2])
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
// Effect 1048: 若对手处于异常状态则自身造成的攻击伤害额外提升{0}%
type Effect1048 struct {
node.EffectNode
}
func (e *Effect1048) SkillHit() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if !e.Ctx().Opp.StatEffect_Exist_all() {
return true
}
addSkillPowerPercent(e.Ctx().SkillEntity, e.Args()[0])
return true
}
// Effect 1049: 击败对手则自身全属性+{0}
type Effect1049 struct {
node.EffectNode
}
func (e *Effect1049) Skill_Use() bool {
if e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
return true
}
boost := int8(e.Args()[0].IntPart())
for i := range e.Ctx().Our.Prop {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boost)
}
return true
}
// Effect 1050: 未击败对手则下{0}回合攻击使对手{1}%{2}
type Effect1050 struct {
node.EffectNode
}
func (e *Effect1050) Skill_Use() bool {
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect1050Sub{}, -1)
return true
}
type Effect1050Sub struct {
RoundEffectArg0Base
}
func (e *Effect1050Sub) OnSkill() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
// Effect 1051: 对手体力高于{0}则将对手体力减少到{1}
type Effect1051 struct {
node.EffectNode
}
func (e *Effect1051) Skill_Use() bool {
currentHP := e.Ctx().Opp.CurrentPet.GetHP()
if currentHP.Cmp(e.Args()[0]) <= 0 {
return true
}
targetHP := e.Args()[1]
if targetHP.Cmp(alpacadecimal.Zero) < 0 {
targetHP = alpacadecimal.Zero
}
if currentHP.Cmp(targetHP) <= 0 {
return true
}
e.Ctx().Opp.CurrentPet.Info.Hp = uint32(targetHP.IntPart())
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1047, &Effect1047{})
input.InitEffect(input.EffectType.Skill, 1048, &Effect1048{})
input.InitEffect(input.EffectType.Skill, 1049, &Effect1049{})
input.InitEffect(input.EffectType.Skill, 1050, &Effect1050{})
input.InitEffect(input.EffectType.Sub, 1050, &Effect1050Sub{})
input.InitEffect(input.EffectType.Skill, 1051, &Effect1051{})
}

View File

@@ -0,0 +1,173 @@
package effect
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"
)
// Effect 1213: {0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害
type Effect1213 struct {
RoundEffectArg0Base
}
func (e *Effect1213) OnSkill() bool {
if len(e.Args()) < 2 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1214: 对手处于异常状态则吸取对手{0}点体力
type Effect1214 struct {
node.EffectNode
}
func (e *Effect1214) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if !e.Ctx().Opp.StatEffect_Exist_all() {
return true
}
drain := e.Args()[0]
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
return true
}
// Effect 1215: 消除对手所有护盾效果,消除成功则使对手全属性-{0},自身体力低于对手时弱化效果翻倍
type Effect1215 struct {
node.EffectNode
}
func (e *Effect1215) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
if e.Ctx().Opp.CurrentShield().Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.ConsumeAllShield()
debuffLevel := int(e.Args()[0].IntPart())
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) < 0 {
debuffLevel *= 2
}
if debuffLevel <= 0 {
return true
}
if debuffLevel > 6 {
debuffLevel = 6
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(debuffLevel))
return true
}
// Effect 1216: 反转对手能力提升状态反转成功则恢复自身所有体力和PP值
type Effect1216 struct {
node.EffectNode
}
func (e *Effect1216) Skill_Use() bool {
reversed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP())
e.Ctx().Our.HealPP(-1)
return true
}
// Effect 1217: 消除对手能力提升状态,消除成功则对手下{0}次攻击技能无效
type Effect1217 struct {
node.EffectNode
}
func (e *Effect1217) Skill_Use() bool {
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1217, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1217Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1217Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1217Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1213, &Effect1213{})
input.InitEffect(input.EffectType.Skill, 1214, &Effect1214{})
input.InitEffect(input.EffectType.Skill, 1215, &Effect1215{})
input.InitEffect(input.EffectType.Skill, 1216, &Effect1216{})
input.InitEffect(input.EffectType.Skill, 1217, &Effect1217{})
input.InitEffect(input.EffectType.Sub, 1217, &Effect1217Sub{})
}

View File

@@ -0,0 +1,202 @@
package effect
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"
)
// Effect 1218: 未击败对手则下{0}回合自身先制+{1}
type Effect1218 struct {
node.EffectNode
}
func (e *Effect1218) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().Opp.CurrentPet.Info.Hp == 0 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect1218Sub{}, -1)
return true
}
type Effect1218Sub struct {
RoundEffectArg0Base
}
func (e *Effect1218Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 1219: 消除对手回合类效果,消除成功则下回合受到的伤害转化为自身体力
type Effect1219 struct {
node.EffectNode
}
func (e *Effect1219) Skill_Use() bool {
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1219)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1219Sub struct {
FixedDuration1Base
}
func (e *Effect1219Sub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, zone.Damage)
zone.Damage = alpacadecimal.Zero
return true
}
// Effect 1220: 消除对手能力提升状态,消除成功则下{0}回合自身攻击必定致命一击
type Effect1220 struct {
node.EffectNode
}
func (e *Effect1220) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1220, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1220Sub struct {
RoundEffectArg0Base
}
func (e *Effect1220Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1221: 反转自身能力下降状态,反转成功则自身免疫下{0}次受到的异常状态
type Effect1221 struct {
node.EffectNode
}
func (e *Effect1221) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
reversed := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1221, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1221Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1221Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1221Sub) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if in != e.Ctx().Opp || !input.IS_Stat(effEffect) {
return true
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return false
}
// Effect 1222: 先出手时使对手随机{0}个技能PP值归零
type Effect1222 struct {
node.EffectNode
}
func (e *Effect1222) OnSkill() bool {
if len(e.Args()) == 0 || !e.IsFirst() {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1218, &Effect1218{})
input.InitEffect(input.EffectType.Sub, 1218, &Effect1218Sub{})
input.InitEffect(input.EffectType.Skill, 1219, &Effect1219{})
input.InitEffect(input.EffectType.Sub, 1219, &Effect1219Sub{})
input.InitEffect(input.EffectType.Skill, 1220, &Effect1220{})
input.InitEffect(input.EffectType.Sub, 1220, &Effect1220Sub{})
input.InitEffect(input.EffectType.Skill, 1221, &Effect1221{})
input.InitEffect(input.EffectType.Sub, 1221, &Effect1221Sub{})
input.InitEffect(input.EffectType.Skill, 1222, &Effect1222{})
}

View File

@@ -0,0 +1,182 @@
package effect
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"
)
// Effect 1223: 造成的攻击伤害若高于{0}则令自身下{1}回合所有技能先制+{2}
type Effect1223 struct {
node.EffectNode
}
func (e *Effect1223) Skill_Use() bool {
if len(e.Args()) < 3 || e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) <= 0 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect1223Sub{}, -1)
return true
}
type Effect1223Sub struct {
RoundEffectArg1Base
}
func (e *Effect1223Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[2].IntPart())
return true
}
// Effect 1224: 消除对手回合类效果,消除成功则使自身下{0}回合必定致命一击
type Effect1224 struct {
node.EffectNode
}
func (e *Effect1224) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1224, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1224Sub struct {
RoundEffectArg0Base
}
func (e *Effect1224Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1225: 对手处于能力下降时吸取对手最大体力的1/{0}
type Effect1225 struct {
node.EffectNode
}
func (e *Effect1225) OnSkill() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if !e.Ctx().Opp.HasPropSub() {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[0])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
// Effect 1226: {0}回合内受到攻击伤害降低{1}点,回合结束时若当回合未受到攻击伤害则吸取对手{2}点体力
type Effect1226 struct {
RoundEffectArg0Base
hitThisRound bool
}
func (e *Effect1226) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 3 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) > 0 {
e.hitThisRound = true
}
reduction := e.Args()[1]
if reduction.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if zone.Damage.Cmp(reduction) > 0 {
zone.Damage = zone.Damage.Sub(reduction)
} else {
zone.Damage = alpacadecimal.Zero
}
return true
}
func (e *Effect1226) TurnEnd() {
if !e.hitThisRound && len(e.Args()) >= 3 && e.Args()[2].Cmp(alpacadecimal.Zero) > 0 {
drain := e.Args()[2]
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
}
e.hitThisRound = false
e.EffectNode.TurnEnd()
}
// Effect 1227: 自身处于能力提升状态则有{0}%概率使对手{1},先出手时概率翻倍
type Effect1227 struct {
node.EffectNode
}
func (e *Effect1227) Skill_Use() bool {
if len(e.Args()) < 2 || !e.Ctx().Our.HasPropADD() {
return true
}
chance := int(e.Args()[0].IntPart())
if e.IsFirst() {
chance *= 2
if chance > 100 {
chance = 100
}
}
success, _, _ := e.Input.Player.Roll(chance, 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1223, &Effect1223{})
input.InitEffect(input.EffectType.Sub, 1223, &Effect1223Sub{})
input.InitEffect(input.EffectType.Skill, 1224, &Effect1224{})
input.InitEffect(input.EffectType.Sub, 1224, &Effect1224Sub{})
input.InitEffect(input.EffectType.Skill, 1225, &Effect1225{})
input.InitEffect(input.EffectType.Skill, 1226, &Effect1226{})
input.InitEffect(input.EffectType.Skill, 1227, &Effect1227{})
}

View File

@@ -0,0 +1,212 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 1228: {0}回合内对手使用攻击技能则随机进入{1}种异常状态,未触发则消除对手回合类效果
type Effect1228 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1228) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
count := int(e.Args()[1].IntPart())
statusTypes := []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Poisoned),
int(info.PetStatus.Paralysis),
int(info.PetStatus.Fear),
int(info.PetStatus.Sleep),
}
if count <= 0 {
return true
}
if count > len(statusTypes) {
count = len(statusTypes)
}
indices := grand.Perm(len(statusTypes))
for _, idx := range indices[:count] {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, statusTypes[idx])
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
}
e.triggered = true
return true
}
func (e *Effect1228) TurnEnd() {
if !e.triggered && e.Duration() == 1 {
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
}
e.EffectNode.TurnEnd()
}
// Effect 1229: 自身体力高于对手时附加自身当前体力1/{0}的百分比伤害
type Effect1229 struct {
node.EffectNode
}
func (e *Effect1229) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) <= 0 {
return true
}
damage := e.Ctx().Our.CurrentPet.GetHP().Div(e.Args()[0])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1230: 自身体力低于对手时,下{0}次自身技能先制+{1}
type Effect1230 struct {
node.EffectNode
}
func (e *Effect1230) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) >= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1230, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1230Sub struct {
node.EffectNode
remaining int
priority int
}
func (e *Effect1230Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.priority = a[1]
}
}
func (e *Effect1230Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += e.priority
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1231: {0}%令对手{1}未触发则附加对手最大体力1/{2}的百分比伤害
type Effect1231 struct {
node.EffectNode
}
func (e *Effect1231) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[2])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1232: 反转自身能力下降状态,反转成功则附加给对手等同的能力下降状态
type Effect1232 struct {
node.EffectNode
}
func (e *Effect1232) OnSkill() bool {
type propDown struct {
index int8
level int8
}
var downs []propDown
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -2*v) {
downs = append(downs, propDown{index: int8(i), level: v})
}
}
if len(downs) == 0 {
return true
}
for _, down := range downs {
e.Ctx().Opp.SetProp(e.Ctx().Our, down.index, down.level)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1228, &Effect1228{})
input.InitEffect(input.EffectType.Skill, 1229, &Effect1229{})
input.InitEffect(input.EffectType.Skill, 1230, &Effect1230{})
input.InitEffect(input.EffectType.Sub, 1230, &Effect1230Sub{})
input.InitEffect(input.EffectType.Skill, 1231, &Effect1231{})
input.InitEffect(input.EffectType.Skill, 1232, &Effect1232{})
}

View File

@@ -0,0 +1,138 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1233: 吸取对手最大体力的{0}%,每次使用增加{1}%,最高{2}%
type Effect1233 struct {
AddLvelEffect
}
func (e *Effect1233) Skill_Use() bool {
percent := e.Args()[0]
if e.UseSkillCount > 1 {
percent = percent.Add(e.Args()[1].Mul(alpacadecimal.NewFromInt(e.UseSkillCount - 1)))
}
if percent.Cmp(e.Args()[2]) > 0 {
percent = e.Args()[2]
}
if percent.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Mul(percent).Div(alpacadecimal.NewFromInt(100))
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, nil, damage)
return true
}
// Effect 1234: 消除对手回合类效果,消除成功则对手全属性-{0}
type Effect1234 struct {
node.EffectNode
}
func (e *Effect1234) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[0].IntPart()))
return true
}
// Effect 1235: {0}回合内每回合{1}%闪避对手攻击,未触发则使对手随机{2}项技能PP值归零
type Effect1235 struct {
RoundEffectArg0Base
}
func (e *Effect1235) SkillHit_ex() bool {
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.AttackTime == 2 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
e.Ctx().SkillEntity.SetMiss()
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[2].IntPart()))
return true
}
// Effect 1236: {0}回合内若对手使用攻击技能则造成伤害前附加对手最大体力1/{1}的百分比伤害
type Effect1236 struct {
RoundEffectArg0Base
}
func (e *Effect1236) SkillHit_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1237: 使双方精灵所有技能PP值归零消除双方能力提升、下降状态以及回合类效果
type Effect1237 struct {
node.EffectNode
}
func (e *Effect1237) OnSkill() bool {
for i := range e.Ctx().Our.CurrentPet.Info.SkillList {
e.Ctx().Our.CurrentPet.Info.SkillList[i].PP = 0
}
for i := range e.Ctx().Opp.CurrentPet.Info.SkillList {
e.Ctx().Opp.CurrentPet.Info.SkillList[i].PP = 0
}
for i := range e.Ctx().Our.Prop {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0)
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
}
e.Ctx().Our.CancelTurn(e.Ctx().Our)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1233, &Effect1233{})
input.InitEffect(input.EffectType.Skill, 1234, &Effect1234{})
input.InitEffect(input.EffectType.Skill, 1235, &Effect1235{})
input.InitEffect(input.EffectType.Skill, 1236, &Effect1236{})
input.InitEffect(input.EffectType.Skill, 1237, &Effect1237{})
}

View File

@@ -0,0 +1,262 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1238: 全属性+{0},对手不为{1}系时强化效果翻倍
type Effect1238 struct {
node.EffectNode
}
func (e *Effect1238) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
boostValue := int8(e.Args()[0].IntPart())
if e.Ctx().Opp.CurrentPet.PetInfo.Type != int(e.Args()[1].IntPart()) {
boostValue *= 2
}
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boostValue)
}
return true
}
// Effect 1239: 恢复自身最大体力的1/{0}自身体力低于1/{1}时造成等量百分比伤害
type Effect1239 struct {
node.EffectNode
}
func (e *Effect1239) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
healAmount := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if healAmount.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
lowHP := false
if e.Args()[1].Cmp(alpacadecimal.Zero) > 0 {
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[1])
lowHP = e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) < 0
}
e.Ctx().Our.Heal(e.Ctx().Our, nil, healAmount)
if lowHP {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: healAmount,
})
}
return true
}
// Effect 1240: 当回合未击败对手则下{0}次自身技能附加自身最大体力1/{1}的百分比伤害
type Effect1240 struct {
node.EffectNode
}
func (e *Effect1240) Skill_Use() bool {
if len(e.Args()) < 2 || e.Ctx().Opp.CurrentPet.Info.Hp == 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1240, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1240Sub struct {
node.EffectNode
remaining int
divisor int
}
func (e *Effect1240Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.divisor = a[1]
}
}
func (e *Effect1240Sub) OnSkill() bool {
if e.remaining <= 0 || e.divisor <= 0 {
e.Alive(false)
return true
}
damage := e.Ctx().Our.CurrentPet.GetMaxHP().Div(alpacadecimal.NewFromInt(int64(e.divisor)))
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1241: 吸取对手{0}点固定体力自身体力低于1/{1}时吸取效果翻倍
type Effect1241 struct {
node.EffectNode
}
func (e *Effect1241) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
drain := e.Args()[0]
if e.Args()[1].Cmp(alpacadecimal.Zero) > 0 {
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[1])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) < 0 {
drain = drain.Mul(alpacadecimal.NewFromInt(2))
}
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, nil, drain)
return true
}
// Effect 1242: {0}%的概率伤害为{1}倍,未触发则下次翻倍概率额外提升{2}%且伤害提升变为{3}倍
type Effect1242 struct {
node.EffectNode
triggered bool
nextBonus int
boostedMode bool
}
func (e *Effect1242) SkillHit() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 4 {
return true
}
bonus := 0
if state := findEffect1242State(e.Ctx().Our, skill.XML.ID); state != nil {
bonus = state.bonusChance
e.boostedMode = true
}
chance := int(e.Args()[0].IntPart()) + bonus
if chance > 100 {
chance = 100
}
e.triggered, _, _ = e.Input.Player.Roll(chance, 100)
e.nextBonus = bonus + int(e.Args()[2].IntPart())
if e.triggered {
if state := findEffect1242State(e.Ctx().Our, skill.XML.ID); state != nil {
state.Alive(false)
}
}
return true
}
func (e *Effect1242) Damage_Mul(zone *info.DamageZone) bool {
if !e.triggered || zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
multiplier := int(e.Args()[1].IntPart())
if e.boostedMode {
multiplier = int(e.Args()[3].IntPart())
}
if multiplier > 1 {
zone.Mul(multiplier)
}
return true
}
func (e *Effect1242) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 4 || e.triggered {
return true
}
if state := findEffect1242State(e.Ctx().Our, skill.XML.ID); state != nil {
state.bonusChance = e.nextBonus
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1242, skill.XML.ID, e.nextBonus)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1242Sub struct {
node.EffectNode
skillID int
bonusChance int
}
func (e *Effect1242Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.skillID = a[0]
}
if len(a) > 1 {
e.bonusChance = a[1]
}
}
func (e *Effect1242Sub) SwitchOut(in *input.Input) bool {
if in == e.Ctx().Our {
e.Alive(false)
}
return true
}
func findEffect1242State(in *input.Input, skillID int) *Effect1242Sub {
if in == nil {
return nil
}
for i := len(in.Effects) - 1; i >= 0; i-- {
effect, ok := in.Effects[i].(*Effect1242Sub)
if !ok || !effect.Alive() || effect.skillID != skillID {
continue
}
return effect
}
return nil
}
func init() {
input.InitEffect(input.EffectType.Skill, 1238, &Effect1238{})
input.InitEffect(input.EffectType.Skill, 1239, &Effect1239{})
input.InitEffect(input.EffectType.Skill, 1240, &Effect1240{})
input.InitEffect(input.EffectType.Sub, 1240, &Effect1240Sub{})
input.InitEffect(input.EffectType.Skill, 1241, &Effect1241{})
input.InitEffect(input.EffectType.Skill, 1242, &Effect1242{})
input.InitEffect(input.EffectType.Sub, 1242, &Effect1242Sub{})
}

View File

@@ -0,0 +1,196 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 1243: 对手处于能力下降状态时先制+1
type Effect1243 struct {
node.EffectNode
}
func (e *Effect1243) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if !e.Ctx().Opp.HasPropSub() {
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority++
return true
}
// Effect 1244: 随机附加{0}-{1}点固伤,对手处于能力下降状态时固伤变为{2}-{3}点
type Effect1244 struct {
node.EffectNode
}
func (e *Effect1244) OnSkill() bool {
if len(e.Args()) < 4 {
return true
}
minDamage := int(e.Args()[0].IntPart())
maxDamage := int(e.Args()[1].IntPart())
if e.Ctx().Opp.HasPropSub() {
minDamage = int(e.Args()[2].IntPart())
maxDamage = int(e.Args()[3].IntPart())
}
if minDamage > maxDamage {
minDamage, maxDamage = maxDamage, minDamage
}
if maxDamage <= 0 {
return true
}
damage := maxDamage
if minDamage < maxDamage {
damage = grand.N(minDamage, maxDamage)
}
if damage <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(int64(damage)),
})
return true
}
// Effect 1245: 若自身处于能力提升状态则附加给对手等同于自身能力提升状态的能力下降状态,若未满足或未触发则令对手随机{0}项技能PP值归零
type Effect1245 struct {
node.EffectNode
}
func (e *Effect1245) OnSkill() bool {
applied := false
if e.Ctx().Our.HasPropADD() {
for i, v := range e.Ctx().Our.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -v) {
applied = true
}
}
}
if applied {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
// Effect 1246: 消除双方能力提升、下降状态,消除任意一方成功则令对手下{0}次使用的攻击技能无效
type Effect1246 struct {
node.EffectNode
}
func (e *Effect1246) OnSkill() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
cleared := false
for i := range e.Ctx().Our.Prop {
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1246, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1246Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1246Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1246Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.SetMiss()
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1247: 先出手时使对手当回合内无法通过技能恢复自身体力
type Effect1247 struct {
node.EffectNode
}
func (e *Effect1247) Skill_Use() bool {
if !e.IsFirst() {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1247)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1247Sub struct {
FixedDuration1Base
}
func (e *Effect1247Sub) Heal_Pre(ac action.BattleActionI, value *int) bool {
if value == nil || *value <= 0 {
return true
}
if _, ok := ac.(*action.SelectSkillAction); !ok {
return true
}
*value = 0
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1243, &Effect1243{})
input.InitEffect(input.EffectType.Skill, 1244, &Effect1244{})
input.InitEffect(input.EffectType.Skill, 1245, &Effect1245{})
input.InitEffect(input.EffectType.Skill, 1246, &Effect1246{})
input.InitEffect(input.EffectType.Sub, 1246, &Effect1246Sub{})
input.InitEffect(input.EffectType.Skill, 1247, &Effect1247{})
input.InitEffect(input.EffectType.Sub, 1247, &Effect1247Sub{})
}

View File

@@ -0,0 +1,166 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
var effect1394Statuses = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Poisoned),
int(info.PetStatus.Paralysis),
int(info.PetStatus.Fear),
int(info.PetStatus.Sleep),
}
func applyRandomStatuses1394(owner, target *input.Input, count int) {
if owner == nil || target == nil || count <= 0 || len(effect1394Statuses) == 0 {
return
}
if count > len(effect1394Statuses) {
count = len(effect1394Statuses)
}
indexes := grand.Perm(len(effect1394Statuses))
for _, idx := range indexes[:count] {
statusEffect := owner.InitEffect(input.EffectType.Status, effect1394Statuses[idx])
if statusEffect != nil {
target.AddEffect(owner, statusEffect)
}
}
}
// Effect 1393: {0}回合内每回合使用技能则造成伤害前令对手防御-{1}、速度-{2}未触发则附加对手最大体力1/{3}的百分比伤害
type Effect1393 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1393) SkillHit() bool {
e.triggered = false
if len(e.Args()) < 4 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
defenseDown := e.Ctx().Opp.SetProp(e.Ctx().Our, 1, -int8(e.Args()[1].IntPart()))
speedDown := e.Ctx().Opp.SetProp(e.Ctx().Our, 4, -int8(e.Args()[2].IntPart()))
e.triggered = defenseDown || speedDown
return true
}
func (e *Effect1393) Skill_Use() bool {
if e.triggered || len(e.Args()) < 4 || e.Args()[3].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[3])
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1394: {0}回合内对手使用属性技能则随机进入{1}种异常状态
type Effect1394 struct {
RoundEffectArg0Base
}
func (e *Effect1394) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() != info.Category.STATUS {
return true
}
applyRandomStatuses1394(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
// Effect 1395: 若先出手则必定打出致命一击
type Effect1395 struct {
node.EffectNode
}
func (e *Effect1395) SkillHit() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if !e.Ctx().Our.FightC.IsFirst(e.Ctx().Our.Player) {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1396: {0}回合内每回合吸取对手最大体力的1/{1}自身体力低于最大体力的1/{2}时转变为吸取对手最大体力的1/{3}
type Effect1396 struct {
RoundEffectArg0Base
}
func (e *Effect1396) TurnEnd() {
if e.Ctx().Our.CurrentPet.Info.Hp > 0 && e.Ctx().Opp.CurrentPet.Info.Hp > 0 && len(e.Args()) >= 4 {
divisor := e.Args()[1]
thresholdDivisor := e.Args()[2]
if thresholdDivisor.Cmp(alpacadecimal.Zero) > 0 {
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(thresholdDivisor)
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) < 0 {
divisor = e.Args()[3]
}
}
if divisor.Cmp(alpacadecimal.Zero) > 0 {
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(divisor)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
}
}
}
e.EffectNode.TurnEnd()
}
// Effect 1397: 全属性+{0}自身体力低于1/{1}时强化效果翻倍
type Effect1397 struct {
node.EffectNode
}
func (e *Effect1397) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
boostValue := int8(e.Args()[0].IntPart())
if len(e.Args()) > 1 && e.Args()[1].Cmp(alpacadecimal.Zero) > 0 {
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[1])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) < 0 {
boostValue *= 2
}
}
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boostValue)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1393, &Effect1393{})
input.InitEffect(input.EffectType.Skill, 1394, &Effect1394{})
input.InitEffect(input.EffectType.Skill, 1395, &Effect1395{})
input.InitEffect(input.EffectType.Skill, 1396, &Effect1396{})
input.InitEffect(input.EffectType.Skill, 1397, &Effect1397{})
}

View File

@@ -0,0 +1,229 @@
package effect
import (
"blazing/common/data/xmlres"
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
func setSkillPowerOverride(skill *info.SkillEntity, delta int) {
if skill == nil {
return
}
move, ok := xmlres.SkillMap[int(skill.Info.ID)]
if !ok {
skill.XML.Power += delta
return
}
skill.XML.Power = move.Power + delta
}
func clearPositiveProps(target, owner *input.Input) bool {
if target == nil || owner == nil {
return false
}
cleared := false
for i, v := range target.Prop[:] {
if v <= 0 {
continue
}
if target.SetProp(owner, int8(i), 0) {
cleared = true
}
}
return cleared
}
func applyStatus(owner, target *input.Input, statusID int) {
if owner == nil || target == nil {
return
}
statusEffect := owner.InitEffect(input.EffectType.Status, statusID)
if statusEffect != nil {
target.AddEffect(owner, statusEffect)
}
}
// Effect 1398: 消除对手能力提升状态,消除成功则{0}%令对手{1},未触发则{2}%令对手{3}
type Effect1398 struct {
node.EffectNode
}
func (e *Effect1398) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
if !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
fallback, _, _ := e.Input.Player.Roll(int(e.Args()[2].IntPart()), 100)
if fallback {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[3].IntPart()))
}
return true
}
// Effect 1399: 消除对手回合类效果,消除成功则对手{0},未触发则自身免疫下{1}次受到的异常状态
type Effect1399 struct {
node.EffectNode
}
func (e *Effect1399) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before > 0 {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
immuneEffect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1399, int(e.Args()[1].IntPart()))
if immuneEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, immuneEffect)
}
return true
}
type Effect1399Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1399Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1399Sub) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if in != e.Ctx().Opp || !input.IS_Stat(effEffect) {
return true
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return false
}
// Effect 1400: {0}回合内若自身回合类效果被消除则{1}%令对手{2}
type Effect1400 struct {
node.EffectNode
}
func (e *Effect1400) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect1400Sub{}, -1)
return true
}
type Effect1400Sub struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1400Sub) Alive(t ...bool) bool {
if len(t) > 0 && !t[0] && !e.triggered && e.Duration() > 0 && e.Ctx().Opp != nil && e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
e.triggered = true
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
}
}
return e.EffectNode.Alive(t...)
}
// Effect 1401: 后出手时{0}%令对手对手{1},未触发则使自身下{2}回合必定致命一击
type Effect1401 struct {
node.EffectNode
}
func (e *Effect1401) Skill_Use() bool {
if len(e.Args()) < 3 || e.IsFirst() {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
critEffect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1401, int(e.Args()[2].IntPart()))
if critEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, critEffect)
}
return true
}
type Effect1401Sub struct {
node.EffectNode
}
func (e *Effect1401Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
if len(a) > 0 {
e.Duration(a[0])
}
}
func (e *Effect1401Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 1402: 技能威力提升1点不受其他威力提升/下降效果加成
type Effect1402 struct {
node.EffectNode
}
func (e *Effect1402) CalculatePre() bool {
if e.Ctx().SkillEntity == nil {
return true
}
setSkillPowerOverride(e.Ctx().SkillEntity, 1)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1398, &Effect1398{})
input.InitEffect(input.EffectType.Skill, 1399, &Effect1399{})
input.InitEffect(input.EffectType.Sub, 1399, &Effect1399Sub{})
input.InitEffect(input.EffectType.Skill, 1400, &Effect1400{})
input.InitEffect(input.EffectType.Sub, 1400, &Effect1400Sub{})
input.InitEffect(input.EffectType.Skill, 1401, &Effect1401{})
input.InitEffect(input.EffectType.Sub, 1401, &Effect1401Sub{})
input.InitEffect(input.EffectType.Skill, 1402, &Effect1402{})
}

View File

@@ -0,0 +1,77 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"math"
)
type fixedPowerOverrideEffect struct {
node.EffectNode
delta int
}
func (e *fixedPowerOverrideEffect) CalculatePre() bool {
setSkillPowerOverride(e.Ctx().SkillEntity, e.delta)
return true
}
// Effect 1403: 技能威力提升4点不受其他威力提升/下降效果加成
type Effect1403 struct{ fixedPowerOverrideEffect }
// Effect 1404: 技能威力提升7点不受其他威力提升/下降效果加成
type Effect1404 struct{ fixedPowerOverrideEffect }
// Effect 1405: 技能威力提升10点不受其他威力提升/下降效果加成
type Effect1405 struct{ fixedPowerOverrideEffect }
// Effect 1406: 技能威力提升14点不受其他威力提升/下降效果加成
type Effect1406 struct{ fixedPowerOverrideEffect }
// Effect 1407: 技能威力提升17点不受其他威力提升/下降效果加成
type Effect1407 struct{ fixedPowerOverrideEffect }
// Effect 1408: 技能威力提升20点不受其他威力提升/下降效果加成
type Effect1408 struct{ fixedPowerOverrideEffect }
// Effect 1409: 技能威力提升24点不受其他威力提升/下降效果加成
type Effect1409 struct{ fixedPowerOverrideEffect }
// Effect 1410: 技能威力提升27点不受其他威力提升/下降效果加成
type Effect1410 struct{ fixedPowerOverrideEffect }
// Effect 1411: 技能威力提升30点不受其他威力提升/下降效果加成
type Effect1411 struct{ fixedPowerOverrideEffect }
// Effect 1412: 自身体力低于300时必定先手
type Effect1412 struct {
node.EffectNode
}
func (e *Effect1412) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if e.Ctx().Our.CurrentPet.GetHP().IntPart() >= 300 {
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority = math.MaxInt
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1403, &Effect1403{fixedPowerOverrideEffect{delta: 4}})
input.InitEffect(input.EffectType.Skill, 1404, &Effect1404{fixedPowerOverrideEffect{delta: 7}})
input.InitEffect(input.EffectType.Skill, 1405, &Effect1405{fixedPowerOverrideEffect{delta: 10}})
input.InitEffect(input.EffectType.Skill, 1406, &Effect1406{fixedPowerOverrideEffect{delta: 14}})
input.InitEffect(input.EffectType.Skill, 1407, &Effect1407{fixedPowerOverrideEffect{delta: 17}})
input.InitEffect(input.EffectType.Skill, 1408, &Effect1408{fixedPowerOverrideEffect{delta: 20}})
input.InitEffect(input.EffectType.Skill, 1409, &Effect1409{fixedPowerOverrideEffect{delta: 24}})
input.InitEffect(input.EffectType.Skill, 1410, &Effect1410{fixedPowerOverrideEffect{delta: 27}})
input.InitEffect(input.EffectType.Skill, 1411, &Effect1411{fixedPowerOverrideEffect{delta: 30}})
input.InitEffect(input.EffectType.Skill, 1412, &Effect1412{})
}

View File

@@ -0,0 +1,267 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
const petStatusDazed info.EnumPetStatus = 29
var effect1498Statuses = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Blind),
int(petStatusDazed),
}
func applyRandomStatuses1498(owner, target *input.Input, count int) int {
if owner == nil || target == nil || count <= 0 {
return 0
}
if count > len(effect1498Statuses) {
count = len(effect1498Statuses)
}
added := 0
indexes := grand.Perm(len(effect1498Statuses))
for _, idx := range indexes[:count] {
statusEffect := owner.InitEffect(input.EffectType.Status, effect1498Statuses[idx])
if statusEffect == nil {
continue
}
before := len(target.Effects)
target.AddEffect(owner, statusEffect)
if len(target.Effects) > before {
added++
}
}
return added
}
func reduceRandomSkillPP(target *input.Input) {
if target == nil {
return
}
skills := target.CurrentPet.Info.SkillList
if len(skills) == 0 {
return
}
idx := grand.Intn(len(skills))
if skills[idx].PP > 0 {
skills[idx].PP--
}
}
func hasDarkSeed(target *input.Input) bool {
if target == nil {
return false
}
effect := target.GetEffect(input.EffectType.Sub, 1501)
return effect != nil && effect.Alive()
}
// Effect 1498: 随机附加烧伤,冻伤,失明,失神中的{0}种异常状态,未触发则自身下{1}回合造成的伤害提升{2}%
type Effect1498 struct {
node.EffectNode
}
func (e *Effect1498) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
if applyRandomStatuses1498(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart())) > 0 {
return true
}
boostEffect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
1498,
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
)
if boostEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, boostEffect)
}
return true
}
type Effect1498Sub struct {
node.EffectNode
percent alpacadecimal.Decimal
}
func (e *Effect1498Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
if len(a) > 0 {
e.Duration(a[0])
}
if len(a) > 1 {
e.percent = alpacadecimal.NewFromInt(int64(a[1]))
}
}
func (e *Effect1498Sub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.percent)).Div(hundred)
return true
}
// Effect 1499: 体力低于最大体力的1/3时先制+3
type Effect1499 struct {
node.EffectNode
}
func (e *Effect1499) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
if e.Ctx().Our.CurrentPet.GetHP().Mul(alpacadecimal.NewFromInt(3)).Cmp(maxHP) >= 0 {
return true
}
current.SkillEntity.XML.Priority += 3
return true
}
// Effect 1500: 1回合做{0}-{1}次攻击,自身处于护盾状态下连击上限为{2}
// 当前战斗模型未逐段执行多段攻击,这里按随机连击次数折算为红伤倍率提升。
type Effect1500 struct {
node.EffectNode
}
func (e *Effect1500) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
minHits := int(e.Args()[0].IntPart())
maxHits := int(e.Args()[1].IntPart())
if minHits <= 0 {
minHits = 1
}
if maxHits < minHits {
maxHits = minHits
}
if e.Ctx().Our.HasShield() {
shieldCap := int(e.Args()[2].IntPart())
if shieldCap > 0 && shieldCap < maxHits {
maxHits = shieldCap
}
if maxHits < minHits {
maxHits = minHits
}
}
hits := minHits
if maxHits > minHits {
hits += grand.Intn(maxHits - minHits + 1)
}
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(int64(hits)))
return true
}
// Effect 1501: 命中后为对手种下一颗黑暗之种
type Effect1501 struct {
node.EffectNode
}
func (e *Effect1501) Skill_Use() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if e.Ctx().Opp.CurrentPet.Info.Hp <= 0 {
return true
}
darkSeed := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1501)
if darkSeed != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, darkSeed)
}
return true
}
type Effect1501Sub struct {
node.EffectNode
stage int
}
func (e *Effect1501Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
e.CanStack(false)
}
func (e *Effect1501Sub) SwitchOut(in *input.Input) bool {
if in == e.Ctx().Our {
e.Alive(false)
}
return true
}
func (e *Effect1501Sub) TurnEnd() {
if e.Ctx().Our.CurrentPet.Info.Hp <= 0 {
return
}
if e.stage >= 4 {
e.Ctx().Our.DelPP(1)
return
}
reduceRandomSkillPP(e.Ctx().Our)
e.stage++
}
// Effect 1502: 对手身上存在黑暗之种时先制+1
type Effect1502 struct {
node.EffectNode
}
func (e *Effect1502) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if !hasDarkSeed(e.Ctx().Opp) {
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += 1
return true
}
func init() {
dazed := &StatusCannotAct{}
dazed.Status = petStatusDazed
input.InitEffect(input.EffectType.Status, int(petStatusDazed), dazed)
input.InitEffect(input.EffectType.Skill, 1498, &Effect1498{})
input.InitEffect(input.EffectType.Sub, 1498, &Effect1498Sub{})
input.InitEffect(input.EffectType.Skill, 1499, &Effect1499{})
input.InitEffect(input.EffectType.Skill, 1500, &Effect1500{})
input.InitEffect(input.EffectType.Skill, 1501, &Effect1501{})
input.InitEffect(input.EffectType.Sub, 1501, &Effect1501Sub{})
input.InitEffect(input.EffectType.Skill, 1502, &Effect1502{})
}

View File

@@ -0,0 +1,216 @@
package effect
import (
element "blazing/common/data/Element"
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
"github.com/gogf/gf/v2/util/grand"
)
const petStatusCurse info.EnumPetStatus = 23
var effect1507Statuses = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Poisoned),
int(info.PetStatus.Paralysis),
int(info.PetStatus.Fear),
int(info.PetStatus.Sleep),
}
func clearDarkSeed(target *input.Input) bool {
if target == nil {
return false
}
cleared := false
for _, eff := range target.Effects {
if eff == nil || !eff.Alive() {
continue
}
effID := eff.ID()
if effID.GetEffectType() != input.EffectType.Sub || int(effID.Suffix()) != 1501 {
continue
}
eff.Alive(false)
cleared = true
}
return cleared
}
func darkSeedStage(target *input.Input) int {
if target == nil {
return -1
}
eff := target.GetEffect(input.EffectType.Sub, 1501)
if eff == nil || !eff.Alive() {
return -1
}
darkSeed, ok := eff.(*Effect1501Sub)
if !ok {
return -1
}
return darkSeed.stage
}
func hasDragonType(target *input.Input) bool {
if target == nil || target.CurrentPet == nil {
return false
}
petType := target.CurrentPet.GetType()
if petType == nil {
return false
}
if petType.Primary == element.ElementTypeDragon {
return true
}
return petType.Secondary != nil && *petType.Secondary == element.ElementTypeDragon
}
func applyRandomStatuses1507(owner, target *input.Input, count int) bool {
if owner == nil || target == nil || count <= 0 {
return false
}
if count > len(effect1507Statuses) {
count = len(effect1507Statuses)
}
triggered := false
indexes := grand.Perm(len(effect1507Statuses))
for _, idx := range indexes[:count] {
statusEffect := owner.InitEffect(input.EffectType.Status, effect1507Statuses[idx])
if statusEffect == nil {
continue
}
before := len(target.Effects)
target.AddEffect(owner, statusEffect)
if len(target.Effects) > before {
triggered = true
}
}
return triggered
}
// Effect 1503: 清除对手身上的黑暗之种清除成功则令对手随机受到1-500点固定伤害
type Effect1503 struct {
node.EffectNode
}
func (e *Effect1503) Skill_Use() bool {
if !clearDarkSeed(e.Ctx().Opp) {
return true
}
damage := alpacadecimal.NewFromInt(int64(grand.Intn(500) + 1))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 1504: 40%令对手诅咒,若对手身上存在黑暗之种则概率翻倍
type Effect1504 struct {
node.EffectNode
}
func (e *Effect1504) Skill_Use() bool {
chance := 40
if hasDarkSeed(e.Ctx().Opp) {
chance *= 2
}
if chance > 100 {
chance = 100
}
success, _, _ := e.Input.Player.Roll(chance, 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(petStatusCurse))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
// Effect 1505: 黑暗之种成长期时附加200点固定伤害黑暗之种长大后固定伤害翻倍
type Effect1505 struct {
node.EffectNode
}
func (e *Effect1505) Skill_Use() bool {
stage := darkSeedStage(e.Ctx().Opp)
if stage < 0 {
return true
}
damage := int64(200)
if stage >= 4 {
damage *= 2
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: alpacadecimal.NewFromInt(damage),
})
return true
}
// Effect 1506: 若对手不是龙系精灵则恢复自身{0}点体力
type Effect1506 struct {
node.EffectNode
}
func (e *Effect1506) Skill_Use() bool {
if len(e.Args()) == 0 || hasDragonType(e.Ctx().Opp) {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[0])
return true
}
// Effect 1507: {0}回合内自身受到攻击则令对手随机进入{1}种异常状态,未触发则消除对手回合类效果
type Effect1507 struct {
RoundEffectArg0Base
triggered bool
}
func (e *Effect1507) Skill_Use_ex() bool {
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if applyRandomStatuses1507(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart())) {
e.triggered = true
}
return true
}
func (e *Effect1507) TurnEnd() {
if !e.triggered && e.Duration() == 1 {
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
}
e.EffectNode.TurnEnd()
}
func init() {
curse := &BaseStatus{}
curse.Status = petStatusCurse
input.InitEffect(input.EffectType.Status, int(petStatusCurse), curse)
input.InitEffect(input.EffectType.Skill, 1503, &Effect1503{})
input.InitEffect(input.EffectType.Skill, 1504, &Effect1504{})
input.InitEffect(input.EffectType.Skill, 1505, &Effect1505{})
input.InitEffect(input.EffectType.Skill, 1506, &Effect1506{})
input.InitEffect(input.EffectType.Skill, 1507, &Effect1507{})
}

View File

@@ -0,0 +1,277 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
var effect1508IgnoredImmunityIDs = map[int]struct{}{
170: {},
525: {},
570: {},
850: {},
1011: {},
1511: {},
}
func applyRandomStatuses1510(owner, target *input.Input, count int) bool {
if owner == nil || target == nil || count <= 0 {
return false
}
if count > len(effect1507Statuses) {
count = len(effect1507Statuses)
}
triggered := false
indexes := grand.Perm(len(effect1507Statuses))
for _, idx := range indexes[:count] {
statusEffect := owner.InitEffect(input.EffectType.Status, effect1507Statuses[idx])
if statusEffect == nil {
continue
}
before := len(target.Effects)
target.AddEffect(owner, statusEffect)
if len(target.Effects) > before {
triggered = true
}
}
return triggered
}
// Effect 1508: 先出手时无视攻击免疫效果
type Effect1508 struct {
node.EffectNode
disabled []input.Effect
}
func (e *Effect1508) SkillHit() bool {
if !e.IsFirst() || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.disabled = e.disabled[:0]
for _, eff := range e.Ctx().Opp.Effects {
if eff == nil || !eff.Alive() {
continue
}
if _, ok := effect1508IgnoredImmunityIDs[int(eff.ID().Suffix())]; !ok {
continue
}
eff.Alive(false)
e.disabled = append(e.disabled, eff)
}
return true
}
func (e *Effect1508) restoreDisabled() {
for _, eff := range e.disabled {
if eff == nil {
continue
}
eff.Alive(true)
}
e.disabled = e.disabled[:0]
}
func (e *Effect1508) Skill_Use() bool {
e.restoreDisabled()
return true
}
func (e *Effect1508) Action_end() bool {
e.restoreDisabled()
return true
}
// Effect 1509: 令对手全属性-{0}且随机{1}个技能PP值归零技能无效时消耗自身全部体力并令对手全属性-1然后对手下3次使用技能消耗的PP值为3倍
type Effect1509 struct {
node.EffectNode
}
func (e *Effect1509) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
skill := e.Ctx().SkillEntity
if skill != nil && skill.AttackTime == 0 {
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetMaxHP(),
})
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, 1)
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1509)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[0].IntPart()))
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
return true
}
type Effect1509Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1509Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
e.remaining = 3
}
func (e *Effect1509Sub) HookPP(count *int) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
*count *= 3
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1510: {0}回合内对手主动切换精灵则登场精灵{1}%随机进入{2}种异常状态
type Effect1510 struct {
node.EffectNode
}
func (e *Effect1510) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1510, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1510Sub struct {
node.EffectNode
pending bool
}
func (e *Effect1510Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
if len(a) > 0 {
e.Duration(a[0])
}
}
func (e *Effect1510Sub) SwitchOut(in *input.Input) bool {
if in != e.Ctx().Our || e.Ctx().Our.CurrentPet == nil {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp > 0 {
e.pending = true
}
return true
}
func (e *Effect1510Sub) SwitchIn(in *input.Input) bool {
if !e.pending || in != e.Ctx().Our || len(e.Args()) < 3 {
return true
}
e.pending = false
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
applyRandomStatuses1510(e.Ctx().Opp, e.Ctx().Our, int(e.Args()[2].IntPart()))
return true
}
// Effect 1511: 先出手时免疫当回合受到的攻击伤害,若对手为自身天敌则免疫并反弹给对手造成伤害值{0}%的百分比伤害
type Effect1511 struct {
node.EffectNode
}
func (e *Effect1511) DamageLockEx(zone *info.DamageZone) bool {
if !e.IsFirst() || zone == nil || zone.Type != info.DamageType.Red || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := zone.Damage
zone.Damage = alpacadecimal.Zero
if !e.ISNaturalEnemy() || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
reflectDamage := damage.Mul(e.Args()[0]).Div(hundred)
if reflectDamage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: reflectDamage,
})
return true
}
// Effect 1512: 集结天幕四龙之神力使自身下2回合先制+3且攻击必定命中、必定致命
type Effect1512 struct {
node.EffectNode
}
func (e *Effect1512) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1512)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1512Sub struct {
FixedDuration2Base
}
func (e *Effect1512Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += 3
return true
}
func (e *Effect1512Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.MustHit = 1
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1508, &Effect1508{})
input.InitEffect(input.EffectType.Skill, 1509, &Effect1509{})
input.InitEffect(input.EffectType.Sub, 1509, &Effect1509Sub{})
input.InitEffect(input.EffectType.Skill, 1510, &Effect1510{})
input.InitEffect(input.EffectType.Sub, 1510, &Effect1510Sub{})
input.InitEffect(input.EffectType.Skill, 1511, &Effect1511{})
input.InitEffect(input.EffectType.Skill, 1512, &Effect1512{})
input.InitEffect(input.EffectType.Sub, 1512, &Effect1512Sub{})
}

View File

@@ -0,0 +1,126 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1553: 自身体力高于最大体力的1/{0}时攻击后附加造成伤害值{1}%的百分比伤害
type Effect1553 struct {
node.EffectNode
}
func (e *Effect1553) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 2 {
return true
}
if e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 || e.Ctx().Our.SumDamage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) <= 0 {
return true
}
damage := e.Ctx().Our.SumDamage.Mul(e.Args()[1]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
return true
}
// Effect 1554: 若自身当前体力低于最大体力的1/{0}则令自身{1}且免疫下{2}次受到的攻击
type Effect1554 struct {
node.EffectNode
}
func (e *Effect1554) Skill_Use() bool {
if len(e.Args()) < 3 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
threshold := e.Ctx().Our.CurrentPet.GetMaxHP().Div(e.Args()[0])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) >= 0 {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, statusEffect)
}
immuneEffect := e.Ctx().Our.InitEffect(input.EffectType.Skill, 570, int(e.Args()[2].IntPart()))
if immuneEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, immuneEffect)
}
return true
}
// Effect 1555: 对手不处于能力提升时令对手所有技能PP值-{0}
type Effect1555 struct {
node.EffectNode
}
func (e *Effect1555) Skill_Use() bool {
if len(e.Args()) == 0 || e.Ctx().Opp.HasPropADD() {
return true
}
e.Ctx().Opp.DelPP(int(e.Args()[0].IntPart()))
return true
}
// Effect 1556: {0}回合内每回合{1}%闪避对手攻击,未触发则使对手全属性-{2}
type Effect1556 struct {
RoundEffectArg0Base
}
func (e *Effect1556) SkillHit_ex() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 3 {
return true
}
if skill.AttackTime != 2 {
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success && skill.SetMiss() {
return true
}
}
applyAllPropDown(e.Ctx().Our, e.Ctx().Opp, int8(e.Args()[2].IntPart()))
return true
}
// Effect 1557: 本回合未打出致命一击则令对手随机{0}个技能PP值归零
type Effect1557 struct {
node.EffectNode
}
func (e *Effect1557) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || skill.Crit != 0 || len(e.Args()) == 0 {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1553, &Effect1553{})
input.InitEffect(input.EffectType.Skill, 1554, &Effect1554{})
input.InitEffect(input.EffectType.Skill, 1555, &Effect1555{})
input.InitEffect(input.EffectType.Skill, 1556, &Effect1556{})
input.InitEffect(input.EffectType.Skill, 1557, &Effect1557{})
}

View File

@@ -0,0 +1,351 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1558: 下{0}回合若打出致命一击则造成的攻击伤害提升{1}%
type Effect1558 struct {
node.EffectNode
}
func (e *Effect1558) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1558, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1558Sub struct {
RoundEffectArg0Base
}
func (e *Effect1558Sub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.Crit == 0 {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[1])).Div(hundred)
return true
}
// Effect 1559: {0}回合内自身释放技能{1}%不消耗PP值
type Effect1559 struct {
node.EffectNode
}
func (e *Effect1559) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1559, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1559Sub struct {
RoundEffectArg0Base
}
func (e *Effect1559Sub) HookPP(count *int) bool {
if len(e.Args()) < 2 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
*count = 0
}
return true
}
// Effect 1560: 将当回合护盾所承受的伤害值以百分比伤害的形式{0}%反弹给对手,若护盾未承受伤害值则使对手随机的{1}个技能PP值归零
type Effect1560 struct {
node.EffectNode
}
func (e *Effect1560) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1560, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1560Sub struct {
FixedDuration1Base
absorbed alpacadecimal.Decimal
}
func (e *Effect1560Sub) Damage_Shield(zone *info.DamageZone) bool {
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
absorbed := alpacadecimal.Min(e.Ctx().Our.CurrentShield(), zone.Damage)
if absorbed.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.absorbed = e.absorbed.Add(absorbed)
return true
}
func (e *Effect1560Sub) TurnEnd() {
if len(e.Args()) >= 2 {
if e.absorbed.Cmp(alpacadecimal.Zero) > 0 {
damage := e.absorbed.Mul(e.Args()[0]).Div(hundred)
if damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
}
} else {
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
}
}
e.EffectNode.TurnEnd()
}
// Effect 1561: 获得点数等同于双方最大体力差值的护盾,最高{0}点,护盾被击破时自身下{1}次使用的攻击技能附加与双方最大体力差护盾值相同的威力
type Effect1561 struct {
node.EffectNode
}
func (e *Effect1561) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
ourMaxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
oppMaxHP := e.Ctx().Opp.CurrentPet.GetMaxHP()
shieldValue := ourMaxHP.Sub(oppMaxHP)
if shieldValue.Cmp(alpacadecimal.Zero) < 0 {
shieldValue = shieldValue.Mul(alpacadecimal.NewFromInt(-1))
}
if shieldValue.Cmp(e.Args()[0]) > 0 {
shieldValue = e.Args()[0]
}
if shieldValue.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.AddShield(shieldValue)
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
1561,
int(shieldValue.IntPart()),
int(e.Args()[1].IntPart()),
)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1561Sub struct {
node.EffectNode
trackedPet *info.BattlePetEntity
shieldValue alpacadecimal.Decimal
absorbed alpacadecimal.Decimal
uses int
}
func (e *Effect1561Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
e.CanStack(false)
e.trackedPet = t.CurrentPet
if len(a) > 0 {
e.shieldValue = alpacadecimal.NewFromInt(int64(a[0]))
}
if len(a) > 1 {
e.uses = a[1]
}
}
func (e *Effect1561Sub) Damage_Shield(zone *info.DamageZone) bool {
if e.trackedPet == nil || e.Ctx().Our.CurrentPet != e.trackedPet {
return true
}
if zone == nil || zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || e.shieldValue.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
absorbed := alpacadecimal.Min(e.Ctx().Our.CurrentShield(), zone.Damage)
if absorbed.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.absorbed = e.absorbed.Add(absorbed)
if e.absorbed.Cmp(e.shieldValue) < 0 {
return true
}
if e.uses <= 0 {
e.Alive(false)
return true
}
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
15611,
int(e.shieldValue.IntPart()),
e.uses,
)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
e.Alive(false)
return true
}
func (e *Effect1561Sub) SwitchOut(in *input.Input) bool {
if in != e.Ctx().Our {
return true
}
if e.trackedPet != nil && e.trackedPet.Alive() {
return true
}
e.Alive(false)
return true
}
type Effect1561PowerSub struct {
node.EffectNode
trackedPet *info.BattlePetEntity
bonusPower int
remaining int
}
func (e *Effect1561PowerSub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
e.CanStack(false)
e.trackedPet = t.CurrentPet
if len(a) > 0 {
e.bonusPower = a[0]
}
if len(a) > 1 {
e.remaining = a[1]
}
}
func (e *Effect1561PowerSub) SkillHit() bool {
if e.trackedPet == nil || e.Ctx().Our.CurrentPet != e.trackedPet || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.Power += e.bonusPower
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
func (e *Effect1561PowerSub) SwitchOut(in *input.Input) bool {
if in != e.Ctx().Our {
return true
}
if e.trackedPet != nil && e.trackedPet.Alive() {
return true
}
e.Alive(false)
return true
}
// Effect 1562: 命中后{0}%令对手{1},触发后{2}回合内对手主动切换精灵则登场精灵{3}%进入{4}状态
type Effect1562 struct {
node.EffectNode
}
func (e *Effect1562) OnSkill() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.AttackTime == 0 || len(e.Args()) < 5 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1562, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1562Sub struct {
node.EffectNode
pending bool
}
func (e *Effect1562Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
if len(a) > 2 {
e.Duration(a[2])
}
}
func (e *Effect1562Sub) SwitchOut(in *input.Input) bool {
if in != e.Ctx().Our || e.Ctx().Our.CurrentPet == nil {
return true
}
if e.Ctx().Our.CurrentPet.Info.Hp > 0 {
e.pending = true
}
return true
}
func (e *Effect1562Sub) SwitchIn(in *input.Input) bool {
if !e.pending || in != e.Ctx().Our || len(e.Args()) < 5 {
return true
}
e.pending = false
success, _, _ := e.Input.Player.Roll(int(e.Args()[3].IntPart()), 100)
if !success {
return true
}
statusEffect := e.Ctx().Opp.InitEffect(input.EffectType.Status, int(e.Args()[4].IntPart()))
if statusEffect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Opp, statusEffect)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1558, &Effect1558{})
input.InitEffect(input.EffectType.Sub, 1558, &Effect1558Sub{})
input.InitEffect(input.EffectType.Skill, 1559, &Effect1559{})
input.InitEffect(input.EffectType.Sub, 1559, &Effect1559Sub{})
input.InitEffect(input.EffectType.Skill, 1560, &Effect1560{})
input.InitEffect(input.EffectType.Sub, 1560, &Effect1560Sub{})
input.InitEffect(input.EffectType.Skill, 1561, &Effect1561{})
input.InitEffect(input.EffectType.Sub, 1561, &Effect1561Sub{})
input.InitEffect(input.EffectType.Sub, 15611, &Effect1561PowerSub{})
input.InitEffect(input.EffectType.Skill, 1562, &Effect1562{})
input.InitEffect(input.EffectType.Sub, 1562, &Effect1562Sub{})
}

View File

@@ -0,0 +1,169 @@
package effect
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"
)
// Effect 1563: 损失自身{0}点体力,给对手造成{1}点固定伤害,若自身体力不足{2}则损失全部体力且造成的固定伤害翻倍
type Effect1563 struct {
node.EffectNode
}
func (e *Effect1563) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
selfDamage := e.Args()[0]
oppDamage := e.Args()[1]
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Args()[2]) < 0 {
selfDamage = e.Ctx().Our.CurrentPet.GetHP()
oppDamage = oppDamage.Mul(alpacadecimal.NewFromInt(2))
}
if selfDamage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: selfDamage,
})
}
if oppDamage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: oppDamage,
})
}
return true
}
// Effect 1564: 恢复自身{0}点体力,若自身满天赋值则{1}%附加等量百分比伤害
type Effect1564 struct {
node.EffectNode
}
func (e *Effect1564) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
healAmount := e.Args()[0]
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
if e.Ctx().Our.CurrentPet.Info.Dv != 31 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: healAmount,
})
return true
}
// Effect 1565: {0}回合内每回合结束时使对手随机{1}个技能PP归零
type Effect1565 struct {
node.EffectNode
}
func (e *Effect1565) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1565, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1565Sub struct {
RoundEffectArg0Base
}
func (e *Effect1565Sub) TurnEnd() {
if len(e.Args()) > 1 {
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
}
e.EffectNode.TurnEnd()
}
// Effect 1566: {0}回合内每回合结束后反转对手能力提升状态
type Effect1566 struct {
node.EffectNode
}
func (e *Effect1566) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1566, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1566Sub struct {
RoundEffectArg0Base
}
func (e *Effect1566Sub) TurnEnd() {
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v)
}
e.EffectNode.TurnEnd()
}
// Effect 1567: 获得海洋的祝福使自身下2回合先制+2且攻击必定命中、必定致命
type Effect1567 struct {
node.EffectNode
}
func (e *Effect1567) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1567)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1567Sub struct {
FixedDuration2Base
}
func (e *Effect1567Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
current.SkillEntity.XML.Priority += 2
return true
}
func (e *Effect1567Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.MustHit = 1
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1563, &Effect1563{})
input.InitEffect(input.EffectType.Skill, 1564, &Effect1564{})
input.InitEffect(input.EffectType.Skill, 1565, &Effect1565{})
input.InitEffect(input.EffectType.Sub, 1565, &Effect1565Sub{})
input.InitEffect(input.EffectType.Skill, 1566, &Effect1566{})
input.InitEffect(input.EffectType.Sub, 1566, &Effect1566Sub{})
input.InitEffect(input.EffectType.Skill, 1567, &Effect1567{})
input.InitEffect(input.EffectType.Sub, 1567, &Effect1567Sub{})
}

View File

@@ -0,0 +1,161 @@
package effect
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"
)
// Effect 1670: {0}%令对手{1},对手为自身天敌时概率提升{2}%,未触发则消除对手回合类效果
type Effect1670 struct {
node.EffectNode
}
func (e *Effect1670) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
chance := int(e.Args()[0].IntPart())
if e.ISNaturalEnemy() {
chance += int(e.Args()[2].IntPart())
if chance > 100 {
chance = 100
}
}
success, _, _ := e.Input.Player.Roll(chance, 100)
if success {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[1].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
return true
}
}
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
return true
}
// Effect 1671: 造成的攻击伤害不低于{0},若对手处于能力提升状态则造成的攻击伤害不低于{1}
type Effect1671 struct {
node.EffectNode
}
func (e *Effect1671) DamageFloor(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if len(e.Args()) < 2 {
return true
}
threshold := e.Args()[0]
if e.Ctx().Opp.HasPropADD() {
threshold = e.Args()[1]
}
if zone.Damage.Cmp(threshold) < 0 {
zone.Damage = threshold
}
return true
}
// Effect 1672: 出手时若自身未满体力则吸取对手{0}点体力
type Effect1672 struct {
node.EffectNode
}
func (e *Effect1672) OnSkill() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Our.CurrentPet.GetMaxHP()) >= 0 {
return true
}
drain := e.Args()[0]
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: drain,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, drain)
return true
}
// Effect 1673: 命中后{0}%的概率秒杀对手,未触发则造成的伤害不少于{1}
type Effect1673 struct {
node.EffectNode
}
func (e *Effect1673) DamageFloor(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if len(e.Args()) < 2 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
if success {
zone.Damage = e.Ctx().Opp.CurrentPet.GetMaxHP()
return true
}
if zone.Damage.Cmp(e.Args()[1]) < 0 {
zone.Damage = e.Args()[1]
}
return true
}
// Effect 1674: {0}回合内每回合使用技能吸取对手最大体力的1/{1},若对手未受到百分比伤害则额外附加{2}点真实伤害
type Effect1674 struct {
RoundEffectArg0Base
}
func (e *Effect1674) OnSkill() bool {
if len(e.Args()) < 3 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) > 0 {
beforeHP := e.Ctx().Opp.CurrentPet.Info.Hp
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
if e.Ctx().Opp.CurrentPet.Info.Hp < beforeHP {
return true
}
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.True,
Damage: e.Args()[2],
})
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1670, &Effect1670{})
input.InitEffect(input.EffectType.Skill, 1671, &Effect1671{})
input.InitEffect(input.EffectType.Skill, 1672, &Effect1672{})
input.InitEffect(input.EffectType.Skill, 1673, &Effect1673{})
input.InitEffect(input.EffectType.Skill, 1674, &Effect1674{})
}

View File

@@ -0,0 +1,227 @@
package effect
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"
)
// Effect 1675: 反转对手能力提升状态,反转成功则对手{0}回合内无法通过自身技能恢复体力
type Effect1675 struct {
node.EffectNode
}
func (e *Effect1675) Skill_Use() bool {
reversed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -2*v) {
reversed = true
}
}
if !reversed || len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1675, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1675Sub struct {
RoundEffectArg0Base
}
func (e *Effect1675Sub) Heal_Pre(ac action.BattleActionI, value *int) bool {
if value == nil || *value <= 0 {
return true
}
if _, ok := ac.(*action.SelectSkillAction); !ok {
return true
}
*value = 0
return true
}
// Effect 1676: {0}回合内每回合使用技能{1}%令对手{2},未触发则令自身全属性+{3}
type Effect1676 struct {
RoundEffectArg0Base
}
func (e *Effect1676) OnSkill() bool {
if len(e.Args()) < 4 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
return true
}
}
boost := int8(e.Args()[3].IntPart())
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boost)
}
return true
}
// Effect 1677: 附加给自身{0}点固定伤害致死时令自身残留1点体力附加给对手{1}点固定伤害,令自身下{2}次受到的攻击伤害转化为体力
type Effect1677 struct {
node.EffectNode
}
func (e *Effect1677) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
selfDamage := e.Args()[0]
if selfDamage.Cmp(alpacadecimal.Zero) > 0 {
currentHP := e.Ctx().Our.CurrentPet.GetHP()
if currentHP.Cmp(alpacadecimal.NewFromInt(1)) > 0 {
maxSelfDamage := currentHP.Sub(alpacadecimal.NewFromInt(1))
if selfDamage.Cmp(maxSelfDamage) > 0 {
selfDamage = maxSelfDamage
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: selfDamage,
})
}
}
if e.Args()[1].Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[1],
})
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1677, int(e.Args()[2].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1677Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1677Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1677Sub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
return true
}
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, zone.Damage)
zone.Damage = alpacadecimal.Zero
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1678: 附加自身防御和特防能力提升总段数x{0}的固定伤害
type Effect1678 struct {
node.EffectNode
}
func (e *Effect1678) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
total := int64(0)
if e.Ctx().Our.Prop[1] > 0 {
total += int64(e.Ctx().Our.Prop[1])
}
if e.Ctx().Our.Prop[3] > 0 {
total += int64(e.Ctx().Our.Prop[3])
}
if total <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Args()[0].Mul(alpacadecimal.NewFromInt(total)),
})
return true
}
// Effect 1679: 造成的伤害高于{0}则{1}%令对手{2}未触发则吸取对手最大体力的1/{3}
type Effect1679 struct {
node.EffectNode
}
func (e *Effect1679) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || e.Ctx().SkillEntity.AttackTime == 0 {
return true
}
if e.Ctx().Our.SumDamage.Cmp(e.Args()[0]) <= 0 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if success {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
return true
}
}
if e.Args()[3].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[3])
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1675, &Effect1675{})
input.InitEffect(input.EffectType.Sub, 1675, &Effect1675Sub{})
input.InitEffect(input.EffectType.Skill, 1676, &Effect1676{})
input.InitEffect(input.EffectType.Skill, 1677, &Effect1677{})
input.InitEffect(input.EffectType.Sub, 1677, &Effect1677Sub{})
input.InitEffect(input.EffectType.Skill, 1678, &Effect1678{})
input.InitEffect(input.EffectType.Skill, 1679, &Effect1679{})
}

View File

@@ -0,0 +1,278 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 1680: 对手不处于异常状态时附加{0}点真实伤害
type Effect1680 struct {
node.EffectNode
}
func (e *Effect1680) OnSkill() bool {
if len(e.Args()) == 0 || e.Ctx().Opp.StatEffect_Exist_all() {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.True,
Damage: e.Args()[0],
})
return true
}
// Effect 1681: 吸取对手能力提升状态,吸取成功则下{0}次受到的攻击伤害减少{1}点
type Effect1681 struct {
node.EffectNode
}
func (e *Effect1681) Skill_Use() bool {
absorbed := false
for i, v := range e.Ctx().Opp.Prop[:] {
if v <= 0 {
continue
}
if !e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0) {
continue
}
absorbed = true
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
}
if !absorbed || len(e.Args()) < 2 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1681, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1681Sub struct {
node.EffectNode
remaining int
reduce int
}
func (e *Effect1681Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.reduce = a[1]
}
}
func (e *Effect1681Sub) DamageSubEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 || e.reduce <= 0 {
return true
}
reduceDamage := alpacadecimal.NewFromInt(int64(e.reduce))
if zone.Damage.Cmp(reduceDamage) > 0 {
zone.Damage = zone.Damage.Sub(reduceDamage)
} else {
zone.Damage = alpacadecimal.Zero
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1682: {0}%的概率伤害为{1}倍,未触发则令敌我双方全属性-{2}且下次翻倍概率额外提升{3}%
type Effect1682 struct {
node.EffectNode
triggered bool
nextBonus int
}
func (e *Effect1682) SkillHit() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 4 {
return true
}
bonus := 0
if state := findEffect1682State(e.Ctx().Our, skill.XML.ID); state != nil {
bonus = state.bonusChance
}
chance := int(e.Args()[0].IntPart()) + bonus
if chance > 100 {
chance = 100
}
e.triggered, _, _ = e.Input.Player.Roll(chance, 100)
e.nextBonus = bonus + int(e.Args()[3].IntPart())
if e.triggered {
if state := findEffect1682State(e.Ctx().Our, skill.XML.ID); state != nil {
state.Alive(false)
}
}
return true
}
func (e *Effect1682) Damage_Mul(zone *info.DamageZone) bool {
if !e.triggered || zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Mul(int(e.Args()[1].IntPart()))
return true
}
func (e *Effect1682) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || len(e.Args()) < 4 || e.triggered {
return true
}
reduce := int8(e.Args()[2].IntPart())
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), -reduce)
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), -reduce)
}
if state := findEffect1682State(e.Ctx().Our, skill.XML.ID); state != nil {
state.bonusChance = e.nextBonus
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1682, skill.XML.ID, e.nextBonus)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1682Sub struct {
node.EffectNode
skillID int
bonusChance int
}
func (e *Effect1682Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.skillID = a[0]
}
if len(a) > 1 {
e.bonusChance = a[1]
}
}
func (e *Effect1682Sub) SwitchOut(in *input.Input) bool {
if in == e.Ctx().Our {
e.Alive(false)
}
return true
}
func findEffect1682State(in *input.Input, skillID int) *Effect1682Sub {
if in == nil {
return nil
}
for i := len(in.Effects) - 1; i >= 0; i-- {
effect, ok := in.Effects[i].(*Effect1682Sub)
if !ok || !effect.Alive() || effect.skillID != skillID {
continue
}
return effect
}
return nil
}
// Effect 1683: {0}回合内自身的能力提升状态无法被消除或吸取
type Effect1683 struct {
node.EffectNode
}
func (e *Effect1683) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1683, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1683Sub struct {
RoundEffectArg0Base
}
func (e *Effect1683Sub) PropBefer(source *input.Input, prop int8, level int8) bool {
if prop < 0 || int(prop) >= len(e.Ctx().Our.Prop) {
return true
}
if e.Ctx().Our.Prop[prop] <= 0 {
return true
}
if level == 0 {
return false
}
return true
}
// Effect 1684: {0}回合内对手的能力下降状态无法被解除或反转
type Effect1684 struct {
node.EffectNode
}
func (e *Effect1684) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1684, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1684Sub struct {
RoundEffectArg0Base
}
func (e *Effect1684Sub) PropBefer(source *input.Input, prop int8, level int8) bool {
if prop < 0 || int(prop) >= len(e.Ctx().Our.Prop) {
return true
}
if e.Ctx().Our.Prop[prop] >= 0 {
return true
}
if level >= 0 {
return false
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1680, &Effect1680{})
input.InitEffect(input.EffectType.Skill, 1681, &Effect1681{})
input.InitEffect(input.EffectType.Sub, 1681, &Effect1681Sub{})
input.InitEffect(input.EffectType.Skill, 1682, &Effect1682{})
input.InitEffect(input.EffectType.Sub, 1682, &Effect1682Sub{})
input.InitEffect(input.EffectType.Skill, 1683, &Effect1683{})
input.InitEffect(input.EffectType.Sub, 1683, &Effect1683Sub{})
input.InitEffect(input.EffectType.Skill, 1684, &Effect1684{})
input.InitEffect(input.EffectType.Sub, 1684, &Effect1684Sub{})
}

View File

@@ -0,0 +1,176 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 1685: 1回合做{0}-{1}次攻击,对手处于异常状态时连击上限为{2}
// 当前战斗模型未逐段执行多段攻击,这里按随机连击次数折算为红伤倍率提升。
type Effect1685 struct {
node.EffectNode
}
func (e *Effect1685) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if len(e.Args()) < 3 || e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
minHits := int(e.Args()[0].IntPart())
maxHits := int(e.Args()[1].IntPart())
if minHits <= 0 {
minHits = 1
}
if maxHits < minHits {
maxHits = minHits
}
if e.Ctx().Opp.StatEffect_Exist_all() {
statusCap := int(e.Args()[2].IntPart())
if statusCap > 0 && statusCap < maxHits {
maxHits = statusCap
}
if maxHits < minHits {
maxHits = minHits
}
}
hits := minHits
if maxHits > minHits {
hits += grand.Intn(maxHits - minHits + 1)
}
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(int64(hits)))
return true
}
// Effect 1686: 先出手时造成的攻击伤害提升{0}%,若对手当前体力值高于自身则伤害额外提升{1}%
type Effect1686 struct {
node.EffectNode
}
func (e *Effect1686) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || !e.IsFirst() {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || len(e.Args()) < 2 {
return true
}
percent := e.Args()[0]
if e.Ctx().Opp.CurrentPet.GetHP().Cmp(e.Ctx().Our.CurrentPet.GetHP()) > 0 {
percent = percent.Add(e.Args()[1])
}
zone.Damage = zone.Damage.Mul(hundred.Add(percent)).Div(hundred)
return true
}
// Effect 1687: {0}回合内免疫并反弹所有受到的控制类异常状态
type Effect1687 struct {
RoundEffectArg0Base
}
func (e *Effect1687) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
if in != e.Ctx().Opp || !input.IS_Stat(effEffect) {
return true
}
if !isControlStatus1687(int(effEffect.ID().Suffix())) {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(effEffect.ID().Suffix()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return false
}
func isControlStatus1687(statusID int) bool {
switch info.EnumPetStatus(statusID) {
case info.PetStatus.Paralysis,
info.PetStatus.Tired,
info.PetStatus.Fear,
info.PetStatus.Petrified,
info.PetStatus.Sleep:
return true
default:
return false
}
}
// Effect 1688: 消除敌我双方能力提升状态和回合类效果消除任意一项成功则吸取对手最大体力的1/{0}且{1}%令对手{2}
type Effect1688 struct {
node.EffectNode
}
func (e *Effect1688) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
success := false
if clearPositiveProps(e.Ctx().Our, e.Ctx().Our) {
success = true
}
if clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
success = true
}
ourTurnEffects := activeTurnEffectCount(e.Ctx().Our)
oppTurnEffects := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Our.CancelTurn(e.Ctx().Our)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if ourTurnEffects > 0 || oppTurnEffects > 0 {
success = true
}
if !success {
return true
}
if e.Args()[0].Cmp(alpacadecimal.Zero) > 0 {
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[0])
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
}
ok, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if ok {
applyStatus(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[2].IntPart()))
}
return true
}
// Effect 1689: 本回合未打出致命一击则恢复自己所有技能{0}点PP值并降低对手所有技能{1}点PP值
type Effect1689 struct {
node.EffectNode
}
func (e *Effect1689) Skill_Use() bool {
skill := e.Ctx().SkillEntity
if skill == nil || skill.Category() == info.Category.STATUS || skill.AttackTime == 0 || skill.Crit != 0 || len(e.Args()) < 2 {
return true
}
e.Ctx().Our.HealPP(int(e.Args()[0].IntPart()))
e.Ctx().Opp.DelPP(int(e.Args()[1].IntPart()))
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1685, &Effect1685{})
input.InitEffect(input.EffectType.Skill, 1686, &Effect1686{})
input.InitEffect(input.EffectType.Skill, 1687, &Effect1687{})
input.InitEffect(input.EffectType.Skill, 1688, &Effect1688{})
input.InitEffect(input.EffectType.Skill, 1689, &Effect1689{})
}

View File

@@ -0,0 +1,254 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 1690: 火之力量觉醒,使自身下{0}次攻击获得灼心之焰效果
type Effect1690 struct {
node.EffectNode
}
func (e *Effect1690) Skill_Use() bool {
if len(e.Args()) == 0 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1690, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1690Sub struct {
node.EffectNode
remaining int
}
func (e *Effect1690Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
}
func (e *Effect1690Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil || e.remaining <= 0 {
return true
}
if current.SkillEntity.Category() == info.Category.STATUS {
return true
}
current.SkillEntity.XML.Priority += 1
return true
}
func (e *Effect1690Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.Ctx().SkillEntity == nil || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
func (e *Effect1690Sub) Skill_Use() bool {
if e.Ctx().SkillEntity == nil || e.remaining <= 0 {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().SkillEntity.AttackTime != 0 {
indexes := grand.Perm(6)
for _, idx := range indexes[:2] {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(idx), 1)
}
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
return true
}
// Effect 1691: 终阶源盾下{0}次被激活或被消耗则回合结束时附加{1}点固定伤害
type Effect1691 struct {
node.EffectNode
}
func (e *Effect1691) Skill_Use() bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1691, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect1691Sub struct {
node.EffectNode
remaining int
damage alpacadecimal.Decimal
triggeredTurn bool
}
func (e *Effect1691Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.Duration(-1)
if len(a) > 0 {
e.remaining = a[0]
}
if len(a) > 1 {
e.damage = alpacadecimal.NewFromInt(int64(a[1]))
}
}
func (e *Effect1691Sub) ShieldChange(before, after alpacadecimal.Decimal) bool {
if e.remaining <= 0 {
e.Alive(false)
return true
}
if (before.Cmp(alpacadecimal.Zero) == 0 && after.Cmp(alpacadecimal.Zero) > 0) ||
(before.Cmp(alpacadecimal.Zero) > 0 && after.Cmp(alpacadecimal.Zero) == 0) {
e.triggeredTurn = true
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
}
return true
}
func (e *Effect1691Sub) TurnEnd() {
if e.triggeredTurn && e.damage.Cmp(alpacadecimal.Zero) > 0 {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.damage,
})
e.triggeredTurn = false
}
e.EffectNode.TurnEnd()
}
// Effect 1692: {0}%的概率造成伤害翻倍,终阶源盾处于激活状态时概率提升至{1}%
type Effect1692 struct {
node.EffectNode
}
func (e *Effect1692) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS || len(e.Args()) < 2 {
return true
}
chance := int(e.Args()[0].IntPart())
if e.Ctx().Our.HasShield() {
chance = int(e.Args()[1].IntPart())
}
ok, _, _ := e.Input.Player.Roll(chance, 100)
if ok {
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(2))
}
return true
}
// Effect 1693: {0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害,对手免疫百分比伤害时额外附加{2}点真实伤害
type Effect1693 struct {
RoundEffectArg0Base
}
func (e *Effect1693) OnSkill() bool {
if len(e.Args()) < 3 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := e.Ctx().Opp.CurrentPet.GetMaxHP().Div(e.Args()[1])
if damage.Cmp(alpacadecimal.Zero) > 0 {
beforeHP := e.Ctx().Opp.CurrentPet.Info.Hp
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Percent,
Damage: damage,
})
if e.Ctx().Opp.CurrentPet.Info.Hp < beforeHP {
return true
}
}
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.True,
Damage: e.Args()[2],
})
return true
}
// Effect 1694: 随机吸取对手{0}-{1}点体力,若自身处于能力提升状态则效果转变为{2}-{3}点
type Effect1694 struct {
node.EffectNode
}
func (e *Effect1694) Skill_Use() bool {
if len(e.Args()) < 4 {
return true
}
minDrain := int(e.Args()[0].IntPart())
maxDrain := int(e.Args()[1].IntPart())
if e.Ctx().Our.HasPropADD() {
minDrain = int(e.Args()[2].IntPart())
maxDrain = int(e.Args()[3].IntPart())
}
if maxDrain < minDrain {
minDrain, maxDrain = maxDrain, minDrain
}
drain := minDrain
if maxDrain > minDrain {
drain = grand.N(minDrain, maxDrain)
}
if drain <= 0 {
return true
}
damage := alpacadecimal.NewFromInt(int64(drain))
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 1690, &Effect1690{})
input.InitEffect(input.EffectType.Sub, 1690, &Effect1690Sub{})
input.InitEffect(input.EffectType.Skill, 1691, &Effect1691{})
input.InitEffect(input.EffectType.Sub, 1691, &Effect1691Sub{})
input.InitEffect(input.EffectType.Skill, 1692, &Effect1692{})
input.InitEffect(input.EffectType.Skill, 1693, &Effect1693{})
input.InitEffect(input.EffectType.Skill, 1694, &Effect1694{})
}

View File

@@ -0,0 +1,169 @@
package effect
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"
"github.com/gogf/gf/v2/util/grand"
)
// Effect 615: {0}回合内使用技能恢复{1}点体力体力低于1/{2}时恢复至满
type Effect615 struct {
RoundEffectArg0Base
}
func (e *Effect615) OnSkill() bool {
if len(e.Args()) < 2 {
return true
}
healAmount := e.Args()[1]
if len(e.Args()) > 2 && e.Args()[2].Cmp(alpacadecimal.Zero) > 0 {
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
threshold := maxHP.Div(e.Args()[2])
if e.Ctx().Our.CurrentPet.GetHP().Cmp(threshold) < 0 {
healAmount = maxHP
}
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
return true
}
// Effect 616: 当自身血量少于1/3时先制+2
type Effect616 struct {
node.EffectNode
}
func (e *Effect616) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
return true
}
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
if current == nil || current.SkillEntity == nil {
return true
}
maxHP := e.Ctx().Our.CurrentPet.GetMaxHP()
if e.Ctx().Our.CurrentPet.GetHP().Mul(e.Args()[0]).Cmp(maxHP) >= 0 {
return true
}
current.SkillEntity.XML.Priority += int(e.Args()[1].IntPart())
return true
}
// Effect 617: 消耗自身所有体力给对手造成{0}-{1}点伤害,若造成伤害大于对手体力则对手必定留1点血
type Effect617 struct {
node.EffectNode
}
func (e *Effect617) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetMaxHP(),
})
minDamage := int(e.Args()[0].IntPart())
maxDamage := int(e.Args()[1].IntPart())
if maxDamage < minDamage {
minDamage, maxDamage = maxDamage, minDamage
}
randomDamage := minDamage
if maxDamage > minDamage {
randomDamage = grand.N(minDamage, maxDamage)
}
remainHP := e.Ctx().Opp.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))
if remainHP.Cmp(alpacadecimal.Zero) <= 0 {
return true
}
damage := alpacadecimal.Min(alpacadecimal.NewFromInt(int64(randomDamage)), remainHP)
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: damage,
})
return true
}
// Effect 618: 消耗自身所有体力,使下一只出战精灵{0}回合内每回合恢复{1}点体力
type Effect618 struct {
SelfKill
}
func (e *Effect618) SwitchIn(in *input.Input) bool {
if !e.can || in != e.Ctx().Our {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 618, e.SideEffectArgs...)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
e.Alive(false)
return true
}
type Effect618Sub struct {
RoundEffectArg0Base
}
func (e *Effect618Sub) TurnEnd() {
if len(e.Args()) > 1 && e.Ctx().Our.CurrentPet.Info.Hp > 0 {
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[1])
}
e.EffectNode.TurnEnd()
}
// Effect 619: 下{0}回合令对手所有技能先制-{1}
type Effect619 struct {
node.EffectNode
}
func (e *Effect619) Skill_Use() bool {
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
619,
e.SideEffectArgs...,
)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect619Sub struct {
RoundEffectArg0Base
}
func (e *Effect619Sub) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
priorityDown := int(e.Args()[1].IntPart())
if fattack != nil && fattack.PlayerID == e.Ctx().Opp.UserID && fattack.SkillEntity != nil {
fattack.SkillEntity.XML.Priority -= priorityDown
}
if sattack != nil && sattack.PlayerID == e.Ctx().Opp.UserID && sattack.SkillEntity != nil {
sattack.SkillEntity.XML.Priority -= priorityDown
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 615, &Effect615{})
input.InitEffect(input.EffectType.Skill, 616, &Effect616{})
input.InitEffect(input.EffectType.Skill, 617, &Effect617{})
input.InitEffect(input.EffectType.Skill, 618, &Effect618{})
input.InitEffect(input.EffectType.Sub, 618, &Effect618Sub{})
input.InitEffect(input.EffectType.Skill, 619, &Effect619{})
input.InitEffect(input.EffectType.Sub, 619, &Effect619Sub{})
}

View File

@@ -0,0 +1,169 @@
package effect
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"
)
// Effect 621: 消除对手能力上升状态,消除成功对手{0}{1}
type Effect621 struct {
node.EffectNode
}
func (e *Effect621) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
return true
}
propID := int(e.Args()[0].IntPart())
if propID < 0 || propID >= 6 {
return true
}
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(propID), int8(e.Args()[1].IntPart()))
return true
}
// Effect 622: 自身{0}{6}%概率强化效果翻倍
type Effect622 struct {
node.EffectNode
}
func (e *Effect622) Skill_Use() bool {
if len(e.SideEffectArgs) < 7 {
return true
}
double := false
success, _, _ := e.Input.Player.Roll(e.SideEffectArgs[6], 100)
double = success
for i, v := range e.SideEffectArgs[:6] {
if v == 0 {
continue
}
if double {
v *= 2
}
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v))
}
return true
}
// Effect 623: 消除自身能力下降状态,消除成功下{0}回合自身直接攻击必定暴击
type Effect623 struct {
node.EffectNode
}
func (e *Effect623) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
cleared := false
for i, v := range e.Ctx().Our.Prop[:] {
if v >= 0 {
continue
}
if e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), 0) {
cleared = true
}
}
if !cleared {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect623Sub{}, -1)
return true
}
type Effect623Sub struct {
RoundEffectArg0Base
}
func (e *Effect623Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.Ctx().SkillEntity.XML.CritRate = 16
return true
}
// Effect 624: 消除对手能力上升状态,消除成功{0}回合内受到伤害减少{1}点
type Effect624 struct {
node.EffectNode
}
func (e *Effect624) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect624Sub{}, -1)
return true
}
type Effect624Sub struct {
RoundEffectArg0Base
}
func (e *Effect624Sub) DamageSubEx(zone *info.DamageZone) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
return true
}
reduction := e.Args()[1]
if zone.Damage.Cmp(reduction) > 0 {
zone.Damage = zone.Damage.Sub(reduction)
} else {
zone.Damage = alpacadecimal.Zero
}
return true
}
// Effect 625: 使对手{0},若对手处于弱化状态,弱化效果翻倍
type Effect625 struct {
node.EffectNode
}
func (e *Effect625) Skill_Use() bool {
double := e.Ctx().Opp.HasPropSub()
for i, v := range e.SideEffectArgs[:min(len(e.SideEffectArgs), 6)] {
if v == 0 {
continue
}
if double {
v *= 2
}
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), int8(v))
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 621, &Effect621{})
input.InitEffect(input.EffectType.Skill, 622, &Effect622{})
input.InitEffect(input.EffectType.Skill, 623, &Effect623{})
input.InitEffect(input.EffectType.Sub, 623, &Effect623Sub{})
input.InitEffect(input.EffectType.Skill, 624, &Effect624{})
input.InitEffect(input.EffectType.Sub, 624, &Effect624Sub{})
input.InitEffect(input.EffectType.Skill, 625, &Effect625{})
}

View File

@@ -30,16 +30,7 @@ func (e *Effect632) Skill_Use() bool {
return true
}
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
632,
int(e.Args()[0].IntPart()),
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect632Sub{}, -1)
return true
}
@@ -55,6 +46,9 @@ func (e *Effect632Sub) SetArgs(t *input.Input, a ...int) {
}
func (e *Effect632Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
@@ -128,10 +122,7 @@ func (e *Effect635) Skill_Use() bool {
return true
}
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 635, int(e.Args()[0].IntPart()))
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect635Sub{}, -1)
return true
}

View File

@@ -0,0 +1,150 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/gogf/gf/v2/util/grand"
)
var randomMajorAbnormalStatuses = []int{
int(info.PetStatus.Burned),
int(info.PetStatus.Frozen),
int(info.PetStatus.Poisoned),
int(info.PetStatus.Paralysis),
int(info.PetStatus.Fear),
int(info.PetStatus.Sleep),
}
func addRandomMajorAbnormalStatus(owner, target *input.Input) {
if owner == nil || target == nil || len(randomMajorAbnormalStatuses) == 0 {
return
}
statusID := randomMajorAbnormalStatuses[grand.Intn(len(randomMajorAbnormalStatuses))]
statusEffect := owner.InitEffect(input.EffectType.Status, statusID)
if statusEffect != nil {
target.AddEffect(owner, statusEffect)
}
}
// Effect 769: 若对手不处于异常状态则造成的攻击伤害额外提升{0}%
type Effect769 struct {
node.EffectNode
}
func (e *Effect769) SkillHit() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if e.Ctx().Opp.StatEffect_Exist_all() {
return true
}
addSkillPowerPercent(e.Ctx().SkillEntity, e.Args()[0])
return true
}
// Effect 770: 若对手处于异常状态,则恢复自身全部体力
type Effect770 struct {
node.EffectNode
}
func (e *Effect770) Skill_Use() bool {
if !e.Ctx().Opp.StatEffect_Exist_all() {
return true
}
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP())
return true
}
// Effect 771: {0}回合内每次使用攻击技能都有{1}%概率使对手进入任意一种异常状态
type Effect771 struct {
RoundEffectArg0Base
}
func (e *Effect771) OnSkill() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if len(e.Args()) < 2 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
addRandomMajorAbnormalStatus(e.Ctx().Our, e.Ctx().Opp)
return true
}
// Effect 772: {0}回合内若对手使用攻击技能则有{1}%概率随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态
type Effect772 struct {
RoundEffectArg0Base
}
func (e *Effect772) Skill_Use_ex() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if len(e.Args()) < 2 {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
addRandomMajorAbnormalStatus(e.Ctx().Our, e.Ctx().Opp)
return true
}
// Effect 773: 若自身体力低于对手则与对手互换体力
type Effect773 struct {
node.EffectNode
}
func (e *Effect773) OnSkill() bool {
ourHP := e.Ctx().Our.CurrentPet.GetHP().IntPart()
oppHP := e.Ctx().Opp.CurrentPet.GetHP().IntPart()
if ourHP >= oppHP {
return true
}
ourMaxHP := e.Ctx().Our.CurrentPet.GetMaxHP().IntPart()
oppMaxHP := e.Ctx().Opp.CurrentPet.GetMaxHP().IntPart()
newOurHP := oppHP
if newOurHP > ourMaxHP {
newOurHP = ourMaxHP
}
if newOurHP < 0 {
newOurHP = 0
}
newOppHP := ourHP
if newOppHP > oppMaxHP {
newOppHP = oppMaxHP
}
if newOppHP < 0 {
newOppHP = 0
}
e.Ctx().Our.CurrentPet.Info.Hp = uint32(newOurHP)
e.Ctx().Opp.CurrentPet.Info.Hp = uint32(newOppHP)
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 769, &Effect769{})
input.InitEffect(input.EffectType.Skill, 770, &Effect770{})
input.InitEffect(input.EffectType.Skill, 771, &Effect771{})
input.InitEffect(input.EffectType.Skill, 772, &Effect772{})
input.InitEffect(input.EffectType.Skill, 773, &Effect773{})
}

View File

@@ -0,0 +1,190 @@
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// Effect 911: 全属性+{0},自身处于能力提升状态时强化效果翻倍
type Effect911 struct {
node.EffectNode
}
func (e *Effect911) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
boostValue := int8(e.Args()[0].IntPart())
if e.Ctx().Our.HasPropADD() {
boostValue *= 2
}
for i := 0; i < 6; i++ {
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), boostValue)
}
return true
}
// Effect 912: 若对手处于能力下降则使对手随机{0}个技能的PP归零
type Effect912 struct {
node.EffectNode
}
func (e *Effect912) OnSkill() bool {
if len(e.Args()) == 0 {
return true
}
if !e.Ctx().Opp.HasPropSub() {
return true
}
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[0].IntPart()))
return true
}
// Effect 913: 消除对手回合类效果,消除成功则下回合自身造成的攻击伤害额外提升{0}%
type Effect913 struct {
node.EffectNode
}
func (e *Effect913) Skill_Use() bool {
if len(e.Args()) == 0 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect913Sub{}, -1)
return true
}
type Effect913Sub struct {
FixedDuration1Base
}
func (e *Effect913Sub) Damage_Mul(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
zone.Damage = zone.Damage.Mul(hundred.Add(e.Args()[0])).Div(hundred)
return true
}
// Effect 914: 若对手处于{0}状态则{1}回合内{2}%令对手使用的技能无效
type Effect914 struct {
node.EffectNode
}
func (e *Effect914) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
if !e.Ctx().Opp.StatEffect_Exist(info.EnumPetStatus(e.Args()[0].IntPart())) {
return true
}
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
914,
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
)
if effect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect914Sub struct {
RoundEffectArg0Base
}
func (e *Effect914Sub) ActionStart(a, b *action.SelectSkillAction) bool {
if len(e.Args()) < 2 {
return true
}
if e.Ctx().SkillEntity == nil {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
return true
}
// Effect 915: 消除对手回合类效果,消除成功则自身下{0}回合攻击有{1}%使对手{2}
type Effect915 struct {
node.EffectNode
}
func (e *Effect915) Skill_Use() bool {
if len(e.Args()) < 3 {
return true
}
before := activeTurnEffectCount(e.Ctx().Opp)
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
if before <= 0 {
return true
}
effect := e.Ctx().Our.InitEffect(
input.EffectType.Sub,
915,
int(e.Args()[0].IntPart()),
int(e.Args()[1].IntPart()),
int(e.Args()[2].IntPart()),
)
if effect != nil {
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
}
return true
}
type Effect915Sub struct {
RoundEffectArg0Base
}
func (e *Effect915Sub) OnSkill() bool {
if len(e.Args()) < 3 {
return true
}
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
if !success {
return true
}
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart()))
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 911, &Effect911{})
input.InitEffect(input.EffectType.Skill, 912, &Effect912{})
input.InitEffect(input.EffectType.Skill, 913, &Effect913{})
input.InitEffect(input.EffectType.Sub, 913, &Effect913Sub{})
input.InitEffect(input.EffectType.Skill, 914, &Effect914{})
input.InitEffect(input.EffectType.Sub, 914, &Effect914Sub{})
input.InitEffect(input.EffectType.Skill, 915, &Effect915{})
input.InitEffect(input.EffectType.Sub, 915, &Effect915Sub{})
}

View File

@@ -356,6 +356,11 @@ var effectInfoByID = map[int]string{
606: "若体力{0}对手,技能威力翻倍",
607: "{0}回合内若{1}使用属性技能则{2}的{3}",
608: "若对手体力低于1/2该技能先制额外+1",
615: "{0}回合内使用技能恢复{1}点体力体力低于1/{2}时恢复至满",
616: "当自身血量少于1/3时先制+2",
617: "消耗自身所有体力给对手造成{0}-{1}点伤害,若造成伤害大于对手体力则对手必定留1点血",
618: "消耗自身所有体力,使下一只出战精灵{0}回合内每回合恢复{1}点体力",
619: "下{0}回合令对手所有技能先制-{1}",
612: "{0}%概率攻击{1}次",
614: "{0}回合内若对手使用攻击技能则对手{1}",
668: "若对手处于能力提升状态则先制额外+1",
@@ -365,6 +370,11 @@ var effectInfoByID = map[int]string{
672: "当回合击败对手则恢复自身全部体力",
139: "50%威力301-350、30%威力101-300,20%威力5-100",
620: "{0}回合内致命一击率上升{1}/16",
621: "消除对手能力上升状态,消除成功对手{0}{1}",
622: "自身{0}{6}%概率强化效果翻倍",
623: "消除自身能力下降状态,消除成功下{0}回合自身直接攻击必定暴击",
624: "消除对手能力上升状态,消除成功{0}回合内受到伤害减少{1}点",
625: "使对手{0},若对手处于弱化状态,弱化效果翻倍",
626: "随机使自己{0}项能力+{1}",
627: "对手处于能力提升状态时附加其{0}值{1}%的百分比伤害",
628: "若对手处于能力下降状态则造成伤害的{0}%恢复体力",
@@ -431,12 +441,22 @@ var effectInfoByID = map[int]string{
868: "消除对手能力提升状态,消除成功则令对手下回合所有技能先制-{0}",
869: "附加自身速度{0}%的百分比伤害,每次触发增加{1}%,最高{2}%",
870: "吸取对手{0}点体力",
911: "全属性+{0},自身处于能力提升状态时强化效果翻倍",
912: "若对手处于能力下降则使对手随机{0}个技能的PP归零",
913: "消除对手回合类效果,消除成功则下回合自身造成的攻击伤害额外提升{0}%",
914: "若对手处于{0}状态则{1}回合内{2}%令对手使用的技能无效",
915: "消除对手回合类效果,消除成功则自身下{0}回合攻击有{1}%使对手{2}",
851: "使对手随机进入害怕、失明、烧伤、冻伤、中毒其中{0}种异常状态",
852: "附加自身最大体力{0}%的百分比伤害并恢复等量体力恢复体力时若自身体力低于最大体力的1/{1}则恢复效果和百分比伤害翻倍",
853: "附加自身最大体力值与速度值总和{0}%的百分比伤害,每次使用增加{1}%,最高{2}%",
854: "令对手下1次使用的威力高于{0}的攻击技能无效",
855: "将下次受到的伤害{0}%反馈给对手",
690: "下{0}回合,能力提升状态消失则对手使用属性技能失效",
769: "若对手不处于异常状态则造成的攻击伤害额外提升{0}%",
770: "若对手处于异常状态,则恢复自身全部体力",
771: "{0}回合内每次使用攻击技能都有{1}%概率使对手进入任意一种异常状态",
772: "{0}回合内若对手使用攻击技能则有{1}%概率随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态",
773: "若自身体力低于对手则与对手互换体力",
776: "下{0}回合自身造成的攻击伤害翻倍",
1016: "造成的伤害不足{0}则下{1}次攻击造成的伤害提高{2}%",
1017: "消耗自身所有护盾值,造成等量固定伤害",
@@ -454,6 +474,11 @@ var effectInfoByID = map[int]string{
1029: "造成的伤害低于{0}则下{1}回合自身先制+{2}",
1030: "将自身能力下降状态反馈给对手,反馈成功则对手{0}",
1044: "吸取对手能力提升状态,吸取成功则下{0}回合造成的伤害翻倍",
1047: "{0}%令对手{1}未触发则吸取对手最大体力的1/{2}",
1048: "若对手处于异常状态则自身造成的攻击伤害额外提升{0}%",
1049: "击败对手则自身全属性+{0}",
1050: "未击败对手则下{0}回合攻击使对手{1}%{2}",
1051: "对手体力高于{0}则将对手体力减少到{1}",
1097: "造成的攻击伤害若低于280则令对手疲惫未击败对手则令对手下1回合使用的攻击技能无效;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒50%令对手失明未触发则2回合内令对手使用的属性技能无效",
1098: "致命一击率提升20%每次使用增加20%最高100%打出致命一击后令自身下2次技能触发的星皇之怒威力不再减少;技能结束后对手体力值高于0则50%进行一次额外行动以触发星皇之怒星皇之怒下2次自身使用的攻击技能先制+2",
1099: "消除对手能力提升状态,消除成功则自身免疫下{0}次受到的异常状态",
@@ -470,7 +495,117 @@ var effectInfoByID = map[int]string{
1110: "反转对手能力提升状态,反转成功则令对手下{0}次属性技能失效,反转失败则消除对手能力提升状态",
1111: "{0}%令对手{1},未触发则{2}回合内自身造成的攻击伤害额外提升{3}%",
1146: "双方每处于{0}种能力提升状态则附加{1}点固定伤害",
1213: "{0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害",
1214: "对手处于异常状态则吸取对手{0}点体力",
1215: "消除对手所有护盾效果,消除成功则使对手全属性-{0},自身体力低于对手时弱化效果翻倍",
1216: "反转对手能力提升状态反转成功则恢复自身所有体力和PP值",
1217: "消除对手能力提升状态,消除成功则对手下{0}次攻击技能无效",
1218: "未击败对手则下{0}回合自身先制+{1}",
1219: "消除对手回合类效果,消除成功则下回合受到的伤害转化为自身体力",
1220: "消除对手能力提升状态,消除成功则下{0}回合自身攻击必定致命一击",
1221: "反转自身能力下降状态,反转成功则自身免疫下{0}次受到的异常状态",
1222: "先出手时使对手随机{0}个技能PP值归零",
1223: "造成的攻击伤害若高于{0}则令自身下{1}回合所有技能先制+{2}",
1224: "消除对手回合类效果,消除成功则使自身下{0}回合必定致命一击",
1225: "对手处于能力下降时吸取对手最大体力的1/{0}",
1226: "{0}回合内受到攻击伤害降低{1}点,回合结束时若当回合未受到攻击伤害则吸取对手{2}点体力",
1227: "自身处于能力提升状态则有{0}%概率使对手{1},先出手时概率翻倍",
1228: "{0}回合内对手使用攻击技能则随机进入{1}种异常状态,未触发则消除对手回合类效果",
1229: "自身体力高于对手时附加自身当前体力1/{0}的百分比伤害",
1230: "自身体力低于对手时,下{0}次自身技能先制+{1}",
1231: "{0}%令对手{1}未触发则附加对手最大体力1/{2}的百分比伤害",
1232: "反转自身能力下降状态,反转成功则附加给对手等同的能力下降状态",
1233: "吸取对手最大体力的{0}%,每次使用增加{1}%,最高{2}%",
1234: "消除对手回合类效果,消除成功则对手全属性-{0}",
1235: "{0}回合内每回合{1}%闪避对手攻击,未触发则使对手随机{2}项技能PP值归零",
1236: "{0}回合内若对手使用攻击技能则造成伤害前附加对手最大体力1/{1}的百分比伤害",
1237: "使双方精灵所有技能PP值归零消除双方能力提升、下降状态以及回合类效果",
1238: "全属性+{0},对手不为{1}系时强化效果翻倍",
1239: "恢复自身最大体力的1/{0}自身体力低于1/{1}时造成等量百分比伤害",
1240: "当回合未击败对手则下{0}次自身技能附加自身最大体力1/{1}的百分比伤害",
1241: "吸取对手{0}点固定体力自身体力低于1/{1}时吸取效果翻倍",
1242: "{0}%的概率伤害为{1}倍,未触发则下次翻倍概率额外提升{2}%且伤害提升变为{3}倍",
1243: "对手处于能力下降状态时先制+1",
1244: "随机附加{0}-{1}点固伤,对手处于能力下降状态时固伤变为{2}-{3}点",
1245: "若自身处于能力提升状态则附加给对手等同于自身能力提升状态的能力下降状态,若未满足或未触发则令对手随机{0}项技能PP值归零",
1246: "消除双方能力提升、下降状态,消除任意一方成功则令对手下{0}次使用的攻击技能无效",
1247: "先出手时使对手当回合内无法通过技能恢复自身体力",
1393: "{0}回合内每回合使用技能则造成伤害前令对手防御-{1}、速度-{2}未触发则附加对手最大体力1/{3}的百分比伤害",
1394: "{0}回合内对手使用属性技能则随机进入{1}种异常状态",
1395: "若先出手则必定打出致命一击",
1396: "{0}回合内每回合吸取对手最大体力的1/{1}自身体力低于最大体力的1/{2}时转变为吸取对手最大体力的1/{3}",
1397: "全属性+{0}自身体力低于1/{1}时强化效果翻倍",
1398: "消除对手能力提升状态,消除成功则{0}%令对手{1},未触发则{2}%令对手{3}",
1399: "消除对手回合类效果,消除成功则对手{0},未触发则自身免疫下{1}次受到的异常状态",
1400: "{0}回合内若自身回合类效果被消除则{1}%令对手{2}",
1401: "后出手时{0}%令对手对手{1},未触发则使自身下{2}回合必定致命一击",
1402: "技能威力提升1点不受其他威力提升/下降效果加成",
1403: "技能威力提升4点不受其他威力提升/下降效果加成",
1404: "技能威力提升7点不受其他威力提升/下降效果加成",
1405: "技能威力提升10点不受其他威力提升/下降效果加成",
1406: "技能威力提升14点不受其他威力提升/下降效果加成",
1407: "技能威力提升17点不受其他威力提升/下降效果加成",
1408: "技能威力提升20点不受其他威力提升/下降效果加成",
1409: "技能威力提升24点不受其他威力提升/下降效果加成",
1410: "技能威力提升27点不受其他威力提升/下降效果加成",
1411: "技能威力提升30点不受其他威力提升/下降效果加成",
1412: "自身体力低于300时必定先手",
1498: "随机附加烧伤,冻伤,失明,失神中的{0}种异常状态,未触发则自身下{1}回合造成的伤害提升{2}%",
1499: "体力低于最大体力的1/3时先制+3",
1500: "1回合做{0}-{1}次攻击,自身处于护盾状态下连击上限为{2}",
1501: "命中后为对手种下一颗黑暗之种黑暗之种经过4回合逐渐成长每回合结束使对手随机1个技能PP值-1长大后使对手所有技能PP值-1",
1502: "对手身上存在黑暗之种时先制+1",
1503: "清除对手身上的黑暗之种清除成功则令对手随机受到1-500点固定伤害",
1504: "40%令对手诅咒,若对手身上存在黑暗之种则概率翻倍",
1505: "黑暗之种成长期时附加200点固定伤害黑暗之种长大后固定伤害翻倍",
1506: "若对手不是龙系精灵则恢复自身{0}点体力",
1507: "{0}回合内自身受到攻击则令对手随机进入{1}种异常状态,未触发则消除对手回合类效果",
1508: "先出手时无视攻击免疫效果",
1509: "令对手全属性-{0}且随机{1}个技能PP值归零技能无效时消耗自身全部体力并令对手全属性-1然后对手下3次使用技能消耗的PP值为3倍",
1510: "{0}回合内对手主动切换精灵则登场精灵{1}%随机进入{2}种异常状态",
1511: "先出手时免疫当回合受到的攻击伤害,若对手为自身天敌则免疫并反弹给对手造成伤害值{0}%的百分比伤害",
1512: "集结天幕四龙之神力使自身下2回合先制+3且攻击必定命中、必定致命",
1553: "自身体力高于最大体力的1/{0}时攻击后附加造成伤害值{1}%的百分比伤害",
1554: "若自身当前体力低于最大体力的1/{0}则令自身{1}且免疫下{2}次受到的攻击",
1555: "对手不处于能力提升时令对手所有技能PP值-{0}",
1556: "{0}回合内每回合{1}%闪避对手攻击,未触发则使对手全属性-{2}",
1557: "本回合未打出致命一击则令对手随机{0}个技能PP值归零",
1558: "下{0}回合若打出致命一击则造成的攻击伤害提升{1}%",
1559: "{0}回合内自身释放技能{1}%不消耗PP值",
1560: "将当回合护盾所承受的伤害值以百分比伤害的形式{0}%反弹给对手,若护盾未承受伤害值则使对手随机的{1}个技能PP值归零",
1561: "获得点数等同于双方最大体力差值的护盾,最高{0}点,护盾被击破时自身下{1}次使用的攻击技能附加与双方最大体力差护盾值相同的威力",
1562: "命中后{0}%令对手{1},触发后{2}回合内对手主动切换精灵则登场精灵{3}%进入{4}状态",
1563: "损失自身{0}点体力,给对手造成{1}点固定伤害,若自身体力不足{2}则损失全部体力且造成的固定伤害翻倍",
1564: "恢复自身{0}点体力,若自身满天赋值则{1}%附加等量百分比伤害",
1565: "{0}回合内每回合结束时使对手随机{1}个技能PP归零",
1566: "{0}回合内每回合结束后反转对手能力提升状态",
1567: "获得海洋的祝福使自身下2回合先制+2且攻击必定命中、必定致命",
1605: "{0}%令对手{1}",
1670: "{0}%令对手{1},对手为自身天敌时概率提升{2}%,未触发则消除对手回合类效果",
1671: "造成的攻击伤害不低于{0},若对手处于能力提升状态则造成的攻击伤害不低于{1}",
1672: "出手时若自身未满体力则吸取对手{0}点体力",
1673: "命中后{0}%的概率秒杀对手,未触发则造成的伤害不少于{1}",
1674: "{0}回合内每回合使用技能吸取对手最大体力的1/{1},若对手未受到百分比伤害则额外附加{2}点真实伤害",
1675: "反转对手能力提升状态,反转成功则对手{0}回合内无法通过自身技能恢复体力",
1676: "{0}回合内每回合使用技能{1}%令对手{2},未触发则令自身全属性+{3}",
1677: "附加给自身{0}点固定伤害致死时令自身残留1点体力附加给对手{1}点固定伤害,令自身下{2}次受到的攻击伤害转化为体力",
1678: "附加自身防御和特防能力提升总段数x{0}的固定伤害",
1679: "造成的伤害高于{0}则{1}%令对手{2}未触发则吸取对手最大体力的1/{3}",
1680: "对手不处于异常状态时附加{0}点真实伤害",
1681: "吸取对手能力提升状态,吸取成功则下{0}次受到的攻击伤害减少{1}点",
1682: "{0}%的概率伤害为{1}倍,未触发则令敌我双方全属性-{2}且下次翻倍概率额外提升{3}%",
1683: "{0}回合内自身的能力提升状态无法被消除或吸取",
1684: "{0}回合内对手的能力下降状态无法被解除或反转",
1685: "1回合做{0}-{1}次攻击,对手处于异常状态时连击上限为{2}",
1686: "先出手时造成的攻击伤害提升{0}%,若对手当前体力值高于自身则伤害额外提升{1}%",
1687: "{0}回合内免疫并反弹所有受到的控制类异常状态",
1688: "消除敌我双方能力提升状态和回合类效果消除任意一项成功则吸取对手最大体力的1/{0}且{1}%令对手{2}",
1689: "本回合未打出致命一击则恢复自己所有技能{0}点PP值并降低对手所有技能{1}点PP值",
1690: "火之力量觉醒,使自身下{0}次攻击获得灼心之焰效果",
1691: "终阶源盾下{0}次被激活或被消耗则回合结束时附加{1}点固定伤害",
1692: "{0}%的概率造成伤害翻倍,终阶源盾处于激活状态时概率提升至{1}%",
1693: "{0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害,对手免疫百分比伤害时额外附加{2}点真实伤害",
1694: "随机吸取对手{0}-{1}点体力,若自身处于能力提升状态则效果转变为{2}-{3}点",
}
func EffectInfo(id int) string {

View File

@@ -47,15 +47,36 @@ func (our *Input) CalculateCrit(opp *Input, skill *info.SkillEntity) {
// 恢复血量
func (our *Input) Heal(in *Input, ac action.BattleActionI, value alpacadecimal.Decimal) {
healValue := int(value.IntPart())
if ac != nil {
if _, ok := ac.(*action.UseItemAction); !ok {
our.Exec(func(t Effect) bool {
t.Heal_Pre(ac, &healValue)
return true
})
}
}
//使用道具回血
if _, ok := ac.(*action.UseItemAction); !ok &&
ac != nil &&
in == our {
our.AttackValue.GainHp += int32(value.IntPart()) //道具有专门的回血包
in == our &&
healValue > 0 {
our.AttackValue.GainHp += int32(healValue) //道具有专门的回血包
}
our.CurrentPet.Info.ModelHP(value.IntPart())
if healValue >= 0 {
our.CurrentPet.Info.ModelHP(int64(healValue))
return
}
damage := uint32(-healValue)
if damage >= our.CurrentPet.Info.Hp {
our.CurrentPet.Info.Hp = 0
return
}
our.CurrentPet.Info.Hp -= damage
}
func (our *Input) HealPP(value int) {

View File

@@ -2,6 +2,10 @@ package input
import "github.com/alpacahq/alpacadecimal"
type shieldChangeEffect interface {
ShieldChange(before, after alpacadecimal.Decimal) bool
}
func (our *Input) CurrentShield() alpacadecimal.Decimal {
if our == nil || our.CurrentPet == nil {
return alpacadecimal.Zero
@@ -20,7 +24,9 @@ func (our *Input) AddShield(value alpacadecimal.Decimal) bool {
if value.Cmp(alpacadecimal.Zero) <= 0 {
return false
}
before := our.CurrentPet.Shield
our.CurrentPet.Shield = our.CurrentPet.Shield.Add(value)
our.notifyShieldChange(before, our.CurrentPet.Shield)
return true
}
@@ -32,11 +38,13 @@ func (our *Input) AbsorbShieldDamage(damage alpacadecimal.Decimal) alpacadecimal
return alpacadecimal.Zero
}
before := our.CurrentPet.Shield
absorbed := alpacadecimal.Min(our.CurrentPet.Shield, damage)
our.CurrentPet.Shield = our.CurrentPet.Shield.Sub(absorbed)
if our.CurrentPet.Shield.Cmp(alpacadecimal.Zero) < 0 {
our.CurrentPet.Shield = alpacadecimal.Zero
}
our.notifyShieldChange(before, our.CurrentPet.Shield)
return absorbed
}
@@ -45,7 +53,29 @@ func (our *Input) ConsumeAllShield() alpacadecimal.Decimal {
return alpacadecimal.Zero
}
before := our.CurrentPet.Shield
value := our.CurrentPet.Shield
our.CurrentPet.Shield = alpacadecimal.Zero
our.notifyShieldChange(before, our.CurrentPet.Shield)
return value
}
func (our *Input) notifyShieldChange(before, after alpacadecimal.Decimal) {
if our == nil || before.Cmp(after) == 0 {
return
}
for _, effect := range our.Effects {
if effect == nil || !effect.Alive() {
continue
}
hook, ok := effect.(shieldChangeEffect)
if !ok {
continue
}
effect.Ctx().Our = our
effect.Ctx().Opp = our.Opp
hook.ShieldChange(before, after)
}
}

View File

@@ -380,12 +380,6 @@ func (f *FightC) handleItemAction(a *action.UseItemAction) {
}
case gconv.Int(item.HP) != 0:
addhp := item.HP
f.GetInputByAction(a, false).Exec(func(rr input.Effect) bool {
rr.Heal_Pre(a, &addhp)
return true
})
f.GetInputByAction(a, false).Heal(f.GetInputByAction(a, false), a, alpacadecimal.NewFromInt(int64(addhp)))
f.Broadcast(func(ff *input.Input) {
ff.Player.SendPackCmd(2406, &info.UsePetIteminfo{