Added casting spell circle graphic and AI for Stone Elemental Stone Pillar Attack. Added Stone Elemental configuration parameters. Release Build 9283.

mac-build
sigonasr2 6 months ago
parent 7ff1c60d94
commit 9a9cbe765e
  1. 2
      Adventures in Lestoria/Audio.cpp
  2. 49
      Adventures in Lestoria/Stone_Elemental.cpp
  3. 2
      Adventures in Lestoria/Version.h
  4. 27
      Adventures in Lestoria/assets/config/MonsterStrategies.txt
  5. 1
      Adventures in Lestoria/assets/config/gfx/gfx.txt
  6. BIN
      Adventures in Lestoria/assets/gamepack.pak
  7. BIN
      Adventures in Lestoria/assets/spell_insignia.png
  8. BIN
      x64/Release/Adventures in Lestoria.exe

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

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

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

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Loading…
Cancel
Save