continue;
}
- const auto *s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
if (this->caster_ptr->spell_exp[spell] < SPELL_EXP_BEGINNER) {
this->caster_ptr->spell_exp[spell] += 5;
continue;
continue;
}
- if (this->gain_exp_expert(spell, s_ptr)) {
+ if (this->gain_exp_expert(spell)) {
continue;
}
- this->gain_exp_master(spell, s_ptr);
+ this->gain_exp_master(spell);
}
}
return true;
}
-bool RealmHex::gain_exp_expert(const int spell, const magic_type *s_ptr)
+bool RealmHex::gain_exp_expert(const int spell)
{
if (this->caster_ptr->spell_exp[spell] >= SPELL_EXP_EXPERT) {
return false;
}
+ const auto *s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
auto *floor_ptr = this->caster_ptr->current_floor_ptr;
auto gain_condition = one_in_(5);
gain_condition &= (floor_ptr->dun_level + 5) > this->caster_ptr->lev;
return true;
}
-void RealmHex::gain_exp_master(const int spell, const magic_type *s_ptr)
+void RealmHex::gain_exp_master(const int spell)
{
if (this->caster_ptr->spell_exp[spell] >= SPELL_EXP_MASTER) {
return;
}
+ const auto *s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
auto *floor_ptr = this->caster_ptr->current_floor_ptr;
auto gain_condition = one_in_(5);
gain_condition &= (floor_ptr->dun_level + 5) > this->caster_ptr->lev;
#include "system/angband.h"
-struct magic_type;
struct player_type;
class RealmHex {
public:
int calc_need_mana();
void gain_exp_from_hex();
bool gain_exp_skilled(const int spell);
- bool gain_exp_expert(const int spell, const magic_type *s_ptr);
- void gain_exp_master(const int spell, const magic_type *s_ptr);
+ bool gain_exp_expert(const int spell);
+ void gain_exp_master(const int spell);
};
bool stop_hex_spell_all(player_type *caster_ptr);