Go で書き直した Ikemen
Revisão | 1cc2491fc1249894d3012184ad78c139508ba45c (tree) |
---|---|
Hora | 2017-05-15 19:58:20 |
Autor | SUEHIRO <supersuehiro@user...> |
Commiter | SUEHIRO |
旧バージョンのヘルパーの palno の処理を修正
@@ -1073,7 +1073,7 @@ func (be BytecodeExp) run(c *Char) BytecodeValue { | ||
1073 | 1073 | case OC_numtarget: |
1074 | 1074 | *sys.bcStack.Top() = c.numTarget(*sys.bcStack.Top()) |
1075 | 1075 | case OC_palno: |
1076 | - sys.bcStack.PushI(c.gi().palno) | |
1076 | + sys.bcStack.PushI(c.palno()) | |
1077 | 1077 | case OC_pos_x: |
1078 | 1078 | sys.bcStack.PushF(c.pos[0] - sys.cam.Pos[0]) |
1079 | 1079 | case OC_pos_y: |
@@ -2306,6 +2306,12 @@ func (c *Char) numTarget(hid BytecodeValue) BytecodeValue { | ||
2306 | 2306 | } |
2307 | 2307 | return BytecodeInt(n) |
2308 | 2308 | } |
2309 | +func (c *Char) palno() int32 { | |
2310 | + if c.helperIndex != 0 && c.gi().ver[0] != 1 { | |
2311 | + return 1 | |
2312 | + } | |
2313 | + return c.gi().palno | |
2314 | +} | |
2309 | 2315 | func (c *Char) getPower() int32 { |
2310 | 2316 | if sys.powerShare[c.playerNo&1] { |
2311 | 2317 | return sys.chars[c.playerNo&1][0].power |