diff --git a/Adventures in Lestoria/Bomb.cpp b/Adventures in Lestoria/Bomb.cpp index 84158ef6..53118749 100644 --- a/Adventures in Lestoria/Bomb.cpp +++ b/Adventures in Lestoria/Bomb.cpp @@ -43,6 +43,7 @@ All rights reserved. INCLUDE_DATA INCLUDE_ANIMATION_DATA +INCLUDE_MONSTER_LIST INCLUDE_game Bomb::Bomb(const vf2d pos,const float z,const float gravity,const float detonationTime,const float bombFadeoutTime,const float bombKnockbackFactor,const vf2d targetPos,const float radius,const int damage,const bool upperLevel,const bool friendly,const Pixel col,const vf2d scale) @@ -65,19 +66,28 @@ void Bomb::Update(float fElapsedTime){ if(fadeOutTime==0.f){ z=0; //Force the bomb to be grounded. fadeOutTime=bombFadeoutTime; - game->AddEffect(std::make_unique(pos,0.f,OnUpperLevel(),scale*1.5f/*Upscale 24x24 to 36x36*/,1.f,vf2d{},WHITE,0.f,0.f,true)); + game->AddEffect(std::make_unique(pos,0.f,OnUpperLevel(),vf2d{radius,radius}/12.f/1.5f/*Upscale 24x24 to 36x36*/,1.f,vf2d{},WHITE,0.f,0.f,true)); + float distToPlayer=geom2d::line(pos,game->GetPlayer()->GetPos()).length(); if(friendly){ const MonsterHurtList hurtEnemies=game->HurtEnemies(pos,radius,damage,OnUpperLevel(),z); for(auto&[monsterPtr,wasHit]:hurtEnemies){ if(wasHit)monsterPtr->ProximityKnockback(pos,bombKnockbackFactor); } + if(distToPlayer<=radius){ + game->GetPlayer()->ProximityKnockback(pos,bombKnockbackFactor); + } }else{ - float distToPlayer=geom2d::line(pos,game->GetPlayer()->GetPos()).length(); if(distToPlayer<=radius){ if(game->GetPlayer()->Hurt(damage,OnUpperLevel(),z)){ game->GetPlayer()->ProximityKnockback(pos,bombKnockbackFactor); } } + for(auto&monsterPtr:MONSTER_LIST){ + float distToMonster=geom2d::line(pos,monsterPtr->GetPos()).length(); + if(distToMonster<=radius){ + monsterPtr->ProximityKnockback(pos,bombKnockbackFactor); + } + } } } } diff --git a/Adventures in Lestoria/Bullet.cpp b/Adventures in Lestoria/Bullet.cpp index 45c5e2bf..4d6c9d75 100644 --- a/Adventures in Lestoria/Bullet.cpp +++ b/Adventures in Lestoria/Bullet.cpp @@ -143,8 +143,8 @@ void Bullet::_Update(const float fElapsedTime){ void Bullet::Draw()const{ if(GetZ()>0){ - vf2d shadowScale=vf2d{8*(radius/12.f)/3.f,1}/std::max(1.f,GetZ()/24); - game->view.DrawDecal(pos-vf2d{3,3}*shadowScale/2+vf2d{0,6*(radius/12.f)},GFX["circle.png"].Decal(),shadowScale,BLACK); + vf2d shadowScale=vf2d{8*scale.x/3.f,1}/std::max(1.f,GetZ()/8); + game->view.DrawDecal(pos-vf2d{3,3}*shadowScale/2+vf2d{0,12*scale.y},GFX["circle.png"].Decal(),shadowScale,BLACK); } if(animated){ diff --git a/Adventures in Lestoria/Goblin_Bomb.cpp b/Adventures in Lestoria/Goblin_Bomb.cpp index bb82f85b..a25a156a 100644 --- a/Adventures in Lestoria/Goblin_Bomb.cpp +++ b/Adventures in Lestoria/Goblin_Bomb.cpp @@ -71,7 +71,7 @@ void Monster::STRATEGY::GOBLIN_BOMB(Monster&m,float fElapsedTime,std::string str float distToPlayer=geom2d::line(m.GetPos(),game->GetPlayer()->GetPos()).length(); if(m.F(A::SHOOT_TIMER)>=ConfigFloat("Bomb Reload Time")&&distToPlayer<=ConfigFloat("Bomb Max Range")){ vf2d targetThrowPos=geom2d::line(m.GetPos(),game->GetPlayer()->GetPos()).rpoint(distToPlayer-ConfigFloat("Bomb Distance Variation")+util::random(ConfigFloat("Bomb Distance Variation")*2.f)); - CreateBullet(Bomb)(m.GetPos(),ConfigFloat("Bomb Starting Z"),ConfigFloat("Bomb Gravity"),ConfigFloat("Bomb Detonation Time"),ConfigFloat("Bomb Fadeout Time"),ConfigFloat("Bomb Knockback Factor"),targetThrowPos,ConfigFloat("Bomb Radius")/100.f*24,m.GetAttack(),m.OnUpperLevel(),false,WHITE,vf2d{3,3})EndBullet; + CreateBullet(Bomb)(m.GetPos(),ConfigFloat("Bomb Starting Z"),ConfigFloat("Bomb Gravity"),ConfigFloat("Bomb Detonation Time"),ConfigFloat("Bomb Fadeout Time"),ConfigFloat("Bomb Knockback Factor"),targetThrowPos,ConfigFloat("Bomb Radius")/100.f*12,m.GetAttack(),m.OnUpperLevel())EndBullet; m.UpdateFacingDirection(game->GetPlayer()->GetPos()); m.PerformShootAnimation(); m.B(A::IGNORE_DEFAULT_ANIMATIONS)=true; diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index b4a712e8..197e437b 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -17,4 +17,6 @@ Look into removing OVERRIDE from rumble settings. It looks like it was used to p Move old maps from master branch into demo branch (has boundary changes) -When a monster spawns, if it spawns inside a collision tile, attempt to set it outside somewhere and make a warning popup. \ No newline at end of file +When a monster spawns, if it spawns inside a collision tile, attempt to set it outside somewhere and make a warning popup. + +New Monster Sound Effects \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index d670978a..76948412 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 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 9230 +#define VERSION_BUILD 9237 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 0bff2f16..26ecb459 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ