diff --git a/Zennysoft.Game.Ma.Implementation/Components/ElementType.cs b/Zennysoft.Game.Ma.Implementation/Components/ElementType.cs index 55976678..ce2bbf28 100644 --- a/Zennysoft.Game.Ma.Implementation/Components/ElementType.cs +++ b/Zennysoft.Game.Ma.Implementation/Components/ElementType.cs @@ -8,7 +8,7 @@ public enum ElementType Hydric, Igneous, Ferrum, - Holy, - Curse, + Sankta, + Shura, All } diff --git a/Zennysoft.Game.Ma.Implementation/Entity/ElementalResistanceSet.cs b/Zennysoft.Game.Ma.Implementation/Entity/ElementalResistanceSet.cs index cae2b422..33070fb8 100644 --- a/Zennysoft.Game.Ma.Implementation/Entity/ElementalResistanceSet.cs +++ b/Zennysoft.Game.Ma.Implementation/Entity/ElementalResistanceSet.cs @@ -19,8 +19,8 @@ namespace Zennysoft.Ma.Adapter.Entity { ElementType.Igneous, igneousResistance }, { ElementType.Ferrum, ferrumResistance }, { ElementType.Telluric, telluricResistance }, - { ElementType.Holy, holyResistance }, - { ElementType.Curse, curseResistance }, + { ElementType.Sankta, holyResistance }, + { ElementType.Shura, curseResistance }, { ElementType.All, aeolicResistance + hydricResistance + igneousResistance + ferrumResistance + telluricResistance + holyResistance + curseResistance }, }; } @@ -33,8 +33,8 @@ namespace Zennysoft.Ma.Adapter.Entity left.ElementalResistance[ElementType.Igneous] + right.ElementalResistance[ElementType.Igneous], left.ElementalResistance[ElementType.Ferrum] + right.ElementalResistance[ElementType.Ferrum], left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric], - left.ElementalResistance[ElementType.Holy] + right.ElementalResistance[ElementType.Holy], - left.ElementalResistance[ElementType.Curse] + right.ElementalResistance[ElementType.Curse]); + left.ElementalResistance[ElementType.Sankta] + right.ElementalResistance[ElementType.Sankta], + left.ElementalResistance[ElementType.Shura] + right.ElementalResistance[ElementType.Shura]); } } } diff --git a/Zennysoft.Game.Ma.Implementation/Quest/SarcoData.cs b/Zennysoft.Game.Ma.Implementation/Quest/SarcoData.cs index cba3f2bc..8b90d3f3 100644 --- a/Zennysoft.Game.Ma.Implementation/Quest/SarcoData.cs +++ b/Zennysoft.Game.Ma.Implementation/Quest/SarcoData.cs @@ -6,6 +6,24 @@ namespace Zennysoft.Ma.Adapter; [Meta, Id("sarco_data")] public partial record SarcoData { + [Save("aeolic_sarco")] + public bool AeolicSarcoAcquired { get; set; } = false; + [Save("igneous_sarco")] public bool IgneousSarcoAcquired { get; set; } = false; + + [Save("telluric_sarco")] + public bool TelluricSarcoAcquired { get; set; } = false; + + [Save("hydric_sarco")] + public bool HydricSarcoAcquired { get; set; } = false; + + [Save("ferrum_sarco")] + public bool FerrumSarcoAcquired { get; set; } = false; + + [Save("sankta_sarco")] + public bool SanktaSarcoAcquired { get; set; } = false; + + [Save("shura_sarco")] + public bool ShuraSarcoAcquired { get; set; } = false; } diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs b/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs index 906da365..9382042b 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs @@ -74,7 +74,7 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView FlameHitAnimation.Stop(); FlameHitAnimation.Play("FireHit"); } - else if (elementType == ElementType.Holy) + else if (elementType == ElementType.Sankta) { if (HolyHitAnimation.IsPlaying()) HolyHitAnimation.Stop(); @@ -86,7 +86,7 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView WindHitAnimation.Stop(); WindHitAnimation.Play("WindHit"); } - else if (elementType == ElementType.Curse) + else if (elementType == ElementType.Shura) { if (CurseHitAnimation.IsPlaying()) CurseHitAnimation.Stop(); diff --git a/Zennysoft.Game.Ma/src/game/Game.cs b/Zennysoft.Game.Ma/src/game/Game.cs index 93a5e262..ec5d3a27 100644 --- a/Zennysoft.Game.Ma/src/game/Game.cs +++ b/Zennysoft.Game.Ma/src/game/Game.cs @@ -115,7 +115,13 @@ public partial class Game : Node3D, IGame }, SarcoData = new SarcoData() { + AeolicSarcoAcquired = SarcoData.AeolicSarcoAcquired, IgneousSarcoAcquired = SarcoData.IgneousSarcoAcquired, + TelluricSarcoAcquired = SarcoData.TelluricSarcoAcquired, + HydricSarcoAcquired = SarcoData.HydricSarcoAcquired, + FerrumSarcoAcquired = SarcoData.FerrumSarcoAcquired, + SanktaSarcoAcquired = SarcoData.SanktaSarcoAcquired, + ShuraSarcoAcquired = SarcoData.ShuraSarcoAcquired, } }; return gameData; diff --git a/Zennysoft.Game.Ma/src/map/Placeables/Sarco.cs b/Zennysoft.Game.Ma/src/map/Placeables/Sarco.cs index 11a059d3..1c6f36f5 100644 --- a/Zennysoft.Game.Ma/src/map/Placeables/Sarco.cs +++ b/Zennysoft.Game.Ma/src/map/Placeables/Sarco.cs @@ -43,7 +43,7 @@ public partial class Sarco : Node3D public void OnResolved() { - _interactionComplete = _game.SarcoData.IgneousSarcoAcquired; + _interactionComplete = GetSaveDataByAffinity(); if (_interactionComplete) ShowFlower(); } @@ -71,7 +71,7 @@ public partial class Sarco : Node3D { GetTree().Paused = false; _interactionComplete = true; - _game.SarcoData.IgneousSarcoAcquired = true; + SetSaveDataByAffinity(); await _game.Save(); } @@ -84,4 +84,42 @@ public partial class Sarco : Node3D { _isInInteractZone = false; } + + private bool GetSaveDataByAffinity() + { + if (Affinity == ElementType.Aeolic) + return _game.SarcoData.AeolicSarcoAcquired; + if (Affinity == ElementType.Igneous) + return _game.SarcoData.IgneousSarcoAcquired; + if (Affinity == ElementType.Telluric) + return _game.SarcoData.TelluricSarcoAcquired; + if (Affinity == ElementType.Hydric) + return _game.SarcoData.HydricSarcoAcquired; + if (Affinity == ElementType.Ferrum) + return _game.SarcoData.FerrumSarcoAcquired; + if (Affinity == ElementType.Sankta) + return _game.SarcoData.SanktaSarcoAcquired; + if (Affinity == ElementType.Shura) + return _game.SarcoData.ShuraSarcoAcquired; + + return false; + } + + private void SetSaveDataByAffinity() + { + if (Affinity == ElementType.Aeolic) + _game.SarcoData.AeolicSarcoAcquired = true; + if (Affinity == ElementType.Igneous) + _game.SarcoData.IgneousSarcoAcquired = true; + if (Affinity == ElementType.Telluric) + _game.SarcoData.TelluricSarcoAcquired = true; + if (Affinity == ElementType.Hydric) + _game.SarcoData.HydricSarcoAcquired = true; + if (Affinity == ElementType.Ferrum) + _game.SarcoData.FerrumSarcoAcquired = true; + if (Affinity == ElementType.Sankta) + _game.SarcoData.SanktaSarcoAcquired = true; + if (Affinity == ElementType.Shura) + _game.SarcoData.ShuraSarcoAcquired = true; + } } diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/Overworld.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/Overworld.tscn index e4b31b2f..61da4b13 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/Overworld.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/Overworld.tscn @@ -3017,10 +3017,6 @@ transform = Transform3D(0.921192, 0.0644309, 0.329915, -0.635509, 0.0745904, 0.4 mesh = SubResource("ArrayMesh_pxsmp") skeleton = NodePath("") -[node name="Sarco2" parent="." instance=ExtResource("59_mic3u")] -transform = Transform3D(-0.561658, 0, -0.196382, 0, 0.595, 0, 0.196382, 0, -0.561658, -328.661, 2.6811, 27.9079) -Affinity = 4 - [editable path="Node3D/Overworld Re-Scaled (Missing Distance Objects)"] [editable path="Actors/Rat"] [editable path="Actors/Clalo"] diff --git a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs index f4d02c5f..984ba46a 100644 --- a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs +++ b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs @@ -102,7 +102,7 @@ public partial class InGameUI : Control, IInGameUI case ElementType.Telluric: TelluricImg.Visible = true; break; - case ElementType.Curse: + case ElementType.Shura: SanktaImg.Visible = true; break; }