Exemplo n.º 1
0
    def reqAttackType(attack, attackType):

        if attackType == 'Weapon':
            val = manager.fromWepTable(attack)
            value = val['Range']
        elif attackType == 'Spell':
            value = manager.fromSpellTable(attack)

        return value
Exemplo n.º 2
0
    def attackRoll(attacker, weapon, targetAC):

        attackClass = attacker['Class']
        attackLevel = attacker['Level']
        attackBonus = manager.CharacterClass.classLookup(attackClass,
                                             attackLevel,'Base Attack Bonus')
        newWep = manager.fromWepTable(weapon)
        critMin, critMax = newWep['CritMin'], newWep['CritMax']
        critMul = newWep['CritMult']
        wepDamage = newWep['Damage']
        damage = diceRoll(wepDamage)
        
        if critMin == critMax:
            attack = diceRoll.attackRoll([20],targetAC,attackBonus)
        else:
            critRange = range(critMin,critMax)
            attack = diceRoll.attackRoll(critRange,targetAC,attackBonus)

        if attack == 'Critical':
            return damage.standardRoll()*critMul
            
        elif attack == 'Hit':
            return damage.standardRoll()

        else:
            return 0
Exemplo n.º 3
0
    def castSpell(spell, target='Self'):

        spell = manager.fromSpellTable(spell)
Exemplo n.º 4
0
 def makeWeaponAttack(weaponkey, attacker, target):
     
     weapon = manager.fromWepTable(weaponkey)