comparison src/th06/ecl_vm.rs @ 723:420cec4005b5

ecl_vm: patchouli spellcard selector
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Tue, 29 Oct 2019 04:06:28 +0100
parents e71ea8214ee2
children 8acaf45b47d0
comparison
equal deleted inserted replaced
722:e71ea8214ee2 723:420cec4005b5
985 let rand_y = self.get_prng().borrow_mut().get_f64(); 985 let rand_y = self.get_prng().borrow_mut().get_f64();
986 let mut enemy = self.enemy.borrow_mut(); 986 let mut enemy = self.enemy.borrow_mut();
987 let pos = [rand_x * range_x + enemy.pos.x as f64 - range_x / 2., 987 let pos = [rand_x * range_x + enemy.pos.x as f64 - range_x / 2.,
988 rand_y * range_y + enemy.pos.x as f64 - range_y / 2.]; 988 rand_y * range_y + enemy.pos.x as f64 - range_y / 2.];
989 enemy.bullet_attributes.fire(); 989 enemy.bullet_attributes.fire();
990 }
991 3 => { // Patchouli’s dual sign spellcard selector
992 let mut enemy = self.enemy.borrow_mut();
993 let mut knowledge: [[i32; 3]; 4] =
994 [[0, 3, 1],
995 [2, 3, 4],
996 [1, 4, 0],
997 [4, 2, 3]];
998
999 //TODO: implement select_player and replace character by the correct one
1000 //let character = enemy.select_player().character;
1001 let character = 0;
1002 for i in 1..=3 {
1003 self.frame.ints1[i] = knowledge[character][i];
1004 }
990 } 1005 }
991 8 => { // Vampire Fantasy 1006 8 => { // Vampire Fantasy
992 /* 1007 /*
993 let mut n = 0: 1008 let mut n = 0:
994 for bullet in game.bullets{ 1009 for bullet in game.bullets{