diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-08-04 15:30:45 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-08-04 15:30:45 -0300 |
commit | e184170fe599cae7b9b57a7db46c4c10b74a47bc (patch) | |
tree | 356238668d7b14e52c7098d836b6cbf494226034 | |
parent | 27c66ba593683aa167d364964b5385b9a0d0bdd8 (diff) | |
download | server-e184170fe599cae7b9b57a7db46c4c10b74a47bc.tar.gz server-e184170fe599cae7b9b57a7db46c4c10b74a47bc.tar.bz2 server-e184170fe599cae7b9b57a7db46c4c10b74a47bc.tar.xz server-e184170fe599cae7b9b57a7db46c4c10b74a47bc.zip |
Verbosity should now be fine (or at least, better)
-rw-r--r-- | battle/common.py | 8 | ||||
-rw-r--r-- | battle/spheres.py | 8 | ||||
-rw-r--r-- | sql.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/battle/common.py b/battle/common.py index 649d852..e9bf3ee 100644 --- a/battle/common.py +++ b/battle/common.py @@ -104,22 +104,22 @@ def find_target(token, scope): continue except: try: - stdout("(%d) Faulty structure: %s" % (i, str(Battle[token][scope][i]))) + stdout("(%d) Faulty structure: %s" % (i, str(Battle[token][scope][i])), 0) except: - stdout("(%d) TOTALLY Faulty structure: %s" % (i, str(Battle[token][scope]))) + stdout("(%d) TOTALLY Faulty structure: %s" % (i, str(Battle[token][scope])), 0) continue continue targets.append(i) #stdout("While loop has finished") - stdout("List of targets: %s" % str(targets)) + stdout("List of targets: %s" % str(targets), 2) # When a player selects an target, it should always be the first enemy in list if scope == "enemy": opt=targets[0] else: opt=random.choice(targets) - stdout("Selected: %d" % opt) + stdout("Selected: %d" % opt, 2) return opt diff --git a/battle/spheres.py b/battle/spheres.py index e3b0d88..d0e42b4 100644 --- a/battle/spheres.py +++ b/battle/spheres.py @@ -23,12 +23,12 @@ from battle.common import find_target, attackall, calc_dmg # Handle sphere attacks. Unit is a member from Battle[token][scope] def sphere_attack(token, unit, sphere, idx=0): - stdout("%s is attacking" % str(unit)) - stdout("Sphere selected: %d" % sphere) + stdout("%s is attacking" % str(unit), 2) + stdout("Sphere selected: %d" % sphere, 2) # Select the enemy which should be attacked target_id=find_target(token, "enemy") - stdout("Enemy selected: %d" % target_id) + stdout("Enemy selected: %d" % target_id, 2) target=Battle[token]["enemy"][target_id] # Now cycle though spheres @@ -55,7 +55,7 @@ def sphere_attack(token, unit, sphere, idx=0): unit["atk"]*=-1 elif (sphere == SPH_NONE): # Normal Attack - stdout("It's a normal attack!") + stdout("It's a normal attack!", 2) target["hp"]-=calc_dmg(token, unit, target, unit["atk"]) elif (sphere == SPH_ATKUP): # Attack up sphere: Add SC_ATKUP to all members (even dead ones) @@ -76,7 +76,7 @@ def save_player(token, mask=SQL_NONE): w.execute(sqlx) except: stdout("SQL.ERR: Error happened (save.player), commiting anyway due MyISAM...", 0) - stdout("Faulty: %s" % sqlx, 0) + stdout("Faulty: %s" % sqlx, 0) #w.execute("INSERT INTO ....") # <- Not in save_player #w.execute("REPLACE DELAYED....") # <- Not where you can't delete, but for inv |