|
@@ -120,13 +120,11 @@ 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 ?
|
124
|
|
- target_subject.collections.remove(COLLECTION_ALIVE)
|
125
|
|
- # FIXME: Must be automatic when manipulate subject collections !
|
126
|
|
- self.simulation.collections[COLLECTION_ALIVE].remove(target_subject_id)
|
127
|
|
- self.simulation.collections[COLLECTION_ALIVE] = self.simulation.collections[COLLECTION_ALIVE]
|
128
|
|
- events.append(DieEvent(shooter_subject_id=self.subject.id, shoot_subject_id=target_subject_id))
|
129
|
|
- target_subject.intentions.remove_all()
|
|
123
|
+ DieEvent.apply_subject_death(target_subject)
|
|
124
|
+ events.append(DieEvent(
|
|
125
|
+ shooter_subject_id=self.subject.id,
|
|
126
|
+ shoot_subject_id=target_subject_id,
|
|
127
|
+ ))
|
130
|
128
|
|
131
|
129
|
return events
|
132
|
130
|
|