|
@@ -120,11 +120,13 @@ class EngageOpponent(AliveSubjectBehaviour):
|
120
|
120
|
|
121
|
121
|
# Must be check if target is not already dead (killed same cycle)
|
122
|
122
|
if kill and COLLECTION_ALIVE in target_subject.collections:
|
|
123
|
+ # TODO: refact ? All in same place for dead ?
|
123
|
124
|
target_subject.collections.remove(COLLECTION_ALIVE)
|
124
|
125
|
# FIXME: Must be automatic when manipulate subject collections !
|
125
|
126
|
self.simulation.collections[COLLECTION_ALIVE].remove(target_subject_id)
|
126
|
127
|
self.simulation.collections[COLLECTION_ALIVE] = self.simulation.collections[COLLECTION_ALIVE]
|
127
|
128
|
events.append(DieEvent(shooter_subject_id=self.subject.id, shoot_subject_id=target_subject_id))
|
|
129
|
+ target_subject.intentions.remove_all()
|
128
|
130
|
|
129
|
131
|
return events
|
130
|
132
|
|