Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pointlist = []
- hp = state.entities[game.focus_object_id].hp
- maxhp = state.entities[game.focus_object_id].maxhp
- proportion = hp/maxhp
- y = round(proportion*18)+10# 18=Total size of the whole thing; 10=Offset of the cross.
- '''
- Coordinates:
- 27|10 35|10
- 22|15 27|15 35|15 40|15
- 22|23 27|23 35|23 40|23
- 27|28 35|28
- '''
- if hp != 0:
- pointlist.append((27, 28))# The bottom-left corner.
- if proportion > 2.0/9.0:
- pointlist.append((27, 23))
- pointlist.append((22, 23))
- if proportion > 13.0/18.0:
- pointlist.append((22, 15))
- pointlist.append((27, 15))
- if maxhp == hp:
- pointlist.append((27, 10))
- pointlist.append((35, 10))
- else:
- pointlist.append((27, y))
- pointlist.append((35, y))
- pointlist.append((35, 15))
- pointlist.append((40, 15))
- else:
- pointlist.append((22, y))
- pointlist.append((40, y))
- pointlist.append((40, 23))
- pointlist.append((35, 23))
- else:
- pointlist.append((27, y))
- pointlist.append((35, y))
- pointlist.append((35, 28))
Add Comment
Please, Sign In to add comment