Skip to content

Instantly share code, notes, and snippets.

@compleatang
Created June 14, 2014 23:53
Show Gist options
  • Save compleatang/0b38aec3f4de075f2573 to your computer and use it in GitHub Desktop.
Save compleatang/0b38aec3f4de075f2573 to your computer and use it in GitHub Desktop.
(if (< (DIV @0x40 BLrepfrac) minpunish)
{
(if (> minpunish @0x40)
{
;Can't afford the punishment
[0x0]"addstrike"
[0x20]@0x100
[0x40]maxstrikes
(call (gass) @@REP 0 0x0 0x40 0x0 0x0)
[0x0]"set"
[0x40]0
(call (gass) @@REP 0 0x0 0x60 0x0 0x0)
}
{
[0x0]"addstrike"
[0x20]@0x100
[0x40]1
(call (gass) @@REP 0 0x0 0x60 0x0 0x0)
;Can afford it
[0x0]"set"
[0x40](- @0x40 minpunish)
(call (gass) @@REP 0 0x0 0x60 0x0 0x0)
}
)
}
{
[0x0]"addstrike"
[0x20]@0x100
[0x40]1
(call (gass) @@REP 0 0x0 0x60 0x0 0x0)
;Can afford it
[0x0]"set"
[0x40](- @0x40 (DIV @0x40 BLrepfrac) )
(call (gass) @@REP 0 0x0 0x60 0x0 0x0)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment