-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* me when the bone is sturdy * check active char * forgor * fix event name --------- Co-authored-by: imring <35897995+imring@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
225 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package_name: sturdybone | ||
genshin_id: 11430 | ||
key: sturdybone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
id: 11430 | ||
key: "sturdybone" | ||
rarity: 4 | ||
weapon_class: WEAPON_SWORD_ONE_HAND | ||
image_name: "UI_EquipIcon_Sword_Umpakati" | ||
base_stats: { | ||
base_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
initial_value: 43.7349 | ||
curve: GROW_CURVE_ATTACK_202 | ||
} | ||
base_props: { | ||
prop_type: FIGHT_PROP_ATTACK_PERCENT | ||
initial_value: 0.06 | ||
curve: GROW_CURVE_CRITICAL_201 | ||
} | ||
promo_data: { | ||
max_level: 20 | ||
} | ||
promo_data: { | ||
max_level: 40 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 25.9 | ||
} | ||
} | ||
promo_data: { | ||
max_level: 50 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 51.9 | ||
} | ||
} | ||
promo_data: { | ||
max_level: 60 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 77.8 | ||
} | ||
} | ||
promo_data: { | ||
max_level: 70 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 103.7 | ||
} | ||
} | ||
promo_data: { | ||
max_level: 80 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 129.7 | ||
} | ||
} | ||
promo_data: { | ||
max_level: 90 | ||
add_props: { | ||
prop_type: FIGHT_PROP_BASE_ATTACK | ||
value: 155.6 | ||
} | ||
} | ||
} | ||
name_text_hash_map: 495182275 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package sturdybone | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/genshinsim/gcsim/pkg/core" | ||
"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/event" | ||
"github.com/genshinsim/gcsim/pkg/core/glog" | ||
"github.com/genshinsim/gcsim/pkg/core/info" | ||
"github.com/genshinsim/gcsim/pkg/core/keys" | ||
"github.com/genshinsim/gcsim/pkg/core/player/character" | ||
) | ||
|
||
const ( | ||
buffKey = "sturdy-bone" | ||
) | ||
|
||
func init() { | ||
core.RegisterWeaponFunc(keys.SturdyBone, NewWeapon) | ||
} | ||
|
||
type Weapon struct { | ||
Index int | ||
} | ||
|
||
func (w *Weapon) SetIndex(idx int) { w.Index = idx } | ||
func (w *Weapon) Init() error { return nil } | ||
|
||
// Sprint or Alternate Sprint Stamina Consumption decreased by 15%. | ||
// Additionally, after using Sprint or Alternate Sprint, Normal Attack DMG is increased by 32% of ATK. | ||
// This effect expires after triggering 18 times or 7s. | ||
func NewWeapon(c *core.Core, char *character.CharWrapper, p info.WeaponProfile) (info.Weapon, error) { | ||
w := &Weapon{} | ||
r := p.Refine | ||
|
||
c.Player.AddStamPercentMod(buffKey, -1, func(a action.Action) (float64, bool) { | ||
return -0.15, false | ||
}) | ||
|
||
naDmg := 0.12 + 0.4*float64(r) | ||
c.Events.Subscribe(event.OnDash, func(args ...interface{}) bool { | ||
if c.Player.Active() != char.Index { | ||
return false | ||
} | ||
|
||
char.SetTag(buffKey, 18) | ||
char.AddStatus(buffKey, 7*60, true) | ||
|
||
return false | ||
}, fmt.Sprintf("sturdybone-%v", char.Base.Key.String())) | ||
|
||
c.Events.Subscribe(event.OnEnemyHit, func(args ...interface{}) bool { | ||
if c.Player.Active() != char.Index { | ||
return false | ||
} | ||
|
||
atk := args[1].(*combat.AttackEvent) | ||
if atk.Info.ActorIndex != char.Index { | ||
return false | ||
} | ||
if atk.Info.AttackTag != attacks.AttackTagNormal { | ||
return false | ||
} | ||
|
||
if !char.StatusIsActive(buffKey) || char.Tag(buffKey) == 0 { | ||
return false | ||
} | ||
|
||
dmgAdded := char.Stat(attributes.ATK) * naDmg | ||
atk.Info.FlatDmg += dmgAdded | ||
|
||
char.SetTag(buffKey, char.Tag(buffKey)-1) | ||
|
||
c.Log.NewEvent("sturdy bone buff", glog.LogPreDamageMod, char.Index). | ||
Write("damage_added", dmgAdded). | ||
Write("remaining_stacks", char.Tags[buffKey]) | ||
|
||
return false | ||
}, fmt.Sprintf("sturdybone-%v", char.Base.Key.String())) | ||
return w, nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Sturdy Bone | ||
--- | ||
|
||
import AoETable from "@site/src/components/AoE/AoETable"; | ||
import IssuesTable from "@site/src/components/Issues/IssuesTable"; | ||
import NamesList from "@site/src/components/Names/NamesList"; | ||
import ParamsTable from "@site/src/components/Params/ParamsTable"; | ||
import FieldsTable from "@site/src/components/Fields/FieldsTable"; | ||
|
||
## AoE Data | ||
|
||
<AoETable item_key="sturdybone" data_src="weapon" /> | ||
|
||
## Known issues | ||
|
||
<IssuesTable item_key="sturdybone" data_src="weapon" /> | ||
|
||
## Names | ||
|
||
<NamesList item_key="sturdybone" data_src="weapon" /> | ||
|
||
## Params | ||
|
||
<ParamsTable item_key="sturdybone" data_src="weapon" /> | ||
|
||
## Fields | ||
|
||
<FieldsTable item_key="sturdybone" data_src="weapon" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -374,6 +374,7 @@ | |
"scarlet", | ||
"sss" | ||
], | ||
"sturdybone": [], | ||
"summitshaper": [ | ||
"summit" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters