diff options
Diffstat (limited to 'src/bossTopman.cpp')
-rw-r--r-- | src/bossTopman.cpp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/src/bossTopman.cpp b/src/bossTopman.cpp index 41aac4d..5aec384 100644 --- a/src/bossTopman.cpp +++ b/src/bossTopman.cpp @@ -29,10 +29,7 @@ public: int isInvulnerableCountdown; int isTurningCountdown; char charging; - int pOneHit; - int pTwoHit; - int pThreeHit; - int pFourHit; + int flashing; float dying; @@ -144,6 +141,7 @@ daDreidel *daDreidel::build() { void daDreidel::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { + char hitType; hitType = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0); @@ -340,6 +338,8 @@ int daDreidel::onCreate() { this->isInSpace = this->settings & 0xF; this->fromBehind = 0; + this->flashing = 0; + ActivePhysics::Info HitMeBaby; @@ -406,9 +406,19 @@ int daDreidel::onExecute() { } int daDreidel::onDraw() { - bodyModel.scheduleForDrawing(); + + if (this->isInvulnerable == 1) { + this->flashing++; + } + + if (this->flashing < 5) { + bodyModel.scheduleForDrawing(); + } + bodyModel._vf1C(); + if (this->flashing > 8) { this->flashing = 0; } + return true; } @@ -461,7 +471,7 @@ void daDreidel::updateModelMatrices() { /////////////// void daDreidel::beginState_Walk() { this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed; - this->speed.x = (direction) ? -0.8f : 0.8f; + this->speed.x = (direction) ? -1.2f : 1.2f; this->max_speed.y = (this->isInSpace) ? -2.0 : -4.0; this->speed.y = (this->isInSpace) ? -2.0 : -4.0; @@ -476,6 +486,7 @@ void daDreidel::updateModelMatrices() { } else { this->isInvulnerable = 0; + this->flashing = 0; } PlaySound(this, SE_BOSS_JR_CROWN_JR_RIDE); // 5 @@ -490,7 +501,7 @@ void daDreidel::updateModelMatrices() { this->isTurningCountdown++; } - if (this->isTurningCountdown > 90) { doStateChange(&StateID_Turn); } + if (this->isTurningCountdown > 60) { doStateChange(&StateID_Turn); } if(this->chrAnimation.isAnimationDone()) { this->chrAnimation.setCurrentFrame(0.0); @@ -529,13 +540,17 @@ void daDreidel::updateModelMatrices() { void daDreidel::beginState_KnockBack() { bindAnimChr_and_setUpdateRate("begoman_damage", 1, 0.0, 0.65); - this->max_speed.x = (this->direction) ? 5.5f : -5.5f; - this->speed.x = (this->direction) ? 5.5f : -5.5f; + this->max_speed.x = (this->direction) ? 6.5f : -6.5f; + this->speed.x = (this->direction) ? 6.5f : -6.5f; } void daDreidel::executeState_KnockBack() { bool ret = calculateTileCollisions(); - this->speed.x = this->speed.x / 1.1; + if (ret) { + this->max_speed.x = -this->max_speed.x; + this->speed.x = -this->speed.x; + } + this->speed.x = this->speed.x / 1.08; bodyModel._vf1C(); if(this->chrAnimation.isAnimationDone()) { @@ -564,7 +579,7 @@ void daDreidel::updateModelMatrices() { // ChargePrep State /////////////// void daDreidel::beginState_ChargePrep() { - bindAnimChr_and_setUpdateRate("begoman_attack", 1, 0.0, 1.0); + bindAnimChr_and_setUpdateRate("begoman_attack", 1, 0.0, 0.9); } void daDreidel::executeState_ChargePrep() { if(this->chrAnimation.isAnimationDone()) { @@ -583,7 +598,7 @@ void daDreidel::updateModelMatrices() { this->isTurningCountdown = 0; this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed; - this->speed.x = (direction) ? -2.2f : 2.2f; + this->speed.x = (direction) ? -2.6f : 2.6f; this->max_speed.y = (this->isInSpace) ? -2.0 : -4.0; this->speed.y = (this->isInSpace) ? -2.0 : -4.0; @@ -598,6 +613,7 @@ void daDreidel::updateModelMatrices() { } else { this->isInvulnerable = 0; + this->flashing = 0; } if(this->chrAnimation.isAnimationDone()) { @@ -646,7 +662,7 @@ void daDreidel::updateModelMatrices() { /////////////// void daDreidel::beginState_Damage() { this->isInvulnerable = 1; - bindAnimChr_and_setUpdateRate("begoman_wait", 1, 0.0, 1.0); + bindAnimChr_and_setUpdateRate("begoman_wait", 1, 0.0, 0.75); this->timer = 0; PlaySound(this, SE_PLY_TOUCH_BIRI); @@ -665,7 +681,7 @@ void daDreidel::updateModelMatrices() { if(this->chrAnimation.isAnimationDone()) { this->timer += 1; - if (this->timer == 3) { + if (this->timer == 1) { u8 dir = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos); if (dir != this->direction) { |