Skip to content

Commit

Permalink
Add noMakeDust assertSpecial #467
Browse files Browse the repository at this point in the history
  • Loading branch information
K4thos committed Jan 8, 2023
1 parent 693a0c1 commit e6c55f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/char.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const (
CSF_nodizzypointsdamage
CSF_noguardpointsdamage
CSF_noredlifedamage
CSF_nomakedust
CSF_screenbound
CSF_movecamera_x
CSF_movecamera_y
Expand All @@ -79,7 +80,7 @@ const (
CSF_nofastrecoverfromliedown | CSF_nofallcount | CSF_nofalldefenceup |
CSF_noturntarget | CSF_noinput | CSF_nopowerbardisplay | CSF_autoguard |
CSF_animfreeze | CSF_postroundinput | CSF_nodizzypointsdamage |
CSF_noguardpointsdamage | CSF_noredlifedamage
CSF_noguardpointsdamage | CSF_noredlifedamage | CSF_nomakedust
)

type GlobalSpecialFlag uint32
Expand Down Expand Up @@ -5718,7 +5719,7 @@ func (c *Char) update(cvmin, cvmax,
c.ghv.score = 0
}
if (c.ss.moveType == MT_H || c.ss.no == 52) && c.pos[1] == 0 &&
AbsF(c.pos[0]-c.oldPos[0]) >= 1 && c.ss.time%3 == 0 {
AbsF(c.pos[0]-c.oldPos[0]) >= 1 && c.ss.time%3 == 0 && !c.sf(CSF_nomakedust) {
c.makeDust(0, 0)
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2645,6 +2645,8 @@ func (c *Compiler) expValue(out *BytecodeExp, in *string,
out.appendI32Op(OC_ex_isassertedchar, int32(CSF_noguardpointsdamage))
case "noredlifedamage":
out.appendI32Op(OC_ex_isassertedchar, int32(CSF_noredlifedamage))
case "nomakedust":
out.appendI32Op(OC_ex_isassertedchar, int32(CSF_nomakedust))
case "intro":
out.appendI32Op(OC_ex_isassertedglobal, int32(GSF_intro))
case "roundnotover":
Expand Down
2 changes: 2 additions & 0 deletions src/compiler_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ func (c *Compiler) assertSpecial(is IniSection, sc *StateControllerBase, _ int8)
sc.add(assertSpecial_flag, sc.iToExp(int32(CSF_noguardpointsdamage)))
case "noredlifedamage":
sc.add(assertSpecial_flag, sc.iToExp(int32(CSF_noredlifedamage)))
case "nomakedust":
sc.add(assertSpecial_flag, sc.iToExp(int32(CSF_nomakedust)))
case "intro":
sc.add(assertSpecial_flag_g, sc.iToExp(int32(GSF_intro)))
case "roundnotover":
Expand Down
2 changes: 2 additions & 0 deletions src/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +3797,8 @@ func triggerFunctions(l *lua.LState) {
l.Push(lua.LBool(sys.debugWC.sf(CSF_noguardpointsdamage)))
case "noredlifedamage":
l.Push(lua.LBool(sys.debugWC.sf(CSF_noredlifedamage)))
case "nomakedust":
l.Push(lua.LBool(sys.debugWC.sf(CSF_nomakedust)))
// GlobalSpecialFlag
case "intro":
l.Push(lua.LBool(sys.sf(GSF_intro)))
Expand Down

0 comments on commit e6c55f5

Please sign in to comment.