This commit is contained in:
xinian
2026-03-31 20:18:54 +08:00
committed by cnb
parent acfdf5679d
commit 39e64c0bf5
2 changed files with 50 additions and 12 deletions

View File

@@ -29,6 +29,35 @@ func clearOwnStatusEffects(target *input.Input) bool {
return cleared
}
func tryAddStatusByID(owner, target *input.Input, statusID int) bool {
if owner == nil || target == nil {
return false
}
existing := target.GetEffect(input.EffectType.Status, statusID)
beforeStack := 0
beforeDuration := 0
if existing != nil && existing.Alive() {
beforeStack = existing.Stack()
beforeDuration = existing.Duration()
}
eff := owner.InitEffect(input.EffectType.Status, statusID)
if eff == nil {
return false
}
target.AddEffect(owner, eff)
after := target.GetEffect(input.EffectType.Status, statusID)
if after == nil || !after.Alive() {
return false
}
if existing == nil || !existing.Alive() {
return true
}
return after.Stack() > beforeStack || after.Duration() > beforeDuration
}
func countLightDarkSkills(target *input.Input) (light, dark int) {
if target == nil || target.CurrentPet == nil {
return 0, 0
@@ -203,7 +232,7 @@ func (e *Effect2199) Skill_Use() bool {
return true
}
// Effect 2200: 令双方行动条件失效
// Effect 2200: 令双方进入{0},任意一方未触发则额外令对手进入{1}
type Effect2200 struct {
node.EffectNode
}
@@ -212,8 +241,13 @@ func (e *Effect2200) Skill_Use() bool {
if len(e.Args()) < 2 {
return true
}
if e.Ctx().Opp.CurrentPet != nil {
e.Ctx().Opp.DelPP(int(e.Args()[0].IntPart()))
statusID := int(e.Args()[0].IntPart())
fallbackID := int(e.Args()[1].IntPart())
ourOK := tryAddStatusByID(e.Ctx().Our, e.Ctx().Our, statusID)
oppOK := tryAddStatusByID(e.Ctx().Our, e.Ctx().Opp, statusID)
if !ourOK || !oppOK {
tryAddStatusByID(e.Ctx().Our, e.Ctx().Opp, fallbackID)
}
return true
}
@@ -252,6 +286,7 @@ func (e *Effect2202) Skill_Use() bool {
return true
}
light, dark := countLightDarkSkills(e.Ctx().Our)
// 光暗相等时,吸取与必定暴击都可以同时生效。
if dark < light {
return true
}
@@ -304,24 +339,22 @@ func (e *Effect2203) Skill_Use_ex() bool {
type Effect2203Sub struct {
node.EffectNode
remaining int
}
func (e *Effect2203Sub) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.CanStack(false)
e.Duration(-1)
e.remaining = 1
}
func (e *Effect2203Sub) DamageLockEx(zone *info.DamageZone) bool {
if zone == nil || zone.Type != info.DamageType.Red || e.remaining <= 0 {
func (e *Effect2203Sub) SkillHit_ex() bool {
if e.Ctx().SkillEntity == nil || e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
e.remaining--
if e.remaining <= 0 {
e.Alive(false)
}
zone.Damage = alpacadecimal.Zero
e.Ctx().SkillEntity.SetNoSide()
e.Ctx().SkillEntity.AttackTime = 0
e.Alive(false)
return true
}

View File

@@ -828,6 +828,11 @@ var effectInfoByID = map[int]string{
1692: "{0}%的概率造成伤害翻倍,终阶源盾处于激活状态时概率提升至{1}%",
1693: "{0}回合内每回合使用技能附加对手最大体力1/{1}的百分比伤害,对手免疫百分比伤害时额外附加{2}点真实伤害",
1694: "随机吸取对手{0}-{1}点体力,若自身处于能力提升状态则效果转变为{2}-{3}点",
2200: "令双方{0},任意一方未触发则额外令对手{1}",
2201: "自身携带技能中含有的光系多于暗影系时{0}%令对手疲惫,暗影系多于光系时{0}%令对手害怕",
2202: "自身携带技能中含有的光系不少于暗影系时必定打出致命一击暗影系不少于光系时吸取对手最大体力的1/{0}",
2203: "技能无效时,免疫下次对手的攻击",
2204: "技能威力减少{0}%,对手处于异常状态时改为提升{1}%",
926: "反转自身能力下降状态,反转成功则下{0}回合先制+{1}",
927: "{0}回合内每回合使用技能则出手流程结束后恢复自身最大体力的1/{1}恢复体力时若自身体力低于最大体力的1/{2}则附加给对手等量百分比伤害",
928: "消除对手回合类效果,消除成功则己方免疫下{0}次受到的异常状态",