

Fujiwara 说:Various bitwise operations:
val_shift_left (val_shift_left,>dest>,<n places>) : dest = dest << n
val_shift_right : dest = dest >> n
store_and (store_and,<dest>,<op1>,<op2>) : dest = op1 & op2
store_or : dest = op1 | op2
store_xor : dest = op1 ^ op2
store_not : (store_not,<dest>,<op1>) : dest = ~op1
This would make the implementation of bitfields for custom flags much cleaner and less bug-prone
val_or = 2114 #dest, operand :: dest = dest | operand
# (val_or,<destination>,<value>),
val_and = 2115 #dest, operand :: dest = dest & operand
# (val_and,<destination>,<value>),
store_or = 2116 #dest, op1, op2 : dest = op1 | op2
# (store_or,<destination>,<value>,<value>),
store_and = 2117 #dest, op1, op2 : dest = op1 & op2
# (store_or,<destination>,<value>,<value>),
troop_sort_inventory = 1511 # (troop_sort_inventory,<troop_id>),

Fujiwara 说:插入代码块:val_or = 2114 #dest, operand :: dest = dest | operand # (val_or,<destination>,<value>), val_and = 2115 #dest, operand :: dest = dest & operand # (val_and,<destination>,<value>), store_or = 2116 #dest, op1, op2 : dest = op1 | op2 # (store_or,<destination>,<value>,<value>), store_and = 2117 #dest, op1, op2 : dest = op1 & op2 # (store_or,<destination>,<value>,<value>),
(assign, ":1or2", 1),
(val_or, ":1or2", 2),
(try_begin),
(eq, ":1or2", 1),
(display_message, "@PASS!"),
(else_try),
(display_message, "@FAIL!"),
(try_end),
(try_begin),
(eq, ":1or2", 2),
(display_message, "@PASS!"),
(else_try),
(display_message, "@FAIL!"),
(try_end),
(try_begin),
(eq, ":1or2", 3),
(display_message, "@PASS!"),
(else_try), :lol:
(display_message, "@FAIL!"),
(try_end),
Banned
Rongar 说:


