-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
7ca1bea
commit a7a0e31
Showing
68 changed files
with
723 additions
and
163 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
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
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,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,79 @@ | ||
package Attributes; | ||
|
||
import java.util.ArrayList; | ||
|
||
|
||
public class Attribute extends BaseAttribute { | ||
|
||
private ArrayList<RawBonus> _rawBonuses = new ArrayList<RawBonus>(); | ||
private ArrayList<FinalBonus> _finalBonuses = new ArrayList<FinalBonus>();; | ||
private int _finalValue; | ||
|
||
public Attribute(int startingValue) { | ||
super(startingValue, 0); | ||
|
||
_finalValue = getBaseValue(); | ||
} | ||
|
||
public void addRawBonus(RawBonus bonus) | ||
{ | ||
_rawBonuses.add(bonus); | ||
} | ||
public void addFinalBonus(FinalBonus bonus) | ||
{ | ||
_finalBonuses.add(bonus); | ||
} | ||
public void removeRawBonus(RawBonus bonus) | ||
{ | ||
if (_rawBonuses.indexOf(bonus) >=0) | ||
{ | ||
_rawBonuses.remove(_rawBonuses.indexOf(bonus)); | ||
} | ||
} | ||
public void removeFinalBonus(FinalBonus bonus) | ||
{ | ||
if (_finalBonuses.indexOf(bonus) >=0) | ||
{ | ||
_finalBonuses.remove(_finalBonuses.indexOf(bonus)); | ||
} | ||
} | ||
|
||
public int calculateValue() | ||
{ | ||
_finalValue = getBaseValue(); | ||
|
||
int rawBonusValue = 0; | ||
double rawBonusMultiplier =0; | ||
|
||
for (RawBonus bonus : _rawBonuses) | ||
{ | ||
rawBonusValue += bonus.getBaseValue(); | ||
rawBonusMultiplier += bonus.getBaseMultiplier(); | ||
} | ||
|
||
_finalValue += rawBonusValue; | ||
_finalValue *= (1 + rawBonusMultiplier); | ||
|
||
// Adding value from final | ||
int finalBonusValue = 0; | ||
double finalBonusMultiplier = 0; | ||
|
||
for (FinalBonus bonus : _finalBonuses) | ||
{ | ||
finalBonusValue += bonus.getBaseValue(); | ||
finalBonusMultiplier += bonus.getBaseMultiplier(); | ||
} | ||
|
||
_finalValue += finalBonusValue; | ||
_finalValue *= (1 + finalBonusMultiplier); | ||
|
||
return _finalValue; | ||
} | ||
public int finalValue() | ||
{ | ||
return calculateValue(); | ||
} | ||
|
||
} | ||
|
||
|
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,20 @@ | ||
package Attributes; | ||
|
||
public class BaseAttribute { | ||
private int _baseValue; | ||
private double _baseMultiplier; | ||
|
||
public BaseAttribute(int value, double multiplier) | ||
{ | ||
_baseValue = value; | ||
_baseMultiplier = multiplier; | ||
} | ||
public int getBaseValue() | ||
{ | ||
return _baseValue; | ||
} | ||
public double getBaseMultiplier() | ||
{ | ||
return _baseMultiplier; | ||
} | ||
} |
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,8 @@ | ||
package Attributes; | ||
|
||
public class FinalBonus extends BaseAttribute { | ||
public FinalBonus (int value, double multiplier) | ||
{ | ||
super(value, multiplier); | ||
} | ||
} |
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,8 @@ | ||
package Attributes; | ||
|
||
public class RawBonus extends BaseAttribute{ | ||
public RawBonus(int value, double multiplier) | ||
{ | ||
super(value, multiplier); | ||
} | ||
} |
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,37 @@ | ||
package Skins; | ||
|
||
import main.ChampionDecorator; | ||
import champions.Champion; | ||
|
||
public class SkinAnglerJax extends ChampionDecorator{ | ||
|
||
Champion champ; | ||
public SkinAnglerJax(Champion champion) { | ||
super(champion); | ||
champ = champion; | ||
champ.setSkin("Angler Jax"); | ||
} | ||
|
||
// @Override | ||
// public String getSummary() { | ||
//// String push = ""; | ||
//// push += "You picked Jax"; | ||
//// push += "\n\""+champ.taunt()+"\""; | ||
//// push += "\n\nMy current stats are:"; | ||
//// | ||
//// push += "\nHP: "+ champ.hp.finalValue(); | ||
//// push += "\nMP: "+ champ.mp.finalValue(); | ||
//// push += "\nAD: "+ champ.ad.finalValue(); | ||
//// push += "\nAP: "+ champ.ap.finalValue(); | ||
//// push += "\nArmor: "+ champ.armor.finalValue(); | ||
//// push += "\nMR: "+ champ.mr.finalValue(); | ||
//// | ||
//// push += "\n\nMy inventory: \n(slots used: "+champ.equipped.size()+"/6)"; | ||
//// for (String str : champ.equipped) | ||
//// { | ||
//// push += "\n"+ str; | ||
//// } | ||
//// return push; | ||
// return null; | ||
// } | ||
} |
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,14 @@ | ||
package Skins; | ||
|
||
import main.ChampionDecorator; | ||
import champions.Champion; | ||
|
||
public class SkinHumanRyze extends ChampionDecorator{ | ||
|
||
Champion champ; | ||
public SkinHumanRyze(Champion champion) { | ||
super(champion); | ||
champ = champion; | ||
champ.setSkin("Human Ryze"); | ||
} | ||
} |
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 @@ | ||
package champions; | ||
|
||
import items.Item; | ||
|
||
import java.util.ArrayList; | ||
|
||
public abstract class Champion implements CharacterInterface { | ||
//Initieel heeft de champion geen skin. Dus zet deze naar "Default" | ||
String currSkin = "Default"; | ||
|
||
//Verkrijg de beschrijving van de champion | ||
public String getSummary() {return "";} | ||
//Elke champion heeft een taunt. | ||
public String taunt() { return "";} | ||
//Als er items aan een champion worden toegevoegd worden deze verkregen via de getItems() | ||
public ArrayList<String> getItems() { return null; } | ||
//Voeg een nieuw item toe aan de champion | ||
public void addItem(Item input) {} | ||
//Verkrijg de skin die de champion heeft. Initieel is dit de Default skin. | ||
public String getSkin(){return currSkin;} | ||
//Geef de champion een skin | ||
public void setSkin(String input){this.currSkin = input;} | ||
//Verkrijg de naam van de champion | ||
public String getName() { return this.getName(); } | ||
} |
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,5 @@ | ||
package champions; | ||
|
||
public interface CharacterInterface { | ||
|
||
} |
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,69 @@ | ||
package champions; | ||
|
||
import items.Item; | ||
|
||
import java.util.ArrayList; | ||
|
||
import Attributes.Attribute; | ||
|
||
public class Jax extends Champion { | ||
|
||
Attribute hp = new Attribute(463); | ||
Attribute mp = new Attribute(230); | ||
Attribute ap = new Attribute(0); | ||
Attribute ad = new Attribute(56); | ||
Attribute armor = new Attribute(18); | ||
Attribute mr = new Attribute(30); | ||
|
||
ArrayList<String> equipped = new ArrayList<String>(); | ||
|
||
@Override | ||
public String getSummary() { | ||
String push = ""; | ||
push += "You picked "+this.getName()+ " with the "+this.getSkin()+" skin"; | ||
push += "\n\""+this.taunt()+"\""; | ||
push += "\n\nMy current stats are:"; | ||
|
||
push += "\nHP: "+ hp.finalValue(); | ||
push += "\nMP: "+ mp.finalValue(); | ||
push += "\nAD: "+ ad.finalValue(); | ||
push += "\nAP: "+ ap.finalValue(); | ||
push += "\nArmor: "+ armor.finalValue(); | ||
push += "\nMR: "+ mr.finalValue(); | ||
|
||
push += "\n\nMy inventory: \n(slots used: "+equipped.size()+"/6)"; | ||
for (String str : equipped) | ||
{ | ||
push += "\n"+ str; | ||
} | ||
return push; | ||
} | ||
|
||
@Override | ||
public String taunt() { | ||
return "Who wants a piece of the champ?!"; | ||
} | ||
@Override | ||
public String getName() { | ||
return "Jax"; | ||
} | ||
|
||
@Override | ||
public void addItem(Item input){ | ||
if (equipped.size() <6) | ||
{ | ||
equipped.add(input.getName()); | ||
hp.addRawBonus(input.getBonusHp()); | ||
mp.addRawBonus(input.getBonusMp()); | ||
ap.addRawBonus(input.getBonusAp()); | ||
ad.addRawBonus(input.getBonusAd()); | ||
armor.addRawBonus(input.getBonusArmor()); | ||
mr.addRawBonus(input.getBonusMr()); | ||
} | ||
} | ||
|
||
@Override | ||
public ArrayList<String> getItems() { | ||
return equipped; | ||
} | ||
} |
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,71 @@ | ||
package champions; | ||
|
||
import items.Item; | ||
|
||
import java.util.ArrayList; | ||
|
||
import Attributes.Attribute; | ||
|
||
public class Ryze extends Champion { | ||
|
||
Attribute hp = new Attribute(250); | ||
Attribute mp = new Attribute(250); | ||
Attribute ap = new Attribute(0); | ||
Attribute ad = new Attribute(52); | ||
Attribute armor = new Attribute(11); | ||
Attribute mr = new Attribute(30); | ||
|
||
ArrayList<String> equipped = new ArrayList<String>(); | ||
|
||
@Override | ||
public String getSummary() { | ||
String push = ""; | ||
|
||
push += "You picked "+this.getName()+ " with the "+this.getSkin()+" skin"; | ||
push += "\n\""+this.taunt()+"\""; | ||
push += "\n\nMy current stats are:"; | ||
|
||
push += "\nHP: "+ hp.finalValue(); | ||
push += "\nMP: "+ mp.finalValue(); | ||
push += "\nAD: "+ ad.finalValue(); | ||
push += "\nAP: "+ ap.finalValue(); | ||
push += "\nArmor: "+ armor.finalValue(); | ||
push += "\nMR: "+ mr.finalValue(); | ||
|
||
push += "\n\nMy inventory: \n(slots used: "+equipped.size()+"/6)"; | ||
for (String str : equipped) | ||
{ | ||
push += "\n"+ str; | ||
} | ||
return push; | ||
} | ||
|
||
@Override | ||
public String taunt() { | ||
return "Take this scroll and stick it... somewhere safe."; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Ryze"; | ||
} | ||
|
||
@Override | ||
public void addItem(Item input){ | ||
if (equipped.size() <6) | ||
{ | ||
equipped.add(input.getName()); | ||
hp.addRawBonus(input.getBonusHp()); | ||
mp.addRawBonus(input.getBonusMp()); | ||
ap.addRawBonus(input.getBonusAp()); | ||
ad.addRawBonus(input.getBonusAd()); | ||
armor.addRawBonus(input.getBonusArmor()); | ||
mr.addRawBonus(input.getBonusMr()); | ||
} | ||
} | ||
|
||
@Override | ||
public ArrayList<String> getItems() { | ||
return equipped; | ||
} | ||
} |
Oops, something went wrong.