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 522897f + 38e7d82 commit 8867646
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is the code to our Java Clicker. All of this game is written in Java. It ha

## Getting Started

Download the files above or [here](https://github.com/WeAreDevs/JavaClicker/archive/master.zip) and follow the build instructions below, or the latest build [here](https://github.com/WeAreDevs/JavaClicker/releases/download/beta5/JavaClicker-Beta5.jar). `Beta 5`.
Download the files above or [here](https://github.com/WeAreDevs/JavaClicker/archive/master.zip) and follow the build instructions below, or the latest build [here](https://github.com/WeAreDevs/JavaClicker/releases/download/beta51/JavaClicker-Beta51.jar). `Beta 5.1`.

### Prerequisites

Expand Down
Binary file added res/sound/clickSound/MLG_spooky.wav
Binary file not shown.
Binary file added res/sound/clickSound/MLG_wam.wav
Binary file not shown.
9 changes: 7 additions & 2 deletions src/com/wearedevs/someclicker/BaseMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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.handlers.ShopHandler;
Expand All @@ -22,16 +24,18 @@ public class BaseMod extends Mod {
public static int portal = 0;

public static int ticks = 0;
public static double seconds = 0; //large limit :)
public static double seconds = 0; //Large Limit :)

public void preInit() {
SoundUnlocker.unlock(new Default());

ShopHandler.unlock(new PerClick2());

CaseHandler.registerCase(100, new ClickCase());
CaseHandler.registerCase(20, new SoundCase());
CaseHandler.registerCase(30, new SoundCase());
CaseHandler.registerCase(3, new ClickMultiplierCase());
CaseHandler.registerCase(20, new MLGSoundCase());
CaseHandler.registerCase(20, new MEMESoundCase());
}

public void postInit() {
Expand All @@ -54,6 +58,7 @@ public double onClick(double click) {
if(RandomUtil.randomRange(1, 500) == 10) {
click *= 10;
}

return click;
}

Expand Down
7 changes: 4 additions & 3 deletions 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 = 1000000;
public static double clicks = 0;
public static int perClick = 1;
public static ArrayList<Mod> mods = new ArrayList<Mod>();

Expand All @@ -58,7 +58,7 @@ public class Main extends JFrame {
public static CheaterPanel cheaterPanel;
public static ExtrasPanel extrasPanel;

public static final String VERSION = "Beta 5";
public static final String VERSION = "Beta 5.1";
public static final int VERSION_NUM = 2;

public static final Rectangle windowSize = new Rectangle(100, 100, 640, 480);
Expand All @@ -85,7 +85,7 @@ public void run() {
ModLoader ml = new ModLoader();

System.out.println("== Loading Mods ==");
System.out.println("Loading Mod 'BaseMod'");
System.out.println("Loading Mod 'Base Mod " + VERSION + "'");
mods.add(new BaseMod());
File[] modfiles = new File(modPath).listFiles();
for(File file : modfiles) {
Expand Down Expand Up @@ -230,6 +230,7 @@ public static void updateCounter() {
mainPanel.labelClicks.setText("Clicks: " + Math.round(clicks));
shopPanel.labelClicks.setText(Math.round(clicks)+" Clicks");
casePanel.labelClicks.setText(Math.round(clicks)+" Clicks");

for(Mod m : mods) {
m.onUpdateCounter(clicks);
}
Expand Down
5 changes: 3 additions & 2 deletions src/com/wearedevs/someclicker/cases/GetCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;
Expand All @@ -28,7 +27,9 @@ public static void checkCases() {
w.add(10, new ClickMultiplierCase());
w.add(30, new SoundCase());
w.add(20, new MLGSoundCase());
w.add(20, new MEMESoundCase());

//TODO: Add More Sounds
// w.add(20, new MEMESoundCase());

CaseHandler.unlock(w.next());

Expand Down
26 changes: 25 additions & 1 deletion src/com/wearedevs/someclicker/cases/cases/MLGSoundCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
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_SpookySound;
import com.wearedevs.someclicker.sound.sounds.MLG_WamSound;
import com.wearedevs.someclicker.sound.sounds.MLG_WowSound;
import com.wearedevs.someclicker.util.WeightedCollection;

Expand All @@ -25,7 +27,7 @@ public String getName() {
});

//Wow
out.add(60, new CaseOutcome() {
out.add(35, new CaseOutcome() {
public void onOutcome() {
SoundUnlocker.unlock(new MLG_WowSound());
}
Expand All @@ -46,6 +48,28 @@ public String getName() {
}
});

//Wam
out.add(20, new CaseOutcome() {
public void onOutcome() {
SoundUnlocker.unlock(new MLG_WamSound());
}

public String getName() {
return "MLG Wam Sound";
}
});

//Spooky
out.add(20, new CaseOutcome() {
public void onOutcome() {
SoundUnlocker.unlock(new MLG_SpookySound());
}

public String getName() {
return "MLG Spooky Sound";
}
});

return out;
}

Expand Down
4 changes: 4 additions & 0 deletions src/com/wearedevs/someclicker/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ Beta 5
- Click Multiplier Saves
- Multiplier From Cases Will Stack
- Click Case is now based on Current Clicks

Beta 5.1
- Added More Cases
- Fixed Case Weights
5 changes: 4 additions & 1 deletion src/com/wearedevs/someclicker/handlers/AutoHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static void initAutoThread() {
@SuppressWarnings("unchecked")
public void run() {
double old = Main.clicks;

if(CaseHandler.ccase != null) {
CaseHandler.tickCase(CaseHandler.ccase);
}
Expand All @@ -44,7 +45,9 @@ public void run() {
CaseHandler.checkCases();
Anticheat.checkCheats();

if(old!=Main.clicks) Main.updateCounter();
if(old != Main.clicks) {
Main.updateCounter();
}
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/com/wearedevs/someclicker/handlers/SaveHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public static void load() {
String[] savearr = str.split(";");

if(savearr[0].equals("1")) {
System.out.println("Version > 1.0.0 Beta 1");
System.out.println("Version Beta 1");
SaveLoader1.load(savearr);
} else if(savearr[0].equals("2")) {
System.out.println("Version > 1.0.0 Beta 4");
System.out.println("Version Beta 4");
SaveLoader2.load(savearr);
} else {
System.out.println("Unknown!");
Expand Down
4 changes: 3 additions & 1 deletion src/com/wearedevs/someclicker/mod/Mod.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ public void onUpdateCounter(double ammount) {
* Called 60 times a second.
* Alternative to using TickHooks.
*/
public void onTick() {}
public void onTick() {

}
}
15 changes: 15 additions & 0 deletions src/com/wearedevs/someclicker/sound/sounds/MLG_SpookySound.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_SpookySound extends Sound {

public String getName() {
return "MLG Spooky";
}

public String getFileName() {
return "MLG_spooky.wav";
}

}
15 changes: 15 additions & 0 deletions src/com/wearedevs/someclicker/sound/sounds/MLG_WamSound.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_WamSound extends Sound {

public String getName() {
return "MLG Wam";
}

public String getFileName() {
return "MLG_wam.wav";
}

}

0 comments on commit 8867646

Please sign in to comment.