Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1018c90c25 | ||
|
|
392b1caf0a |
No files matched your search
@@ -0,0 +1,30 @@
|
||||
# Line endings: LF everywhere, on every OS, whatever core.autocrlf says.
|
||||
* text=auto eol=lf
|
||||
|
||||
# cmd.exe misreads labels and goto in LF batch files, so they stay CRLF.
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
|
||||
# Binaries: never converted, never diffed as text.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.webp binary
|
||||
*.svg text
|
||||
*.ogg binary
|
||||
*.wav binary
|
||||
*.mp3 binary
|
||||
*.ttf binary
|
||||
*.otf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.dll binary
|
||||
*.so binary
|
||||
*.dylib binary
|
||||
*.pdb binary
|
||||
*.exe binary
|
||||
*.zip binary
|
||||
*.pck binary
|
||||
*.moc3 binary
|
||||
*.res binary
|
||||
*.scn binary
|
||||
@@ -292,7 +292,7 @@ namespace Cthangover.Core.Battle
|
||||
return;
|
||||
IsDestroyed = true;
|
||||
_battleSpeedControl?.ResetToNormal();
|
||||
ClearBattle();
|
||||
ClearBattle("defeat");
|
||||
deadground?.Show();
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace Cthangover.Core.Battle
|
||||
return;
|
||||
IsDestroyed = true;
|
||||
_battleSpeedControl?.ResetToNormal();
|
||||
ClearBattle();
|
||||
ClearBattle("victory");
|
||||
winground?.Show();
|
||||
}
|
||||
|
||||
@@ -346,7 +346,13 @@ namespace Cthangover.Core.Battle
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearBattle()
|
||||
/// <summary>
|
||||
/// Stops the battle and publishes <see cref="BattleEndedEvent"/>. The
|
||||
/// outcome is passed in by the caller: both screens set
|
||||
/// <see cref="IsDestroyed"/> before clearing, so it cannot be derived
|
||||
/// from that flag (it used to be, and every battle reported "defeat").
|
||||
/// </summary>
|
||||
private void ClearBattle(string result)
|
||||
{
|
||||
BattleActionMachine?.StopMachine();
|
||||
ActiveCharacter = null;
|
||||
@@ -355,7 +361,7 @@ namespace Cthangover.Core.Battle
|
||||
OnBattleCleared?.Invoke();
|
||||
ModEventBus.Publish(new BattleEndedEvent
|
||||
{
|
||||
Result = IsDestroyed ? "defeat" : "victory",
|
||||
Result = result,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user