diff --git a/Adventures in Lestoria/Audio.cpp b/Adventures in Lestoria/Audio.cpp index 8870506f..dd82f7f3 100644 --- a/Adventures in Lestoria/Audio.cpp +++ b/Adventures in Lestoria/Audio.cpp @@ -333,7 +333,7 @@ void Audio::Update(){ //Start playing the tracks. Audio::BGM&track=Self().bgm[Self().GetTrackName()]; for(int trackID:track.GetChannelIDs()){ - Self().Engine().Play(trackID,true); + Engine().Play(trackID,true); } } } diff --git a/Adventures in Lestoria/Stone_Elemental.cpp b/Adventures in Lestoria/Stone_Elemental.cpp index d9ef3ea4..df7e21f8 100644 --- a/Adventures in Lestoria/Stone_Elemental.cpp +++ b/Adventures in Lestoria/Stone_Elemental.cpp @@ -73,24 +73,57 @@ void Monster::STRATEGY::STONE_ELEMENTAL(Monster&m,float fElapsedTime,std::string case WAITING:{ m.F(A::ATTACK_COOLDOWN)+=fElapsedTime; - float distToPlayer=util::distance(m.GetPos(),game->GetPlayer()->GetPos()); - if(distToPlayer>=ConfigPixels("Auto Dive Range"))m.phase=DIVE_UNDERGROUND_DIG; + //float distToPlayer=util::distance(m.GetPos(),game->GetPlayer()->GetPos()); + //if(distToPlayer>=ConfigPixels("Auto Dive Range"))m.phase=DIVE_UNDERGROUND_DIG; if(m.F(A::ATTACK_COOLDOWN)>=ConfigFloat("Attack Wait Time")){ - switch(util::random()%3){ - case 0:m.phase=STONE_PILLAR_CAST;break; - case 1:m.phase=SHOOT_STONE_CAST;break; - case 2:m.phase=DIVE_UNDERGROUND_DIG;break; + switch(util::random()%1){ + case 0:{ + m.PerformAnimation("STONE PILLAR CAST"); + m.phase=STONE_PILLAR_CAST; + m.F(A::CASTING_TIMER)=ConfigFloat("Stone Pillar Cast Time"); + m.V(A::LOCKON_POS)=game->GetPlayer()->GetPos(); + game->AddEffect(std::make_unique(m.V(A::LOCKON_POS),ConfigFloat("Stone Pillar Cast Time"),"range_indicator.png",m.OnUpperLevel(),vf2d{1.f,1.f}*MONSTER_DATA.at("Stone Pillar").GetSizeMult(),0.3f,vf2d{},ConfigPixel("Stone Pillar Spell Circle Color"),util::random(2*PI),util::degToRad(ConfigFloat("Stone Pillar Spell Circle Rotation Spd"))),true); + game->AddEffect(std::make_unique(m.V(A::LOCKON_POS),ConfigFloat("Stone Pillar Cast Time"),"spell_insignia.png",m.OnUpperLevel(),vf2d{1.f,1.f}*MONSTER_DATA.at("Stone Pillar").GetSizeMult()*0.75f,0.3f,vf2d{},ConfigPixel("Stone Pillar Spell Insignia Color"),util::random(2*PI),util::degToRad(ConfigFloat("Stone Pillar Spell Insignia Rotation Spd"))),true); + }break; + case 1:{ + m.PerformAnimation("ROCK TOSS CAST"); + m.phase=SHOOT_STONE_CAST; + m.F(A::CASTING_TIMER)=ConfigFloat("Rock Toss Track Time")+ConfigFloat("Rock Toss Wait Time"); + }break; + case 2:{ + m.PerformAnimation("BURROW UNDEGROUND"); + m.phase=DIVE_UNDERGROUND_DIG; + m.F(A::CASTING_TIMER)=ConfigFloat("Burrow Wait Time"); + }break; } } }break; case STONE_PILLAR_CAST:{ - m.PerformAnimation("STONE PILLAR CAST"); + m.F(A::CASTING_TIMER)-=fElapsedTime; + if(m.F(A::CASTING_TIMER)<=0.f){ + m.phase=STONE_PILLAR_ATTACK; + } }break; case SHOOT_STONE_CAST:{ - m.PerformAnimation("ROCK TOSS CAST"); + m.F(A::CASTING_TIMER)-=fElapsedTime; + if(m.F(A::CASTING_TIMER)<=0.f){ + m.phase=SHOOT_STONE_ATTACK; + } }break; case DIVE_UNDERGROUND_DIG:{ + m.F(A::CASTING_TIMER)-=fElapsedTime; + if(m.F(A::CASTING_TIMER)<=0.f){ + m.phase=DIVE_UNDERGROUND_SURFACE; + } + }break; + case STONE_PILLAR_ATTACK:{ + + }break; + case SHOOT_STONE_ATTACK:{ + + }break; + case DIVE_UNDERGROUND_SURFACE:{ }break; } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 404b01db..85dec286 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 9272 +#define VERSION_BUILD 9283 #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 c8ba2289..939dbaae 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -724,6 +724,33 @@ MonsterStrategy # Minimum Distance the Stone Elemental will always perform a dive Auto Dive Range = 1200 + + Stone Pillar Cast Time = 3s + # NOTE: Stone Pillar's size and lifetime is determined in Monsters.txt + + # RGBA + Stone Pillar Spell Circle Color = 40, 40, 40, 80 + Stone Pillar Spell Insignia Color = 144, 137, 160, 255 + # Degrees/sec. Positive is CW, Negative is CCW. + Stone Pillar Spell Circle Rotation Spd = -30 + # Degrees/sec. Positive is CW, Negative is CCW. + Stone Pillar Spell Insignia Rotation Spd = 50 + + Rock Toss Track Time = 1s + Rock Toss Wait Time = 1s + + Rock Toss Bullet Speed = 900 + + Burrow Wait Time = 1s + + # Provide a minimum and maximum distance + Burrow Teleport Distance = 400,700 + Burrow Ring Bullet Count = 16 + Burrow Ring Bullet Speed = 100 + Burrow Ring Bullet Damage = 26 + Burrow Ring Bullet Size = 8 + # RGBA + Burrow Ring Bullet Color = 200, 203, 206, 255 } Do Nothing { diff --git a/Adventures in Lestoria/assets/config/gfx/gfx.txt b/Adventures in Lestoria/assets/config/gfx/gfx.txt index d41298f2..01692def 100644 --- a/Adventures in Lestoria/assets/config/gfx/gfx.txt +++ b/Adventures in Lestoria/assets/config/gfx/gfx.txt @@ -93,6 +93,7 @@ Images GFX_GoblinBomb = goblin_bomb.png GFX_GoblinBombFuse = goblin_bomb_fuse.png GFX_BombBoom = bomb_boom.png + GFX_SpellInsignia = spell_insignia.png # Ability Icons GFX_Warrior_BattleCry_Icon = Ability Icons/battlecry.png diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index ca363a9e..c81e8de4 100644 Binary files a/Adventures in Lestoria/assets/gamepack.pak and b/Adventures in Lestoria/assets/gamepack.pak differ diff --git a/Adventures in Lestoria/assets/spell_insignia.png b/Adventures in Lestoria/assets/spell_insignia.png new file mode 100644 index 00000000..4b73af55 Binary files /dev/null and b/Adventures in Lestoria/assets/spell_insignia.png differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index e8f25baf..704e3ef9 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ