-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (55 loc) · 2.07 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from pkb_stats import *
assert "Up" != "Down", 'We Use Asserts to Test Our Assumptions'
print("\nTypes and Symbols:")
print(TypeOfChargeMove("Dynamic Punch"))
print(TypeOfQuickMove("Charm"))
print(SymbolForType("Fighting"))
print(SymbolForType("Ground"))
print("\nQuickMove:")
qm = QuickMove("Charm")
print(qm.strMove)
print(qm.strType)
print(qm.valDamage)
print(qm.valEnergy)
print(qm.cTurnsToQuick)
print(qm.RoundUpTurns(5))
print("\nChargeMove:")
cm = ChargeMove("Dynamic Punch", qm)
print(cm.strMove)
print(cm.strType)
print(cm.valEnergy)
print(cm.cTurnsToCharge)
print("\nUtilities:")
print(MinMax(5, 10, 20))
print(WeightedAverage(1, 2, 2/3))
print("\nTypeEffectiveness:")
print(TypeEffectiveness("Fire", "Water"))
print(TypeEffectiveness("Ground", "Flying"))
print("\nPokemon:")
pk = Pokemon("Togekiss, Charm, ancient_POWER, Flamethrower", "15, 15, 12")
print("name: " + pk.strName)
print("types: %s , %s" % (pk.strType1,pk.strType2))
print("default moves: %s, %s" % (pk.qm.strMove, pk.cm.strMove))
print("\nBattleLeague:")
bl = BattleLeague("ML Flying Cup")
print("battle league: %s: " % bl.strBattleLeague)
print("cpMax: %d" % bl.cpMax)
print("restriction: %s" % bl.strRestriction)
print("\nQualifyPokemon:")
QualifyPokemon(pk, bl)
string = pk.strName + " is fighting in " + bl.strBattleLeague
print(string)
print("level: %.1f" % pk.bstat.level)
print("cp: %d" % pk.bstat.cp)
print("hp: %d" % pk.bstat.hp)
print("\nTypeEffectiveness: ")
pkDefender = Pokemon("Metagross, Bullet Punch, Meteor Mash")
mult = TypeEffectivenessMultiplier(pk.qm.strType, pk, pkDefender)
print("%s using %s has type effectiveness multiplier of %.2f against %s"
% (pk.strName, pk.qm.strMove, mult, pkDefender.strName))
mult = TypeEffectivenessMultiplier(pk.cm.strType, pk, pkDefender)
print("%s using %s has type effectiveness multiplier of %.2f against %s"
% (pk.strName, pk.cm.strMove, mult, pkDefender.strName))
mult = TypeEffectivenessMultiplier("Fire", pk, pkDefender)
print("%s using %s has type effectiveness multiplier of %.2f against %s"
% (pk.strName, "Flamethrower", mult, pkDefender.strName))