generateWeapon(int(arg[2]), int(arg[3]), int(arg[4]), True)

if(arg[1] == 'armor'):
	if(len(arg) < 3):
		arg.append(1); arg.append(7)
	if(len(arg) < 4):
		arg.append(7)
	generateArmor(int(arg[2]), int(arg[3]))


#py generate.py encounter <map> <level>
if(arg[1] == 'encounter'):
	if(len(arg) < 3):
		print 'ERROR: bad call sequence'
		sys.exit()
	generateEnemy(0, 2, arg[2], 3, int(arg[3]))

#py generate.py multifoe <low> <high> <map> <enemy amount> <level>
if(arg[1] == 'multifoe'):
	if(len(arg) < 3):
		print 'ERROR: bad call sequence'
		sys.exit()
	generateEnemy(int(arg[2]), int(arg[3]), arg[4], int(arg[5]), int(arg[6]))

#py generate.py foe <id> <map> <level>
if(arg[1] == 'foe'):
	if(len(arg) < 3):
		print 'ERROR: bad call sequence'
		sys.exit()
	generateEnemy(int(arg[2]), int(arg[2]), arg[3], 1, int(arg[4]))
#Suggestion: Create a seperate script for taking two weapon types, finding the appropriate dice, and calcualting an action encounter result
#So have battleSim.py, tactics.py, and actionResolution.py?

import dict
from weaponGeneration import generateWeapon
from armorGeneration import generateArmor
from enemyGeneration import generateEnemy
from npcGeneration import generateNPC
from random import randint
import sys

arg = sys.argv
# arg1<map> arg2<level> arg3<?>

#generate enemy party
foe = generateEnemy(0, 2, arg[1], 3, int(arg[2]))

#generate npc
self = generateNPC(arg[2])

#check npc stats, decide Role.
#?

#Generate Weapon, Aegis.
self['armor'] = generateArmor(level)
self['weapon'] = generateWeapon(level)

#check agility scores, set up turn order


#begin turn sequence
# Room-by-room dungeon enemy generation.
# author: amesen
# Takes world number, enemy level as argv1 & 2

from random import randint
import sys
from enemyGeneration import generateEnemy

roll = randint(1, 10)

if roll <= 6:
    print("Room clear.")
elif roll <= 8:
    print("Enemies!")
    generateEnemy(int(sys.argv[1]), randint(1, 4), int(sys.argv[2]))
elif roll <= 9:
    print("Enemies+")
    generateEnemy(int(sys.argv[1]), randint(1, 4), int(sys.argv[2]) + 3)
else:
    print("Self!")