5.24 Damage Over Time Kills Don't Give XP
まだ誰も着手していません。
評価
調査の方向性
components.rs の DamageOverTime の定義を読み、rawmaster.rs と effects/damage.rs での構築を追跡してください。ai/initiative_system.rs のステータス効果の処理を追跡してください。ダメージ・オーバー・タイムによるキルでも効果の作成者が保持され、プレイヤーが XP を受け取れるようになれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Because damage effects created by a DOT status condition don't include a creator, if the player uses the effect to kill a monster they don't gain any XP from the kill.
I was able to fix it with a little bit of difficulty (all thanks to a bug in specs):
In components.rs:
#[derive(Component, Debug, ConvertSaveload, Clone)]
pub struct DamageOverTime {
pub damage: i32,
pub creator: EntityOption<Entity>,
}
This requires the entity-container workaround at https://github.com/amethyst/specs/issues/681#issuecomment-821274957 to store an optional entity.
In rawmaster.rs:
"damage_over_time" => $eb = $eb.with(DamageOverTime {
damage: effect.1.parse::<i32>().unwrap(),
creator: None.into(),
}),
Then, in effects/damage.rs, pass along the effect creator (converting to an EntityOption):
.with(DamageOverTime { damage: *damage, creator: effect.creator.into() })
And finally, in ai/initiative_system.rs, pass the status effect creator back into the effect system:
add_effect(
dot.creator.into(),
EffectType::Damage { amount: dot.damage },
Targets::Single {
target: status.target,
},
);
- 主要言語
- Rust
- スター
- 968
- フォーク
- 166
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
amethyst/rustrogueliketutorial のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 45/100
amethyst/rustrogueliketutorial の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
linebender/parley#849 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
boxlite-ai/boxlite#1729 ·
メンテナーはふだん 1 日以内に返信
-
external
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
langchain-ai/docs#6255 ·
メンテナーはふだん 1 日以内に返信
-
P2 testing
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信