changeset 724:8acaf45b47d0

ecl_vm: added spellcard 13
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Tue, 29 Oct 2019 14:39:03 +0100
parents 420cec4005b5
children fbf89cba04e2
files src/th06/ecl_vm.rs
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs
+++ b/src/th06/ecl_vm.rs
@@ -1029,6 +1029,28 @@ impl EclRunner {
                         self._setval(-10004, n)
                         */
                     }
+                    13 => {
+                        if self.frame.ints1[3] % 6 == 0 {
+                            let mut _angle=self.frame.floats[2];
+                            /*
+                            (type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots,
+                            speed, speed2, launch_angle, angle, flags) = self._enemy.bullet_attributes
+                            for i in range(arg) {
+                                //TODO: distance is obtained directly by copying bullet attributes
+                                //in memory
+                                launch_pos = (192 + cos(_angle) * _distance,
+                                    224 + sin(_angle) * _distance);
+
+                                bullet_attributes = (type_, anim, sprite_idx_offset,
+                                     bullets_per_shot, number_of_shots,
+                                     speed, speed2,
+                                     _angle + self.frame.floats[1], angle, flags);
+                                enemy.fire(launch_pos=launch_pos,bullet_attributes=bullet_attributes);
+                                _angle += 2*std::f64::consts::PI/arg;
+                            }*/
+                        }
+                        self.frame.ints1[3] += 1;
+                    }
                     14 => { // Lävatein
                         let mut enemy = self.enemy.borrow_mut();
                         self.frame.ints1[3] = 0;