Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 182:20843875ad8f
(Hopefully) use difficulty as it should.
The difficulty[0] (also called rank) varies from 0 to 32 and affects
various parts of the game. The difficulty now impact those parts,
but how it is modified during the gameplay is not clear.
Such changes to the difficulty are not handled yet.
[0] http://en.touhouwiki.net/wiki/Embodiment_of_Scarlet_Devil/Gameplay#Rank
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 25 Oct 2011 01:29:40 +0200 |
parents | 184196480f59 |
children | b6d7ce644f34 |
comparison
equal
deleted
inserted
replaced
181:184196480f59 | 182:20843875ad8f |
---|---|
663 flags) | 663 flags) |
664 | 664 |
665 | 665 |
666 @instruction(76) | 666 @instruction(76) |
667 def set_bullet_interval(self, value): | 667 def set_bullet_interval(self, value): |
668 self._enemy.bullet_launch_interval = value | 668 self._enemy.set_bullet_launch_interval(value) |
669 | 669 |
670 | 670 |
671 @instruction(77) | 671 @instruction(77) |
672 def set_bullet_interval_ex(self, value): | 672 def set_bullet_interval_ex(self, value): |
673 self._enemy.bullet_launch_interval = value | 673 self._enemy.set_bullet_launch_interval(value, self._game.prng.rand_double()) #TODO: check |
674 self._enemy.bullet_launch_timer = int(self._game.prng.rand_double() * value) #TODO: check | |
675 | 674 |
676 | 675 |
677 @instruction(78) | 676 @instruction(78) |
678 def set_delay_attack(self): | 677 def set_delay_attack(self): |
679 self._enemy.delay_attack = True | 678 self._enemy.delay_attack = True |
921 | 920 |
922 @instruction(126) | 921 @instruction(126) |
923 def set_remaining_lives(self, lives): | 922 def set_remaining_lives(self, lives): |
924 self._enemy.remaining_lives = lives | 923 self._enemy.remaining_lives = lives |
925 | 924 |
925 | |
926 @instruction(131) | |
927 def set_difficulty_coeffs(self, speed_a, speed_b, nb_a, nb_b, shots_a, shots_b): | |
928 self._enemy.difficulty_coeffs = (speed_a, speed_b, nb_a, nb_b, shots_a, shots_b) | |
929 |