-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
id116539
committed
Sep 10, 2022
1 parent
7f8ba4f
commit 50f1a95
Showing
12 changed files
with
1,057 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.3.32825.248 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Phasmophobia Item and Map Randomizer", "Phasmophobia Item and Map Randomizer\Phasmophobia Item and Map Randomizer.csproj", "{85E54E78-D8A1-4CBD-AE74-26FE3C1A7B70}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{85E54E78-D8A1-4CBD-AE74-26FE3C1A7B70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{85E54E78-D8A1-4CBD-AE74-26FE3C1A7B70}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{85E54E78-D8A1-4CBD-AE74-26FE3C1A7B70}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{85E54E78-D8A1-4CBD-AE74-26FE3C1A7B70}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {7239666D-E8CC-4019-8B7E-C52BEA032585} | ||
EndGlobalSection | ||
EndGlobal |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
namespace Phasmophobia_Item_and_Map_Randomizer | ||
{ | ||
public partial class Form1 : Form | ||
{ | ||
private int mode = 0; | ||
private int difficulty = 1; | ||
private bool lightAllowed = true; | ||
private int maxEvidence = 4; | ||
private int itemsPerPlayer = 4; | ||
private int players = 4; | ||
private bool guaranteeLight = false; | ||
|
||
private static List<Item> player1_list = new List<Item>(); | ||
private static List<Item> player2_list = new List<Item>(); | ||
private static List<Item> player3_list = new List<Item>(); | ||
private static List<Item> player4_list = new List<Item>(); | ||
public static int ingameDifficulty = 0; | ||
|
||
string[] maps = { "Tanglewood Street House", "Ridgeview Road House", "Bleasdale Farmhouse", "Edgefield Street House", "Grafton Farmhouse", | ||
"Willow Street House", "Brownstone High School", "Maple Lodge Campsite", "Prison", "Asylum" }; | ||
|
||
public static void SetPlayerItems(int player, Item i) | ||
{ | ||
if (player == 1) player1_list.Add(i); | ||
else if (player == 2) player2_list.Add(i); | ||
else if (player == 3) player3_list.Add(i); | ||
else if (player == 4) player4_list.Add(i); | ||
} | ||
|
||
public Form1() | ||
{ | ||
InitializeComponent(); | ||
ToolTip modeTip = new ToolTip(); | ||
modeTip.ToolTipIcon = ToolTipIcon.Info; | ||
modeTip.IsBalloon = true; | ||
modeTip.ShowAlways = true; | ||
modeTip.SetToolTip(label7, "Default Mode: No Restrictions by default\n" + | ||
"No Lights: No Lightsources except for Lighters and Glowsticks\n" + | ||
"No Evidence: No Items that gather active evidence towards the ghost\n" + | ||
"Nightmare: Combination of No Lights and No Evidence. WARNING: HARD!!"); | ||
|
||
selectMode.Items.Add("Default"); | ||
selectMode.Items.Add("No Lights"); | ||
selectMode.Items.Add("No Evidence"); | ||
selectMode.Items.Add("Nightmare"); | ||
|
||
ToolTip diffTip = new ToolTip(); | ||
diffTip.ToolTipIcon = ToolTipIcon.Info; | ||
diffTip.IsBalloon = true; | ||
diffTip.ShowAlways = true; | ||
diffTip.SetToolTip(label8, "Modifier for the Ingame Difficulty Level. Try it out ;)"); | ||
|
||
selectDiff.Items.Add("Easy"); | ||
selectDiff.Items.Add("Medium"); | ||
selectDiff.Items.Add("Hard"); | ||
|
||
selectLight.Items.Add("Yes"); | ||
selectLight.Items.Add("No"); | ||
|
||
selectMaxEvidence.Items.Add("1"); | ||
selectMaxEvidence.Items.Add("2"); | ||
selectMaxEvidence.Items.Add("3"); | ||
selectMaxEvidence.Items.Add("4"); | ||
|
||
selectItems.Items.Add("1"); | ||
selectItems.Items.Add("2"); | ||
selectItems.Items.Add("3"); | ||
selectItems.Items.Add("4"); | ||
|
||
selectPlayers.Items.Add("1"); | ||
selectPlayers.Items.Add("2"); | ||
selectPlayers.Items.Add("3"); | ||
selectPlayers.Items.Add("4"); | ||
|
||
|
||
|
||
} | ||
|
||
public void RunRando() | ||
{ | ||
player1_list.Clear(); | ||
player2_list.Clear(); | ||
player3_list.Clear(); | ||
player4_list.Clear(); | ||
|
||
Program.RunRandomizer(mode, difficulty, lightAllowed, maxEvidence, itemsPerPlayer, players, guaranteeLight); | ||
|
||
player1_textbox.Clear(); | ||
player2_textbox.Clear(); | ||
player3_textbox.Clear(); | ||
player4_textbox.Clear(); | ||
|
||
|
||
#region Player1 | ||
player1_textbox.AppendText("Item 1: " + Environment.NewLine + player1_list[0].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 1) player1_textbox.AppendText("Item 2: " + Environment.NewLine + player1_list[1].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 2) player1_textbox.AppendText("Item 3: " + Environment.NewLine + player1_list[2].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 3) player1_textbox.AppendText("Item 4: " + Environment.NewLine + player1_list[3].Name + Environment.NewLine); | ||
#endregion | ||
|
||
#region Player2 | ||
if (players > 1) | ||
{ | ||
player2_textbox.AppendText("Item 1: " + Environment.NewLine + player2_list[0].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 1) player2_textbox.AppendText("Item 2: " + Environment.NewLine + player2_list[1].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 2) player2_textbox.AppendText("Item 3: " + Environment.NewLine + player2_list[2].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 3) player2_textbox.AppendText("Item 4: " + Environment.NewLine + player2_list[3].Name + Environment.NewLine); | ||
} | ||
#endregion | ||
|
||
#region Player3 | ||
if (players > 2) | ||
{ | ||
player3_textbox.AppendText("Item 1: " + Environment.NewLine + player3_list[0].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 1) player3_textbox.AppendText("Item 2: " + Environment.NewLine + player3_list[1].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 2) player3_textbox.AppendText("Item 3: " + Environment.NewLine + player3_list[2].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 3) player3_textbox.AppendText("Item 4: " + Environment.NewLine + player3_list[3].Name + Environment.NewLine); | ||
} | ||
#endregion | ||
|
||
#region Player4 | ||
if (players > 3) | ||
{ | ||
player4_textbox.AppendText("Item 1: " + Environment.NewLine + player4_list[0].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 1) player4_textbox.AppendText("Item 2: " + Environment.NewLine + player4_list[1].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 2) player4_textbox.AppendText("Item 3: " + Environment.NewLine + player4_list[2].Name + Environment.NewLine); | ||
if (itemsPerPlayer > 3) player4_textbox.AppendText("Item 4: " + Environment.NewLine + player4_list[3].Name + Environment.NewLine); | ||
} | ||
#endregion | ||
} | ||
|
||
private void button1_Click(object sender, EventArgs e) | ||
{ | ||
if (selectMode.Text == "Default") mode = 0; | ||
else if (selectMode.Text == "No Lights") mode = 1; | ||
else if (selectMode.Text == "No Evidence") mode = 2; | ||
else if (selectMode.Text == "Nightmare") mode = 3; | ||
else if (selectMode.Text == "Select Mode") mode = 0; | ||
|
||
if (selectDiff.Text == "Easy") difficulty = 0; | ||
else if (selectDiff.Text == "Medium") difficulty = 1; | ||
else if (selectDiff.Text == "Hard") difficulty = 2; | ||
else difficulty = 0; | ||
|
||
if (selectLight.Text == "Yes") lightAllowed = true; | ||
else lightAllowed = false; | ||
|
||
guaranteeLight = checkLight.Checked; | ||
|
||
if (selectMaxEvidence.Text == "1") maxEvidence = 1; | ||
else if (selectMaxEvidence.Text == "2") maxEvidence = 2; | ||
else if (selectMaxEvidence.Text == "3") maxEvidence = 3; | ||
else if (selectMaxEvidence.Text == "4") maxEvidence = 4; | ||
else maxEvidence = 4; | ||
|
||
if (selectItems.Text == "1") itemsPerPlayer = 1; | ||
else if (selectItems.Text == "2") itemsPerPlayer = 2; | ||
else if (selectItems.Text == "3") itemsPerPlayer= 3; | ||
else if (selectItems.Text == "4") itemsPerPlayer = 4; | ||
else itemsPerPlayer = 4; | ||
|
||
if (selectPlayers.Text == "1") players = 1; | ||
else if (selectPlayers.Text == "2") players = 2; | ||
else if (selectPlayers.Text == "3") players = 3; | ||
else if (selectPlayers.Text == "4") players = 4; | ||
else players = 4; | ||
|
||
if (ingameDifficulty == 0) difficulty_textbox.Text = "Amateur"; | ||
if (ingameDifficulty == 1) difficulty_textbox.Text = "Intermediate"; | ||
if (ingameDifficulty == 2) difficulty_textbox.Text = "Professional"; | ||
if (ingameDifficulty == 3) difficulty_textbox.Text = "Nightmare"; | ||
|
||
map_textbox.Text = maps[Randomizer.getMap()]; | ||
|
||
RunRando(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<root> | ||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | ||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | ||
<xsd:element name="root" msdata:IsDataSet="true"> | ||
<xsd:complexType> | ||
<xsd:choice maxOccurs="unbounded"> | ||
<xsd:element name="metadata"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" use="required" type="xsd:string" /> | ||
<xsd:attribute name="type" type="xsd:string" /> | ||
<xsd:attribute name="mimetype" type="xsd:string" /> | ||
<xsd:attribute ref="xml:space" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="assembly"> | ||
<xsd:complexType> | ||
<xsd:attribute name="alias" type="xsd:string" /> | ||
<xsd:attribute name="name" type="xsd:string" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="data"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | ||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | ||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | ||
<xsd:attribute ref="xml:space" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
<xsd:element name="resheader"> | ||
<xsd:complexType> | ||
<xsd:sequence> | ||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | ||
</xsd:sequence> | ||
<xsd:attribute name="name" type="xsd:string" use="required" /> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:choice> | ||
</xsd:complexType> | ||
</xsd:element> | ||
</xsd:schema> | ||
<resheader name="resmimetype"> | ||
<value>text/microsoft-resx</value> | ||
</resheader> | ||
<resheader name="version"> | ||
<value>2.0</value> | ||
</resheader> | ||
<resheader name="reader"> | ||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
<resheader name="writer"> | ||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | ||
</resheader> | ||
</root> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Phasmophobia_Item_and_Map_Randomizer | ||
{ | ||
public class Item | ||
{ | ||
#region fields | ||
private readonly bool _isEvidence; | ||
private readonly bool _isLight; | ||
private readonly string _name; | ||
private readonly int _max; | ||
|
||
#region properties | ||
public bool IsEvidence | ||
{ | ||
get { return _isEvidence; } | ||
} | ||
public bool IsLight | ||
{ | ||
get { return _isLight; } | ||
} | ||
public string Name | ||
{ | ||
get { return _name; } | ||
} | ||
public int Max | ||
{ | ||
get { return _max; } | ||
} | ||
#endregion | ||
|
||
#endregion | ||
|
||
public Item(string name, bool evidence, bool light, int max) | ||
{ | ||
_isEvidence = evidence; | ||
_isLight = light; | ||
_name = name; | ||
_max = max; | ||
} | ||
|
||
public new void ToString() | ||
{ | ||
Program.Log($"Item Name: {this._name, -20} Is a Lightsource: {_isLight, -10} Is an Evidence item: {_isEvidence, -10} Max number in game: {_max, -2}"); | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Phasmophobia Item and Map Randomizer/Phasmophobia Item and Map Randomizer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<RootNamespace>Phasmophobia_Item_and_Map_Randomizer</RootNamespace> | ||
<Nullable>enable</Nullable> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<SignAssembly>False</SignAssembly> | ||
<ApplicationIcon>icon.ico</ApplicationIcon> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="icon.ico" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.