forked from Cryz/battle_royale_sim
other player methods
This commit is contained in:
@@ -18,3 +18,14 @@ class BrSimPlayer():
|
|||||||
rnd= _random.randint(0, 100)
|
rnd= _random.randint(0, 100)
|
||||||
if rnd > self.agility: return True
|
if rnd > self.agility: return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def steal(self):
|
||||||
|
#XXX can steal from death players or from sleeping players
|
||||||
|
pass
|
||||||
|
|
||||||
|
def heal(self):
|
||||||
|
#XXX if you have a wound and you have a medikit item, you can heal your wound or sickness
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_inventory(self):
|
||||||
|
return self.inventory
|
||||||
|
|||||||
3
main.py
3
main.py
@@ -41,7 +41,8 @@ class BrSimArena():
|
|||||||
|
|
||||||
def init_arena():
|
def init_arena():
|
||||||
players= [{'name': 'Crystal'}, {'name': 'Andrea'}]
|
players= [{'name': 'Crystal'}, {'name': 'Andrea'}]
|
||||||
weapons= [{_wsyms.KNIFE['name']: 1}]
|
w= _wsyms.KNIFE
|
||||||
|
weapons= [{_wsyms.WEAPONS[w]['name']: 1}]
|
||||||
return BrSimArena(players, weapons)
|
return BrSimArena(players, weapons)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user