-
Notifications
You must be signed in to change notification settings - Fork 0
/
statusoptype_gen.go
90 lines (80 loc) · 2.66 KB
/
statusoptype_gen.go
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
// Code generated by "genenum.exe -typename=StatusOpType -packagename=statusoptype -basedir=enum"
package statusoptype
import "fmt"
type StatusOpType uint8
const (
None StatusOpType = iota //
AddHP //
AddSP //
AddHPRate //
AddSPRate //
//
ModSight // change sight for 1 turn
//
RndFaction // change to random faction
IncFaction // change to next faction
SetFaction // set faction to arg
ResetFaction // reset to born faction
//
NegBias // neg bias value
RotateBiasRight // rotate bias right
RotateBiasLeft // rotate bias left
//
SetCondition // set condition for 1 turn
//
ForgetFloor // forget this floor tiles
ForgetOneFloor // forget visited floor tiles
StatusOpType_Count int = iota
)
var _StatusOpType2string = [StatusOpType_Count][2]string{
None: {"None", ""},
AddHP: {"AddHP", ""},
AddSP: {"AddSP", ""},
AddHPRate: {"AddHPRate", ""},
AddSPRate: {"AddSPRate", ""},
ModSight: {"ModSight", "change sight for 1 turn"},
RndFaction: {"RndFaction", "change to random faction"},
IncFaction: {"IncFaction", "change to next faction"},
SetFaction: {"SetFaction", "set faction to arg"},
ResetFaction: {"ResetFaction", "reset to born faction"},
NegBias: {"NegBias", "neg bias value"},
RotateBiasRight: {"RotateBiasRight", "rotate bias right"},
RotateBiasLeft: {"RotateBiasLeft", "rotate bias left"},
SetCondition: {"SetCondition", "set condition for 1 turn"},
ForgetFloor: {"ForgetFloor", "forget this floor tiles"},
ForgetOneFloor: {"ForgetOneFloor", "forget visited floor tiles"},
}
func (e StatusOpType) String() string {
if e >= 0 && e < StatusOpType(StatusOpType_Count) {
return _StatusOpType2string[e][0]
}
return fmt.Sprintf("StatusOpType%d", uint8(e))
}
func (e StatusOpType) CommentString() string {
if e >= 0 && e < StatusOpType(StatusOpType_Count) {
return _StatusOpType2string[e][1]
}
return ""
}
var _string2StatusOpType = map[string]StatusOpType{
"None": None,
"AddHP": AddHP,
"AddSP": AddSP,
"AddHPRate": AddHPRate,
"AddSPRate": AddSPRate,
"ModSight": ModSight,
"RndFaction": RndFaction,
"IncFaction": IncFaction,
"SetFaction": SetFaction,
"ResetFaction": ResetFaction,
"NegBias": NegBias,
"RotateBiasRight": RotateBiasRight,
"RotateBiasLeft": RotateBiasLeft,
"SetCondition": SetCondition,
"ForgetFloor": ForgetFloor,
"ForgetOneFloor": ForgetOneFloor,
}
func String2StatusOpType(s string) (StatusOpType, bool) {
v, b := _string2StatusOpType[s]
return v, b
}