-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKonstantinovich.java
34 lines (23 loc) · 953 Bytes
/
Konstantinovich.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//class Konstantinovich contain's Mr. Konstantinovich's abilities
public class Konstantinovich extends Teacher{
private String[] lore= {"Lord of the Rings","Star Trek","Futurama","Star Wars","Legend of Zelda","Battlestar Galactica",
"LOLcatz","World of Warcraft","South Park","XKCD","Cyanide and Happiness",};
public Konstantinovich(){
_hitPts = 125;
_strength = 100;
_defense = 40;
_attack = .4;
_name = "Mr. Konstantinovich";}
public int reference(Character opponent){
int damage = (int)( (_strength * _attack) - opponent.getDefense() );
damage *= 1 + (Math.random()/2);
return damage;}
public int attackSpecial(Character opponent){
int damage;
System.out.println(_name+" makes an obscure " + lore[(int)(Math.random()*lore.length)]+ " reference!\n Ouch that one hurt!");
damage = reference(opponent);
if ( damage < 0 )
damage = 0;
opponent.lowerHP( damage );
return damage;}
}