🚸Rebalanded fight to make it more likely to win
This commit is contained in:
@@ -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<float, Func<bool>> 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();
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public class AllyFighters
|
||||
public FightWorld.Fighter vesnaFighter = new()
|
||||
{
|
||||
type = FightWorld.Fighter.Type.Vesna,
|
||||
maxHealth = 20,
|
||||
maxHealth = 60,
|
||||
availableActions =
|
||||
[
|
||||
new AllyAttackAction()
|
||||
|
||||
@@ -133,7 +133,7 @@ public partial class FightWorld : Node
|
||||
{
|
||||
var enemyGroups = new List<FighterGroup>();
|
||||
|
||||
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))
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user