Compare commits

..

1 Commits

Author SHA1 Message Date
jlink 2ed9dbbc52 Vesna resets to bed after death 2025-12-16 15:34:52 +01:00
4 changed files with 9 additions and 7 deletions
@@ -12,7 +12,6 @@ public class TargetSelectActionDetail : FighterAction.FighterActionDetail
// settings
public required bool selectEnemy;
public required bool selectAlly;
public required bool aliveOnly;
public VisualRange visualRange = VisualRange.Single;
// result
@@ -13,8 +13,7 @@ public class AllyAttackAction : FighterAction
public TargetSelectActionDetail targetSelect = new()
{
selectEnemy = true,
selectAlly = false,
aliveOnly = true
selectAlly = false
};
public MinigameActionDetail minigameDetail = new();
@@ -117,13 +117,11 @@ public partial class AllFightersVisual : Node
if (targetDetail.selectEnemy)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
if (targetDetail.selectAlly)
_fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.allyFighterFormation))
.Where(kv => !targetDetail.aliveOnly || kv.Key.IsAlive())// if aliveOnly: take where IsAlive
.ForEach(kv => kv.Value.SetTargetSelectionActive(true));
}
@@ -9,9 +9,15 @@ public partial class SwitchSceneOnFightEnd : Node
public void OnFightStateEnter(FightHappening.FightState to)
{
if (to is FightHappening.FightState.PlayerWin
or FightHappening.FightState.EnemyWin)
if (to is FightHappening.FightState.PlayerWin )
_ = SwitchSceneAfterTime(2.0f);
if (to is FightHappening.FightState.EnemyWin)
{
_fightSceneSwitcher.ExitFight();
_fightSceneSwitcher.ExitFightWorld();
}
}
private async Task SwitchSceneAfterTime(float seconds)