Skip to content

Commit

Permalink
added tarokka cards
Browse files Browse the repository at this point in the history
  • Loading branch information
savagezen committed Jun 8, 2017
1 parent 3272ca6 commit 0fb0f86
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 12 deletions.
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Maintainer: Austin Haedicke (gtbjj @ GitHub)

pkgname=dnd-tools
pkgver=
pkgver=1
pkgrel=1
pkgdesc='Interactive CLI tools for Dungeons and Dragons 5e'
depends=('python')
makedepends=('git' 'python')
arch=('i686' 'x86_64')
url='https://github.com/gtbjj/dnd-tools'
license=('AGPLv3')
conflicts=('')
provides=('dnd-tools')
source=(git://github.com/gtbjj/dnd-tools.git)
sha256sums=('SKIP')
Expand All @@ -22,4 +21,5 @@ pkgver() {
package() {
cd ${srcdir}/${pkgname}
python setup.py install --root="$pkgdir"
cp ${srcdir}/${pkgname}/LICENSE /usr/share/licenses/${pkgname}/LICENSE
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
- [Git commit for package version](https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything)
- [Check package sanity](https://wiki.archlinux.org/index.php/creating_packages#Checking_package_sanity)
- [Added AGPLv3 license](https://choosealicense.com/licenses/agpl-3.0/#)
- Sometimes errors installing, may need to remove ```/usr/lib/python3.6/site-packages/UNKOWN-0.0.0-py-3.6-egg-info```

**To Do:**

- submit to AUR
- update ```pkgbuild``` repo
- update ```scripts``` repo
- script features
- tarokka cards
- wild magic
- loot generator
- npc generator?
Expand Down
147 changes: 138 additions & 9 deletions scripts/dnd-tools
Original file line number Diff line number Diff line change
@@ -1,14 +1,74 @@
#! /usr/bin/python

# DnD Version 5e
# Script Version 2.0
###########
# Imports #
###########

# Imports
import random
import math
import itertools

# Lists and Dictionaries
##########################
# Lists and Dictionaries #
##########################

card_deck = [
'Hooded One (7) ',
'Enchanter (3) ',
'Shepherd (4) ',
'Tempter ',
'Raven ',
'Seer ',
'Swashbuckler (1) ',
'Executioner ',
'Ghost ',
'Warrior ',
'Tax Collector (8) ',
'Anarchist (6) ',
'Marionette ',
'Miser (9) ',
'Torturer (9) ',
'Priest ',
'Traitor (9) ',
'Paladin (2) ',
'Thief (7) ',
'Beast ',
'Guild Member (5) ',
'Healer (3) ',
'Darklord ',
'Myrmidon (5) ',
'Elementalist (5) ',
'Diviner (2) ',
'Abjurer (4) ',
'Artifact ',
'Avenger (1) ',
'Beggar (6) ',
'Beserker (6) ',
'Bishop (8) ',
'Broken One ',
'Charlatan (7) ',
'Conjurer (9) ',
'Dictator (8) ',
'Donjon ',
'Druid (5) ',
'Evoker (6) ',
'Horseman ',
'Illusionist (7) ',
'Innocent ',
'Missionary (2) ',
'Mists ',
'Monk (1) ',
'Necromancer (8) ',
'Philanthropist (2)',
'Rogue ',
'Soldier (3) ',
'Trader (3) ',
'Transmuter (1) ',
'Wizard ',
'Mercenary (4) ',
'Merchant (4) '
]

race_desc = [
"Dwarf - Bold, hardy, warrior, miner, long memory and grudges",
"Mountain Dwarf - Strong, hardy, rugged, tall for a dwarf",
Expand Down Expand Up @@ -74,13 +134,78 @@ abilities = [
" Intelligence: mental acuity, information recall, analytical skill",
" Wisdom: awareness, intuition, insight",
" Charisma: confidence, eloquence, leadership",
]
]

#############
# Functions #
#############

def draw_cards_fn():
global drawn_cards
drawn_cards = random.sample(card_deck, 5)

global pos_1
global pos_2
global pos_3
global pos_4
global pos_5

pos_1 = random.choice(drawn_cards)
drawn_cards.remove(pos_1)

pos_2 = random.choice(drawn_cards)
drawn_cards.remove(pos_2)

# Functions
pos_3 = random.choice(drawn_cards)
drawn_cards.remove(pos_3)

pos_4 = random.choice(drawn_cards)
drawn_cards.remove(pos_4)

pos_5 = random.choice(drawn_cards)
drawn_cards.remove(pos_5)

def reveal_cards_fn():
print(" |--------|")
print(" | |")
print(" | Card 2 |")
print(" | |")
print("|--------|--------|--------|")
print("| | | |")
print("| Card 1 | Card 5 | Card 3 |")
print("| | | |")
print("|--------|--------|--------|")
print(" | |")
print(" | Card 4 |")
print(" | |")
print(" |--------|")

print("")
print("Card 1 - ", pos_1)
print("The Tome of Strahd (location): This card tells of history. Knowledge of the ancient will help you better understand your enemy")

print("")
print("Card 2 - ", pos_2)
print("The Holy Symbol of Ravenkind (location): This card tells of a powerful force for good and protection, a symbol of great hope")

print("")
print("Card 3 - ", pos_3)
print("The Sunsword (location): This is a card of power and strength. It tells of a weapon of vengeance: a sword of sunlight")

print("")
print("Card 4 - ", pos_4)
print("Strahd's Enemy (where to find an ally: This card sheds light on one who will help you greatly in the battle against darkness")

print("")
print("card 5 - ", pos_5)
print("Strahd (location): Your enemy is a creature of darkness, whose powers are beyond mortality. This card will lead you to him")

def start_fn():
print('')
print(' What would you like to do? ')
print(' 1) (C)reate Character ')
print(' 2) (R)oll Dice ')
print(' 3) Tarokka Fortune Cards ')
print(' 0) (Q)uit ')
print('')
option = input('What would you like to do? ')
Expand All @@ -92,6 +217,10 @@ def start_fn():
for _ in itertools.repeat(None, dice):
print(random.randrange(1,sides))
start_fn()
elif option == '3':
draw_cards_fn()
reveal_cards_fn()
start_fn()
elif option in ('Q', 'q', '0'):
quit()
else:
Expand Down Expand Up @@ -171,7 +300,7 @@ def height_fn ():
char_heightft = math.trunc(height/12)
char_heightin = height % 12

print('Select Charcter Height:')
print('Select Character Height:')
for entry in avg_stats:
print(entry)
print('Your race is', char_race)
Expand Down Expand Up @@ -226,7 +355,7 @@ def weight_fn():
if char_race == 'Half-Orc':
char_weight = 140 + weight_mod

print('Select Charcter Weight:')
print('Select Character Weight:')
for entry in avg_stats:
print(entry)
print('Your race is' , char_race)
Expand All @@ -244,7 +373,7 @@ def weight_fn():
def misc_fn():
global char_gender
global char_age
print('Miscelaneous Characteristics:')
print('Miscellaneous Characteristics:')
for entry in avg_stats:
print(entry)
rnd_age = input('Do you want a random age? ')
Expand Down

0 comments on commit 0fb0f86

Please sign in to comment.