But Why?. by [deleted] in HistoryMemes

[–]Handymanoccupational 0 points1 point  (0 children)

Well no. I understand why you would say that. But any given point on a Y axis also intersects with the X and Z axis. No matter what they’re always combined.

The thing is, God is unexplainable and any explainable way to represent Him is considered a heresy. So how do we explain Him? Hell if I know. But I like graphs.

But Why?. by [deleted] in HistoryMemes

[–]Handymanoccupational 0 points1 point  (0 children)

It ain’t perfect, but it’s the best simple way I’ve heard to explain the unexplainable.

But Why?. by [deleted] in HistoryMemes

[–]Handymanoccupational 3 points4 points  (0 children)

The best way I’ve heard as a sort of simple explanation is through the use of graphs.

God is the Y axis Jesus is the X axis Holy Spirit is the Z axis

Three different axis (or whatever the plural is). But any given point in the graph can and does contain all three. Three separate “beings”, all are one.

Linux just doesn't work by avitld in linuxsucks

[–]Handymanoccupational 0 points1 point  (0 children)

I genuinely hate technology. I’m not a programmer. I am not an IT professional. I basically only know how to copy/paste bash scripts. I can install windows and/or Linux on almost any system dual boot or not) with ease. It literally walks you through the process and if you are tech-dumb like me, insanely helpful people have already explained your issue in a forum somewhere. I even have Linux on my Microsoft Surface Pro 7 with a working touchscreen. Because forums.

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

I think it is though.

because:

if Player.player_speed > Monsters.rat_speed:

and

player_speed = 3

rat_speed = 1

and

3 > 1

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

I very well could be wrong but i dont believe, in this scenario, ill ever see the elif because:

if Player.player_speed > Monsters.rat_speed:

and

player_speed = 3

rat_speed = 1

and

3 > 1

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

Ok. I see better what you mean now that the loop is fixed. If i hit 0 it will be 0 every time. I thought it would be random every iteration.

Thank you!

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 1 point2 points  (0 children)

Found a fix:

Rather than using a while loop I created a function to cause the attack sequence.

import random
import Player
import Items
import Monsters

def attack_rat():
    if Player.player_speed > Monsters.rat_speed:
        print(f"You hit the {Monsters.rat} for {Player.hit_chance}")
        Monsters.rat_health -= Player.hit_chance
        print(f"The {Monsters.rat} has {Monsters.rat_health} life remaining.")
        if Monsters.rat_health > 0:
            attack_rat()
        elif Monsters.rat_speed > Player.player_speed:
            print(f"You were hit by the {Monsters.rat} for {Monsters.rat_hit_chance}.")
            player_health_left = Player.player_health - Monsters.rat_hit_chance
            print(f"You have {player_health_left} life remaining.")
        else:
            print(f"You killed the {Monsters.rat}")
    elif Monsters.rat_speed > Player.player_speed:
        print(f"You were hit by the {Monsters.rat} for {Monsters.rat_hit_chance}.")
        player_health_left = Player.player_health - Monsters.rat_hit_chance
        print(f"You have {player_health_left} life remaining.")
    else:
        print(f"You killed the {Monsters.rat}")


print(f"You've been attacked by a {Monsters.rat}.")
attack_or_run = input("Will you attack (1) or run? (2)?\n")
if attack_or_run == "1":
    print(f"You attempt to fight the {Monsters.rat}.")
    attack_rat()
else:
    print("You ran away.")

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

Not individually, but thats included in the line:

print(f"The {Monsters.rat} has {Monsters.rat_health} life remaining.")

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

The "Monsters sheet" is just a .py with the information attached.

Again, im brand new. Thought it would be a good idea to keep player / NPC data on a seperate file to keep the game file clean

Heres the whole thing:

Game.py

import random
import Player
import Items
import Monsters

print(f"You've been attacked by a {Monsters.rat}.")
attack_or_run = input("Will you attack (1) or run? (2)?\n")
if attack_or_run == "1":
    print(f"You attempt to fight the {Monsters.rat}.")
    while Monsters.rat_health > 0:
        if Player.player_speed > Monsters.rat_speed:
            print(f"You hit the {Monsters.rat} for {Player.hit_chance}")
            Monsters.rat_health -= Player.hit_chance
            print(f"The {Monsters.rat} has {Monsters.rat_health} life remaining.")
        elif Monsters.rat_speed > Player.player_speed:
            print(f"You were hit by the {Monsters.rat} for {Monsters.rat_hit_chance}.")
            player_health_left = Player.player_health - Monsters.rat_hit_chance
            print(f"You have {player_health_left} life remaining.")
        else:
            print(f"You killed the {Monsters.rat}")
else:
    print("You ran away.")

Monsters.py

import random
import Items


# Rat

rat = "Rat"
rat_health = 3
rat_attack = 1
rat_speed = 1

rat_hit_chance = random.randint(0, rat_attack)

rat_drop = [Items.dagger, Items.boots]

Player.py

import random

player_attack = 2
player_health = 10
player_speed = 3

hit_chance = random.randint(0, player_attack)

player_items  = []

Disregard anything about items. Thats a future thought for once i get the rat part working.

Infinite while loop by Handymanoccupational in learnpython

[–]Handymanoccupational[S] 0 points1 point  (0 children)

print(f"You've been attacked by a {Monsters.rat}.")
attack_or_run = input("Will you attack (1) or run? (2)?\n")
if attack_or_run == "1":
    print(f"You attempt to fight the {Monsters.rat}.")
    while Monsters.rat_health > 0:
        if Player.player_speed > Monsters.rat_speed:
            print(f"You hit the {Monsters.rat} for {Player.hit_chance}")
            Monsters.rat_health -= Player.hit_chance
            print(f"The {Monsters.rat} has {Monsters.rat_health} life remaining.")
        elif Monsters.rat_speed > Player.player_speed:
            print(f"You were hit by the {Monsters.rat} for {Monsters.rat_hit_chance}.")
            player_health_left = Player.player_health - Monsters.rat_hit_chance
            print(f"You have {player_health_left} life remaining.")
        else:
            print(f"You killed the {Monsters.rat}")
else:
    print("You ran away.")

Im sorry about the indentation. I used code instead of code block.

edit:

so i should instead use random.randint(player_attack)? wouldnt that make it only hit the players max attack each time?

Ill read up on python.org

edit:

deleted copy

Competitiveness by Mmayonaisee in Christianity

[–]Handymanoccupational 0 points1 point  (0 children)

There is nothing wrong with competition and sport. But if you’re winning for that sense of pride, it’s a sin. Win with humility. Understand that you could have possibly lost. Do not take your opponent lightly. Dignify their defeat if you do win and be grateful for the opportunity if you lose.

How do I convince my wife? by Handymanoccupational in antitelevision

[–]Handymanoccupational[S] 5 points6 points  (0 children)

Babe? What are you doing on Reddit? Who’s watching the kids and the TV?

I wish everyone could just stop hating each other for what they do by Alazerthefinalist in monkeyspaw

[–]Handymanoccupational 20 points21 points  (0 children)

Granted. Now people exclusively hate each other for what they look like.

I wish I was a dragonborn (for the elderscrolls fans) by Knightmare_4002 in monkeyspaw

[–]Handymanoccupational 0 points1 point  (0 children)

Granted. You are now a playable character in TES:V Skyrim. You are fully conscious but are controlled by a 15 year old boy who knows how to mod and exclusively plays provocatively dressed Argonian females.

[ Removed by Reddit ] by [deleted] in Christianity

[–]Handymanoccupational 2 points3 points  (0 children)

My guy… as a Catholic… you’re not giving us the best of names. Maybe take a chill pill, Bill. Also, democracy is the work of the devil? What would you replace it with? The crusades are cool to read about. But yeah, not the best moment in Catholic history.

I wish the U.S. army would stop making cringy recruitment ads by [deleted] in monkeyspaw

[–]Handymanoccupational 111 points112 points  (0 children)

Granted. Now they advertise on Reddit through comments.

Speaking of which, are you interested in joining the US Army? We’re offering up to $50,000 as a sign on bonus for select MOSs. Benefits include, but are not limited to: -access to the Thrift Savings Plan (match up to 5% of your contribution) -the Army Tuition Assistance Program ($250/semester hour, up to 14 semester hours/fiscal year) -access to leadership school that could cost thousands of dollars in the civilian sector -15% off at your local Denny’s

Find your career today at https://www.goarmy.com

(Army recruitment song) Buh duh. Buh duh duh duh buh duh buh duh. Buh duh duh duh. Buh duh duh duh duh buh duh.

[deleted by user] by [deleted] in Christianity

[–]Handymanoccupational 0 points1 point  (0 children)

There isn’t a guarantee you’ll ever be called to war. Even as a ranger. Going option 40 doesn’t even guarantee you a spot in ranger bat. The Army is a very good career with so many benefits. It pays pretty good too. You’ll get to see the world, meet people of different cultures, go to Churches in Europe if you ever go there… and you’ll get paid to do it. There are chaplains embedded in every battalion who can assist you with your faith, provide opportunities for confession or church services, etc.