diff --git a/Crawler/Crawler.cpp b/Crawler/Crawler.cpp index bbbb9529..1d684dd1 100644 --- a/Crawler/Crawler.cpp +++ b/Crawler/Crawler.cpp @@ -1307,8 +1307,6 @@ void Crawler::LoadLevel(MapName map){ totalBossEncounterMobs=0; Inventory::Clear("Monster Loot"); Inventory::Clear("Stage Loot"); - Inventory::AddItem("Bandages",3); - Inventory::AddItem("Blue Slime Remains",10,true); #pragma region Monster Spawn Data Setup for(auto key:MAP_DATA[map].SpawnerData){ diff --git a/Crawler/Monster.h b/Crawler/Monster.h index fc65faee..e7cf2494 100644 --- a/Crawler/Monster.h +++ b/Crawler/Monster.h @@ -41,6 +41,8 @@ SUCH DAMAGE. #include "DEFINES.h" #include "Attributable.h" +INCLUDE_ITEM_DATA + struct Player; class Crawler; @@ -53,6 +55,15 @@ enum MonsterAnimation{ DEATH }; +struct MonsterDropData{ + ItemInfo*item; + float dropChance; + int minQty=1; + int maxQty=1; + MonsterDropData(std::string itemName,float dropChance,int minQty=1,int maxQty=1) + :item(ITEM_DATA.at(itemName)),dropChance(dropChance),minQty(minQty),maxQty(maxQty){} +}; + struct MonsterData{ private: int id; diff --git a/Crawler/assets/config/Monsters.txt b/Crawler/assets/config/Monsters.txt index fe5de6b1..bac39c9c 100644 --- a/Crawler/assets/config/Monsters.txt +++ b/Crawler/assets/config/Monsters.txt @@ -23,6 +23,10 @@ Monsters ShootAnimation = 10, 0.1, OneShot DeathAnimation = 10, 0.1, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + DROP[0] = Green Slime Remains,65%,1,2 + DROP[1] = Small Health Potion,5%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0]. Order is: # Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse) #ANIMATION[0] = 6, 0.1, Repeat @@ -49,6 +53,10 @@ Monsters ShootAnimation = 10, 0.1, Repeat DeathAnimation = 10, 0.1, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + DROP[0] = Green Slime Remains,65%,1,2 + DROP[1] = Small Health Potion,5%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0] #ANIMATION[0] = MY_NEW_ANIMATION } @@ -74,6 +82,10 @@ Monsters ShootAnimation = 10, 0.1, OneShot DeathAnimation = 10, 0.1, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + DROP[0] = Green Slime Remains,65%,1,2 + DROP[1] = Small Health Potion,5%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0] #ANIMATION[0] = MY_NEW_ANIMATION } @@ -99,6 +111,9 @@ Monsters ShootAnimation = 10, 0.1, OneShot DeathAnimation = 10, 0.1, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + #DROP[0] = Bandages,30%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0] #ANIMATION[0] = MY_NEW_ANIMATION } @@ -124,6 +139,9 @@ Monsters ShootAnimation = 5, 0.1, OneShot DeathAnimation = 5, 0.2, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + DROP[0] = Bandages,30%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0] #ANIMATION[0] = MY_NEW_ANIMATION } @@ -150,6 +168,9 @@ Monsters ShootAnimation = 10, 0.1, OneShot DeathAnimation = 10, 0.1, OneShot + # Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity + #DROP[0] = Bandages,30%,1,1 + #Additional custom animations go down below. Start with ANIMATION[0] ANIMATION[0] = monsters/Slime King - Cast.png } diff --git a/Crawler/assets/config/items/ItemDatabase.txt b/Crawler/assets/config/items/ItemDatabase.txt index 66786956..a3f551bf 100644 --- a/Crawler/assets/config/items/ItemDatabase.txt +++ b/Crawler/assets/config/items/ItemDatabase.txt @@ -164,4 +164,14 @@ ItemDatabase Description = The remains of a red slime. It stares at you intently. ItemCategory = Materials } + Logs + { + Description = A small unrefined pile of logs. + ItemCategory = Materials + } + Green Gemstone + { + Description = Radiating with energy from the forest, it is used to refine stronger equipment. + ItemCategory = Materials + } } \ No newline at end of file diff --git a/Crawler/assets/items/Green Gemstone.png b/Crawler/assets/items/Green Gemstone.png new file mode 100644 index 00000000..15e649ec Binary files /dev/null and b/Crawler/assets/items/Green Gemstone.png differ diff --git a/Crawler/assets/items/Logs.png b/Crawler/assets/items/Logs.png new file mode 100644 index 00000000..d358ffb8 Binary files /dev/null and b/Crawler/assets/items/Logs.png differ