diff --git a/src/com/wearedevs/someclicker/Main.java b/src/com/wearedevs/someclicker/Main.java index 2762ff3..553db78 100644 --- a/src/com/wearedevs/someclicker/Main.java +++ b/src/com/wearedevs/someclicker/Main.java @@ -43,7 +43,7 @@ */ public class Main extends JFrame { private static final long serialVersionUID = 1L; - public static double clicks = 0; + public static double clicks = 1000000; public static int perClick = 1; public static ArrayList mods = new ArrayList(); diff --git a/src/com/wearedevs/someclicker/cases/GetCase.java b/src/com/wearedevs/someclicker/cases/GetCase.java new file mode 100644 index 0000000..354d86a --- /dev/null +++ b/src/com/wearedevs/someclicker/cases/GetCase.java @@ -0,0 +1,42 @@ +package com.wearedevs.someclicker.cases; + +import java.awt.TrayIcon.MessageType; + +import com.wearedevs.someclicker.Main; +import com.wearedevs.someclicker.cases.cases.ClickCase; +import com.wearedevs.someclicker.cases.cases.ClickMultiplierCase; +import com.wearedevs.someclicker.cases.cases.MEMESoundCase; +import com.wearedevs.someclicker.cases.cases.MLGSoundCase; +import com.wearedevs.someclicker.cases.cases.SoundCase; +import com.wearedevs.someclicker.handlers.CaseHandler; +import com.wearedevs.someclicker.util.NotificationUtil; +import com.wearedevs.someclicker.util.PlaySound; +import com.wearedevs.someclicker.util.WeightedCollection; + +/** + * Handles When and What Case a User Should Get. + */ +public class GetCase { + public static double caseGoal = 100; + + public static void checkCases() { + if(Main.clicks >= caseGoal) { + caseGoal *= 2; + WeightedCollection w = new WeightedCollection(); + + w.add(100, new ClickCase()); + w.add(10, new ClickMultiplierCase()); + w.add(30, new SoundCase()); + w.add(20, new MLGSoundCase()); + w.add(20, new MEMESoundCase()); + + CaseHandler.unlock(w.next()); + + PlaySound.playSound("/sound/cases/get.wav"); + + //TODO: Fix + NotificationUtil.displayCaseNotif("New Case!", "You Have a New Case! Click Cases to Open It!", MessageType.INFO); + } + } +} + diff --git a/src/com/wearedevs/someclicker/cases/cases/MEMESoundCase.java b/src/com/wearedevs/someclicker/cases/cases/MEMESoundCase.java new file mode 100644 index 0000000..30e2107 --- /dev/null +++ b/src/com/wearedevs/someclicker/cases/cases/MEMESoundCase.java @@ -0,0 +1,32 @@ +package com.wearedevs.someclicker.cases.cases; + +import com.wearedevs.someclicker.cases.Case; +import com.wearedevs.someclicker.cases.CaseOutcome; +import com.wearedevs.someclicker.handlers.SoundUnlocker; +import com.wearedevs.someclicker.sound.sounds.MEME_YouNeedAWebsiteSound; +import com.wearedevs.someclicker.util.WeightedCollection; + +public class MEMESoundCase extends Case { + + public WeightedCollection getAllOutcomes() { + WeightedCollection out = new WeightedCollection(); + + //Bass + out.add(50, new CaseOutcome() { + public void onOutcome() { + SoundUnlocker.unlock(new MEME_YouNeedAWebsiteSound()); + } + + public String getName() { + return "You Need a Website Sound"; + } + }); + + return out; + } + + public String getName() { + return "Meme Sound Case"; + } + +} diff --git a/src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java b/src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java new file mode 100644 index 0000000..e63ec94 --- /dev/null +++ b/src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java @@ -0,0 +1,56 @@ +package com.wearedevs.someclicker.cases.cases; + +import com.wearedevs.someclicker.cases.Case; +import com.wearedevs.someclicker.cases.CaseOutcome; +import com.wearedevs.someclicker.handlers.SoundUnlocker; +import com.wearedevs.someclicker.sound.sounds.MLG_BassSound; +import com.wearedevs.someclicker.sound.sounds.MLG_HitmarkerSound; +import com.wearedevs.someclicker.sound.sounds.MLG_WowSound; +import com.wearedevs.someclicker.util.WeightedCollection; + +public class MLGSoundCase extends Case { + + public WeightedCollection getAllOutcomes() { + WeightedCollection out = new WeightedCollection(); + + //Bass + out.add(20, new CaseOutcome() { + public void onOutcome() { + SoundUnlocker.unlock(new MLG_BassSound()); + } + + public String getName() { + return "MLG Bass Sound"; + } + }); + + //Wow + out.add(60, new CaseOutcome() { + public void onOutcome() { + SoundUnlocker.unlock(new MLG_WowSound()); + } + + public String getName() { + return "MLG Wow Sound"; + } + }); + + //Hitmarker + out.add(30, new CaseOutcome() { + public void onOutcome() { + SoundUnlocker.unlock(new MLG_HitmarkerSound()); + } + + public String getName() { + return "MLG Hitmarker Sound"; + } + }); + + return out; + } + + public String getName() { + return "MLG Sound Case"; + } + +} diff --git a/src/com/wearedevs/someclicker/cases/cases/SoundCase.java b/src/com/wearedevs/someclicker/cases/cases/SoundCase.java index 5740b37..a86422a 100644 --- a/src/com/wearedevs/someclicker/cases/cases/SoundCase.java +++ b/src/com/wearedevs/someclicker/cases/cases/SoundCase.java @@ -5,6 +5,7 @@ import com.wearedevs.someclicker.handlers.SoundUnlocker; import com.wearedevs.someclicker.sound.sounds.AirhornSound; import com.wearedevs.someclicker.sound.sounds.BombSound; +import com.wearedevs.someclicker.sound.sounds.DiscordMessageSound; import com.wearedevs.someclicker.sound.sounds.FartSound; import com.wearedevs.someclicker.sound.sounds.RainbowSound; import com.wearedevs.someclicker.util.WeightedCollection; @@ -57,6 +58,17 @@ public String getName() { return "Fart Click Sound"; } }); + + //Discord Message + out.add(25, new CaseOutcome() { + public void onOutcome() { + SoundUnlocker.unlock(new DiscordMessageSound()); + } + + public String getName() { + return "Discord Message Sound"; + } + }); return out; } diff --git a/src/com/wearedevs/someclicker/changelog b/src/com/wearedevs/someclicker/changelog index 37a7579..a2baec2 100644 --- a/src/com/wearedevs/someclicker/changelog +++ b/src/com/wearedevs/someclicker/changelog @@ -14,6 +14,12 @@ Beta 4 - Better Mod Support - Better Save System +Beta 4.1 +- Public Beta Release on GameJolt + +Beta 4.2 +- Bug Fixes + Beta 5 - Even Better Mod Support - A "Base Mod" diff --git a/src/com/wearedevs/someclicker/gui/OptionsPanel.java b/src/com/wearedevs/someclicker/gui/OptionsPanel.java index 60873b0..e65795b 100644 --- a/src/com/wearedevs/someclicker/gui/OptionsPanel.java +++ b/src/com/wearedevs/someclicker/gui/OptionsPanel.java @@ -61,7 +61,7 @@ public void actionPerformed(ActionEvent e) { add(lblSelectYourClick); clickSound = new JComboBox(); - clickSound.setBounds(224, 17, 97, 22); + clickSound.setBounds(224, 17, 150, 22); clickSound.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { SoundUnlocker.currentSound = (Sound) clickSound.getSelectedItem(); diff --git a/src/com/wearedevs/someclicker/sound/sounds/DiscordMessageSound.java b/src/com/wearedevs/someclicker/sound/sounds/DiscordMessageSound.java new file mode 100644 index 0000000..899cfa3 --- /dev/null +++ b/src/com/wearedevs/someclicker/sound/sounds/DiscordMessageSound.java @@ -0,0 +1,15 @@ +package com.wearedevs.someclicker.sound.sounds; + +import com.wearedevs.someclicker.sound.Sound; + +public class DiscordMessageSound extends Sound { + + public String getName() { + return "Discord Message"; + } + + public String getFileName() { + return "discordmessage.wav"; + } + +} diff --git a/src/com/wearedevs/someclicker/sound/sounds/MEME_YouNeedAWebsiteSound.java b/src/com/wearedevs/someclicker/sound/sounds/MEME_YouNeedAWebsiteSound.java new file mode 100644 index 0000000..f2c6b9f --- /dev/null +++ b/src/com/wearedevs/someclicker/sound/sounds/MEME_YouNeedAWebsiteSound.java @@ -0,0 +1,15 @@ +package com.wearedevs.someclicker.sound.sounds; + +import com.wearedevs.someclicker.sound.Sound; + +public class MEME_YouNeedAWebsiteSound extends Sound { + + public String getName() { + return "You Need a Website"; + } + + public String getFileName() { + return "MEME_youneedawebsite.wav"; + } + +} diff --git a/src/com/wearedevs/someclicker/sound/sounds/MLG_BassSound.java b/src/com/wearedevs/someclicker/sound/sounds/MLG_BassSound.java new file mode 100644 index 0000000..d260b45 --- /dev/null +++ b/src/com/wearedevs/someclicker/sound/sounds/MLG_BassSound.java @@ -0,0 +1,15 @@ +package com.wearedevs.someclicker.sound.sounds; + +import com.wearedevs.someclicker.sound.Sound; + +public class MLG_BassSound extends Sound { + + public String getName() { + return "MLG Bass"; + } + + public String getFileName() { + return "MLG_bass.wav"; + } + +} diff --git a/src/com/wearedevs/someclicker/sound/sounds/MLG_HitmarkerSound.java b/src/com/wearedevs/someclicker/sound/sounds/MLG_HitmarkerSound.java new file mode 100644 index 0000000..42dc243 --- /dev/null +++ b/src/com/wearedevs/someclicker/sound/sounds/MLG_HitmarkerSound.java @@ -0,0 +1,15 @@ +package com.wearedevs.someclicker.sound.sounds; + +import com.wearedevs.someclicker.sound.Sound; + +public class MLG_HitmarkerSound extends Sound { + + public String getName() { + return "MLG Hitmarker"; + } + + public String getFileName() { + return "MLG_hitmarker.wav"; + } + +} diff --git a/src/com/wearedevs/someclicker/sound/sounds/MLG_WowSound.java b/src/com/wearedevs/someclicker/sound/sounds/MLG_WowSound.java new file mode 100644 index 0000000..06d3fd5 --- /dev/null +++ b/src/com/wearedevs/someclicker/sound/sounds/MLG_WowSound.java @@ -0,0 +1,15 @@ +package com.wearedevs.someclicker.sound.sounds; + +import com.wearedevs.someclicker.sound.Sound; + +public class MLG_WowSound extends Sound { + + public String getName() { + return "MLG Wow"; + } + + public String getFileName() { + return "MLG_wow.wav"; + } + +}