diff --git a/Adventures in Lestoria/Bear.cpp b/Adventures in Lestoria/Bear.cpp index b5e24d8a..3e7eb690 100644 --- a/Adventures in Lestoria/Bear.cpp +++ b/Adventures in Lestoria/Bear.cpp @@ -99,7 +99,7 @@ void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){ if(!otherM->AttackAvoided(m.GetZ())&&&m!=otherM.get()&&geom2d::overlaps(attackCircle,otherM->BulletCollisionHitbox())){ otherM->Knockup(ConfigFloat("Attack Knockup Duration")); vf2d monsterDirVecNorm=geom2d::line(m.GetPos(),otherM->GetPos()).vector().norm(); - game->GetPlayer()->Knockback(monsterDirVecNorm*ConfigFloat("Attack Knockback Amount")); + otherM->Knockback(monsterDirVecNorm*ConfigFloat("Attack Knockback Amount")); } } m.spriteRot=0.f; diff --git a/Adventures in Lestoria/Monster.cpp b/Adventures in Lestoria/Monster.cpp index d64a8802..099c8dec 100644 --- a/Adventures in Lestoria/Monster.cpp +++ b/Adventures in Lestoria/Monster.cpp @@ -340,6 +340,7 @@ bool Monster::Update(float fElapsedTime){ if(&*m==this)continue; if(!m->HasIframes()&&OnUpperLevel()==m->OnUpperLevel()&&abs(m->GetZ()-GetZ())<=1&&geom2d::overlaps(geom2d::circle(pos,monsterRadius),geom2d::circle(m->GetPos(),otherMonsterRadius))){ m->Collision(*this); + if(IsSolid())continue; //Solid objects don't need any movement/knockback processing and can be ignored from here on out. geom2d::line line(pos,m->GetPos()); float dist = line.length(); while(dist<=0.001){ @@ -454,11 +455,13 @@ void Monster::Draw()const{ blendCol.a=blendColAlpha; - game->view.DrawPartialRotatedDecal(drawPos,GetFrame().GetSourceImage()->Decal(),spriteRot,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),blendCol); + const float finalSpriteRot=HasFourWaySprites()?0.f:spriteRot; //Prevent 4-way sprites from being rotated. + + game->view.DrawPartialRotatedDecal(drawPos,GetFrame().GetSourceImage()->Decal(),finalSpriteRot,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),blendCol); if(overlaySprite.length()!=0){ - game->view.DrawPartialRotatedDecal(drawPos,GFX[overlaySprite].Decal(),spriteRot,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),{blendCol.r,blendCol.g,blendCol.b,overlaySpriteTransparency}); + game->view.DrawPartialRotatedDecal(drawPos,GFX[overlaySprite].Decal(),finalSpriteRot,GetFrame().GetSourceRect().size/2,GetFrame().GetSourceRect().pos,GetFrame().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),{blendCol.r,blendCol.g,blendCol.b,overlaySpriteTransparency}); } - if(HasMountedMonster())game->view.DrawPartialRotatedDecal(drawPos+mountedSprOffset,GetMountedFrame().value().GetSourceImage()->Decal(),spriteRot,GetMountedFrame().value().GetSourceRect().size/2,GetMountedFrame().value().GetSourceRect().pos,GetMountedFrame().value().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),blendCol); + if(HasMountedMonster())game->view.DrawPartialRotatedDecal(drawPos+mountedSprOffset,GetMountedFrame().value().GetSourceImage()->Decal(),finalSpriteRot,GetMountedFrame().value().GetSourceRect().size/2,GetMountedFrame().value().GetSourceRect().pos,GetMountedFrame().value().GetSourceRect().size,vf2d(GetSizeMult()*(!HasFourWaySprites()&&GetFacingDirection()==Direction::EAST?-1:1),GetSizeMult()),blendCol); std::vectorshieldBuffs=GetBuffs(BARRIER_DAMAGE_REDUCTION); if(shieldBuffs.size()>0){ diff --git a/Adventures in Lestoria/StoneGolem.cpp b/Adventures in Lestoria/StoneGolem.cpp index 25b1362a..3a09f1dc 100644 --- a/Adventures in Lestoria/StoneGolem.cpp +++ b/Adventures in Lestoria/StoneGolem.cpp @@ -76,7 +76,7 @@ void Monster::STRATEGY::STONE_GOLEM(Monster&m,float fElapsedTime,std::string str if(m.F(A::CASTING_TIMER)<=0.f){ m.I(A::PATTERN_REPEAT_COUNT)--; game->SpawnMonster(m.V(A::LOCKON_POS),MONSTER_DATA.at("Stone Golem Pillar"),m.OnUpperLevel()); - game->Hurt(m.V(A::LOCKON_POS),MONSTER_DATA.at("Stone Golem Pillar").GetCollisionRadius()*MONSTER_DATA.at("Stone Golem Pillar").GetSizeMult(),m.GetAttack(),m.OnUpperLevel(),0.f,HurtType::PLAYER); + game->Hurt(m.V(A::LOCKON_POS),MONSTER_DATA.at("Stone Golem Pillar").GetCollisionRadius()*MONSTER_DATA.at("Stone Golem Pillar").GetSizeMult(),MONSTER_DATA.at("Stone Golem Pillar").GetAttack(),m.OnUpperLevel(),0.f,HurtType::PLAYER); if(m.I(A::PATTERN_REPEAT_COUNT)<=0){ m.phase=STANDARD; }else{ @@ -87,7 +87,7 @@ void Monster::STRATEGY::STONE_GOLEM(Monster&m,float fElapsedTime,std::string str } }break; case STANDARD:{ - + BEAR(m,fElapsedTime,"Bear"); }break; } } \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 78c0dbd0..0d129754 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 3 -#define VERSION_BUILD 9610 +#define VERSION_BUILD 9613 #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 eff9c2bd..a5650da0 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -904,6 +904,7 @@ MonsterStrategy Repeat Count = 3 Pillar Cast Time = 2s Pillar Cast Delay Time = 0.5s + Pillar Spell Circle Color = 40, 40, 40, 80 Pillar Spell Insignia Color = 144, 137, 160, 255 # Degrees/sec. Positive is CW, Negative is CCW. diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index 69703245..344c6d55 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -984,7 +984,7 @@ Monsters Stone Golem { Health = 30000 - Attack = 40 + Attack = 35 CollisionDmg = 40 @@ -1004,6 +1004,29 @@ Monsters # Setting this to true means every four rows indicates one animation, the ordering of the directions is: NORTH, EAST, SOUTH, WEST 4-Way Spritesheet = True + + # vvvvv Bear script overrides vvvvv + + # How close the Stone Golem has to get to begin its attack. + Attack Range = 250 + + # How large the range of the attack is. + Smash Attack Diameter = 320 + + # How long the Stone Golem charges up its attack. + Chargeup Time = 0.8s + + # How long to wait in animation time before the attack hits. + Attack Animation Wait Time = 0.45s + + # How long the duration of the knockup is. + Attack Knockup Duration = 0.4s + + # Sets how much knockback the attack will have. + Attack Knockback Amount = 250 + + # ^^^^^ End Bear script overrides ^^^^^ + Animations { # Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse) @@ -1016,11 +1039,11 @@ Monsters BURROW UNDERGROUND = 5, 0.15, OneShot RISE FROM UNDERGROUND = 5, 0.15, OneShot TOSS ROCK Cast = 2, 0.2, Repeat - SLAM = 3, 0.2, OneShot + SLAM = 3, 0.15, OneShot TOSS ROCK = 4, 0.2, OneShot } - Ignore Collisions = False + Ignore Collisions = True Hurt Sound = Monster Hurt Death Sound = Slime Dead diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index b1c0c87c..c25a2cfd 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ