Fun Game

Pasted Sep 10, 2026, 7:11 PM1 file55 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/zzgtnw91db5emxxg
untitled
import random
import time

player_hp = 100
monster_hp = random.randint(60, 100)

print("⚔️  MONSTER BATTLE  ⚔️")
print("A wild monster appears!")
print(f"👹 Monster HP: {monster_hp}")
print(f"❤️  Your HP: {player_hp}")

while player_hp > 0 and monster_hp > 0:
    print("\nChoose your move:")
    print("1. ⚔️ Attack")
    print("2. 💥 Power Attack")
    print("3. 🧪 Heal")

    choice = input("> ")

    if choice == "1":
        damage = random.randint(10, 20)
        monster_hp -= damage
        print(f"\n⚔️ You hit the monster for {damage} damage!")

    elif choice == "2":
        if random.random() < 0.5:
            damage = random.randint(25, 40)
            monster_hp -= damage
            print(f"\n💥 CRITICAL HIT! You dealt {damage} damage!")
        else:
            print("\n💨 You missed!")

    elif choice == "3":
        healing = random.randint(15, 30)
        player_hp = min(100, player_hp + healing)
        print(f"\n🧪 You healed {healing} HP!")

    else:
        print("\n🤨 That's not a move!")
        continue

    if monster_hp > 0:
        time.sleep(0.5)
        damage = random.randint(8, 18)
        player_hp -= damage
        print(f"👹 The monster attacks you for {damage} damage!")

    print(f"\n❤️ Your HP: {max(0, player_hp)}")
    print(f"👹 Monster HP: {max(0, monster_hp)}")

if player_hp > 0:
    print("\n🏆 YOU WIN! The monster has been defeated!")
else:
    print("\n💀 GAME OVER! The monster got you!")

1,459 chars · codepastes.com