diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index f65a3474..8e286e9f 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -927,9 +927,11 @@ void AiL::ProximityKnockback(const vf2d pos,const float radius,const float knock } } if(CheckForPlayerCollisions){ + LOG(std::format("Checking for player collision: {} {} {} {}",pos.str(),radius,GetPlayer()->GetPos().str(),12*GetPlayer()->GetSizeMult())); if(geom2d::overlaps(geom2d::circle(pos,radius),geom2d::circle(GetPlayer()->GetPos(),12*GetPlayer()->GetSizeMult()))){ + LOG("Player collision succeeded."); GetPlayer()->ProximityKnockback(pos,knockbackAmt); - } + }else LOG("Player collision failed."); } } diff --git a/Adventures in Lestoria/BulletTypes.h b/Adventures in Lestoria/BulletTypes.h index f5ea7b73..c1497bdb 100644 --- a/Adventures in Lestoria/BulletTypes.h +++ b/Adventures in Lestoria/BulletTypes.h @@ -295,6 +295,7 @@ private: SpellCircle indicator; const float knockbackAmt; float lastTrailEffect{}; + const float collisionRadius{}; }; //While not a bullet directly, the DeadlyDash class generates a bunch of afterimages and collision checks. diff --git a/Adventures in Lestoria/FallingBullet.cpp b/Adventures in Lestoria/FallingBullet.cpp index 219b004b..761e463b 100644 --- a/Adventures in Lestoria/FallingBullet.cpp +++ b/Adventures in Lestoria/FallingBullet.cpp @@ -46,7 +46,7 @@ All rights reserved. INCLUDE_game FallingBullet::FallingBullet(const std::string&imgName,vf2d targetPos,vf2d vel,float zVel,float indicatorDisplayTime,float radius,int damage,bool upperLevel,bool hitsMultiple,float knockbackAmt,float lifetime,bool friendly,Pixel spellCircleCol,vf2d scale,float image_angle,float spellCircleRotation,float spellCircleRotationSpd,Pixel insigniaCol,float insigniaRotation,float insigniaRotationSpd) -:Bullet(targetPos,vel,radius,damage,imgName,upperLevel,false,lifetime+0.1f,false,friendly,WHITE,scale,image_angle),targetPos(targetPos),zVel(zVel),indicatorDisplayTime(indicatorDisplayTime),knockbackAmt(knockbackAmt), +:Bullet(targetPos,vel,0.f,damage,imgName,upperLevel,false,lifetime+0.1f,false,friendly,WHITE,scale,image_angle),targetPos(targetPos),zVel(zVel),indicatorDisplayTime(indicatorDisplayTime),knockbackAmt(knockbackAmt),collisionRadius(radius), indicator(targetPos,lifetime+0.1f,"range_indicator.png","spell_insignia.png",upperLevel,radius/12.f,0.5f,{},spellCircleCol,spellCircleRotation,spellCircleRotationSpd,false,radius/12.f,0.f,{},insigniaCol,insigniaRotation,insigniaRotationSpd,false){ pos+=-vel*lifetime; z=-zVel*lifetime; @@ -62,16 +62,15 @@ void FallingBullet::Update(float fElapsedTime){ fadeOutTime=0.5f; SoundEffect::PlaySFX("Stone Land",pos); if(friendly){ - for(auto&[monsterPtr,hurt]:game->Hurt(pos,radius,damage,OnUpperLevel(),z,HurtType::MONSTER)){ + for(auto&[monsterPtr,hurt]:game->Hurt(pos,collisionRadius,damage,OnUpperLevel(),z,HurtType::MONSTER)){ if(hurt)std::get(monsterPtr)->ApplyIframes(0.1f); } - } - else{ - for(auto&[playerPtr,hurt]:game->Hurt(pos,radius,damage,OnUpperLevel(),z,HurtType::PLAYER)){ + }else{ + for(auto&[playerPtr,hurt]:game->Hurt(pos,collisionRadius,damage,OnUpperLevel(),z,HurtType::PLAYER)){ if(hurt)std::get(playerPtr)->ApplyIframes(0.1f); } } - game->ProximityKnockback(pos,radius,knockbackAmt,HurtType::PLAYER|HurtType::MONSTER); + game->ProximityKnockback(pos,collisionRadius,knockbackAmt,HurtType::PLAYER|HurtType::MONSTER); for(int i:std::ranges::iota_view(0,30))game->AddEffect(std::make_unique(pos-vf2d{0.f,GetZ()},util::random_range(0.05f,0.2f),"circle_outline.png",OnUpperLevel(),util::random_range(0.5f,1.f),0.2f,vf2d{util::random_range(-10.f,10.f),util::random_range(-3.f,0.f)},PixelLerp(BLACK,col,util::random(1.f)),0.f,0.f,true)); Deactivate(); } diff --git a/Adventures in Lestoria/Player.cpp b/Adventures in Lestoria/Player.cpp index 996b7b95..29f74639 100644 --- a/Adventures in Lestoria/Player.cpp +++ b/Adventures in Lestoria/Player.cpp @@ -683,6 +683,7 @@ void Player::Update(float fElapsedTime){ float newX=pos.x+totalVel.x*fElapsedTime; float newY=pos.y+totalVel.y*fElapsedTime; MoveFlag::MoveFlag flag{MoveFlag::NONE}; + LOG(std::format("Vel is currently: {}",totalVel.str())); if(vel==vf2d{})flag=MoveFlag::PREVENT_CAST_CANCELLING; //This means added velocity is the only thing affecting movement, we don't stop casting for additional velocity actors. SetX(newX,flag); SetY(newY,flag); @@ -1918,7 +1919,7 @@ void Player::ProximityKnockback(const vf2d centerPoint,const float knockbackFact float dist=lineToPlayer.length(); if(dist<0.001f){ float randomDir=util::random(2*PI); - lineToPlayer={centerPoint,centerPoint+vf2d{cos(randomDir),sin(randomDir)}*1}; + lineToPlayer={centerPoint,centerPoint+vf2d{cos(randomDir),sin(randomDir)}*knockbackFactor}; } game->GetPlayer()->Knockback(lineToPlayer.vector().norm()*knockbackFactor); } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index ecd8ad6c..49b5b924 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 11958 +#define VERSION_BUILD 11970 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/MonsterStrategies.txt b/Adventures in Lestoria/assets/config/MonsterStrategies.txt index a57288b9..2d231734 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -1302,7 +1302,7 @@ MonsterStrategy { # 0 = Normal Cannon Shot, 1 = Silence, 2 = Shrapnel Shot # Repeats at end of cycle. - Cannon Cycle = 0,0,0,0,0,0,0,0,1,2,1 + Cannon Cycle = 0 Cannon Shot Delay = 0.4s Cannon Shot Impact Time = 2.5s diff --git a/Adventures in Lestoria/assets/config/credits.txt b/Adventures in Lestoria/assets/config/credits.txt index f83e3ed5..4da64f37 100644 --- a/Adventures in Lestoria/assets/config/credits.txt +++ b/Adventures in Lestoria/assets/config/credits.txt @@ -65,21 +65,33 @@ Credits LINE[62]="Gull sounds by Jonathon Jongsma https://www.xeno-canto.org/75111" LINE[63]=" " LINE[64]=" " - LINE[65]=" " - LINE[66]="Game License" - LINE[67]="~~~~~~~~~~~~~~~~" - LINE[68]="License (OLC-3)" - LINE[69]="~~~~~~~~~~~~~~~" - LINE[70]=" " - LINE[71]="Copyright ` 2024 Sig Productions " - LINE[72]=" " - LINE[73]="Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" - LINE[74]=" " - LINE[75]="1. Redistributions or derivations of source code must retain the above copyright notice, this list of conditions and the following disclaimer." + LINE[65]="Special Thanks" + LINE[66]="~~~~~~~~~~~~~~~~~~~~" + LINE[67]=" " + LINE[68]="Plasticky" + LINE[69]="(You're welcome for making you get lunch)" + LINE[70]="brainbleepblop" + LINE[71]="Respect" + LINE[72]="Smaha" + LINE[73]="Azzerxzz" + LINE[74]="Blueyoshi6" + LINE[75]=" " LINE[76]=" " - LINE[77]="2. Redistributions or derivative works in binary form must reproduce the above copyright notice. This list of conditions and the following disclaimer must be reproduced in the documentation and/or other materials provided with the distribution." - LINE[78]=" " - LINE[79]="3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." - LINE[80]=" " - LINE[81]="THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + LINE[77]="~~~~~~~~~~~~~~~~" + LINE[78]="Game License" + LINE[79]="~~~~~~~~~~~~~~~~" + LINE[80]="License (OLC-3)" + LINE[81]="~~~~~~~~~~~~~~~" + LINE[82]=" " + LINE[83]="Copyright ` 2024 Sig Productions " + LINE[84]=" " + LINE[85]="Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" + LINE[86]=" " + LINE[87]="1. Redistributions or derivations of source code must retain the above copyright notice, this list of conditions and the following disclaimer." + LINE[88]=" " + LINE[89]="2. Redistributions or derivative works in binary form must reproduce the above copyright notice. This list of conditions and the following disclaimer must be reproduced in the documentation and/or other materials provided with the distribution." + LINE[90]=" " + LINE[91]="3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." + LINE[92]=" " + LINE[93]="THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." } \ No newline at end of file diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 5edcb47e..feab61a8 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ