From 20ad05f4ecf8dc16b24ebb8318ee904b52c93f42 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 1 May 2020 20:47:54 +0300 Subject: Added sheep, they have 8 health, they drop mutton steak, 4 energy replenish points. Changed values for easy difficulty and beef steak. Removed useless methods from MobStatsController. Updated executable. --- Mundus Build 01-05-2020 No2.exe | Bin 1652736 -> 0 bytes Mundus Build 01-05-2020 No3.exe | Bin 0 -> 1661952 bytes Mundus/Data/Difficulty.cs | 2 +- Mundus/Data/Windows/WI.cs | 2 +- Mundus/Icons/Land/Materials/L_mutton_steak.png | Bin 0 -> 4339 bytes Mundus/Icons/Land/Mobs/L_sheep.png | Bin 0 -> 4339 bytes Mundus/Icons/Project files/L_mutton_steak.xcf | Bin 0 -> 6416 bytes Mundus/Icons/Project files/L_sheep.xcf | Bin 0 -> 12622 bytes Mundus/Mundus.csproj | 6 ++-- .../Generators/LandSuperLayerGenerator.cs | 11 +++++-- .../Service/Tiles/Items/Presets/MaterialPresets.cs | 7 ++++- .../Tiles/Mobs/Controllers/MobStatsController.cs | 33 ++------------------- .../Service/Tiles/Mobs/LandMobs/LandMobsPresets.cs | 4 +++ .../Views/Windows/GameWindows/SmallGameWindow.cs | 5 ++-- Mundus/gtk-gui/generated.cs | 4 +++ Mundus/gtk-gui/gui.stetic | 18 ++++++++--- 16 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 Mundus Build 01-05-2020 No2.exe create mode 100644 Mundus Build 01-05-2020 No3.exe create mode 100644 Mundus/Icons/Land/Materials/L_mutton_steak.png create mode 100644 Mundus/Icons/Land/Mobs/L_sheep.png create mode 100644 Mundus/Icons/Project files/L_mutton_steak.xcf create mode 100644 Mundus/Icons/Project files/L_sheep.xcf diff --git a/Mundus Build 01-05-2020 No2.exe b/Mundus Build 01-05-2020 No2.exe deleted file mode 100644 index 6308eaa..0000000 Binary files a/Mundus Build 01-05-2020 No2.exe and /dev/null differ diff --git a/Mundus Build 01-05-2020 No3.exe b/Mundus Build 01-05-2020 No3.exe new file mode 100644 index 0000000..f9b9ab7 Binary files /dev/null and b/Mundus Build 01-05-2020 No3.exe differ diff --git a/Mundus/Data/Difficulty.cs b/Mundus/Data/Difficulty.cs index 5bef4af..3e79ecc 100644 --- a/Mundus/Data/Difficulty.cs +++ b/Mundus/Data/Difficulty.cs @@ -2,7 +2,7 @@ namespace Mundus.Data { public static class Difficulty { public const int Peaceful = -10; - public const int Easy = 0; + public const int Easy = -5; public const int Normal = 10; public const int Hard = 40; public const int Insane = 80; diff --git a/Mundus/Data/Windows/WI.cs b/Mundus/Data/Windows/WI.cs index 6e80f44..70cb2bd 100644 --- a/Mundus/Data/Windows/WI.cs +++ b/Mundus/Data/Windows/WI.cs @@ -2,7 +2,7 @@ namespace Mundus.Data.Windows { public static class WI { //stands for Window Instances - public const string BuildName = "Build 01-05-2020 No2"; + public const string BuildName = "Build 01-05-2020 No3"; public static IGameWindow SelWin { get; set; } diff --git a/Mundus/Icons/Land/Materials/L_mutton_steak.png b/Mundus/Icons/Land/Materials/L_mutton_steak.png new file mode 100644 index 0000000..a78b293 Binary files /dev/null and b/Mundus/Icons/Land/Materials/L_mutton_steak.png differ diff --git a/Mundus/Icons/Land/Mobs/L_sheep.png b/Mundus/Icons/Land/Mobs/L_sheep.png new file mode 100644 index 0000000..089fe10 Binary files /dev/null and b/Mundus/Icons/Land/Mobs/L_sheep.png differ diff --git a/Mundus/Icons/Project files/L_mutton_steak.xcf b/Mundus/Icons/Project files/L_mutton_steak.xcf new file mode 100644 index 0000000..8cf307c Binary files /dev/null and b/Mundus/Icons/Project files/L_mutton_steak.xcf differ diff --git a/Mundus/Icons/Project files/L_sheep.xcf b/Mundus/Icons/Project files/L_sheep.xcf new file mode 100644 index 0000000..9a65c41 Binary files /dev/null and b/Mundus/Icons/Project files/L_sheep.xcf differ diff --git a/Mundus/Mundus.csproj b/Mundus/Mundus.csproj index 7d58d02..206e1a9 100644 --- a/Mundus/Mundus.csproj +++ b/Mundus/Mundus.csproj @@ -30,8 +30,8 @@ - - + + @@ -79,6 +79,8 @@ + + diff --git a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs index a5e4950..c83d62a 100644 --- a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs +++ b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs @@ -45,12 +45,12 @@ namespace Mundus.Service.SuperLayers.Generators { if (LI.Land.GetGroundLayerTile(col, row) != null && !atPlayerSpawnPosition) { - if (rnd.Next(0, 40 + Difficulty.SelDifficulty) == 1) { - tiles[col, row] = StructurePresets.GetALBoulder(); - } if (rnd.Next(0, 15 + Difficulty.SelDifficulty) == 1) { tiles[col, row] = StructurePresets.GetALTree(); } + else if (rnd.Next(0, 40 + Difficulty.SelDifficulty) == 1) { + tiles[col, row] = StructurePresets.GetALBoulder(); + } } } } @@ -76,6 +76,11 @@ namespace Mundus.Service.SuperLayers.Generators { tiles[col, row].YPos = col; tiles[col, row].XPos = row; } + else if (rnd.Next(0, 15 + Difficulty.SelDifficulty) == 1) { + tiles[col, row] = LandMobsPresets.GetASheep(); + tiles[col, row].YPos = col; + tiles[col, row].XPos = row; + } } } } diff --git a/Mundus/Service/Tiles/Items/Presets/MaterialPresets.cs b/Mundus/Service/Tiles/Items/Presets/MaterialPresets.cs index 56cf4f1..491513e 100644 --- a/Mundus/Service/Tiles/Items/Presets/MaterialPresets.cs +++ b/Mundus/Service/Tiles/Items/Presets/MaterialPresets.cs @@ -12,7 +12,12 @@ /// New instance public static Material GetALandBeefSteak() { - return new Material("L_beef_steak", 4); + return new Material("L_beef_steak", 5); + } + + // New instance + public static Material GetALandMuttonSteak() { + return new Material("L_mutton_steak", 4); } /// diff --git a/Mundus/Service/Tiles/Mobs/Controllers/MobStatsController.cs b/Mundus/Service/Tiles/Mobs/Controllers/MobStatsController.cs index 7e886cf..f8a5c19 100644 --- a/Mundus/Service/Tiles/Mobs/Controllers/MobStatsController.cs +++ b/Mundus/Service/Tiles/Mobs/Controllers/MobStatsController.cs @@ -5,9 +5,6 @@ using Mundus.Service.SuperLayers; namespace Mundus.Service.Tiles.Mobs.Controllers { public static class MobStatsController { - public static int GetPlayerHealth() { - return MI.Player.Health; - } /// /// Returns the stock_id of the hearth icon that must be used on the given position of the health bar @@ -17,7 +14,7 @@ namespace Mundus.Service.Tiles.Mobs.Controllers { public static string GetPlayerHearthStock(int index) { string stock_id = "hearth_0"; - int diff = GetPlayerHealth() - index * 4; + int diff = MI.Player.Health - index * 4; if (diff >= 4) stock_id = "hearth_4"; else if (diff == 1) stock_id = "hearth_1"; else if (diff == 2) stock_id = "hearth_2"; @@ -26,24 +23,6 @@ namespace Mundus.Service.Tiles.Mobs.Controllers { return stock_id; } - public static void DamagePlayer(int damagePoints) { - if (!MI.Player.TakeDamage(damagePoints)) { - //do smth - } - } - - /// - /// Heals the player (unless/until he has full health) - /// - /// Health points to heal with - public static void HealPlayer(int healthPoints) { - MI.Player.Heal(healthPoints); - } - - public static int GetPlayerEnergy() { - return (int)MI.Player.Energy; - } - /// /// Returns the stock_id of the energy icon that must be used on the given position of the energy bar /// @@ -52,7 +31,7 @@ namespace Mundus.Service.Tiles.Mobs.Controllers { public static string GetPlayerEnergyStock(int index) { string stock_id = "energy_0"; - int diff = GetPlayerEnergy() - index * 6; + int diff = (int)MI.Player.Energy - index * 6; if (diff >= 6) stock_id = "energy_6"; else if (diff == 1) stock_id = "energy_1"; else if (diff == 2) stock_id = "energy_2"; @@ -63,14 +42,6 @@ namespace Mundus.Service.Tiles.Mobs.Controllers { return stock_id; } - public static void DrainEnergyPlayer(double energyPoints) { - MI.Player.DrainEnergy(energyPoints); - } - - public static void RestoreEnergyPlayer(double energyPoints) { - MI.Player.RestoreEnergy(energyPoints); - } - /// /// Returns the name of the superlayer the player is curently on /// diff --git a/Mundus/Service/Tiles/Mobs/LandMobs/LandMobsPresets.cs b/Mundus/Service/Tiles/Mobs/LandMobs/LandMobsPresets.cs index 28eca25..ddf0daa 100644 --- a/Mundus/Service/Tiles/Mobs/LandMobs/LandMobsPresets.cs +++ b/Mundus/Service/Tiles/Mobs/LandMobs/LandMobsPresets.cs @@ -9,5 +9,9 @@ namespace Mundus.Service.Tiles.Mobs.LandMobs { public static MobTile GetACow() { return new MobTile("L_cow", 10, 1, LI.Land, 1, MaterialPresets.GetALandBeefSteak()); } + + public static MobTile GetASheep() { + return new MobTile("L_sheep", 8, 1, LI.Land, 1, MaterialPresets.GetALandMuttonSteak()); + } } } diff --git a/Mundus/Views/Windows/GameWindows/SmallGameWindow.cs b/Mundus/Views/Windows/GameWindows/SmallGameWindow.cs index e178e2a..5b1f126 100644 --- a/Mundus/Views/Windows/GameWindows/SmallGameWindow.cs +++ b/Mundus/Views/Windows/GameWindows/SmallGameWindow.cs @@ -376,8 +376,7 @@ namespace Mundus.Views.Windows { protected void OnBtnIG1Clicked(object sender, EventArgs e) { //Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[0] = LandPresets.Boulder(); - //MobStatsController.DamagePlayer(1); - MobStatsController.DrainEnergyPlayer(0.5); + //Service.Crafting.CraftingController.FindAvalableItems(); PrintMainMenu(); } @@ -385,7 +384,7 @@ namespace Mundus.Views.Windows { protected void OnBtnIG2Clicked(object sender, EventArgs e) { //Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[1] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Pickaxe, 1); //Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[0] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Axe, 1); - MobStatsController.RestoreEnergyPlayer(0.5); + //MobStatsController.HealPlayer(1); PrintMainMenu(); } diff --git a/Mundus/gtk-gui/generated.cs b/Mundus/gtk-gui/generated.cs index 3a896d9..6b13f0c 100644 --- a/Mundus/gtk-gui/generated.cs +++ b/Mundus/gtk-gui/generated.cs @@ -96,6 +96,10 @@ namespace Stetic w1.Add("energy_6", w42); global::Gtk.IconSet w43 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Materials.L_beef_steak.png")); w1.Add("L_beef_steak", w43); + global::Gtk.IconSet w44 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Mobs.L_sheep.png")); + w1.Add("L_sheep", w44); + global::Gtk.IconSet w45 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Materials.L_mutton_steak.png")); + w1.Add("L_mutton_steak", w45); w1.AddDefault(); } } diff --git a/Mundus/gtk-gui/gui.stetic b/Mundus/gtk-gui/gui.stetic index 9dd0094..d66e494 100644 --- a/Mundus/gtk-gui/gui.stetic +++ b/Mundus/gtk-gui/gui.stetic @@ -217,6 +217,16 @@ resource:Mundus.Icons.Land.Materials.L_beef_steak.png + + + resource:Mundus.Icons.Land.Mobs.L_sheep.png + + + + + resource:Mundus.Icons.Land.Materials.L_mutton_steak.png + + @@ -2655,8 +2665,8 @@ 50 50 True - TextAndIcon - + TextOnly + TESTING True @@ -2682,8 +2692,8 @@ 50 50 True - TextAndIcon - + TextOnly + TESTING True -- cgit v1.2.3