-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShortTower.java
45 lines (38 loc) · 956 Bytes
/
ShortTower.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
35
36
37
38
39
40
41
42
43
44
45
package game;
public class ShortTower extends BasicTower
{
public ShortTower()
{
super(50, 125, 1000, 50, 100);
}
@Override
public void upgrade()
{
setRank(getRank() + 1);
setCost(getCost() + getUpgradeCost());
switch (getRank())
{
case 2:
setDamage(getDamage() + 20);
setRange(getRange() + 25);
setAttackSpeed(getAttackSpeed() - 100);
setUpgradeCost(150);
break;
case 3:
setDamage(getDamage() + 30);
setRange(getRange() + 35);
setAttackSpeed(getAttackSpeed() - 150);
setUpgradeCost(0);
break;
}
}
@Override
public int getTowerType()
{
return 1;
}
public static int getInitialCost()
{
return 50;
}
}