Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
49232f9
Implement Xianyun Plunge for Candace
GaspNAwe Jul 27, 2025
e37c841
Implement Xianyun plunge for Chongyun
GaspNAwe Jul 27, 2025
c92d6f6
Implement Xianyun plunge for Kaeya
GaspNAwe Jul 27, 2025
5a71a8a
Implement Xianyun plunge for Lanyan
GaspNAwe Jul 27, 2025
cc78a1b
Implement Xianyun plunge for Razor
GaspNAwe Jul 27, 2025
2617359
Implement Xianyun plunge for Rosaria
GaspNAwe Jul 27, 2025
2744ca1
Implement Xianyun plunge for Xinyan
GaspNAwe Jul 27, 2025
669dc94
Document Xianyun plunge frame recording and counts
GaspNAwe Jul 27, 2025
8a61a56
Document Xianyun plunge parameters, multiple chars
GaspNAwe Jul 27, 2025
d911426
Document Xianyun plunge AoE for varied chars
GaspNAwe Jul 27, 2025
9abd85a
Document Xianyun plunge implementation for 4 stars
GaspNAwe Jul 27, 2025
7e365d5
documentation of param for plunge collision
GaspNAwe Jul 28, 2025
5e61bf0
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
d820140
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
0005b9f
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
ee12112
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
408549b
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
42931fb
documentation of param for plunge collision.
GaspNAwe Jul 28, 2025
bdc2ccd
documentation of walk frames for low/high plunge
GaspNAwe Jul 28, 2025
05d7ac8
plunge collision param
GaspNAwe Jul 29, 2025
dbedf9a
plunge collision param
GaspNAwe Jul 29, 2025
45f2210
plunge collision param
GaspNAwe Jul 29, 2025
10f16dd
Add files via upload
GaspNAwe Jul 29, 2025
3f13e27
plunge collision param
GaspNAwe Jul 29, 2025
caec03d
plunge collision param
GaspNAwe Jul 29, 2025
8848431
plunge collision param
GaspNAwe Jul 29, 2025
6a8c03f
Update plunge.go
GaspNAwe Aug 15, 2025
e23aa80
Update plunge.go
GaspNAwe Aug 15, 2025
39e1108
Update plunge.go
GaspNAwe Aug 15, 2025
6f086d0
InitAbilSlice redundancy, CanQueueAfter fixes
GaspNAwe Sep 2, 2025
9495e01
InitAbilSlice redundancy fixes
GaspNAwe Sep 2, 2025
33511d2
InitAbilSlice redundancy fixes
GaspNAwe Sep 2, 2025
a3a0447
InitAbilSlice, Y Offset, Hitmark corrections
GaspNAwe Sep 2, 2025
7b67771
InitAbilSlice redundancy fixes
GaspNAwe Sep 2, 2025
1360c17
InitAbilSlice redundancy, CanQueueAfter fixes
GaspNAwe Sep 2, 2025
89a0ef8
InitAbilSlice redundancy fixes
GaspNAwe Sep 2, 2025
7e3acc1
Document Lanyan XY Plunge Offsets
GaspNAwe Sep 2, 2025
63fcbdd
golangci-lint fixes; comment whitespace
GaspNAwe Sep 2, 2025
e1f8fbe
golangci-lint fixes; comment whitespace
GaspNAwe Sep 2, 2025
b73c5a2
golangci-lint fixes; comment whitespace
GaspNAwe Sep 2, 2025
89c05f6
walk frames
GaspNAwe Sep 13, 2025
1bdd82b
walk frames
GaspNAwe Sep 13, 2025
a3d2366
Adjust plunge.go
shizukayuki Sep 22, 2025
3db7d53
Update docs
shizukayuki Sep 22, 2025
bda79e2
Run pipeline
shizukayuki Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions internal/characters/candace/candace_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion internal/characters/candace/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ package_name: candace
genshin_id: 10000072
key: candace
action_param_keys:
skill:
skill:
- param: "hold"
- param: "perfect"
low_plunge:
- param: "collision"
high_plunge:
- param: "collision"
skill_data_mapping:
attack:
attack_1:
Expand All @@ -18,6 +22,12 @@ skill_data_mapping:
- 4 # 4-Hit DMG|{param4:F1P}
charge:
- 5 # Charged Attack DMG|{param5:F1P}
collision:
- 7 # Plunge DMG|{param7:F1P}
lowPlunge:
- 8 # Low/High Plunge DMG|{param8:P}/{param9:P}
highPlunge:
- 9 # Low/High Plunge DMG|{param8:P}/{param9:P}
skill:
skillDmg:
- 0 # Shield DMG Absorption|{param0:F1P} Max HP+{param1:I}
Expand Down
169 changes: 169 additions & 0 deletions internal/characters/candace/plunge.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
package candace

import (
"errors"

"github.com/genshinsim/gcsim/internal/frames"
"github.com/genshinsim/gcsim/pkg/core/action"
"github.com/genshinsim/gcsim/pkg/core/attacks"
"github.com/genshinsim/gcsim/pkg/core/attributes"
"github.com/genshinsim/gcsim/pkg/core/combat"
"github.com/genshinsim/gcsim/pkg/core/info"
"github.com/genshinsim/gcsim/pkg/core/player"
)

var (
highPlungeFrames []int
lowPlungeFrames []int
)

const (
lowPlungeHitmark = 42
highPlungeHitmark = 45
collisionHitmark = lowPlungeHitmark - 6
)

const (
lowPlungePoiseDMG = 100.0
lowPlungeRadius = 3.0
)

const (
highPlungePoiseDMG = 150.0
highPlungeRadius = 5.0
)

func init() {
// low_plunge -> x
lowPlungeFrames = frames.InitAbilSlice(81) // Jump
lowPlungeFrames[action.ActionAttack] = 59
lowPlungeFrames[action.ActionSkill] = 59
lowPlungeFrames[action.ActionBurst] = 60
lowPlungeFrames[action.ActionDash] = 79
lowPlungeFrames[action.ActionSwap] = 65

// high_plunge -> x
highPlungeFrames = frames.InitAbilSlice(82) // Jump
highPlungeFrames[action.ActionAttack] = 62
highPlungeFrames[action.ActionSkill] = 62
highPlungeFrames[action.ActionBurst] = 62
highPlungeFrames[action.ActionWalk] = 81
highPlungeFrames[action.ActionSwap] = 66
}

// Low Plunge attack damage queue generator
// Use the "collision" optional argument if you want to do a falling hit on the way down
// Default = 0
func (c *char) LowPlungeAttack(p map[string]int) (action.Info, error) {
defer c.Core.Player.SetAirborne(player.Grounded)
switch c.Core.Player.Airborne() {
case player.AirborneXianyun:
return c.lowPlungeXY(p), nil
default:
return action.Info{}, errors.New("low_plunge can only be used while airborne")
}
}

func (c *char) lowPlungeXY(p map[string]int) action.Info {
collision, ok := p["collision"]
if !ok {
collision = 0 // Whether or not collision hit
}

if collision > 0 {
c.plungeCollision(collisionHitmark)
}

ai := info.AttackInfo{
ActorIndex: c.Index(),
Abil: "Low Plunge",
AttackTag: attacks.AttackTagPlunge,
ICDTag: attacks.ICDTagNone,
ICDGroup: attacks.ICDGroupDefault,
StrikeType: attacks.StrikeTypeBlunt,
PoiseDMG: lowPlungePoiseDMG,
Element: attributes.Physical,
Durability: 25,
Mult: lowPlunge[c.TalentLvlAttack()],
}
c.Core.QueueAttack(
ai,
combat.NewCircleHitOnTarget(c.Core.Combat.Player(), info.Point{Y: 1}, lowPlungeRadius),
lowPlungeHitmark,
lowPlungeHitmark,
)

return action.Info{
Frames: frames.NewAbilFunc(lowPlungeFrames),
AnimationLength: lowPlungeFrames[action.InvalidAction],
CanQueueAfter: lowPlungeFrames[action.ActionAttack],
State: action.PlungeAttackState,
}
}

// High Plunge attack damage queue generator
// Use the "collision" optional argument if you want to do a falling hit on the way down
// Default = 0
func (c *char) HighPlungeAttack(p map[string]int) (action.Info, error) {
defer c.Core.Player.SetAirborne(player.Grounded)
switch c.Core.Player.Airborne() {
case player.AirborneXianyun:
return c.highPlungeXY(p), nil
default:
return action.Info{}, errors.New("high_plunge can only be used while airborne")
}
}

func (c *char) highPlungeXY(p map[string]int) action.Info {
collision, ok := p["collision"]
if !ok {
collision = 0 // Whether or not collision hit
}

if collision > 0 {
c.plungeCollision(collisionHitmark)
}

ai := info.AttackInfo{
ActorIndex: c.Index(),
Abil: "High Plunge",
AttackTag: attacks.AttackTagPlunge,
ICDTag: attacks.ICDTagNone,
ICDGroup: attacks.ICDGroupDefault,
StrikeType: attacks.StrikeTypeBlunt,
PoiseDMG: highPlungePoiseDMG,
Element: attributes.Physical,
Durability: 25,
Mult: highPlunge[c.TalentLvlAttack()],
}
c.Core.QueueAttack(
ai,
combat.NewCircleHitOnTarget(c.Core.Combat.Player(), info.Point{Y: 1}, highPlungeRadius),
highPlungeHitmark,
highPlungeHitmark,
)

return action.Info{
Frames: frames.NewAbilFunc(highPlungeFrames),
AnimationLength: highPlungeFrames[action.InvalidAction],
CanQueueAfter: highPlungeFrames[action.ActionAttack],
State: action.PlungeAttackState,
}
}

// Plunge normal falling attack damage queue generator
// Standard - Always part of high/low plunge attacks
func (c *char) plungeCollision(delay int) {
ai := info.AttackInfo{
ActorIndex: c.Index(),
Abil: "Plunge Collision",
AttackTag: attacks.AttackTagPlunge,
ICDTag: attacks.ICDTagNone,
ICDGroup: attacks.ICDGroupDefault,
StrikeType: attacks.StrikeTypeSlash,
Element: attributes.Physical,
Durability: 0,
Mult: collision[c.TalentLvlAttack()],
}
c.Core.QueueAttack(ai, combat.NewCircleHitOnTarget(c.Core.Combat.Player(), info.Point{Y: 1}, 1), delay, delay)
}
77 changes: 77 additions & 0 deletions internal/characters/chongyun/chongyun_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions internal/characters/chongyun/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package_name: chongyun
genshin_id: 10000036
key: chongyun
action_param_keys:
low_plunge:
- param: "collision"
high_plunge:
- param: "collision"
skill_data_mapping:
attack:
attack_1:
Expand All @@ -11,6 +16,12 @@ skill_data_mapping:
- 2 # 3-Hit DMG|{param2:F1P}
attack_4:
- 3 # 4-Hit DMG|{param3:P}
collision:
- 8 # Plunge DMG|{param8:F1P}
lowPlunge:
- 9 # Low/High Plunge DMG|{param9:P}/{param10:P}
highPlunge:
- 10 # Low/High Plunge DMG|{param9:P}/{param10:P}
skill:
skill:
- 0 # Skill DMG|{param0:P}
Expand Down
Loading