diff src/th06/ecl_vm.rs @ 721:bbf0da7de481

ecl_vm: work on laevateinn
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Mon, 28 Oct 2019 19:52:06 +0100
parents cffb0f1531fc
children e71ea8214ee2
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -988,6 +988,17 @@ impl EclRunner {
                                    rand_y * range_y + enemy.pos.x as f64 - range_y / 2.];
                         enemy.bullet_attributes.fire();
                     }
+                    14 => { // Lävatein
+                        let mut enemy = self.enemy.borrow_mut();
+                        self.frame.ints1[3] = 0;
+                        for laser in enemy.laser_by_id.values() {
+                            //for pos in laser.get_bullets_pos(){
+                            //TODO: the game checks for laser end_offset before firing
+                            //  enemy.fire(launch_pos=pos);
+                            //}
+                            self.frame.ints1[3] += 1;
+                        }
+                    }
                     16 => { // QED: Ripples of 495 years
                         let mut enemy = self.enemy.borrow_mut();
                         let game = enemy.game.upgrade().unwrap();