コード例 #1
0
ファイル: demigod.c プロジェクト: poschengband/poschengband
static void _gain_level(int new_level)
{
    if (new_level >= 20)
        _gain_power(0);
    if (new_level >= 40)
        _gain_power(1);
}
コード例 #2
0
ファイル: wild_talent.c プロジェクト: Alkalinear/poschengband
void wild_talent_scramble(void)
{
    int i;

    if (p_ptr->pclass != CLASS_WILD_TALENT) return;

    /* Forget old talents */
    for (i = 0; i <= _MAX_TALENTS; ++i)
        p_ptr->magic_num1[i] = 0;

    msg_print("You feel wild forces of randomness enter your body!");

    /* Regain new talents */
    for (i = 1; i <= p_ptr->max_plv; ++i)
        _gain_power(i);
}
コード例 #3
0
ファイル: wild_talent.c プロジェクト: Alkalinear/poschengband
void wild_talent_fix_up(void)
{
    int i;

    if (p_ptr->pclass != CLASS_WILD_TALENT) return;

    for (i = 1; i <= p_ptr->max_plv; ++i)
    {
    int group_idx = -1;

        if (i % 2 == 1)
            group_idx = i/2;

        if (group_idx >= 0 && group_idx < _MAX_TALENTS && _group_size(group_idx) > 0 && p_ptr->magic_num1[group_idx] == 0)
        {
            _gain_power(i);
        }
    }
}
コード例 #4
0
ファイル: wild_talent.c プロジェクト: Alkalinear/poschengband
static void _gain_level(int new_level)
{
    _gain_power(new_level);
    _gain_mutation(new_level);
}