diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-13 09:58:18 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-13 09:58:18 -0500 |
commit | 68d90d197b750695d59e4c0c6224614bb29aef2b (patch) | |
tree | 8621248cdfb6349857979acad9195a40ecb3c9a0 /src/bossFuzzyBear.cpp | |
parent | 4d2eae84e71f7f8f068377335dca518cf4ba3850 (diff) | |
download | kamek-68d90d197b750695d59e4c0c6224614bb29aef2b.tar.gz kamek-68d90d197b750695d59e4c0c6224614bb29aef2b.zip |
Fuzzy Boss Effects
Diffstat (limited to 'src/bossFuzzyBear.cpp')
-rw-r--r-- | src/bossFuzzyBear.cpp | 67 |
1 files changed, 49 insertions, 18 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 4cc4128..9c91662 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -2,7 +2,7 @@ #include <game.h> #include <g3dhax.h> #include <sfx.h> - +#include "effects.h" #include "player.h" class daFuzzyBear_c : public dEn_c { @@ -21,7 +21,7 @@ class daFuzzyBear_c : public dEn_c { float AreaWidthRight; float LaunchSpeedShort; float LaunchSpeedHigh; - float dying; + u8 dying; float storeSpeed; Vec initialPos; char RolyBounces; @@ -97,7 +97,7 @@ void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, Ac this->timer = 0; PlaySound(this, SE_BOSS_KOOPA_FIRE_DISAPP); -// CreateEffect(102); + CreateEffect(&apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 102); this->damage++; if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } } @@ -129,7 +129,7 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy doSpriteMovement(blah); PlaySound(this, SE_EMY_BLOW_PAKKUN_DOWN); -// CreateEffect(161); + CreateEffect(&blah->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 161); if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } else { doStateChange(&StateID_RolyPoly); } @@ -143,7 +143,7 @@ void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics * this->timer = 0; this->damage += 3; -// CreateEffect(162); + CreateEffect(&apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 162); if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } else { doStateChange(&StateID_RolyPoly); } @@ -152,15 +152,35 @@ void daFuzzyBear_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysic void daFuzzyBear_c::dieBigFall_Execute() { - - this->timer = this->timer + 1; - - this->dying = this->dying + 0.15; - - this->pos.x = this->pos.x + 0.15; - this->pos.y = this->pos.y + ((-0.2 * (this->dying*this->dying)) + 5); - - this->dEn_c::dieBigFall_Execute(); + + if (this->dying == 1) { return; } + + if (this->scale.x > 0.1) { + + PlaySound(this, SE_BOSS_CMN_DAMAGE_LAST); + + this->scale.x -= 0.015; + this->scale.y -= 0.015; + this->scale.z -= 0.015; + + if (this->timer == 30) { + CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}, 756); + CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}, 801); + CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}, 957); + this->timer = 0; + } + } + else { + this->scale.x = 0.0; + this->scale.y = 0.0; + this->scale.z = 0.0; + + CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}, 588); + this->dying = 1; + } + + this->timer += 1; + } @@ -385,7 +405,10 @@ void daFuzzyBear_c::executeState_Bounce() { this->pos.y = this->pos.y + (scaleDown/10.0); if (this->pos.y > this->Baseline) { this->pos.y = this->Baseline - 1.0; } } -// else if (this->timer == 10) { CreateEffect(66); } + else if (this->timer == 10) { + Vec tempPos = (Vec){this->pos.x, this->pos.y - wallDistance, 5500.0}; + CreateEffect(&tempPos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}, 66); + } else { float modifier; modifier = (scaleBase - 1.0) + ((this->timer - 10) * 0.1); @@ -585,15 +608,22 @@ void daFuzzyBear_c::beginState_RolyPoly() { this->scale = (Vec){3.0, 3.0, 3.0}; } + this->timer = 0; } void daFuzzyBear_c::executeState_RolyPoly() { OSReport("Fuzzy Roly State Execute"); float wallDistance, scaleDown, scaleUp; - PlaySound(this, SE_OBJ_TEKKYU_G_ROLL); + PlaySound(this, SE_OBJ_TEKKYU_G_CRASH); if (this->pos.y > this->Baseline) { this->pos.y -= 2.0; } - else { this->pos.y = this->Baseline - 1.0; } + else { + this->pos.y = this->Baseline - 1.0; + + Vec tempPos = (Vec){this->pos.x, this->pos.y - 34.0, 5500.0}; + + if (this->timer && 0x20) { CreateEffect(&tempPos, &(S16Vec){0,0,0}, &(Vec){0.7, 0.7, 0.7}, 242); } + } if (this->direction == 0) { // is even this->pos.x = this->pos.x - 4.0; } @@ -607,7 +637,7 @@ void daFuzzyBear_c::executeState_RolyPoly() { wallDistance = 50.0; } - + this->timer += 1; if (this->pos.x <= this->initialPos.x - ((15 * 24.0) + wallDistance)) { // Hit left wall, head right. this->speed.x = -this->speed.x; @@ -646,6 +676,7 @@ void daFuzzyBear_c::endState_RolyPoly() { this->rot.z = 0; OSReport("Fuzzy Roly State End"); this->isInvulnerable = 0; + this->timer = 0; } |