Skip to content

Commit

Permalink
char.act(target) changed to char.next_move(target) - stun is now work…
Browse files Browse the repository at this point in the history
…ing properly
  • Loading branch information
czubert@gmail.com authored and czubert@gmail.com committed Aug 4, 2019
1 parent a7afa32 commit ba2e631
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 3 additions & 8 deletions characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,11 @@ def regenerate(self):
self.regenerate_mana()

def regenerate_hp(self):
if self.current_hp + self.hp_regen * self.current_hp >= self.max_hp:
self.current_hp = self.max_hp
else:
self.current_hp = self.current_hp + self.hp_regen * self.max_hp # hp regeneration
self.current_hp = min(self.max_hp, self.current_hp + self.hp_regen * self.max_hp) # hp regeneration

def regenerate_mana(self):
if self.current_mana + self.mana_regen * self.current_mana >= self.max_mana:
self.current_mana = self.max_mana
else:
self.current_mana = self.current_mana + self.mana_regen * self.max_mana # hp regeneration
self.current_mana = min(self.max_mana,
self.current_mana + self.mana_regen * self.max_mana) # hp regeneration# mana regeneration

def get_exp(self):
self.exp += 250
Expand Down
5 changes: 1 addition & 4 deletions teams.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import random
import math

import characters

Expand Down Expand Up @@ -47,11 +46,9 @@ def team_act(self, char):
if char.current_hp < 0:
return

# target = self.find_weakest_character(self.opponent_team)

target = char.find_weakest_character()

char.act(target)
char.next_move(target)

char.get_exp()

Expand Down

0 comments on commit ba2e631

Please sign in to comment.