-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMage.java
More file actions
113 lines (88 loc) · 3.69 KB
/
Copy pathMage.java
File metadata and controls
113 lines (88 loc) · 3.69 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package magepack;
enum Absolutes{
ABYSS,
LIGHTNING,
AIR,
ARCANE
}
public class Mage {
String Status = "Active";
int Power = 0;
String Homeland = "BladeSpire";
static void Likes(){
System.out.println("Mages like elemental theory, magical sparring, and textbook reading!");
}
public void WarCry(){
System.out.println("");
System.out.println("I am one with the vitalities of our world!");
}
public void Information(){
System.out.println("");
System.out.println("Homeland: " + Homeland + " with the status of " + Status);
}
public void Power(){
System.out.println("");
System.out.println("Power: " + Power);
}
public class Sorcerer extends Mage{
String name;
int age;
String Element;
String Specialization;
String Combat = "Ranged Combat";
String Category = "Support, DPS, AOE";
public class Secrets{
String Secret = "We need distance in order to fend off the enemy, short-ranged combat is too much!";
public void Spread(){
System.out.println(Secret);
}
}
public Sorcerer(String name, int age, String element, String specialization){ //we initialized
this.name = name;
this.age = age;
this.Element = element;
this.Specialization = specialization;
}
public void Information(){
System.out.println(String.format("Homeland: %s with the status of %s.\nName: %s, Age: %d, Element: %s, Specialization: %s",this.Homeland, this.Status, this.name, this.age, this.Element, this.Specialization));
//alternative for template literals
}
public void WarCry(){
System.out.println("We will bend the Elements to our favor!");
}
}
public class Spellsword extends Mage {
//children classes
String name;
int age;
String Element;
String Specialization;
String Combat = "Ranged Combat";
String Category = "Support, DPS, AOE";
public Spellsword(String name, int age, String element, String specialization){ //we initialized
this.name = name;
this.age = age;
this.Element = element;
this.Specialization = specialization;
}
public void Information(){
System.out.println(String.format("Homeland: %s with the status of %s.\nName: %s, Age: %d, Element: %s, Specialization: %s",this.Homeland, this.Status, this.name, this.age, this.Element, this.Specialization));
//alternative for template literals
}
public void WarCry(){
System.out.println("Let us destroy you with the mighty Arcana of our blade and hand!");
}
}
public static void main(String args[]){ //we can debug/run from here, which is within the public class domain
Mage mage = new Mage();
Mage.Sorcerer Gamadan = mage.new Sorcerer("Gamadan", 19, "Lightning", "Destruction");
System.out.println(Gamadan.Combat);
}
}
class main1{
public static void main2(String args[]){ //we can create new class outside of public class domain, then debug within class
Mage mage = new Mage();
Mage.Sorcerer Gamadan = mage.new Sorcerer("Gamadan", 19, "Lightning", "Destruction");
System.out.println(Gamadan.Combat);
}
}