战斗修改

This commit is contained in:
2025-09-29 02:40:35 +08:00
parent 7df70f2375
commit 91d0d29ec9
28 changed files with 332 additions and 281 deletions

View File

@@ -14,7 +14,7 @@ import (
*/
func init() {
input.InitEffect(input.EffectType.Skill, 9, &Effect8{
input.InitEffect(input.EffectType.Skill, 8, &Effect8{
EffectNode: node.EffectNode{},
})
@@ -25,12 +25,11 @@ type Effect8 struct {
}
// 伤害落实前触发,限制最大伤害
func (e *Effect8) Attack(opp *input.Input, v *info.DamageZone) {
if v.Type == info.DamageType.Red {
v.Damage = decimal.NewFromInt(utils.Min(v.Damage.IntPart(), int64(opp.CurrentPet.Info.Hp)-1))
func (e *Effect8) Damage_Floor(ctx input.Ctx) bool {
if ctx.DamageZone.Type == info.DamageType.Red {
ctx.DamageZone.Damage = decimal.NewFromInt(utils.Min(ctx.DamageZone.Damage.IntPart(), int64(ctx.Input.CurrentPet.Info.Hp)-1))
}
return true
}