From 073a74bb2260d46e43748066a51ba579e2e8ef46 Mon Sep 17 00:00:00 2001 From: jonathan Date: Tue, 25 Nov 2025 17:32:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8Rebalanded=20fight=20to=20make=20it?= =?UTF-8?q?=20more=20likely=20to=20win?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/CSharp/Common/Fight/Actions/BlobAttackAction.cs | 9 +++------ scripts/CSharp/Common/Fight/AllyFighters.cs | 2 +- scripts/CSharp/Common/Fight/FightWorld.cs | 8 ++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/scripts/CSharp/Common/Fight/Actions/BlobAttackAction.cs b/scripts/CSharp/Common/Fight/Actions/BlobAttackAction.cs index fa3da73..f0e7f90 100644 --- a/scripts/CSharp/Common/Fight/Actions/BlobAttackAction.cs +++ b/scripts/CSharp/Common/Fight/Actions/BlobAttackAction.cs @@ -4,11 +4,8 @@ using Babushka.scripts.CSharp.Common.Util; namespace Babushka.scripts.CSharp.Common.Fight.Actions; -public class BlobAttackAction : FighterAction +public class BlobAttackAction(int damage = 3) : FighterAction { - // settings - private const int Damage = 3; - public override Variant> GetAnimationEnd() { return 1; @@ -21,7 +18,7 @@ public class BlobAttackAction : FighterAction public override void ExecuteAction() { - FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-Damage); + FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-damage); } public override async Task AnimateAction(AllFightersVisual allFightersVisual) @@ -34,7 +31,7 @@ public class BlobAttackAction : FighterAction await currentFighterVisual.AnimatePosToTarget(targetFighterVisual); _ = targetFighterVisual.AnimateHit(); - targetFighterVisual.SpawnDamageIndicatorNumber(Damage); + targetFighterVisual.SpawnDamageIndicatorNumber(damage); await currentFighterVisual.AnimatePosToBase(); } } \ No newline at end of file diff --git a/scripts/CSharp/Common/Fight/AllyFighters.cs b/scripts/CSharp/Common/Fight/AllyFighters.cs index 765a9cb..2881ee7 100644 --- a/scripts/CSharp/Common/Fight/AllyFighters.cs +++ b/scripts/CSharp/Common/Fight/AllyFighters.cs @@ -7,7 +7,7 @@ public class AllyFighters public FightWorld.Fighter vesnaFighter = new() { type = FightWorld.Fighter.Type.Vesna, - maxHealth = 20, + maxHealth = 60, availableActions = [ new AllyAttackAction() diff --git a/scripts/CSharp/Common/Fight/FightWorld.cs b/scripts/CSharp/Common/Fight/FightWorld.cs index be34387..a6ec8d4 100644 --- a/scripts/CSharp/Common/Fight/FightWorld.cs +++ b/scripts/CSharp/Common/Fight/FightWorld.cs @@ -133,7 +133,7 @@ public partial class FightWorld : Node { var enemyGroups = new List(); - var enemyGroupCount = GD.RandRange(1, 3); + var enemyGroupCount = GD.RandRange(1, 2); for (var i = 0; i < enemyGroupCount; i++) { @@ -150,7 +150,7 @@ public partial class FightWorld : Node fighters = [] }; - var enemyCount = GD.RandRange(1, 3); + var enemyCount = GD.RandRange(2, 3); for (var i = 0; i < enemyCount; i++) { @@ -178,10 +178,10 @@ public partial class FightWorld : Node { type = type, health = null, - maxHealth = 12, + maxHealth = GD.RandRange(8, 20), availableActions = [ - new BlobAttackAction() + new BlobAttackAction(GD.RandRange(2, 5)) ] };