예제 #1
0
파일: weapon.py 프로젝트: trevlix/cthulhu
 def rollDamage(self):
     if self.ammo > 0:
         hitDam = roll(self.damage)
         self.ammo = self.ammo - 1
         logging.debug('DAMAGE: Weapon rolled {} damage'.format(hitDam))
     else:
         logging.info('Combat: CLICK! {} is out of ammo! Choose a different weapon next time.'.format(self.name))
         hitDam = 0
     return hitDam
예제 #2
0
#!/usr/bin/env python

# script to test various skill checks

import logging
from cthulhu.skill import skill
from cthulhu.roll import roll

logging.basicConfig(format='%(message)s', level=logging.DEBUG)

#testskill = skill('Spot Hidden', 65)
#testskill.dump()
#testskill.check()
#otherskill = skill('Sneak', 25)
#testskill.opposedSkill(otherskill)
roll('1d6+1d6', max=True)
예제 #3
0
파일: weapon.py 프로젝트: trevlix/cthulhu
 def maxDamage(self):
     mDam = roll(self.damage, max=True)
     return mDam
예제 #4
0
파일: weapon.py 프로젝트: trevlix/cthulhu
 def rollDamage(self):
     hitDam = roll(self.damage)
     logging.debug('DAMAGE: Weapon rolled {} damage'.format(hitDam))
     return hitDam
예제 #5
0
파일: testChar.py 프로젝트: trevlix/cthulhu
#!/usr/bin/env python

# script to create a test character

import logging

from cthulhu.char import character, json_import
from cthulhu.roll import roll

logging.basicConfig(format='%(message)s', level=logging.INFO)

newChar = character('Tyler')
for characteristic in ['STR', 'DEX', 'APP', 'CON', 'POW']:
    newChar.setCharacteristic(characteristic, roll('3d6*5'))

for characteristic in ['INT', 'SIZ', 'EDU']:
    newChar.setCharacteristic(characteristic, roll('2d6+6*5'))

newChar.luck = roll('2d6+6*5')
newChar.setSecondary()

newChar.setSkill('Spot Hidden', 70)
newChar.setSkill('Fighting (Brawl)', 55)
newChar.setSkill('Firearms (handgun)', 55)
newChar.setSkill('Sneak', 40)
newChar.setSkill('Listen', 55)
newChar.setSkill('Sleight of Hand', 25)
newChar.addWeapon('Unarmed',
                  '1d3',
                  'Fighting (Brawl)',
                  'non-impaling',
예제 #6
0
파일: testChar.py 프로젝트: trevlix/cthulhu
#!/usr/bin/env python

# script to create a test character

import logging

from cthulhu.char import character, json_import
from cthulhu.roll import roll

logging.basicConfig(format='%(message)s', level=logging.INFO)


newChar = character('Tyler')
for characteristic in ['STR', 'DEX', 'APP', 'CON', 'POW']:
    newChar.setCharacteristic(characteristic, roll('3d6*5'))

for characteristic in ['INT', 'SIZ', 'EDU']:
    newChar.setCharacteristic(characteristic, roll('2d6+6*5'))

newChar.luck = roll('2d6+6*5')
newChar.setSecondary()

newChar.setSkill('Spot Hidden', 70)
newChar.setSkill('Fighting (Brawl)', 55)
newChar.setSkill('Firearms (handgun)', 55)
newChar.setSkill('Sneak', 40)
newChar.setSkill('Listen', 55)
newChar.setSkill('Sleight of Hand', 25)
newChar.addWeapon('Unarmed', '1d3', 'Fighting (Brawl)', 'non-impaling', db=True)
#newChar.addWeapon('Machete', '1d8', 'Fighting (Brawl)', 'penetrating', db=True)
newChar.addWeapon('.38 Automatic', '1d10', 'Firearms (handgun)', 'firearm', db=False, mal=99, ammo=8, numAttacks=3)
예제 #7
0
파일: byakhee.py 프로젝트: trevlix/cthulhu
#!/usr/bin/env python

# Test script to create a Byakhee monster

import logging

from cthulhu.char import monster, json_import
from cthulhu.roll import roll
from cthulhu.weapon import weapon

logging.basicConfig(format='%(message)s', level=logging.INFO)

byakhee = monster('Byakhee')

for characteristic in ['STR', 'SIZ']:
    byakhee.setCharacteristic(characteristic, roll('5d6*5'))

for characteristic in ['CON', 'INT', 'POW']:
    byakhee.setCharacteristic(characteristic, roll('3d6*5'))

byakhee.setCharacteristic('DEX', roll('3d6+3*5'))
byakhee.setDodge()

byakhee.HP = 14
byakhee.maxHP = 14
byakhee.db = '1d6'
byakhee.build = 2
byakhee.mp = 10
byakhee.sanLoss = '1/1d6'
byakhee.armor = 2
byakhee.numAttacks = 2