Skip to content

Commit

Permalink
version 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrizziDerKek authored Aug 29, 2024
1 parent d1a30b1 commit 29c187f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
10 changes: 10 additions & 0 deletions BSR_Client/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ public partial class MainWindow
private bool LockedItems = false;
private EDebugMode DebugMode = EDebugMode.None;
private string ItemCloneTarget = "";
private int NCigs = 0;
private int NBeers = 0;
private int NHeros = 0;
private int NMags = 0;
private int NTrash = 0;
private int NDamage = 0;
private string GameVersion = "";

public string GetGameVersion() => GameVersion;
Expand Down Expand Up @@ -169,6 +175,8 @@ private class SoundLib
public MediaPlayer Gunpowder = new MediaPlayer() { Volume = 1.0 };
public MediaPlayer Bullet = new MediaPlayer() { Volume = 1.0 };
public MediaPlayer Trashbin = new MediaPlayer() { Volume = 1.0 };
public MediaPlayer Heroine = new MediaPlayer() { Volume = 1.0 };
public MediaPlayer Katana = new MediaPlayer() { Volume = 1.0 };

public void Media_Ended(object sender, EventArgs e)
{
Expand Down Expand Up @@ -198,6 +206,8 @@ public SoundLib()
Gunpowder.Open(new Uri("sounds/bsr_gunpowder.wav", UriKind.Relative));
Bullet.Open(new Uri("sounds/bsr_bullet.wav", UriKind.Relative));
Trashbin.Open(new Uri("sounds/bsr_trashbin.wav", UriKind.Relative));
Heroine.Open(new Uri("sounds/bsr_heroine.wav", UriKind.Relative));
Katana.Open(new Uri("sounds/bsr_katana.wav", UriKind.Relative));

Title.MediaEnded += Media_Ended;
Background1.MediaEnded += Media_Ended;
Expand Down
40 changes: 40 additions & 0 deletions BSR_Client/Logic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public void UpdateLives(string player, int lives, bool set, bool lose, bool sync
}
it++;
}
if (player == MyName && lose)
NDamage += lives;
if (player == MyName && GetHealth() <= 0)
{
Dead();
Expand Down Expand Up @@ -497,6 +499,24 @@ public EItem UseItem(string slot, bool sync)
return EItem.Nothing;
if (Enum.TryParse(GetItemType(it), out EItem item))
{
switch (item)
{
case EItem.Cigarettes:
NCigs++;
break;
case EItem.Beer:
NBeers++;
break;
case EItem.Heroine:
NHeros++;
break;
case EItem.Magazine:
NMags++;
break;
case EItem.Trashbin:
NTrash++;
break;
}
if (sync)
{
Announce("You used " + item.ToString());
Expand Down Expand Up @@ -651,6 +671,14 @@ public void PlaySfx(EItem item)
Sound.Trashbin.Position = TimeSpan.Zero;
Sound.Trashbin.Play();
break;
case EItem.Heroine:
Sound.Heroine.Position = TimeSpan.Zero;
Sound.Heroine.Play();
break;
case EItem.Katana:
Sound.Katana.Position = TimeSpan.Zero;
Sound.Katana.Play();
break;
}
}

Expand Down Expand Up @@ -735,5 +763,17 @@ public string GetPlayerFromSlot(int slotId)
return null;
return (text as TextBlock).Text;
}

public int GetScore()
{
int score = 70000;
score -= (NDamage / 5) * 2000;
score -= NCigs * 220;
score -= NBeers * 495;
score -= NHeros * 445;
score -= NMags * 350;
score -= NTrash * 380;
return score;
}
}
}
4 changes: 2 additions & 2 deletions BSR_Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.1")]
[assembly: AssemblyFileVersion("1.5.1")]
[assembly: AssemblyVersion("1.5.2")]
[assembly: AssemblyFileVersion("1.5.2")]

0 comments on commit 29c187f

Please sign in to comment.