Skip to content

Instantly share code, notes, and snippets.

View ToferC's full-sized avatar

Chris Allison ToferC

View GitHub Profile
@ToferC
ToferC / Map Writer.py
Created December 22, 2013 02:34
Map Writer
# Script to identify the coordinates for locations on an image map by having the user tap on the appropriate locations and saving the results into a dictionary that can be called by another script.
# Requires an initial dictionary with at least the location name as a key and x, y coordinates as list values 0 and 1.
import math, random
import city_list
from scene import *
offset = 100
city_dict = city_list.city_dict
global city_dict
@ToferC
ToferC / Rome_Map.py
Created December 26, 2013 04:59
Rome_Map
import math, random, sound
import city_list3
from scene import *
from time import time
import encounter
city_dict = city_list3.city_dict
offset = 100
@ToferC
ToferC / encounter2.py
Created December 31, 2013 21:41
encounter2
import math, random
import city_list_final
import monster_stats
global mon_dict
# Sets up a base dictionary in case there is an error with the encounter
mon_dict = {'Enc. Die.:' : 1,
'Enc. Pips:' : 6,
@ToferC
ToferC / monsters2.py
Created December 31, 2013 21:42
monsters2
Name:,Ankheg,"Ant, Giant","Ape, White","Baboon, Rock",Basilisk,"Bat, Normal","Bat, Giant","Bear, Black","Bear, Grizzly","Bear, Polar","Bear, Cave","Bee, Giant Killer","Beetle, Fire","Beetle, Bombardier","Beetle, Tiger",Black Pudding,Blink Dog,"Boar, Ordinary","Boar, Giant",Bugbear,Caecilian,Camel,Carcass Scavenger,"Cat, Mountain Lion","Cat, Panther","Cat, Lion","Cat, Tiger","Cat, Sabre-tooth Tiger",Centaur,"Centipede, Giant",Chimera,Cockatrice,"Crab, Giant","Crocodile, Ordinary","Crocodile, Large","Crocodile, Giant",Cyclops,Demon Boar,Djinni,Doppelganger,"Dragon, Spawn","Dragon, Very Young","Dragon, Young","Dragon, Juvenile","Dragon, Adult","Dragon, Mature Adult","Dragon, Old","Dragon, Very Old","Dragon, Ancient","Dragon, Venerable",Dragon Turtle,Dryad,Dwarf,Efreeti,"Elemental, Air (Staff)","Elemental, Air (Magic)","Elemental, Air (Spell)","Elemental, Earth (Staff)","Elemental, Earth (Magic)","Elemental, Earth (Spell)","Elemental, Fire (Staff)","Elemental, Fire (Magic)","Elemental, Fire (Spell)","Elemental,
@ToferC
ToferC / monster_stats.py
Created December 31, 2013 21:44
monster_stats
import csv
import sys
global monster_dict
monster_dict = {}
# Function to read CSV file and return a dictionary from the encounter script
def monsters (monster):
with open('monsters2.py','rb') as f:
@ToferC
ToferC / Rome_Map2.py
Created December 31, 2013 21:51
Rome_Map2
import math, random, sound
import city_list_final
from scene import *
from time import time
import encounter2
city_dict = city_list_final.city_dict
offset = 120
@ToferC
ToferC / city_list_final.py
Created December 31, 2013 22:00
city_list_final
city_dict = {'Corinium': [398.0, 456.5, 74, 'Bubroci', 'Eriadacus', {'dexterity': 14, 'atk_throw': 9, 'strength': 10, 'constitution': 14, 'level': 2, 'intelligence': 14, 'armour': 'leather armour', 'profession': 'bard', 'motivation': 'Knowledge', 'hp': 9, 'wisdom': 7, 'shield': 1, 'traits': 'Forgiving, Vague', 'charisma': 15, 'xp': 2500, 'weapon': 'short sword', 'special': "['Inspire Courage'], ", 'name': 'Eriadacus'}], 'Aquae Solis': [343.5, 364.0, 249, 'Belgae', 'Ambiorix', {'dexterity': 18, 'atk_throw': 8, 'strength': 11, 'constitution': 8, 'level': 5, 'intelligence': 14, 'armour': 'leather armour', 'profession': 'thief', 'motivation': 'Redemption', 'hp': 11, 'wisdom': 8, 'shield': 0, 'traits': 'Conceited, Felicific', 'charisma': 11, 'xp': 10000, 'weapon': 'short sword', 'special': "['Thief Skills', 'Backstab'], ", 'name': 'Ambiorix'}], 'Durnovaria': [263.5, 231.0, 159, 'Durotriges', 'Vodenos', {'dexterity': 14, 'atk_throw': 10, 'strength': 8, 'constitution': 11, 'level': 3, 'intelligence': 12, 'armour': '
@ToferC
ToferC / dungeons.py
Created February 3, 2014 13:01
dungeons
#coding: utf-8
levels = raw_input('How many levels is this dungeon? ')
# Script to generate random dungeons for ACKS Rome
import random, collections
dungeon_theme = {1: 'Abandoned mine', 11: 'Natural caverns', 2: 'Barrow mound', 12: 'Prison', 3: 'Catacombs', 13: 'Ruined manor', 4: 'Cliff city', 14: 'Sewers', 5: 'Crumbling castle', 15: 'Sunken city', 6: 'Giant burrow', 16: 'Temple', 7: 'Giant insect hive', 17: 'Tomb', 8: 'Humanoid warren', 18: 'Tower', 9: 'Maze',19: 'Underground river',10: 'Monster lair', 20: "Wizard's dungeon"}
@ToferC
ToferC / rome_map.py
Created February 3, 2014 13:01
rome_map
import math, random, sound
from scene import *
from time import time
import encounter
import dieroll
import save_load
city_dict = {}
@ToferC
ToferC / Maximus_test.py
Created July 24, 2014 19:30
Maximus_test.py
import ui
import random
from PIL import Image
import os
images_root = os.path.expanduser('~/Documents/Images')
image_name = '_adventure_max_banner'
image_path = os.path.join(images_root, image_name + '.png')