Esempio n. 1
0
        evt_obj.bonus_list.add(2, 31, 139)  # Racial Bonus
    return 0


def ConditionImmunityOnPreAdd(attachee, args, evt_obj):
    val = evt_obj.is_modifier("sp-Sleep")
    if val:
        evt_obj.return_val = 0
        attachee.float_mesfile_line('mes\\combat.mes', 5059,
                                    tf_red)  # "Sleep Immunity"
        game.create_history_from_pattern(31, attachee, OBJ_HANDLE_NULL)
    return 0


raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddBaseMoveSpeed(raceSpecObj, 30)
race_utils.AddSkillBonuses(
    raceSpecObj, {
        skill_listen: 1,
        skill_search: 1,
        skill_spot: 1,
        skill_diplomacy: 2,
        skill_gather_information: 2
    })

raceSpecObj.AddHook(ET_OnSaveThrowLevel, EK_NONE, ElvenSaveBonusEnchantment,
                    ())
raceSpecObj.AddHook(ET_OnConditionAddPre, EK_NONE, ConditionImmunityOnPreAdd,
                    ())
raceSpecObj.AddHook(ET_OnD20Query, EK_Q_FavoredClass, OnGetFavoredClass, ())
Esempio n. 2
0
    wpn = evt_obj.attack_packet.get_weapon_used()
    if wpn != OBJ_HANDLE_NULL:
        weaponType = wpn.get_weapon_type()
        if weaponType == wt_sling:
            isSling = 1

    #Check for sling or thrown weapon
    if thrownWeapon or isSling:
        evt_obj.bonus_list.add(1, 0, 139)

    return 0


#Note:  Adding the size +4 bonus to hide as a racial bonus since setting size to small does not grant the bonus
raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddAbilityModifierHooks(raceSpecObj, raceSpecModule)
race_utils.AddSkillBonuses(
    raceSpecObj, {
        skill_listen: 2,
        skill_move_silently: 2,
        skill_climb: 2,
        skill_jump: 2,
        skill_hide: 4
    })
race_utils.AddBaseMoveSpeed(raceSpecObj, 20)

raceSpecObj.AddHook(ET_OnD20Query, EK_Q_FavoredClass, OnGetFavoredClass, ())
raceSpecObj.AddHook(ET_OnSaveThrowLevel, EK_NONE, HalflingFearSaveBonus, ())
raceSpecObj.AddHook(ET_OnToHitBonus2, EK_NONE,
                    OnGetToHitBonusSlingsThrownWeapons, ())
Esempio n. 3
0
        game.create_history_from_pattern(31, attachee, OBJ_HANDLE_NULL)
    return 0


def Q_Critter_Has_Spell_Resistance(attachee, args, evt_obj):
    classLvl = attachee.stat_level_get(stat_level)
    evt_obj.return_val = 11 + classLvl
    return 0


raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddAbilityModifierHooks(raceSpecObj, raceSpecModule)
race_utils.AddSaveThrowBonusHook(raceSpecObj, D20_Save_Will, 2)
race_utils.AddSkillBonuses(raceSpecObj, {
    skill_listen: 2,
    skill_search: 2,
    skill_spot: 2
})
race_utils.AddBaseMoveSpeed(raceSpecObj, 30)

raceSpecObj.AddHook(ET_OnGetSpellResistanceMod, EK_NONE, OnGetSpellResistance,
                    ())
raceSpecObj.AddHook(ET_OnGetTooltip, EK_NONE, OnGetSpellResistanceTooltip, ())
raceSpecObj.AddHook(ET_OnSaveThrowLevel, EK_NONE, ElvenSaveBonusEnchantment,
                    ())
raceSpecObj.AddHook(ET_OnD20Query, EK_Q_FavoredClass, OnGetFavoredClass, ())
raceSpecObj.AddHook(ET_OnConditionAddPre, EK_NONE, ConditionImmunityOnPreAdd,
                    ())
raceSpecObj.AddHook(ET_OnD20Query, EK_Q_Critter_Has_Spell_Resistance,
                    Q_Critter_Has_Spell_Resistance, ())
#raceSpecObj.AddHook(ET_OnToHitBonusBase, EK_NONE, OnGetToHitBonusBase, ())
Esempio n. 4
0
        return 0
    caster_level = max(3, 2 * attachee.stat_level_get(stat_level))
    if evt_obj.return_val < caster_level:
        evt_obj.return_val = caster_level
    return 0


##########################################################

raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddAbilityModifierHooks(raceSpecObj, raceSpecModule)
race_utils.AddSaveThrowBonusHook(raceSpecObj, D20_Save_Will, 2)
race_utils.AddSaveBonusVsEffectType(raceSpecObj, D20STD_F_SPELL_LIKE_EFFECT, 2)
race_utils.AddSkillBonuses(raceSpecObj, {
    skill_listen: 1,
    skill_spot: 1,
    skill_move_silently: 4
})
race_utils.AddBaseMoveSpeed(
    raceSpecObj, 20
)  # note: dwarven move speed with heavy armor or when medium/heavy encumbered is already handled in Encumbered Medium, Encumbered Heavy condition callbacks
race_utils.AddPoisonImmunity(raceSpecObj)
race_utils.AddFavoredClassHook(raceSpecObj, stat_level_fighter)

raceSpecObj.AddHook(ET_OnGetSkillLevel, EK_SKILL_APPRAISE, OnGetAppraiseSkill,
                    ())
raceSpecObj.AddHook(ET_OnGetMoveSpeed, EK_NONE, OnGetMoveSpeedSetLowerLimit,
                    ())
raceSpecObj.AddHook(ET_OnSaveThrowLevel, EK_NONE, ElvenSaveBonusEnchantment,
                    ())
raceSpecObj.AddHook(ET_OnConditionAddPre, EK_NONE, ConditionImmunityOnPreAdd,
Esempio n. 5
0
from templeplus.pymod import PythonModifier
from toee import *
import tpdp
import race_utils

###################################################


def GetConditionName():
    return "Tiefling"


raceEnum = race_human + (3 << 5)
raceSpecModule = __import__('race096_tiefling')
###################################################

raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddAbilityModifierHooks(raceSpecObj, raceSpecModule)
race_utils.AddSkillBonuses(raceSpecObj, {skill_bluff: 2, skill_hide: 2})
race_utils.AddBaseMoveSpeed(raceSpecObj, 30)
race_utils.AddFavoredClassHook(raceSpecObj, stat_level_rogue)
race_utils.AddDamageResistances(raceSpecObj, {
    D20DT_FIRE: 5,
    D20DT_COLD: 5,
    D20DT_ELECTRICITY: 5
})
Esempio n. 6
0
    return 0


def OnGetDodgeBonus(attachee, args, evt_obj):
    evt_obj.bonus_list.add(4, 0, 139)  # Racial Bonus
    return 0


def OnIllusionDCBonus(attachee, args, evt_obj):
    school = evt_obj.spell_entry.spell_school_enum
    if school == Illusion:
        evt_obj.bonus_list.add(1, 31, 139)  # Racial Bonus
    return 0


#Note:  Adding the size +4 bonus to hide as a racial bonus since setting size to small does not grant the bonus
raceSpecObj = PythonModifier(GetConditionName(), 0)
race_utils.AddAbilityModifierHooks(raceSpecObj, raceSpecModule)
race_utils.AddSaveThrowBonusHook(raceSpecObj, D20_Save_Will, 2)
race_utils.AddSkillBonuses(raceSpecObj, {skill_hide: 6, skill_listen: 2})
race_utils.AddBaseMoveSpeed(raceSpecObj, 20)

raceSpecObj.AddHook(ET_OnGetSpellResistanceMod, EK_NONE, OnGetSpellResistance,
                    ())
raceSpecObj.AddHook(ET_OnGetTooltip, EK_NONE, OnGetSpellResistanceTooltip, ())
raceSpecObj.AddHook(ET_OnD20Query, EK_Q_FavoredClass, OnGetFavoredClass, ())
raceSpecObj.AddHook(ET_OnToHitBonus2, EK_NONE, OnGetToHitBonusVsOrcsAndKobolds,
                    ())
raceSpecObj.AddHook(ET_OnGetAC, EK_NONE, OnGetDodgeBonus, ())
raceSpecObj.AddHook(ET_OnGetSpellDcMod, EK_NONE, OnIllusionDCBonus, ())