New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] gen_flagsをFlagGroup<TRG>クラスに変更 #489
Conversation
メソッドではなくサービス関数で処理するのが相応しいので、 静的メンバ関数にする。 countとatでは2回検索して非効率なので、findで存在を調べて setはfindで見つけたイテレータで処理する。 string_viewに渡す時はstringクラスにする必要が無いので、 生成のコストをカットできるようにconcptrのまま渡す。
コラボのマージとリファクタリングしました。 |
@@ -248,7 +248,7 @@ static void analyze_addition(object_type *o_ptr, char *addition) | |||
{ | |||
artifact_type *a_ptr = &a_info[o_ptr->name1]; | |||
strcpy(addition, ""); | |||
if (a_ptr->gen_flags.has(TRG::XTRA_POWER) && a_ptr->gen_flags.has(TRG::XTRA_H_RES)) { | |||
if (a_ptr->gen_flags.has_any_of({ TRG::XTRA_POWER, TRG::XTRA_H_RES })) { | |||
strcat(addition, _("能力and耐性", "Ability and Resistance")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& なので、has_all_ofですね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... 直しました。
1bbf6c5
to
b72d9d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他は問題なしです。
Approveかけます。お疲れさまでした。
[Add] 古ウルクの士官追加と古ウルクの傭兵調整.
#253 や #192、#279 の前段階として実装しました。
呪い系エゴが上質確定ドロップでは落ちなくなります。
また、追加能力のフラグを増やしやすくなります。