AI changes, fixed input detection Conditional Branch, Fishious Rend is now a biting move

This commit is contained in:
Maruno17
2024-02-01 23:50:09 +00:00
parent c78e32db09
commit e6fe242d4b
12 changed files with 159 additions and 108 deletions

View File

@@ -429,7 +429,21 @@ class Interpreter
result = (@parameters[2] == 0) ? (gold >= @parameters[1]) : (gold <= @parameters[1])
# when 8, 9, 10 # item, weapon, armor
when 11 # button
result = Input.press?(@parameters[1])
button = {
2 => Input::DOWN,
4 => Input::LEFT,
6 => Input::RIGHT,
8 => Input::UP,
11 => Input::ACTION,
12 => Input::BACK,
13 => Input::USE,
14 => Input::JUMPUP,
15 => Input::JUMPDOWN,
16 => Input::SPECIAL,
17 => Input::AUX1,
18 => Input::AUX2
}[@parameters[1]]
result = button && Input.press?(button)
when 12 # script
result = execute_script(@parameters[1])
end