-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulation.py
32 lines (28 loc) · 1.04 KB
/
simulation.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
""" BLM Simulation """
from blmsim import skillmeta
from blmsim.player import Player
from blmsim.targetdummy import TargetDummy, TargetObserver
from blmsim.util.rotation import Rotation
from blmsim.util.time import Clock, Time
def main():
""" main """
clock = Clock()
player = Player('Tomoyo', clock)
dummy = TargetDummy()
observer = TargetObserver()
observer.eyes_on(dummy)
rotation = Rotation(['b1', 'Enochian'], ['b1', 'sc', 'b1'])
while clock < Time(20):
if not player.casting:
next_skill = player.skills[rotation.next()]
if isinstance(next_skill, skillmeta.GCD):
while not player.gcd.is_zero():
clock.tick()
player.cast(next_skill.name, dummy)
print(f"Total damage: {observer.observe_total_damage_taken()}")
else:
if next_skill.clock.is_zero():
player.cast(next_skill.name, player)
clock.tick()
if __name__ == '__main__':
main()