Fix bug with monsters being able to move solid objects. Make second chapter boss ignore terrain collision. Fix bug with bear slam attack causing knockback to the player when it would hit a monster. Release Build 9613.

mac-build
sigonasr2 6 months ago
parent bcbe58eebd
commit 480039d64c
  1. 2
      Adventures in Lestoria/Bear.cpp
  2. 9
      Adventures in Lestoria/Monster.cpp
  3. 4
      Adventures in Lestoria/StoneGolem.cpp
  4. 2
      Adventures in Lestoria/Version.h
  5. 1
      Adventures in Lestoria/assets/config/MonsterStrategies.txt
  6. 29
      Adventures in Lestoria/assets/config/Monsters.txt
  7. BIN
      x64/Release/Adventures in Lestoria.exe

@ -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<float>(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;

@ -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::vector<Buff>shieldBuffs=GetBuffs(BARRIER_DAMAGE_REDUCTION);
if(shieldBuffs.size()>0){

@ -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;
}
}

@ -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

@ -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.

@ -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

Loading…
Cancel
Save