Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging from main repo #24

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Archive/MCST.pptx
Binary file not shown.
File renamed without changes.
File renamed without changes.
1,239 changes: 1,239 additions & 0 deletions Archive/Vulpix.py

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions ai.py → Archive/ai.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from random import randint
def playerAI(gameboard):
for i in range(len(gameboard.playerHand)):
if (gameboard.playerIsBasic(i)):
if (gameboard.playerIsBasic(i)) and (len(gameboard.oppBench) < 5):
print("ai player is playing basic")
return 1
elif gameboard.playerHand[i].Card_Type == "Energy":
if gameboard.energyPlayed == False:
return 3
elif gameboard.playerHand[i].Card_Type == "Pokemon" and gameboard.playerHand[i].Stage > 0:
if gameboard.playerHand[i].PreEvolution == gameboard.playerActive[0].Name:
return 8
return 6
def oppAI(gameboard):
for i in range(len(gameboard.oppHand)):
Expand All @@ -18,4 +21,4 @@ def oppAI(gameboard):

if gameboard.energyPlayed == False:
return 3
return 6
return 6
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
160 changes: 160 additions & 0 deletions Archive/items.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import random

def nestBall(self, turn):
if turn == 'p':
for i in len(self.playerDeck):
choiceList = []
if self.playerDeck[i].isBasic:
choiceList.append(i)
counter = 1
for i in choiceList:
print(str(counter) + " " + str(self.playerDeck[i].Name))
counter += 1
input(choice)
self.playerBench.append(self.playerDeck.pop(choiceList[choice]))
elif turn == 'o':
for i in len(self.oppDeck):
choiceList = []
if self.oppDeck[i].isBasic:
choiceList.append(i)
counter = 1
for i in choiceList:
print(str(counter) + " " + str(self.oppDeck[i].Name))
counter += 1
input(choice)
self.oppBench.append(self.oppDeck.pop(choiceList[choice]))

def timerBall(self, turn):
counter = 0
for i in range(2):
x = random.randint(0,1)
if x == 1:
counter += 1
for i in range(counter):
choiceList = []
if turn == 'p':
for i in len(self.playerDeck):
if self.playerDeck[i].Card_Type == "Pokemon":
choiceList.append(i)
for i in choiceList:
print(str(counter) + " " + str(self.playerDeck[i].Name))
counter += 1
input(choice)
self.playerHand.append(self.playerDeck.pop[choiceList[choice]])
if turn == 'o':
for i in len(self.oppDeck):
if self.oppDeck[i].Card_Type == "Pokemon":
choiceList.append(i)
for i in choiceList:
print(str(counter) + " " + str(self.oppDeck[i].Name))
counter += 1
input(choice)
self.oppHand.append(self.oppDeck.pop[choiceList[choice]])

def bigMalasada(self, turn):
if turn == 'p':
self.playerActive[0].Hp += 20
self.playerBurned = False
self.playerParalyzed = False
self.playerPoisoned = False
self.playerAsleep = False
self.playerConfused = False
elif turn == 'o':
self.oppActive[0].Hp += 20
self.oppBurned = False
self.oppParalyzed = False
self.oppPoisoned = False
self.oppAsleep = False
self.oppConfused = False

def energyRetreival(self, turn):
energyList = []
count = 0
if turn == 'p':
for i in len(self.playerDiscard):
if self.playerDiscard[i].Card_Type == "Energy":
energyList.append(i)
while (count < 2) and (len(energyList) > 0):
self.playerHand.append(self.playerDiscard.pop(energyList[0]))
count += 1
elif turn == 'o':
for i in len(self.oppDiscard):
if self.oppDiscard[i].Card_Type == "Energy":
energyList.append(i)
while (count < 2) and (len(energyList) > 0):
self.oppHand.append(self.oppDiscard.pop(energyList[0]))
count += 1

def hau(self, turn):
if turn == 'p':
for i in range(3):
self.playerDrawCard()
elif turn == 'o':
for i in range(3):
self.oppDrawCard()

def professorKukui(turn):
if turn == 'p':
for i in range(2):
self.playerDrawCard()
if turn == 'o':
for i in range(2):
self.oppDrawCard()
bonusDamage += 20

# NEED TO CHECK IF POKEMON IN DISCARD BEFORE CALLING !!!
def rescueStretcher(self, turn):
choice = random.randint(1,2)
pokemonList = []
if turn == 'p':
for i in len(self.playerDiscard):
if self.playerDiscard[i].Card_Type == "Pokemon":
pokemonList.append(i)
if choice == 1:
choice == random.randint(0,len(pokemonList))
self.playerHand.append(self.playerDiscard.pop(pokemonList[choice]))
elif choice == 2:
count = 0
while (count < 4) and (len(pokemonList) > 0):
self.playerDeck.append(self.playerDiscard.pop(pokemonList[0]))
trash = pokemonList.pop(0)
count += 1
random.shuffle(self.playerdeck)
elif turn == 'o':
for i in len(self.oppDiscard):
if self.oppDiscard[i].Card_Type == "Pokemon":
pokemonList.append(i)
if choice == 1:
choice == random.randint(0,len(pokemonList))
self.oppHand.append(self.oppDiscard.pop(pokemonList[choice]))
elif choice == 2:
count = 0
while (count < 4) or (len(pokemonList) > 0):
self.oppDeck.append(self.oppDiscard.pop(pokemonList[0]))
trash = pokemonList.pop(0)
count += 1
random.shuffle(self.oppDeck)

def potion(self, turn):
if turn == 'p':
playerActive[0].Hp += 20
elif turn == 'o':
oppActive[0].Hp += 20

def energyLoto(self, turn):
flag = False
count = 0
if turn == 'p':
while flag == false and count < 7:
if playerDeck[i].Card_Type == 'Energy':
playerHand.append(playerDeck.pop[i])
flag = True
count += 1
random.shuffle(playerDeck)
elif turn == 'o':
while flag == false and count < 7:
if oppDeck[i].Card_Type == 'Energy':
oppHand.append(oppDeck.pop[i])
flag = True
count += 1
random.shuffle(oppDeck)
19 changes: 19 additions & 0 deletions Archive/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from GameLoop import *
import GameManager
import attacks
import items
import mcts

playerWins = 0
oppWins = 0
go = True

while go == True:
print("What is the players active pokemon?")
temp = input()
flag = True
i = 0
while flag or i < len(playerDeck):
print(gameboard.playerDeck[i].Name)


Loading