Пример #1
0
def angelAtk():
    #angel chance to hit
    rollHit = random.randrange(1, 21) + 2
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 5)
        print("The angel swings at you and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The angel swings at you and misses.")
Пример #2
0
def knightAtk():
    #knight chance to hit
    rollHit = random.randrange(1, 21) + 5
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 7) + 5
        print("The knight swings his sword and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The knight swings his sword and misses.")
Пример #3
0
def dragonAtk():
    #dragon chance to hit
    rollHit = random.randrange(1, 21) - 1
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 5)
        print("The dragon spits a fireball at you and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The dragon spits a fireball at you and and misses.")
Пример #4
0
def mimicAtk():
    #mimic chance to hit
    rollHit = random.randrange(1, 21) + 4
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 7) + 4
        print("The mimic goes for a bite and lands.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The mimic goes for a bite but misses.")
Пример #5
0
def orcAtk():
    #orc chance to hit
    rollHit = random.randrange(1, 21) + 3
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 7) + 3
        print("The orc thrusts its meaty fist at you and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The orc thrusts its meaty fist at you and misses.")
Пример #6
0
def trollAtk():
    #troll chance to hit
    rollHit = random.randrange(1, 21) + 2
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 7) + 2
        print("The troll swings his great and mighty club and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The troll swings his great and mighty club and misses.")
Пример #7
0
def zombieAtk():
    #zombies chance to hit
    rollHit = random.randrange(1, 21) + 1
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 5) + 1
        print("The zombie scratches you.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The zombie misses to scratch you.")
Пример #8
0
def goblinAtk():
    #Goblins chance to hit
    rollHit = random.randrange(1, 21) + 2
    #If hits or not
    if rollHit > var.CurrentAC:
        damage = random.randrange(1, 7) + 2
        print("The goblin swings his club and hits.")
        print("Damage Dealt:", damage)
        actions.loseHP(damage)
        print("Current HP:", var.HP)
    else:
        print("The goblin swings his club and misses.")
Пример #9
0
def lavaRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	#intro
	art.lavaRoom()
	print("\nThe room is filled with lava. One-step and you’re testing your luck with a jump. That said, if you have a rope, your chances increase.\n")
	#There is no loot
	groundLoot = ''

	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave
	
	nextDoor = actions.pickDoor(3)

	#Now, the user shall jump, if thos fails, damage shall acour
	#Math
	chance = 12 + random.randrange(-2,3)
	playerChance = random.randrange(1,21)
	if 'rope' in var.inv:
		playerChance += 5
	if playerChance >= chance:
		print("You jump to the door and succeed.")
		if 'rope' in var.inv:
			print("Your rope came in useful.")
	else:
		damage = random.randrange(1,7)
		print("You jump to the door and fail.")
		print("Damage Dealt:", damage)
		actions.loseHP(damage)
		print("Current HP:", var.HP)

	if nextDoor == 'b':#Store needs key, so if the user doesnt have it /shrug
		if 'golden key' not in var.inv:
			print("You need a golden key to go here.")
			nextDoor = actions.pickDoorsKey("a", "タイガ", "c", "タイガ")#Will ask for other door
		else:
			treasure()

	if nextDoor == 'a':
		library()

	if nextDoor == 'c':
		lastRoom()
Пример #10
0
def trapRoom():
	print('\033[0;36;48m')#Sets text collor to cyan
	posLoot = actions.getGroundLoot(100)
	groundLoot = actions.tellUserOfLoot(posLoot)#Checks if user can see loot
	#Draws map with or without loot
	if groundLoot != "":
		art.trapRoom(True)
	else:
		art.trapRoom(False)

	print("\nThis room... It doesn't feel right. It looks like a thin hallway.\n")

	#Will calculate if the arrow hits
	arrowHit = random.randrange(1,21)+2
	print("You were right to think so.")
	print("An arrow shoots out of the wall.")
	if arrowHit >= 15:
		print("Thankfully, you were able to dodge it.")
	else:
		print("The arrow penetrates your skin.")
		damage = random.randrange(1,7)
		print("Damage Dealt:", damage)
		actions.loseHP(damage)
		print("Current HP:", var.HP)
	
	print('\033[0;37;48m')#Default Color

	actions.stdActions(groundLoot)
	#Asks the user standard Actions, what they want to do in the room, and this repeats until they choose to leave

	#After they have chosen door, they will be asked what door they wish to go into
	nextDoor = actions.pickDoor(2)
	print('\033[0;37;48m')#Default Color

	if nextDoor == 'a':
		potionRoom()
	if nextDoor == 'b':
		chest_room()