initial event picker idea
This commit is contained in:
14
assets/events.py
Normal file
14
assets/events.py
Normal file
@@ -0,0 +1,14 @@
|
||||
EVENTS = [
|
||||
{
|
||||
'id' : 'ATTACK',
|
||||
'text' : '{Player1} ha attacato {player2}',
|
||||
'resolve_text' : '{Player1} ha causato {effetto_collaterale}',
|
||||
'fail_text' : '{Player1} ha fallito, {player2} è indenne',
|
||||
'success_percentage' : 80,
|
||||
'fail_percentage' : 19,
|
||||
'extreme_fail_percentage' : 1,
|
||||
'required_items' : [],
|
||||
'weight' : 1,
|
||||
'number_of_players' : 2,
|
||||
},
|
||||
]
|
||||
@@ -1,6 +1,7 @@
|
||||
from entities import player as _player
|
||||
from entities import weapons as _weapons
|
||||
from entities import weapon_syms as _wsyms
|
||||
from entities import event_picker as _events
|
||||
|
||||
class BrSimArena():
|
||||
|
||||
@@ -11,6 +12,7 @@ class BrSimArena():
|
||||
self.day= 1
|
||||
self.players= [_player.BrSimPlayer(p['name'], p.get('inventory')) for p in players]
|
||||
self.weapons= []
|
||||
self.eventClass = _events.ArenaEventPicker(self.players)
|
||||
for weapon in weapons:
|
||||
for wtype, quantity in weapon.items():
|
||||
for i in range(quantity): self.weapons.append(_weapons.BrSimWeapon(wtype))
|
||||
|
||||
13
entities/event_picker.py
Normal file
13
entities/event_picker.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from assets.events import EVENTS
|
||||
import random
|
||||
|
||||
class ArenaEventPicker():
|
||||
def __init__(self, players):
|
||||
self.players = players
|
||||
self.event_list = EVENTS
|
||||
self.already_picked_players = []
|
||||
|
||||
def pick_event():
|
||||
pass
|
||||
|
||||
|
||||
2
main.py
2
main.py
@@ -3,7 +3,7 @@ from entities import weapon_syms as _wsyms
|
||||
from entities import arena as _arena
|
||||
|
||||
def init_arena():
|
||||
players= [{'name': 'Crystal'}, {'name': 'Andrea'}]
|
||||
players= [{'name': 'Crystal'}, {'name': 'Andrea'}, {'name': 'giampi'}]
|
||||
w= _wsyms.KNIFE
|
||||
#weapons= [{_wsyms.WEAPONS[w]['name' ]: 1}]
|
||||
weapons= [{w: 1}]
|
||||
|
||||
Reference in New Issue
Block a user