🚸Rebalanded fight to make it more likely to win

feature/night_to_day
jonathan 2 months ago
parent b205e45096
commit 073a74bb22

@ -4,11 +4,8 @@ using Babushka.scripts.CSharp.Common.Util;
namespace Babushka.scripts.CSharp.Common.Fight.Actions; 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<float, Func<bool>> GetAnimationEnd() public override Variant<float, Func<bool>> GetAnimationEnd()
{ {
return 1; return 1;
@ -21,7 +18,7 @@ public class BlobAttackAction : FighterAction
public override void ExecuteAction() public override void ExecuteAction()
{ {
FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-Damage); FightWorld.Instance.allyFighters.vesnaFighter.AddHealth(-damage);
} }
public override async Task AnimateAction(AllFightersVisual allFightersVisual) public override async Task AnimateAction(AllFightersVisual allFightersVisual)
@ -34,7 +31,7 @@ public class BlobAttackAction : FighterAction
await currentFighterVisual.AnimatePosToTarget(targetFighterVisual); await currentFighterVisual.AnimatePosToTarget(targetFighterVisual);
_ = targetFighterVisual.AnimateHit(); _ = targetFighterVisual.AnimateHit();
targetFighterVisual.SpawnDamageIndicatorNumber(Damage); targetFighterVisual.SpawnDamageIndicatorNumber(damage);
await currentFighterVisual.AnimatePosToBase(); await currentFighterVisual.AnimatePosToBase();
} }
} }

@ -7,7 +7,7 @@ public class AllyFighters
public FightWorld.Fighter vesnaFighter = new() public FightWorld.Fighter vesnaFighter = new()
{ {
type = FightWorld.Fighter.Type.Vesna, type = FightWorld.Fighter.Type.Vesna,
maxHealth = 20, maxHealth = 60,
availableActions = availableActions =
[ [
new AllyAttackAction() new AllyAttackAction()

@ -133,7 +133,7 @@ public partial class FightWorld : Node
{ {
var enemyGroups = new List<FighterGroup>(); var enemyGroups = new List<FighterGroup>();
var enemyGroupCount = GD.RandRange(1, 3); var enemyGroupCount = GD.RandRange(1, 2);
for (var i = 0; i < enemyGroupCount; i++) for (var i = 0; i < enemyGroupCount; i++)
{ {
@ -150,7 +150,7 @@ public partial class FightWorld : Node
fighters = [] fighters = []
}; };
var enemyCount = GD.RandRange(1, 3); var enemyCount = GD.RandRange(2, 3);
for (var i = 0; i < enemyCount; i++) for (var i = 0; i < enemyCount; i++)
{ {
@ -178,10 +178,10 @@ public partial class FightWorld : Node
{ {
type = type, type = type,
health = null, health = null,
maxHealth = 12, maxHealth = GD.RandRange(8, 20),
availableActions = availableActions =
[ [
new BlobAttackAction() new BlobAttackAction(GD.RandRange(2, 5))
] ]
}; };

Loading…
Cancel
Save