[Artifact 1453] 霜華の弓の作成#2056
Conversation
EllaCoat
left a comment
There was a problem hiding this comment.
まぁ大雑把に見ただけだから、まだありそうだけど、取り敢えず軽く見た感じの指摘ねー
[NITS] とか [MUST] とかの意味は調べたら出てくるので、調べて()
| scoreboard objectives add Ffb.Charge dummy | ||
| scoreboard objectives add Ffb.LatestChargeTick dummy |
There was a problem hiding this comment.
[NITS]
神器用スコアに関してだけど、可能であれば「神器 ID」を冒頭につけてもらえると良いかも。
神器 ID : 1453 (36進数の場合 14D) なので……
| scoreboard objectives add Ffb.Charge dummy | |
| scoreboard objectives add Ffb.LatestChargeTick dummy | |
| scoreboard objectives add 14D.Charge dummy | |
| scoreboard objectives add 14D.LatestChargeTick dummy |
こうだと、この神器のスコアであることがひと目で分かるよー。
| # 基本的な使用時の処理(MP消費や使用回数の処理など)を行う | ||
| function asset:artifact/common/use/mainhand |
There was a problem hiding this comment.
[MUST]
コピペミスだとは思うけど、
function asset:artifact/common/use/mainhand が 2 回起動してしまっているから、なにかしら理由がないなら消して欲しいー
(なにか理由があるなら、それはそれで返信お願いー)
| @@ -0,0 +1,10 @@ | |||
| #> asset:artifact/1453.frost_flake_bow/using_item/0.load | |||
There was a problem hiding this comment.
[MUST]
同じスコアを 2 重登録する必要はなさそう。
多分 Linter のエラーを消すためだと思うけど、`0.load' はテンプレート経由で作成しない限り、load 時に呼ばれないから気をつけて。
| # @within tag/function asset:artifact/load | ||
|
|
||
| #> 定義類はここに | ||
| # @within function asset:artifact/1453.frost_flake_bow/trigger/** |
There was a problem hiding this comment.
[IMO]
ここをこうすると、Linter がエラーを消してくれるよー
| # @within function asset:artifact/1453.frost_flake_bow/trigger/** | |
| # @within function asset:artifact/1453.frost_flake_bow/** |
元々は trigger 以下のファイル全部でスコアを使って良いよってルールなんだけど、
今回は using_item でも使いたいだろうから、こうすると良いと思う。
| # チャージ段階をFieldOverrideへ | ||
| data modify storage api: Argument.FieldOverride.Charge set from storage api: Return.Effect.Stack |
There was a problem hiding this comment.
[WANT]
多分、FieldOverride.Charge は使われていない……気がするんだけど、どうだろう?
使わなさそうなら、消しちゃっても良いかな。
| execute if score @s Ffb.Charge matches 20 anchored eyes positioned ^ ^ ^1 run function asset:artifact/1453.frost_flake_bow/using_item/vfx/charge1 | ||
|
|
||
| execute if score @s Ffb.Charge matches 30 run playsound ui.toast.in player @s ~ ~ ~ 1 1.3 | ||
| execute if score @s Ffb.Charge matches 34 run playsound entity.experience_orb.pickup player @s ~ ~ ~ 0.1 2 |
There was a problem hiding this comment.
[Q]
うちのラビリア(Claude)が気になったらしいので質問。
Charge のスコアが 30 で二段階目チャージが終了しているという認識なんだけど
それ以降の演出として用意している感じで OK ?
There was a problem hiding this comment.
だいたいそんな感じですね
(チャージした後も引いてるプレイヤーにチャージ終わったよ感のある音を鳴らしたかった)
再生を4tick遅らせてるのはこうすると前の音(ui.toast.in)といい感じに合うからで、演出以上の
理由は特にないです。
| # 神器の発動条件 (TextComponentString) (オプション) | ||
| data modify storage asset:artifact Condition set value '{"text":"最大まで引き絞る"}' | ||
| # 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) | ||
| data modify storage asset:artifact AttackInfo.Damage set value "800-1120 / 500-700" |
There was a problem hiding this comment.
[Q]
これはどっちが 1 段目でどっちが 2 段目かな?
仮に 1 段目が右だとしたら、既存神器の慣習として、左に変えたほうが良いかもしれない
(そもそもとして、こういう場合の表記が難しいのも分かる)
…SB/Asset into dev/ogachu_artifact1453
| # 5. 計算結果をdata(ストレージ)に戻す | ||
| # ※取得時に100倍、倍率計算で100倍のスケールになっているため、戻す時に 0.0001 (1万分の1) を掛けて元のスケールに戻します | ||
| execute store result storage asset:context this.Damage double 0.0001 run scoreboard players get $value Temporary | ||
| scoreboard players reset * Temporary |
There was a problem hiding this comment.
[MUST]
これは絶対にやらないで!(強い断言)
この世に存在するスコアを持ちうる存在の Temporary スコアを全てリセットする
=> この世に存在するエンティティ全員を対象として実行するから非常に重い!
あと、コアデータパックの方に Temporary を tick を跨いで使っているものもあるから、普通にシステムが破壊されちゃいますわ~
なのでリセットする場合は、以下のような明示式にしましょう。
scoreboard players reset $multiplier Temporary
scoreboard players reset $value Temporary
(余談:私は下の方が好きだけど、同じスコアホルダーが何処かで使われる可能性もあるので、上の方が安全ではある。よく分からないなら、上で OK)
scoreboard players reset $multiplier
scoreboard players reset $value
# 接頭語として ID を使ったりすると、スコアホルダー被りが発生しづらくて個人的には好き
# 以下は例、AU はいわゆる 36 進数表記
scoreboard players reset $AU.Temp
| scoreboard players set $4 Temporary 4 | ||
| scoreboard players set $100 Temporary 100 | ||
|
|
There was a problem hiding this comment.
[WANT]
コアデータパックの方に既に Const スコアで定数スコアが用意されているので、それを使ってー
https://github.com/ProjectTSB/TheSkyBlessing/blob/master/TheSkyBlessing/data/core/functions/define_const.mcfunction
後、面倒かもしれないけど $multiplier とかのスコアホルダーは基本的に、定数スコアでもない限り declare しておくと良いよー
#> Private
# @private
#declare score_holder $multiplier
#declare score_holder $value
| # 5. 計算結果をdata(ストレージ)に戻す | ||
| # ※取得時に100倍、倍率計算で100倍のスケールになっているため、戻す時に 0.0001 (1万分の1) を掛けて元のスケールに戻します | ||
| execute store result storage asset:context this.BloomDamage double 0.0001 run scoreboard players get $value Temporary | ||
| scoreboard players reset * Temporary |
| execute store result score $UserID Temporary run data get storage asset:context this.UserID | ||
| execute as @a if score @s UserID = $UserID Temporary run function api:damage/modifier |
There was a problem hiding this comment.
[WANT]
想定 $UserID Temporary のリセット忘れ
($UserID Temporary 自体はそこまで使われていないけど、スコアホルダー被りによるバグが若干怖い)
霜華の弓とそのobjectの作成