Added cast for players to cast spells
Showing
5 changed files
with
10 additions
and
4 deletions
... | @@ -64,6 +64,7 @@ while True: | ... | @@ -64,6 +64,7 @@ while True: |
64 | print('spawner error:') | 64 | print('spawner error:') |
65 | print(e) | 65 | print(e) |
66 | if tick >= 1: | 66 | if tick >= 1: |
67 | if 'esp' in platform: | ||
67 | print(mem_free()) | 68 | print(mem_free()) |
68 | spawn += tick | 69 | spawn += tick |
69 | tick = 0 | 70 | tick = 0 | ... | ... |
1 | {"name": "test", "room": "Outside", "inventory": {"candle": 1}, "prompt": "%hp> ", "aliases": {}, "hp": 593, "mp": 100, "sta": 10, "aa": "1d2", "mpr": 0.25, "star": 0.4, "maxhp": 953, "maxmp": 100, "maxsta": 10, "weapon": "sword"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | {"name": "test", "room": "Tavern", "inventory": {"candle": 1}, "prompt": "hp %hp mp %mp> ", "aliases": {}, "hp": 461, "mp": 50, "sta": 10, "aa": "1d2", "mpr": 0.25, "star": 0.4, "maxhp": 953, "maxmp": 100, "maxsta": 10, "weapon": "sword", "sp": {"fireball": {"cost": 5, "dmg": "2d4", "desc": "A fireball blasts from your fingertips striking the target"}}, "at": {}} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | {"cricket": {"max": 1, "active": [{"hp": 100, "mp": 2.0, "sta": 4.550000000000075, "maxhp": 100, "maxmp": 10, "maxsta": 10, "action": "attack", "target": "test"}]}} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | {"cricket": {"max": 1, "active": [{"hp": 48, "mp": 5.0, "sta": 0.35000000000008313, "maxhp": 100, "maxmp": 10, "maxsta": 10, "action": "attack", "target": "test"}]}} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -48,9 +48,12 @@ def get_att(d): | ... | @@ -48,9 +48,12 @@ def get_att(d): |
48 | else: | 48 | else: |
49 | att = int(d) | 49 | att = int(d) |
50 | return att | 50 | return att |
51 | def calc_att(mud, pid, attacks, bank): | 51 | def calc_att(mud, pid, attacks, bank, attack=None): |
52 | v_att = [] | 52 | v_att = [] |
53 | att = 0 | 53 | att = 0 |
54 | if attack: | ||
55 | v_att.append(attack) | ||
56 | else: | ||
54 | for attack in attacks: | 57 | for attack in attacks: |
55 | if attack['cost'] < bank: | 58 | if attack['cost'] < bank: |
56 | v_att.append(attack) | 59 | v_att.append(attack) | ... | ... |
-
Please register or sign in to post a comment