Feature: check for *Area*-Status
This commit is contained in:
@@ -90,9 +90,11 @@ class Area:
|
||||
|
||||
def __init__(self):
|
||||
self.__dict__['_content'] = {
|
||||
'children': [],
|
||||
'items': {},
|
||||
'armor': 0,
|
||||
'children': [],
|
||||
'items': {},
|
||||
'armor': 0,
|
||||
'inner_armor': 0,
|
||||
'state': AreaStatus.FINE,
|
||||
}
|
||||
|
||||
def __setattr__(self, key, value):
|
||||
@@ -170,3 +172,7 @@ class Mech(object):
|
||||
if area.inner_armor > hits_rest:
|
||||
area.inner_armor -= hits_rest
|
||||
area.armor = 0
|
||||
area.state = AreaStatus.CRITICAL_STRIKE
|
||||
else:
|
||||
area.state = AreaStatus.DESTROYED
|
||||
area.inner_armor = 0
|
||||
|
||||
Reference in New Issue
Block a user