def spawnEnemies(self, spawnPos): for enemyType, enemyAmount in self._areaRef.enemies.iteritems(): for i in range(enemyAmount): if enemyType == enemy.koboldSkirmisher: newEnemy = Digger(self._mainRef) else: newEnemy = enemy.Enemy(self._mainRef, enemyType) randomPos = spawnPos.getX() + (utils.getD10( ) - 5) * .1, spawnPos.getY() + (utils.getD10() - 5) * .1 newEnemy.moveEnemy(*randomPos) newEnemy.enemyNode.hide()
def getDamageBonus(self): randomDamage = 0 if self.damageRange == 4: randomDamage = utils.getD4() elif self.damageRange == 6: randomDamage = utils.getD6() elif self.damageRange == 8: randomDamage = utils.getD8() elif self.damageRange == 10: randomDamage = utils.getD10() return self.getStrengthModifier() + randomDamage + self.damageBonus
def spawnEnemies(self, spawnPos): for enemyType, enemyAmount in self._areaRef.enemies.iteritems(): for i in range(enemyAmount): if enemyType == enemy.koboldSkirmisher: newEnemy = Digger(self._mainRef) else: newEnemy = enemy.Enemy(self._mainRef, enemyType) randomPos = spawnPos.getX() + (utils.getD10()-5)*.1, spawnPos.getY() + (utils.getD10()-5)*.1 newEnemy.moveEnemy(*randomPos) newEnemy.enemyNode.hide()