}
if (this->power > 1) {
- if ((this->power > 2) || one_in_(40)) {
- become_random_artifact(this->player_ptr, this->o_ptr, false);
- return;
- }
-
- this->give_ego_index();
- if (this->o_ptr->art_name > 0) {
- return;
- }
-
- while (one_in_(10 * this->o_ptr->dd * this->o_ptr->ds)) {
- this->o_ptr->dd++;
- }
-
- if (this->o_ptr->dd > 9) {
- this->o_ptr->dd = 9;
- }
-
+ this->strengthen();
return;
}
continue;
}
}
+
+void SwordEnchanter::strengthen()
+{
+ if ((this->power > 2) || one_in_(40)) {
+ become_random_artifact(this->player_ptr, this->o_ptr, false);
+ return;
+ }
+
+ this->give_ego_index();
+ if (this->o_ptr->art_name > 0) {
+ return;
+ }
+
+ while (one_in_(10 * this->o_ptr->dd * this->o_ptr->ds)) {
+ this->o_ptr->dd++;
+ }
+
+ if (this->o_ptr->dd > 9) {
+ this->o_ptr->dd = 9;
+ }
+}