Skip to content

Commit c65115c

Browse files
committed
made story buffs as 2 separate options.
1 parent fdc7216 commit c65115c

2 files changed

Lines changed: 72 additions & 74 deletions

File tree

internal/characters/traveler/common/storybuffs.go

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,60 +12,28 @@ import (
1212
// 1 - buffs from completing "Chapter III: Act I of sumeru archon quest" (+3 base atk)
1313
// 2 (default) - buff from 1 + buffs from completing "Skirk's Story Quest" (+7 additional base atk, +15 EM, +50 base HP)
1414
func TravelerStoryBuffs(c *character.CharWrapper, p info.CharacterProfile) {
15-
storyBuff, ok := p.Params["traveler_story_buff"]
16-
if !ok {
17-
storyBuff = 2 // default to maximum buffs
15+
baseAtkBuff, okBaseAtkBuff := p.Params["base_atk_buff"]
16+
skirkBuff, okSkirkBuff := p.Params["skirk_story_buff"]
17+
if !okBaseAtkBuff {
18+
baseAtkBuff = 1
1819
}
19-
20-
switch storyBuff {
21-
case 0:
22-
// no buffs
23-
return
24-
case 1:
25-
// Chapter III: Act I buffs only
26-
m := make([]float64, attributes.EndStatType)
27-
m[attributes.BaseATK] = 3
28-
c.AddStatMod(character.StatMod{
29-
Base: modifier.NewBase("traveler-sumeru-quest-buff", -1),
30-
Amount: func() ([]float64, bool) {
31-
return m, true
32-
},
33-
})
34-
case 2:
35-
// Chapter III: Act I + Skirk's Story Quest buffs
36-
m := make([]float64, attributes.EndStatType)
37-
m[attributes.BaseATK] = 3 + 7 // 3 from Sumeru + 7 from Skirk
38-
m[attributes.EM] = 15 // 15 EM from Skirk
39-
m[attributes.BaseHP] = 50 // 50 base HP from Skirk
40-
c.AddStatMod(character.StatMod{
41-
Base: modifier.NewBase("traveler-story-quest-buffs", -1),
42-
Amount: func() ([]float64, bool) {
43-
return m, true
44-
},
45-
})
20+
if !okSkirkBuff {
21+
skirkBuff = 1 // default to maximum buffs
4622
}
47-
}
4823

49-
// TravelerBaseAtkIncrease is deprecated, use TravelerStoryBuffs instead
50-
// keeping for backward compatibility with old parameter name
51-
func TravelerBaseAtkIncrease(c *character.CharWrapper, p info.CharacterProfile) {
52-
// Check if old parameter is being used
53-
if _, ok := p.Params["base_atk_buff"]; ok {
54-
baseAtkBuff := p.Params["base_atk_buff"]
55-
if baseAtkBuff == 1 {
56-
// Convert old behavior to new system
57-
newParams := make(map[string]int)
58-
for k, v := range p.Params {
59-
newParams[k] = v
60-
}
61-
newParams["traveler_story_buff"] = 1
62-
newProfile := p
63-
newProfile.Params = newParams
64-
TravelerStoryBuffs(c, newProfile)
65-
}
66-
return
24+
m := make([]float64, attributes.EndStatType)
25+
if baseAtkBuff == 1 {
26+
m[attributes.BaseATK] += 3
6727
}
68-
69-
// Use new system
70-
TravelerStoryBuffs(c, p)
28+
if skirkBuff == 1 {
29+
m[attributes.BaseATK] += 7
30+
m[attributes.EM] += 15
31+
m[attributes.BaseHP] += 50
32+
}
33+
c.AddStatMod(character.StatMod{
34+
Base: modifier.NewBase("traveler-story-quest-buffs", -1),
35+
Amount: func() ([]float64, bool) {
36+
return m, true
37+
},
38+
})
7139
}

ui/packages/docs/src/components/Params/character_data.json

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,18 +1313,6 @@
13131313
"desc": "Projectile travel time. Default 0 frames."
13141314
}
13151315
],
1316-
"travelerpyro": [
1317-
{
1318-
"ability": "-",
1319-
"param": "traveler_story_buff",
1320-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1321-
},
1322-
{
1323-
"ability": "skill",
1324-
"param": "hold",
1325-
"desc": "0 for Blazing Threshold; 1 for Scorching Threshold. Default 0."
1326-
}
1327-
],
13281316
"venti": [
13291317
{
13301318
"ability": "attack",
@@ -1552,8 +1540,13 @@
15521540
"travelergeo": [
15531541
{
15541542
"ability": "-",
1555-
"param": "traveler_story_buff",
1556-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1543+
"param": "base_atk_buff",
1544+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1545+
},
1546+
{
1547+
"ability": "-",
1548+
"param": "skirk_story_buff",
1549+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
15571550
},
15581551
{
15591552
"ability": "skill",
@@ -1579,8 +1572,13 @@
15791572
"travelerelectro": [
15801573
{
15811574
"ability": "-",
1582-
"param": "traveler_story_buff",
1583-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1575+
"param": "base_atk_buff",
1576+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1577+
},
1578+
{
1579+
"ability": "-",
1580+
"param": "skirk_story_buff",
1581+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
15841582
},
15851583
{
15861584
"ability": "skill",
@@ -1601,8 +1599,13 @@
16011599
"traveleranemo": [
16021600
{
16031601
"ability": "-",
1604-
"param": "traveler_story_buff",
1605-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1602+
"param": "base_atk_buff",
1603+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1604+
},
1605+
{
1606+
"ability": "-",
1607+
"param": "skirk_story_buff",
1608+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
16061609
},
16071610
{
16081611
"ability": "skill",
@@ -1618,8 +1621,13 @@
16181621
"travelerhydro": [
16191622
{
16201623
"ability": "-",
1621-
"param": "traveler_story_buff",
1622-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1624+
"param": "base_atk_buff",
1625+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1626+
},
1627+
{
1628+
"ability": "-",
1629+
"param": "skirk_story_buff",
1630+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
16231631
},
16241632
{
16251633
"ability": "skill",
@@ -1645,8 +1653,30 @@
16451653
"travelerdendro": [
16461654
{
16471655
"ability": "-",
1648-
"param": "traveler_story_buff",
1649-
"desc": "0 for no buffs, 1 for Chapter III: Act I buffs (+3 base atk), 2 (default) for all buffs (+10 base atk, +15 EM, +50 base HP). Set via '+params=[traveler_story_buff=...]' in the char's line."
1656+
"param": "base_atk_buff",
1657+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1658+
},
1659+
{
1660+
"ability": "-",
1661+
"param": "skirk_story_buff",
1662+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
1663+
}
1664+
],
1665+
"travelerpyro": [
1666+
{
1667+
"ability": "-",
1668+
"param": "base_atk_buff",
1669+
"desc": "0 for no +3 base atk, 1 (default) for +3 base atk. Set via '+params=[base_atk_buff=...]' in the char's line."
1670+
},
1671+
{
1672+
"ability": "-",
1673+
"param": "skirk_story_buff",
1674+
"desc": "0 for no buffs, 1 (default) for +7 base atk, +15 EM, +50 base HP. Set via '+params=[skirk_story_buff=...]' in the char's line."
1675+
},
1676+
{
1677+
"ability": "skill",
1678+
"param": "hold",
1679+
"desc": "0 for Blazing Threshold; 1 for Scorching Threshold. Default 0."
16501680
}
16511681
],
16521682
"neuvillette": [

0 commit comments

Comments
 (0)