Compare commits
2 Commits
b2e6b40e98
...
10f20f453d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10f20f453d | ||
|
|
92d3c755a5 |
@@ -258,6 +258,67 @@ JSON 中存在但代码未注册(示例前 60 项):
|
||||
- `667` 按配置说明“自身攻击+a、防御+b、特攻+c、特防+d、速度+e、命中+f”处理,仅在满体力时给自己附加前 6 项能力等级。
|
||||
|
||||
### 8.3 本轮新增文件
|
||||
|
||||
---
|
||||
|
||||
## 9. 2026-03-31 增量记录
|
||||
|
||||
### 9.1 本轮补齐的 effect
|
||||
- `764` `{0}回合内若对手使用攻击技能降低对手最大体力的1/{1}`
|
||||
- `765` `{0}回合对手无法使自身能力出现提升状态`
|
||||
- `766` 消除对手能力提升状态,消除成功则`{0}`回合内对手造成的攻击伤害不超过`{1}`点
|
||||
- `767` `{0}`回合内每回合使用技能且出手流程结束后若对手处于能力下降状态则附加给对手`{1}`点固定伤害
|
||||
- `768` 对手每处于一种异常状态则附加`{0}`点固定伤害
|
||||
- `774` 若自身当前体力高于对手则附加对手最大体力1/`{0}`的百分比伤害
|
||||
- `775` `{0}`回合内若受到的伤害大于`{1}`,则恢复自身所有体力
|
||||
- `777` 消除对手能力上升状态,消除成功下`{0}`回合必定先出手
|
||||
- `778` 反转对手的能力提升状态,反转成功则恢复自身所有体力
|
||||
- `779` 若对手处于能力提升状态则先制+2
|
||||
|
||||
### 9.2 已存在并复核通过
|
||||
- `776` 已实现于 `logic/service/fight/effect/effect_776.go`
|
||||
|
||||
### 9.3 本轮新增文件
|
||||
- `logic/service/fight/effect/764_768.go`
|
||||
- `logic/service/fight/effect/774_779.go`
|
||||
|
||||
### 9.4 本轮同步更新
|
||||
- `logic/service/fight/effect/effect_info_map.go`
|
||||
|
||||
### 9.5 本轮顺手修复的同包编译阻塞
|
||||
- `logic/service/fight/effect/2195_2219.go`
|
||||
- 修正 `uint32 * int` 的类型不匹配
|
||||
- `logic/service/fight/effect/2220_2244.go`
|
||||
- 修正将 `info.Category` 误当函数调用的问题,改为 `info.EnumCategory`
|
||||
|
||||
### 9.6 本轮验证
|
||||
- 已执行:
|
||||
- `cd /workspace/logic && go test ./service/fight/effect`
|
||||
- `cd /workspace/logic && go build ./...`
|
||||
- 结果:
|
||||
- 通过
|
||||
|
||||
### 9.7 任务文档状态
|
||||
- `task-031-effects-764-768.md` 本轮已可视为完成
|
||||
- `task-033-effects-774-779.md` 本轮已可视为完成(`776` 为既有实现)
|
||||
- 本轮未删除任务文档;如下一轮继续清理 backlog,可直接移除这两份任务文件
|
||||
|
||||
### 9.8 后续增量
|
||||
- 已继续补齐:
|
||||
- `785` 若自身攻击对手时克制关系为微弱则先制+2
|
||||
- `786` 令对手随机进入`{0}`种异常状态
|
||||
- `787` `{0}`回合内使用技能后若对手处于能力提升状态则附加对手最大体力1/`{1}`的百分比伤害
|
||||
- `788` 消除对手能力提升,消除成功`{0}`回合内免疫异常状态
|
||||
- `789` 消除对手回合类效果,消除成功对手下`{0}`回合受到的伤害翻倍
|
||||
- 新增文件:
|
||||
- `logic/service/fight/effect/785_789.go`
|
||||
- `logic/service/fight/effect/795_799.go`
|
||||
- 已继续补齐:
|
||||
- `795` 每次使用则当回合造成的攻击伤害额外提升`{0}`%,最高额外提升`{1}`%
|
||||
- `796` `{0}`回合内每回合吸取对手当前体力的1/`{1}`
|
||||
- `797` 消除对手回合类效果,消除成功`{0}`回合内对手无法通过自身技能恢复体力
|
||||
- `798` 若对手处于能力提升状态,则对手`{0}`回合内造成的伤害不超过`{1}`
|
||||
- `799` 恢复自身最大体力的1/`{0}`并给对手造成等量百分比伤害,自身体力低于1/`{1}`时效果翻倍
|
||||
- `logic/service/fight/effect/663_667.go`
|
||||
|
||||
### 8.4 本轮同步更新
|
||||
|
||||
@@ -415,7 +415,7 @@ func (e *Effect2219) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().Our == nil || e.Ctx().Our.CurrentPet == nil {
|
||||
return true
|
||||
}
|
||||
target := e.Ctx().Our.CurrentPet.Info.MaxHp * int(e.Args()[0].IntPart()) / 100
|
||||
target := int(e.Ctx().Our.CurrentPet.Info.MaxHp) * int(e.Args()[0].IntPart()) / 100
|
||||
current := e.Ctx().Our.CurrentDivineEnergy()
|
||||
if target <= current {
|
||||
return true
|
||||
|
||||
@@ -435,7 +435,7 @@ func (e *Effect2239Sub) SkillHit_ex() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.remaining <= 0 {
|
||||
return true
|
||||
}
|
||||
if len(e.Args()) > 1 && e.Ctx().SkillEntity.Category() == info.Category(e.Args()[1].IntPart()) {
|
||||
if len(e.Args()) > 1 && e.Ctx().SkillEntity.Category() == info.EnumCategory(e.Args()[1].IntPart()) {
|
||||
e.Alive(false)
|
||||
}
|
||||
return true
|
||||
|
||||
208
logic/service/fight/effect/764_768.go
Normal file
208
logic/service/fight/effect/764_768.go
Normal file
@@ -0,0 +1,208 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
func countAliveStatusKinds(target *input.Input) int {
|
||||
if target == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
seen := make(map[uint16]struct{})
|
||||
for _, eff := range target.Effects {
|
||||
if eff == nil || !eff.Alive() {
|
||||
continue
|
||||
}
|
||||
effID := eff.ID()
|
||||
if effID.GetEffectType() != input.EffectType.Status {
|
||||
continue
|
||||
}
|
||||
seen[effID.Suffix()] = struct{}{}
|
||||
}
|
||||
return len(seen)
|
||||
}
|
||||
|
||||
// Effect 764: {0}回合内若对手使用攻击技能降低对手最大体力的1/{1}
|
||||
type Effect764 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect764) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 764, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect764Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect764Sub) Skill_Use_ex() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity.Category() == info.Category.STATUS || 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 765: {0}回合对手无法使自身能力出现提升状态
|
||||
type Effect765 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect765) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 765, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect765Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect765Sub) PropBefer(source *input.Input, prop int8, level int8) bool {
|
||||
if source != e.Ctx().Our {
|
||||
return true
|
||||
}
|
||||
if level <= 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Effect 766: 消除对手能力提升状态,消除成功则{0}回合内对手造成的攻击伤害不超过{1}点
|
||||
type Effect766 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect766) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 || !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 766, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect766Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect766Sub) Damage_Mul(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(e.Args()[1]) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = e.Args()[1]
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 767: {0}回合内每回合使用技能且出手流程结束后若对手处于能力下降状态则附加给对手{1}点固定伤害
|
||||
type Effect767 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect767) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 767, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect767Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect767Sub) Action_end() bool {
|
||||
if len(e.Args()) < 2 || e.Ctx().SkillEntity == nil || !e.Ctx().Opp.HasPropSub() {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: e.Args()[1],
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 768: 对手每处于一种异常状态则附加{0}点固定伤害
|
||||
type Effect768 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect768) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
count := countAliveStatusKinds(e.Ctx().Opp)
|
||||
if count <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := e.Args()[0].Mul(alpacadecimal.NewFromInt(int64(count)))
|
||||
if damage.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damage,
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 764, &Effect764{})
|
||||
input.InitEffect(input.EffectType.Sub, 764, &Effect764Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 765, &Effect765{})
|
||||
input.InitEffect(input.EffectType.Sub, 765, &Effect765Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 766, &Effect766{})
|
||||
input.InitEffect(input.EffectType.Sub, 766, &Effect766Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 767, &Effect767{})
|
||||
input.InitEffect(input.EffectType.Sub, 767, &Effect767Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 768, &Effect768{})
|
||||
}
|
||||
163
logic/service/fight/effect/774_779.go
Normal file
163
logic/service/fight/effect/774_779.go
Normal file
@@ -0,0 +1,163 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
"math"
|
||||
|
||||
"github.com/alpacahq/alpacadecimal"
|
||||
)
|
||||
|
||||
// Effect 774: 若自身当前体力高于对手则附加对手最大体力1/{0}的百分比伤害
|
||||
type Effect774 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect774) OnSkill() bool {
|
||||
if len(e.Args()) == 0 || e.Ctx().Our.CurrentPet.GetHP().Cmp(e.Ctx().Opp.CurrentPet.GetHP()) <= 0 {
|
||||
return true
|
||||
}
|
||||
if e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
|
||||
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,
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 775: {0}回合内若受到的伤害大于{1},则恢复自身所有体力
|
||||
type Effect775 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect775) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 775, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect775Sub struct {
|
||||
RoundEffectArg0Base
|
||||
pendingHeal bool
|
||||
}
|
||||
|
||||
func (e *Effect775Sub) DamageLockEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(e.Args()[1]) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.pendingHeal = true
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect775Sub) Action_end_ex() bool {
|
||||
if !e.pendingHeal {
|
||||
return true
|
||||
}
|
||||
|
||||
e.pendingHeal = false
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.CurrentPet.GetMaxHP())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 777: 消除对手能力上升状态,消除成功下{0}回合必定先出手
|
||||
type Effect777 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect777) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 || !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 777, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect777Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect777Sub) 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 = math.MaxInt
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 778: 反转对手的能力提升状态,反转成功则恢复自身所有体力
|
||||
type Effect778 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect778) 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())
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 779: 若对手处于能力提升状态则先制+2
|
||||
type Effect779 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect779) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
if !e.Ctx().Opp.HasPropADD() {
|
||||
return true
|
||||
}
|
||||
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
current.SkillEntity.XML.Priority += 2
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 774, &Effect774{})
|
||||
input.InitEffect(input.EffectType.Skill, 775, &Effect775{})
|
||||
input.InitEffect(input.EffectType.Sub, 775, &Effect775Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 777, &Effect777{})
|
||||
input.InitEffect(input.EffectType.Sub, 777, &Effect777Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 778, &Effect778{})
|
||||
input.InitEffect(input.EffectType.Skill, 779, &Effect779{})
|
||||
}
|
||||
144
logic/service/fight/effect/785_789.go
Normal file
144
logic/service/fight/effect/785_789.go
Normal file
@@ -0,0 +1,144 @@
|
||||
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"
|
||||
)
|
||||
|
||||
// Effect 785: 若自身攻击对手时克制关系为微弱则先制+2
|
||||
type Effect785 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect785) ComparePre(fattack, sattack *action.SelectSkillAction) bool {
|
||||
current := actionByPlayer(fattack, sattack, e.Ctx().Our.UserID)
|
||||
if current == nil || current.SkillEntity == nil || e.Ctx().Opp.CurrentPet == nil {
|
||||
return true
|
||||
}
|
||||
if current.SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
mul, _ := element.Calculator.GetOffensiveMultiplier(current.SkillEntity.GetType().ID, e.Ctx().Opp.CurrentPet.GetType().ID)
|
||||
if mul > 0 && mul < 1 {
|
||||
current.SkillEntity.XML.Priority += 2
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 786: 令对手随机进入{0}种异常状态
|
||||
type Effect786 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect786) OnSkill() bool {
|
||||
if len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
applyRandomStatusToOpp(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[0].IntPart()))
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 787: {0}回合内使用技能后若对手处于能力提升状态则附加对手最大体力1/{1}的百分比伤害
|
||||
type Effect787 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect787) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 787, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect787Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect787Sub) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 || !e.Ctx().Opp.HasPropADD() || 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 788: 消除对手能力提升,消除成功{0}回合内免疫异常状态
|
||||
type Effect788 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect788) Skill_Use() bool {
|
||||
if len(e.Args()) == 0 || !clearPositiveProps(e.Ctx().Opp, e.Ctx().Our) {
|
||||
return true
|
||||
}
|
||||
|
||||
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect48{}, -1)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 789: 消除对手回合类效果,消除成功对手下{0}回合受到的伤害翻倍
|
||||
type Effect789 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect789) 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, 789, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect789Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect789Sub) DamageDivEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = zone.Damage.Mul(alpacadecimal.NewFromInt(2))
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 785, &Effect785{})
|
||||
input.InitEffect(input.EffectType.Skill, 786, &Effect786{})
|
||||
input.InitEffect(input.EffectType.Skill, 787, &Effect787{})
|
||||
input.InitEffect(input.EffectType.Sub, 787, &Effect787Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 788, &Effect788{})
|
||||
input.InitEffect(input.EffectType.Skill, 789, &Effect789{})
|
||||
input.InitEffect(input.EffectType.Sub, 789, &Effect789Sub{})
|
||||
}
|
||||
202
logic/service/fight/effect/795_799.go
Normal file
202
logic/service/fight/effect/795_799.go
Normal 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 795: 每次使用则当回合造成的攻击伤害额外提升{0}%,最高额外提升{1}%
|
||||
type Effect795 struct {
|
||||
node.EffectNode
|
||||
useCount int64
|
||||
}
|
||||
|
||||
func (e *Effect795) SkillHit() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.useCount++
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect795) Damage_Mul(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
if e.useCount <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
bonus := e.Args()[0].Mul(alpacadecimal.NewFromInt(e.useCount))
|
||||
if bonus.Cmp(e.Args()[1]) > 0 {
|
||||
bonus = e.Args()[1]
|
||||
}
|
||||
if bonus.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = zone.Damage.Mul(hundred.Add(bonus)).Div(hundred)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 796: {0}回合内每回合吸取对手当前体力的1/{1}
|
||||
type Effect796 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect796) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 796, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect796Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect796Sub) OnSkill() bool {
|
||||
if len(e.Args()) < 2 || e.Args()[1].Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := e.Ctx().Opp.CurrentPet.GetHP().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,
|
||||
})
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, damage)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 797: 消除对手回合类效果,消除成功{0}回合内对手无法通过自身技能恢复体力
|
||||
type Effect797 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect797) 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, 797, int(e.Args()[0].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect797Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect797Sub) 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 798: 若对手处于能力提升状态,则对手{0}回合内造成的伤害不超过{1}
|
||||
type Effect798 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect798) Skill_Use() bool {
|
||||
if len(e.Args()) < 2 || !e.Ctx().Opp.HasPropADD() {
|
||||
return true
|
||||
}
|
||||
|
||||
effect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 798, int(e.Args()[0].IntPart()), int(e.Args()[1].IntPart()))
|
||||
if effect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, effect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect798Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect798Sub) Damage_Mul(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || len(e.Args()) < 2 {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(e.Args()[1]) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = e.Args()[1]
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 799: 恢复自身最大体力的1/{0}并给对手造成等量百分比伤害,自身体力低于1/{1}时效果翻倍
|
||||
type Effect799 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect799) OnSkill() bool {
|
||||
if len(e.Args()) < 2 || e.Args()[0].Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
amount := e.Ctx().Our.CurrentPet.GetMaxHP().Div(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 {
|
||||
amount = amount.Mul(alpacadecimal.NewFromInt(2))
|
||||
}
|
||||
}
|
||||
if amount.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, amount)
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Percent,
|
||||
Damage: amount,
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 795, &Effect795{})
|
||||
input.InitEffect(input.EffectType.Skill, 796, &Effect796{})
|
||||
input.InitEffect(input.EffectType.Sub, 796, &Effect796Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 797, &Effect797{})
|
||||
input.InitEffect(input.EffectType.Sub, 797, &Effect797Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 798, &Effect798{})
|
||||
input.InitEffect(input.EffectType.Sub, 798, &Effect798Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 799, &Effect799{})
|
||||
}
|
||||
@@ -502,6 +502,11 @@ var effectInfoByID = map[int]string{
|
||||
761: "{0}回合内对手恢复体力时恢复效果减少{1}%",
|
||||
762: "{0}回合内每回合恢复自身已损失体力的{1}%",
|
||||
763: "自身不处于能力提升状态时则{0}",
|
||||
764: "{0}回合内若对手使用攻击技能降低对手最大体力的1/{1}",
|
||||
765: "{0}回合对手无法使自身能力出现提升状态",
|
||||
766: "消除对手能力提升状态,消除成功则{0}回合内对手造成的攻击伤害不超过{1}点",
|
||||
767: "{0}回合内每回合使用技能且出手流程结束后若对手处于能力下降状态则附加给对手{1}点固定伤害",
|
||||
768: "对手每处于一种异常状态则附加{0}点固定伤害",
|
||||
|
||||
841: "使对手和自身同时降低1/{0}最大体力",
|
||||
842: "若自身处于能力提升状态则造成的攻击伤害额外提升{0}%",
|
||||
@@ -544,7 +549,22 @@ var effectInfoByID = map[int]string{
|
||||
771: "{0}回合内每次使用攻击技能都有{1}%概率使对手进入任意一种异常状态",
|
||||
772: "{0}回合内若对手使用攻击技能则有{1}%概率随机进入烧伤、冻伤、中毒、麻痹、害怕、睡眠中的一种异常状态",
|
||||
773: "若自身体力低于对手则与对手互换体力",
|
||||
774: "若自身当前体力高于对手则附加对手最大体力1/{0}的百分比伤害",
|
||||
775: "{0}回合内若受到的伤害大于{1},则恢复自身所有体力",
|
||||
776: "下{0}回合自身造成的攻击伤害翻倍",
|
||||
777: "消除对手能力上升状态,消除成功下{0}回合必定先出手",
|
||||
778: "反转对手的能力提升状态,反转成功则恢复自身所有体力",
|
||||
779: "若对手处于能力提升状态则先制+2",
|
||||
785: "若自身攻击对手时克制关系为微弱则先制+2",
|
||||
786: "令对手随机进入{0}种异常状态",
|
||||
787: "{0}回合内使用技能后若对手处于能力提升状态则附加对手最大体力1/{1}的百分比伤害",
|
||||
788: "消除对手能力提升,消除成功{0}回合内免疫异常状态",
|
||||
789: "消除对手回合类效果,消除成功对手下{0}回合受到的伤害翻倍",
|
||||
795: "每次使用则当回合造成的攻击伤害额外提升{0}%,最高额外提升{1}%",
|
||||
796: "{0}回合内每回合吸取对手当前体力的1/{1}",
|
||||
797: "消除对手回合类效果,消除成功{0}回合内对手无法通过自身技能恢复体力",
|
||||
798: "若对手处于能力提升状态,则对手{0}回合内造成的伤害不超过{1}",
|
||||
799: "恢复自身最大体力的1/{0}并给对手造成等量百分比伤害,自身体力低于1/{1}时效果翻倍",
|
||||
1016: "造成的伤害不足{0}则下{1}次攻击造成的伤害提高{2}%",
|
||||
1017: "消耗自身所有护盾值,造成等量固定伤害",
|
||||
1018: "{0}回合内若受到的伤害低于{1}则免疫伤害并造成等同于伤害量的固定伤害",
|
||||
|
||||
Reference in New Issue
Block a user