diff --git a/Adventures in Lestoria/GiantOctopus.cpp b/Adventures in Lestoria/GiantOctopus.cpp index cb30ec7e..1d683971 100644 --- a/Adventures in Lestoria/GiantOctopus.cpp +++ b/Adventures in Lestoria/GiantOctopus.cpp @@ -75,6 +75,9 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s if(!GFX.count(takoyakiImgDir))ERR(std::format("WARNING! Could not find item image {}",takoyakiImgDir)); game->AddEffect(std::make_unique(m.GetPos(),INFINITE,"item_img_directory"_S+"Takoyaki.png",m.OnUpperLevel(),1.f,0.f,vf2d{4.f,4.f},vf2d{},WHITE)); m.SetLifetime(4.f); + m.F(A::SHOOT_TIMER)=ConfigFloat("Shoot Frequency"); + m.F(A::SHOOT_ANIMATION_TIME)=m.GetAnimation("ATTACK").GetTotalAnimationDuration(); + m.I(A::ATTACK_COUNT)=0; return false; }); SETPHASE(IDENTIFY_ARMS); @@ -95,7 +98,12 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s } }break; case NORMAL:{ + m.F(A::SHOOT_TIMER)-=fElapsedTime; m.F(A::CASTING_TIMER)-=fElapsedTime; + if(m.F(A::SHOOT_ANIMATION_TIME)>0.f){ + m.F(A::SHOOT_ANIMATION_TIME)-=fElapsedTime; + if(m.F(A::SHOOT_ANIMATION_TIME)<=0.f)m.PerformIdleAnimation(); + } if(m.F(A::CASTING_TIMER)<=0.f){ int deadMonsterCount{0}; std::vectorunoccupiedArmLocs; @@ -125,6 +133,16 @@ void Monster::STRATEGY::GIANT_OCTOPUS(Monster&m,float fElapsedTime,std::string s } m.F(A::CASTING_TIMER)=util::random_range(ConfigFloatArr("Arm Move Timer",0),ConfigFloatArr("Arm Move Timer",1)); } + if(m.F(A::SHOOT_TIMER)<=0.f){ + if(m.I(A::ATTACK_COUNT)>=ConfigInt("Big Bullet Frequency")){ + CreateBullet(Bullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Big Bullet Speed"),ConfigFloat("Big Bullet Radius")*1.5f,ConfigFloat("Big Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Big Bullet Color"),{ConfigFloat("Big Bullet Radius"),ConfigFloat("Big Bullet Radius")})EndBullet; + m.I(A::ATTACK_COUNT)=-1; + }else CreateBullet(Bullet)(m.GetPos(),util::pointTo(m.GetPos(),game->GetPlayer()->GetPos())*ConfigFloat("Bullet Speed"),ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Bullet Color"),{ConfigFloat("Bullet Radius"),ConfigFloat("Bullet Radius")})EndBullet; + + m.PerformShootAnimation(); + m.F(A::SHOOT_TIMER)=ConfigFloat("Shoot Frequency"); + m.I(A::ATTACK_COUNT)++; + } }break; case HURT_ANIMATION:{ diff --git a/Adventures in Lestoria/Item.cpp b/Adventures in Lestoria/Item.cpp index 2c192c09..f059ebe0 100644 --- a/Adventures in Lestoria/Item.cpp +++ b/Adventures in Lestoria/Item.cpp @@ -393,13 +393,13 @@ void ItemInfo::InitializeItems(){ GFX.at("item_img_directory"_S+fragmentName).Decal()->Update(); }else{ #pragma region Collect colors from source ring image - std::setcolors; - for(int y=0;y<24;y++){ - for(int x=0;x<24;x++){ - colors.insert(ITEM_DATA.at(itemName).Icon().Sprite()->GetPixel(x,y)); - } + std::setcolors; + for(int y=0;y<24;y++){ + for(int x=0;x<24;x++){ + colors.insert(ITEM_DATA.at(itemName).Icon().Sprite()->GetPixel(x,y)); } - colors.erase(BLANK); + } + colors.erase(BLANK); #pragma endregion #pragma region Generate fragment with randomly sampled pixels from the source ring image game->SetDrawTarget(GFX.at("item_img_directory"_S+fragmentName).Sprite()); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 578974ee..2ac6ed55 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 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 11865 +#define VERSION_BUILD 11871 #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 f826a01b..3ebdd2f9 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -1252,5 +1252,20 @@ MonsterStrategy # How long to play the hurt animation for before reverting back to a normal animation. Hurt Animation Time = 2s + + Shoot Frequency = 1s + Bullet Speed = 200 + Bullet Radius = 4px + Bullet Damage = 40 + Bullet Color = 0r,0g,0b,255a + + # Number of shots when a big bullet comes out instead. + Big Bullet Frequency = 6shots + Big Bullet Speed = 250 + Big Bullet Radius = 12px + Big Bullet Damage = 90 + Big Bullet Extra Bullet Count = 10 + Big Bullet Boss Rest Time = 2s + Big Bullet Color = 255r,0g,0b,255a } } \ No newline at end of file diff --git a/Adventures in Lestoria/assets/config/items/Accessories.txt b/Adventures in Lestoria/assets/config/items/Accessories.txt index 3f420cb4..bd30df13 100644 --- a/Adventures in Lestoria/assets/config/items/Accessories.txt +++ b/Adventures in Lestoria/assets/config/items/Accessories.txt @@ -78,10 +78,10 @@ Equipment Slot = Ring1,Ring2 ItemCategory = Accessories - Fragment Name = Bird's Treasure Fragment + Fragment Name = Octopus Ring's Fragment # See ItemStats.txt for valid stat names - StatValues = CDR,Move Spd%,Attack,Mana + StatValues = CDR,Move Spd %,Attack,Mana MinStats = 1,1,4,4 MaxStats = 2,2,11,12 SellValue = 145 @@ -96,7 +96,7 @@ Equipment Fragment Name = Captain's Diamond Ring Fragment # See ItemStats.txt for valid stat names - StatValues = CDR,Move Spd%,Mana + StatValues = CDR,Move Spd %,Mana MinStats = 4,1,8 MaxStats = 7,3,16 SellValue = 160 diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index e799fb9b..92996dc2 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/items/Captain's Diamond Ring.png b/Adventures in Lestoria/assets/items/Captain's Diamond Ring.png new file mode 100644 index 00000000..cbe5a165 Binary files /dev/null and b/Adventures in Lestoria/assets/items/Captain's Diamond Ring.png differ diff --git a/Adventures in Lestoria/assets/items/Crab Claw.png b/Adventures in Lestoria/assets/items/Crab Claw.png new file mode 100644 index 00000000..aadcffd5 Binary files /dev/null and b/Adventures in Lestoria/assets/items/Crab Claw.png differ diff --git a/Adventures in Lestoria/assets/items/Octopus Ring.png b/Adventures in Lestoria/assets/items/Octopus Ring.png new file mode 100644 index 00000000..aadcffd5 Binary files /dev/null and b/Adventures in Lestoria/assets/items/Octopus Ring.png differ diff --git a/Adventures in Lestoria/safemap.h b/Adventures in Lestoria/safemap.h index c3c34272..0a2d956f 100644 --- a/Adventures in Lestoria/safemap.h +++ b/Adventures in Lestoria/safemap.h @@ -63,7 +63,7 @@ public: } } O&at(T key){ - return map.at(key); + return map.at(key); } auto insert(T key,O obj){ return map.insert({key,obj}); diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index cddce5b7..9ab82037 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ