summaryrefslogtreecommitdiff
path: root/src/bossCaptainBowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bossCaptainBowser.cpp')
-rw-r--r--src/bossCaptainBowser.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp
index 6152b42..729c1cf 100644
--- a/src/bossCaptainBowser.cpp
+++ b/src/bossCaptainBowser.cpp
@@ -29,13 +29,6 @@ const char* effects_name_list [] = {
-void ShipPhysicsCallback(daBoss *self, dStageActor_c *other) {
- if (other->name == EN_CANNON_BULLET) {
-
- }
-}
-
-
class daCaptainBowser : public daBoss {
public:
int onCreate();
@@ -92,6 +85,21 @@ daCaptainBowser *daCaptainBowser::build() {
return new(buffer) daCaptainBowser;
}
+void ShipPhysicsCallback(daCaptainBowser *self, dStageActor_c *other) {
+ if (other->name == EN_CANNON_BULLET) {
+ OSReport("CANNON COLLISION");
+ if (self->isInvulnerable) {
+ return;
+ }
+ self->damage += 1;
+
+ if (self->damage == 10) { self->doStateChange(&daCaptainBowser::StateID_Roar); }
+ else if (self->damage > 20) { self->doStateChange(&daCaptainBowser::StateID_Outro); }
+ else { self->doStateChange(&daCaptainBowser::StateID_Damage); }
+
+ }
+}
+
///////////////////////
// Externs and States
///////////////////////