feat: 实现战斗技能效果
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-29 16:38:34 +08:00
committed by cnb
parent 7439c45768
commit c40430aaa4
15 changed files with 851 additions and 210 deletions

View File

@@ -32,6 +32,8 @@ type Input struct {
EffectLost []Effect
// 删掉伤害记录,可以在回调中记录,而不是每次调用记录
SumDamage alpacadecimal.Decimal //伤害
// 记录上一回合结束时的能力等级供效果727等回溯使用。
LastTurnEndProp [6]int8
// DamageZone struct {
// Damage decimal.Decimal //伤害
// BeforeADD decimal.Decimal //攻击伤害
@@ -172,6 +174,10 @@ func (our *Input) GenInfo() {
// ret.SAttack = *f.Second.AttackValue
}
func (our *Input) SnapshotTurnProp() {
our.LastTurnEndProp = our.AttackValue.Prop
}
func (our *Input) ResetAttackValue() {
our.AttackValue.SkillID = 0
our.AttackValue.IsCritical = 0
@@ -184,6 +190,7 @@ func (our *Input) ResetAttackValue() {
// 这个每回合都会调用
func (our *Input) InitAttackValue() {
our.AttackValue = info.NewAttackValue(our.Player.GetInfo().UserID)
our.LastTurnEndProp = [6]int8{}
}
func (our *Input) GetPet(id uint32) (ii *info.BattlePetEntity, Reason info.ChangePetInfo) {