feat: 新增战斗技能效果648-677
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
# Task 010: Effects 648-652
|
||||
|
||||
## 目标
|
||||
|
||||
- 补齐以下 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 648
|
||||
- `argsNum`: `1`
|
||||
- `info`: `若对手下次使用的攻击技能未命中则令对手{0}`
|
||||
- `param`: `1,0,0`
|
||||
|
||||
### Effect 649
|
||||
- `argsNum`: `4`
|
||||
- `info`: `{0}回合内受到攻击则有{1}%概率{2}{3}`
|
||||
- `param`: `1,2,2|14,3,3`
|
||||
|
||||
### Effect 650
|
||||
- `argsNum`: `6`
|
||||
- `info`: `当次攻击击败对手,则自身{0}`
|
||||
- `param`: `0,0,0`
|
||||
|
||||
### Effect 651
|
||||
- `argsNum`: `3`
|
||||
- `info`: `{0}回合内每回合随机恢复{1}-{2}点体力`
|
||||
|
||||
### Effect 652
|
||||
- `argsNum`: `1`
|
||||
- `info`: `消除对手能力上升状态,消除成功下{0}回合必定暴击`
|
||||
|
||||
## 备注
|
||||
|
||||
- 该清单按当前仓库静态注册结果生成;如果某个 effect 实际通过其他模块或运行时路径实现,需要先复核后再落代码。
|
||||
- 对 `201`、`445` 这类占位 effect,优先补核心逻辑或补充明确的不可实现说明。
|
||||
@@ -1,39 +0,0 @@
|
||||
# Task 011: Effects 653-657
|
||||
|
||||
## 目标
|
||||
|
||||
- 补齐以下 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 653
|
||||
- `argsNum`: `6`
|
||||
- `info`: `{0},若对手处于能力下降状态,强化效果翻倍`
|
||||
- `param`: `0,0,0`
|
||||
|
||||
### Effect 654
|
||||
- `argsNum`: `3`
|
||||
- `info`: `{0}回合内{1}%的概率使对手{2}Miss`
|
||||
- `param`: `3,2,2`
|
||||
|
||||
### Effect 655
|
||||
- `argsNum`: `8`
|
||||
- `info`: `消除{0}状态,消除成功则{1}的{2}`
|
||||
- `param`: `10,0,0|9,1,1|0,2,2`
|
||||
|
||||
### Effect 656
|
||||
- `argsNum`: `2`
|
||||
- `info`: `{0}%的概率令对手随机{1}项技能PP值归零`
|
||||
|
||||
### Effect 657
|
||||
- `argsNum`: `2`
|
||||
- `info`: `消除{0}状态,消除成功则附加{1}点固定伤害`
|
||||
- `param`: `10,0,0`
|
||||
|
||||
## 备注
|
||||
|
||||
- 该清单按当前仓库静态注册结果生成;如果某个 effect 实际通过其他模块或运行时路径实现,需要先复核后再落代码。
|
||||
- 对 `201`、`445` 这类占位 effect,优先补核心逻辑或补充明确的不可实现说明。
|
||||
@@ -1,38 +0,0 @@
|
||||
# Task 012: Effects 658-662
|
||||
|
||||
## 目标
|
||||
|
||||
- 补齐以下 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 658
|
||||
- `argsNum`: `1`
|
||||
- `info`: `下次受到攻击伤害后于对手出手流程结束反馈伤害值{0}%的百分比伤害`
|
||||
|
||||
### Effect 659
|
||||
- `argsNum`: `3`
|
||||
- `info`: `{0}回合内若对手使用{1}攻击,则恢复{2}点体力`
|
||||
- `param`: `15,1,1`
|
||||
|
||||
### Effect 660
|
||||
- `argsNum`: `2`
|
||||
- `info`: `消除{0}状态,消除成功恢复{1}%的体力`
|
||||
- `param`: `10,0,0`
|
||||
|
||||
### Effect 661
|
||||
- `argsNum`: `3`
|
||||
- `info`: `消除{0}状态,消除成功{1}回合内受到{2}点固定伤害`
|
||||
- `param`: `10,0,0`
|
||||
|
||||
### Effect 662
|
||||
- `argsNum`: `1`
|
||||
- `info`: `{0}回合内免疫致命一击伤害`
|
||||
|
||||
## 备注
|
||||
|
||||
- 该清单按当前仓库静态注册结果生成;如果某个 effect 实际通过其他模块或运行时路径实现,需要先复核后再落代码。
|
||||
- 对 `201`、`445` 这类占位 effect,优先补核心逻辑或补充明确的不可实现说明。
|
||||
@@ -1,36 +0,0 @@
|
||||
# Task 015: Effects 673-677
|
||||
|
||||
## 目标
|
||||
|
||||
- 补齐以下 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 673
|
||||
- `argsNum`: `2`
|
||||
- `info`: `对手不处于{0}状态时附加对手已损失体力{1}%的百分比伤害`
|
||||
- `param`: `1,0,0`
|
||||
|
||||
### Effect 674
|
||||
- `argsNum`: `1`
|
||||
- `info`: `攻击结束时恢复{0}点体力`
|
||||
|
||||
### Effect 675
|
||||
- `argsNum`: `1`
|
||||
- `info`: `下{0}回合致命一击对自身miss`
|
||||
|
||||
### Effect 676
|
||||
- `argsNum`: `2`
|
||||
- `info`: `下{0}回合每回合使用攻击技能附加自身防御、特防值总和{1}%的百分比伤害`
|
||||
|
||||
### Effect 677
|
||||
- `argsNum`: `1`
|
||||
- `info`: `{0}回合内每回合使用技能吸取对手能力提升状态`
|
||||
|
||||
## 备注
|
||||
|
||||
- 该清单按当前仓库静态注册结果生成;如果某个 effect 实际通过其他模块或运行时路径实现,需要先复核后再落代码。
|
||||
- 对 `201`、`445` 这类占位 effect,优先补核心逻辑或补充明确的不可实现说明。
|
||||
157
logic/service/fight/effect/648_652.go
Normal file
157
logic/service/fight/effect/648_652.go
Normal file
@@ -0,0 +1,157 @@
|
||||
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 648: 若对手下次使用的攻击技能未命中则令对手{0}
|
||||
type Effect648 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect648) Skill_Use() bool {
|
||||
monitor := e.Ctx().Our.InitEffect(input.EffectType.Sub, 648, int(e.Args()[0].IntPart()))
|
||||
if monitor != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, monitor)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect648Sub struct {
|
||||
FixedDurationNeg1Base
|
||||
}
|
||||
|
||||
func (e *Effect648Sub) SkillHit_ex() bool {
|
||||
skill := e.Ctx().SkillEntity
|
||||
if skill == nil || skill.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
if skill.AttackTime == 0 {
|
||||
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[0].IntPart()))
|
||||
if statusEffect != nil {
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||
}
|
||||
}
|
||||
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 649: {0}回合内受到攻击则有{1}%概率{2}{3}
|
||||
type Effect649 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect649) Action_end_ex() bool {
|
||||
skill := e.Ctx().SkillEntity
|
||||
if skill == nil || skill.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 {
|
||||
return true
|
||||
}
|
||||
|
||||
statusEffect.Duration(int(e.Args()[3].IntPart()))
|
||||
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 650: 当次攻击击败对手,则自身{0}
|
||||
type Effect650 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect650) Skill_Use() bool {
|
||||
if e.Ctx().Opp.CurrentPet.Info.Hp > 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
applyEffectPropChanges(e.Ctx().Our, e.Ctx().Our, e.SideEffectArgs, false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 651: {0}回合内每回合随机恢复{1}-{2}点体力
|
||||
type Effect651 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect651) TurnEnd() {
|
||||
minHeal := int(e.Args()[1].IntPart())
|
||||
maxHeal := int(e.Args()[2].IntPart())
|
||||
if maxHeal < minHeal {
|
||||
maxHeal = minHeal
|
||||
}
|
||||
|
||||
healValue := minHeal
|
||||
if maxHeal > minHeal {
|
||||
healValue += grand.Intn(maxHeal - minHeal + 1)
|
||||
}
|
||||
if healValue > 0 {
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, alpacadecimal.NewFromInt(int64(healValue)))
|
||||
}
|
||||
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
// Effect 652: 消除对手能力上升状态,消除成功下{0}回合必定暴击
|
||||
type Effect652 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect652) 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 {
|
||||
return true
|
||||
}
|
||||
|
||||
subEffect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 652, int(e.Args()[0].IntPart()))
|
||||
if subEffect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, subEffect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect652Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect652Sub) 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
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 648, &Effect648{})
|
||||
input.InitEffect(input.EffectType.Sub, 648, &Effect648Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 649, &Effect649{})
|
||||
input.InitEffect(input.EffectType.Skill, 650, &Effect650{})
|
||||
input.InitEffect(input.EffectType.Skill, 651, &Effect651{})
|
||||
input.InitEffect(input.EffectType.Skill, 652, &Effect652{})
|
||||
input.InitEffect(input.EffectType.Sub, 652, &Effect652Sub{})
|
||||
}
|
||||
117
logic/service/fight/effect/653_657.go
Normal file
117
logic/service/fight/effect/653_657.go
Normal file
@@ -0,0 +1,117 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
func matchSkillMode(skill *info.SkillEntity, mode int) bool {
|
||||
if skill == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
switch mode {
|
||||
case 0:
|
||||
return skill.Category() == info.Category.PHYSICAL
|
||||
case 1:
|
||||
return skill.Category() == info.Category.SPECIAL
|
||||
case 2:
|
||||
return skill.Category() == info.Category.STATUS
|
||||
case 3:
|
||||
return skill.Category() != info.Category.STATUS
|
||||
default:
|
||||
return skill.Category() != info.Category.STATUS
|
||||
}
|
||||
}
|
||||
|
||||
// Effect 653: {0},若对手处于能力下降状态,强化效果翻倍
|
||||
type Effect653 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect653) OnSkill() bool {
|
||||
doubleBoost := e.Ctx().Opp.HasPropSub()
|
||||
for i, delta := range e.SideEffectArgs {
|
||||
if delta == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
if doubleBoost && delta > 0 {
|
||||
delta *= 2
|
||||
}
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(delta))
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 654: {0}回合内{1}%的概率使对手{2}Miss
|
||||
type Effect654 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect654) SkillHit_ex() bool {
|
||||
skill := e.Ctx().SkillEntity
|
||||
if !matchSkillMode(skill, int(e.Args()[2].IntPart())) {
|
||||
return true
|
||||
}
|
||||
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)
|
||||
if success {
|
||||
skill.SetMiss()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 655: 消除{0}状态,消除成功则{1}的{2}
|
||||
type Effect655 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect655) Skill_Use() bool {
|
||||
if !clearStatusEffects(e.Ctx().Our, int(e.Args()[0].IntPart())) {
|
||||
return true
|
||||
}
|
||||
|
||||
target := effectRelativeInput(e.Ctx().Our, e.Ctx().Opp, int(e.Args()[1].IntPart()))
|
||||
applyEffectPropChanges(target, e.Ctx().Our, e.SideEffectArgs[2:], false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 656: {0}%的概率令对手随机{1}项技能PP值归零
|
||||
type Effect656 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect656) OnSkill() bool {
|
||||
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)
|
||||
if success {
|
||||
zeroRandomSkillPP(e.Ctx().Opp, int(e.Args()[1].IntPart()))
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 657: 消除{0}状态,消除成功则附加{1}点固定伤害
|
||||
type Effect657 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect657) Skill_Use() bool {
|
||||
if !clearStatusEffects(e.Ctx().Our, int(e.Args()[0].IntPart())) {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: e.Args()[1],
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 653, &Effect653{})
|
||||
input.InitEffect(input.EffectType.Skill, 654, &Effect654{})
|
||||
input.InitEffect(input.EffectType.Skill, 655, &Effect655{})
|
||||
input.InitEffect(input.EffectType.Skill, 656, &Effect656{})
|
||||
input.InitEffect(input.EffectType.Skill, 657, &Effect657{})
|
||||
}
|
||||
156
logic/service/fight/effect/658_662.go
Normal file
156
logic/service/fight/effect/658_662.go
Normal file
@@ -0,0 +1,156 @@
|
||||
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 658: 下次受到攻击伤害后于对手出手流程结束反馈伤害值{0}%的百分比伤害
|
||||
type Effect658 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect658) Skill_Use() bool {
|
||||
addSubEffect(e.Ctx().Our, e.Ctx().Our, &e.EffectNode, &Effect658Sub{}, -1)
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect658Sub struct {
|
||||
FixedDurationNeg1Base
|
||||
damageToReflect alpacadecimal.Decimal
|
||||
}
|
||||
|
||||
func (e *Effect658Sub) SetArgs(t *input.Input, a ...int) {
|
||||
setArgsWithFixedDuration(&e.EffectNode, t, -1, a...)
|
||||
}
|
||||
|
||||
func (e *Effect658Sub) DamageSubEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red || e.damageToReflect.Cmp(alpacadecimal.Zero) > 0 {
|
||||
return true
|
||||
}
|
||||
if zone.Damage.Cmp(alpacadecimal.Zero) <= 0 || len(e.Args()) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
percent := e.Args()[0]
|
||||
if percent.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.damageToReflect = zone.Damage.Mul(percent).Div(alpacadecimal.NewFromInt(100))
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect658Sub) Action_end_ex() bool {
|
||||
if e.damageToReflect.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: e.damageToReflect,
|
||||
})
|
||||
e.damageToReflect = alpacadecimal.Zero
|
||||
e.Alive(false)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 659: {0}回合内若对手使用{1}攻击,则恢复{2}点体力
|
||||
type Effect659 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect659) Skill_Use_ex() bool {
|
||||
if !matchSkillMode(e.Ctx().SkillEntity, int(e.Args()[1].IntPart())) {
|
||||
return true
|
||||
}
|
||||
if e.Args()[2].Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[2])
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 660: 消除{0}状态,消除成功恢复{1}%的体力
|
||||
type Effect660 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect660) Skill_Use() bool {
|
||||
if !clearStatusEffects(e.Ctx().Our, int(e.Args()[0].IntPart())) {
|
||||
return true
|
||||
}
|
||||
|
||||
heal := e.Ctx().Our.CurrentPet.GetMaxHP().Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
|
||||
if heal.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, heal)
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 661: 消除{0}状态,消除成功{1}回合内受到{2}点固定伤害
|
||||
type Effect661 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect661) Skill_Use() bool {
|
||||
if !clearStatusEffects(e.Ctx().Our, int(e.Args()[0].IntPart())) {
|
||||
return true
|
||||
}
|
||||
|
||||
subEffect := e.Ctx().Our.InitEffect(input.EffectType.Sub, 661, int(e.Args()[1].IntPart()), int(e.Args()[2].IntPart()))
|
||||
if subEffect != nil {
|
||||
e.Ctx().Our.AddEffect(e.Ctx().Our, subEffect)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
type Effect661Sub struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect661Sub) TurnEnd() {
|
||||
damage := e.Args()[1]
|
||||
if damage.Cmp(alpacadecimal.Zero) > 0 {
|
||||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: damage,
|
||||
})
|
||||
}
|
||||
|
||||
e.EffectNode.TurnEnd()
|
||||
}
|
||||
|
||||
// Effect 662: {0}回合内免疫致命一击伤害
|
||||
type Effect662 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect662) DamageLockEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Crit == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = alpacadecimal.Zero
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 658, &Effect658{})
|
||||
input.InitEffect(input.EffectType.Sub, 658, &Effect658Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 659, &Effect659{})
|
||||
input.InitEffect(input.EffectType.Skill, 660, &Effect660{})
|
||||
input.InitEffect(input.EffectType.Skill, 661, &Effect661{})
|
||||
input.InitEffect(input.EffectType.Sub, 661, &Effect661Sub{})
|
||||
input.InitEffect(input.EffectType.Skill, 662, &Effect662{})
|
||||
}
|
||||
121
logic/service/fight/effect/673_677.go
Normal file
121
logic/service/fight/effect/673_677.go
Normal file
@@ -0,0 +1,121 @@
|
||||
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 673: 对手不处于{0}状态时附加对手已损失体力{1}%的百分比伤害
|
||||
type Effect673 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect673) OnSkill() bool {
|
||||
status := info.EnumPetStatus(int(e.Args()[0].IntPart()))
|
||||
if e.Ctx().Opp.StatEffect_Exist(status) {
|
||||
return true
|
||||
}
|
||||
|
||||
lostHP := e.Ctx().Opp.CurrentPet.GetMaxHP().Sub(e.Ctx().Opp.CurrentPet.GetHP())
|
||||
if lostHP.Cmp(alpacadecimal.Zero) <= 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
damage := lostHP.Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
|
||||
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
|
||||
}
|
||||
|
||||
// Effect 674: 攻击结束时恢复{0}点体力
|
||||
type Effect674 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect674) Action_end() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, e.Args()[0])
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 675: 下{0}回合致命一击对自身miss
|
||||
type Effect675 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect675) DamageLockEx(zone *info.DamageZone) bool {
|
||||
if zone == nil || zone.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Crit == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
zone.Damage = alpacadecimal.Zero
|
||||
return true
|
||||
}
|
||||
|
||||
// Effect 676: 下{0}回合每回合使用攻击技能附加自身防御、特防值总和{1}%的百分比伤害
|
||||
type Effect676 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect676) OnSkill() bool {
|
||||
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
return true
|
||||
}
|
||||
|
||||
totalDefense := e.Ctx().Our.GetProp(1).Add(e.Ctx().Our.GetProp(3))
|
||||
damage := totalDefense.Mul(e.Args()[1]).Div(alpacadecimal.NewFromInt(100))
|
||||
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
|
||||
}
|
||||
|
||||
// Effect 677: {0}回合内每回合使用技能吸取对手能力提升状态
|
||||
type Effect677 struct {
|
||||
RoundEffectArg0Base
|
||||
}
|
||||
|
||||
func (e *Effect677) OnSkill() bool {
|
||||
if e.Ctx().SkillEntity == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||||
if v <= 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
||||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.Skill, 673, &Effect673{})
|
||||
input.InitEffect(input.EffectType.Skill, 674, &Effect674{})
|
||||
input.InitEffect(input.EffectType.Skill, 675, &Effect675{})
|
||||
input.InitEffect(input.EffectType.Skill, 676, &Effect676{})
|
||||
input.InitEffect(input.EffectType.Skill, 677, &Effect677{})
|
||||
}
|
||||
@@ -396,6 +396,26 @@ var effectInfoByID = map[int]string{
|
||||
644: "当回合未击败对手,则减少对手当前体力1/{0}",
|
||||
645: "体力低于1/{0}时威力{1}倍",
|
||||
646: "体力高于对手时,此技能命中后100%使对手{0}",
|
||||
648: "若对手下次使用的攻击技能未命中则令对手{0}",
|
||||
649: "{0}回合内受到攻击则有{1}%概率{2}{3}",
|
||||
650: "当次攻击击败对手,则自身{0}",
|
||||
651: "{0}回合内每回合随机恢复{1}-{2}点体力",
|
||||
652: "消除对手能力上升状态,消除成功下{0}回合必定暴击",
|
||||
653: "{0},若对手处于能力下降状态,强化效果翻倍",
|
||||
654: "{0}回合内{1}%的概率使对手{2}Miss",
|
||||
655: "消除{0}状态,消除成功则{1}的{2}",
|
||||
656: "{0}%的概率令对手随机{1}项技能PP值归零",
|
||||
657: "消除{0}状态,消除成功则附加{1}点固定伤害",
|
||||
658: "下次受到攻击伤害后于对手出手流程结束反馈伤害值{0}%的百分比伤害",
|
||||
659: "{0}回合内若对手使用{1}攻击,则恢复{2}点体力",
|
||||
660: "消除{0}状态,消除成功恢复{1}%的体力",
|
||||
661: "消除{0}状态,消除成功{1}回合内受到{2}点固定伤害",
|
||||
662: "{0}回合内免疫致命一击伤害",
|
||||
673: "对手不处于{0}状态时附加对手已损失体力{1}%的百分比伤害",
|
||||
674: "攻击结束时恢复{0}点体力",
|
||||
675: "下{0}回合致命一击对自身miss",
|
||||
676: "下{0}回合每回合使用攻击技能附加自身防御、特防值总和{1}%的百分比伤害",
|
||||
677: "{0}回合内每回合使用技能吸取对手能力提升状态",
|
||||
680: "先出手时{0}%使对手{1}{2}回合",
|
||||
681: "下{0}回合自身攻击技能必定致命、必定命中",
|
||||
682: "受到的伤害超过{0},自身{1}",
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/driver"
|
||||
)
|
||||
|
||||
//机器人 token b7a33db00ede
|
||||
func startrobot() {
|
||||
zero.OnMessage(func(ctx *zero.Ctx) bool {
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ func (s *TalkService) Cheak(mapid uint32, flag int) (int, bool) {
|
||||
func (s *TalkService) Update(flag int, count int) bool {
|
||||
// VIP 直接返回失败
|
||||
if cool.Config.ServerInfo.IsVip != 0 {
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
talkID := uint32(flag)
|
||||
@@ -99,7 +99,6 @@ func (s *TalkService) Update(flag int, count int) bool {
|
||||
talk := model.Talk{
|
||||
PlayerID: userID,
|
||||
TalkID: talkID,
|
||||
Count: 0, // 关键:必须初始化 count 为 0
|
||||
}
|
||||
// 唯一索引 + InsertIgnore 保证只会插入1次
|
||||
_, _ = db.Data(talk).InsertIgnore()
|
||||
|
||||
Reference in New Issue
Block a user