-
Notifications
You must be signed in to change notification settings - Fork 0
/
spell class for json
45 lines (43 loc) · 2.07 KB
/
spell class for json
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
import java.util.ArrayList;
public class logic.Spell {
int targetNumber;
int targetDistance;
int effectQuantity;
int staticQuantity;
logic.Time time;
logic.Side side;
logic.Effect effect;
logic.StaticState staticState;
logic.TargetRange targetRange;
logic.TargetStatics targetStatic;
logic.TargetKind targetKind;
boolean massacre;
boolean immunity;
boolean continuous;
boolean choice;
boolean goodness;
boolean eternity;
ArrayList<Integer> turns;
ArrayList<Integer> locations;
public logic.Spell(String targetNumber1, String targetDistance1, String effectQuantity1, String staticQuantity1, String time1, String side1, String effect1, String staticState1, String targetRange1, String targetStatic1, String targetKind1, String massacre1, String immunity1, String continuous1,String choice1, String goodness1, String eternity1,ArrayList<Integer> turns,ArrayList<Integer> locations) {
this.targetNumber = Integer.parseInt(targetNumber1);
this.targetDistance = Integer.parseInt(targetDistance1);
this.effectQuantity = Integer.parseInt(effectQuantity1);
this.staticQuantity = Integer.parseInt(staticQuantity1);
this.time = logic.Time.values()[Integer.parseInt(time1)];
this.side = logic.Side.values()[Integer.parseInt(side1)];
this.effect = logic.Effect.values()[Integer.parseInt(effect1)];
this.staticState = logic.StaticState.values()[Integer.parseInt(staticState1)];
this.targetRange = logic.TargetRange.values()[Integer.parseInt(targetRange1)];
this.targetStatic = logic.TargetStatics.values()[Integer.parseInt(targetStatic1)];
this.targetKind = logic.TargetKind.values()[Integer.parseInt(targetKind1)];
this.massacre = massacre1.equals("1");
this.immunity = immunity1.equals("1");
this.continuous=continuous1.equals("1");
this.choice = choice1.equals("1");
this.goodness = goodness1.equals("1");
this.eternity = eternity1.equals("1");
this.turns=turns;
this.locations=locations;
}
}