Skip to content

Commit 039e202

Browse files
authored
Merge pull request #3610 from ikemen-engine/fix5
fix: movelist resetting on each round, movelist showing current name and warning msg
2 parents 010d165 + 0caea07 commit 039e202

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

external/script/menu.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ function menu.f_commandlistParse()
762762
pn = pn + (member - 1) * 2
763763
end
764764
if player(pn) and aiLevel() == 0 then
765-
local ref = getSelectNo()
766765
local movelist = getMovelist()
767766
if sel.movelistText ~= movelist then
768767
sel.movelistText = movelist
@@ -809,7 +808,7 @@ function menu.f_commandlistParse()
809808
end
810809
table.insert(menu.t_movelists, {
811810
pn = pn,
812-
name = start.f_getCharData(ref).name,
811+
name = name(),
813812
tbl = sel,
814813
commandlist = sel.commandlist,
815814
})

src/bytecode.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11657,8 +11657,9 @@ func (sc changeMovelist) Run(c *Char, _ []int32) bool {
1165711657
}
1165811658
return true
1165911659
})
11660-
if v < 0 {
11661-
v = 0
11660+
if _, ok := crun.gi().movelists[int(v)]; !ok {
11661+
sys.appendToConsole(c.warn() + fmt.Sprintf("changed to invalid movelist: %d", v))
11662+
return false
1166211663
}
1166311664
crun.movelist = v
1166411665
return false

src/char.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3496,7 +3496,6 @@ func (c *Char) prepareNextRound() {
34963496
//c.updateSizeBox()
34973497
c.oldPos, c.interPos = c.pos, c.pos
34983498
if c.helperIndex == 0 {
3499-
c.movelist = 0
35003499
if sys.roundsExisted[c.playerNo&1] > 0 { // TODO: Why do we need this branch?
35013500
c.palfx.clear()
35023501
} else {

0 commit comments

Comments
 (0)