Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenEXP committed Oct 12, 2017
2 parents 2466302 + 1e0cdeb commit 522897f
Show file tree
Hide file tree
Showing 12 changed files with 225 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/com/wearedevs/someclicker/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Mod> mods = new ArrayList<Mod>();

Expand Down
42 changes: 42 additions & 0 deletions src/com/wearedevs/someclicker/cases/GetCase.java
Original file line number Diff line number Diff line change
@@ -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<Case> w = new WeightedCollection<Case>();

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);
}
}
}

32 changes: 32 additions & 0 deletions src/com/wearedevs/someclicker/cases/cases/MEMESoundCase.java
Original file line number Diff line number Diff line change
@@ -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<CaseOutcome> getAllOutcomes() {
WeightedCollection<CaseOutcome> out = new WeightedCollection<CaseOutcome>();

//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";
}

}
56 changes: 56 additions & 0 deletions src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java
Original file line number Diff line number Diff line change
@@ -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<CaseOutcome> getAllOutcomes() {
WeightedCollection<CaseOutcome> out = new WeightedCollection<CaseOutcome>();

//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";
}

}
12 changes: 12 additions & 0 deletions src/com/wearedevs/someclicker/cases/cases/SoundCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 6 additions & 0 deletions src/com/wearedevs/someclicker/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/com/wearedevs/someclicker/gui/OptionsPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void actionPerformed(ActionEvent e) {
add(lblSelectYourClick);

clickSound = new JComboBox<Sound>();
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();
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
}

}
Original file line number Diff line number Diff line change
@@ -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";
}

}
15 changes: 15 additions & 0 deletions src/com/wearedevs/someclicker/sound/sounds/MLG_BassSound.java
Original file line number Diff line number Diff line change
@@ -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";
}

}
15 changes: 15 additions & 0 deletions src/com/wearedevs/someclicker/sound/sounds/MLG_HitmarkerSound.java
Original file line number Diff line number Diff line change
@@ -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";
}

}
15 changes: 15 additions & 0 deletions src/com/wearedevs/someclicker/sound/sounds/MLG_WowSound.java
Original file line number Diff line number Diff line change
@@ -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";
}

}

0 comments on commit 522897f

Please sign in to comment.