Attack recovery time on frogs were being ignored. Made move speed stats implementations consistent across both monsters and players. Added shooting sound effects. Begin wolf behavior implementation.

This commit is contained in:
2024-01-14 12:53:40 -06:00
parent e8d2ec9e9d
commit acaf1bc3bf
16 changed files with 137 additions and 27 deletions
+7 -1
View File
@@ -41,6 +41,7 @@ All rights reserved.
#include "MonsterStrategyHelpers.h"
#include "util.h"
#include "BulletTypes.h"
#include "SoundEffect.h"
INCLUDE_game
INCLUDE_BULLET_LIST
@@ -94,7 +95,7 @@ void Monster::STRATEGY::FROG(Monster&m,float fElapsedTime,std::string strategy){
if(m.F(A::LOCKON_WAITTIME)==0.0f){
m.F(A::LOCKON_WAITTIME)=ConfigFloat("Attack Duration");
vf2d tongueMaxRangePos=geom2d::line<float>(m.GetPos(),m.V(A::LOCKON_POS)).upoint(ConfigFloat("Tongue Max Range")/ConfigFloat("Range"));
SoundEffect::PlaySFX("Slime Shoot",m.pos);
CreateBullet(FrogTongue)(m.pos,tongueMaxRangePos,ConfigFloat("Attack Duration"),m.GetAttack(),m.OnUpperLevel(),ConfigFloat("Tongue Knockback Strength"),false,ConfigPixel("Tongue Color"))EndBullet;
m.PerformShootAnimation();
m.I(A::PHASE)=2;
@@ -104,6 +105,11 @@ void Monster::STRATEGY::FROG(Monster&m,float fElapsedTime,std::string strategy){
case 2:{
if(m.F(A::LOCKON_WAITTIME)==0.0f){
m.F(A::LOCKON_WAITTIME)=ConfigFloat("Attack Recovery Time");
m.I(A::PHASE)=3;
}
}break;
case 3:{
if(m.F(A::LOCKON_WAITTIME)==0.0f){
m.I(A::PHASE)=0;
}
}break;