forked from justinszaro/WarringNations
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaxwellWizard01.java
More file actions
executable file
·44 lines (39 loc) · 1.26 KB
/
MaxwellWizard01.java
File metadata and controls
executable file
·44 lines (39 loc) · 1.26 KB
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
/**
* The Wizard 1 if they encounter another wizard they do 3x the damage
*
* @author Max Schuman, Elizabeth Vicente, Tanishq Iyer, Justin Szaro
* @version 3.0
* @since 2021-04-11
*/
public class MaxwellWizard01 extends People {
/**
* Instantiates a MaxwellWizard01 Object and establishes its properties.
* @param nation
* @param tribe
* @param lifePoints
*/
MaxwellWizard01(String nation, String tribe, int lifePoints) {
super(nation, tribe, PeopleType.wizard, lifePoints, "Max's Wizard");
myDescription = "\tMax's Wizard 01";
}
/**
* when the other person is a wizard my wizard does 3x damage
* @param otherPerson Other Person who is involved in the encounter
* @return
*/
public int encounterStrategy(People otherPerson) {
int lifePoints = 0;
if (!this.getNation().equals(otherPerson.getNation())) {
if (otherPerson.getLifePoints() < this.getLifePoints()) {
if (otherPerson.getType() == PeopleType.wizard)
{
lifePoints = this.getLifePoints();
} else
{
lifePoints = this.getLifePoints() / 3;
}
}
}
return lifePoints;
}
}