BLOCKS CONDITION - bloodwiing/BrawlMapGen GitHub Wiki
CONDITION Blocks are solvable. They solve the inputs to yield a boolean output.
These Blocks can be chained however wanted, they always can have their own type as an input along with any other VALUE Block. There are only a few exceptions for blocks.
These types of CONDITION blocks, depending on the actual block, can have any or a few types as the inputs, but both inputs must have matching types, the operators that can be used in these blocks are all comparative, such as EQUALS, LESS, etc.
Returns true
if both inputs have the same value.
The first input.
The second input.
{
"type": "==",
"a": {
"type": "COLOR",
"r": 6,
"g": 6,
"b": 6
},
"b": 6
}
Returns true
if both inputs have different values.
The first input.
The second input.
{
"type": "!=",
"a": "Apples",
"b": "Oranges"
}
Returns true
if the value in a
is less than the value in b
.
The first input.
The second input.
{
"type": "<",
"a": 1,
"b": 9
}
Returns true
if the value in a
is less than or equals to the value in b
.
The first input.
The second input.
{
"type": "<=",
"a": -8,
"b": -8
}
Returns true
if the value in a
is greater than the value in b
.
The first input.
The second input.
{
"type": ">",
"a": 16,
"b": -2
}
Returns true
if the value in a
is greater than or equals to the value in b
.
The first input.
The second input.
{
"type": ">=",
"a": 6,
"b": 6
}
These types of CONDITION blocks have 2 boolean inputs, the operators that can be used in these blocks are all logic-based, such as AND, OR, XNOR, etc.
Returns true
if at least a
or b
is true
.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "OR",
"a": true,
"b": false
}
Returns true
if both a
and b
are false
. Inverted OR
Block.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "NOR",
"a": false,
"b": false
}
Returns true
if both a
and b
are true
.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "AND",
"a": true,
"b": true
}
Returns true
if at least one a
or b
is false
. Inverted AND
Block.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "NAND",
"a": false,
"b": true
}
Returns true
if only a
and b
is true
. In other words: returns true
when booleans don't match.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "NAND",
"a": true,
"b": false
}
Returns true
if none or both a
and b
are true
. In other words: returns true
when booleans match. Inverted XOR
Block.
ALLOWED TYPES:
Boolean
,LOGICAL
The first input.
ALLOWED TYPES:
Boolean
,LOGICAL
The second input.
{
"type": "NAND",
"a": false,
"b": false
}
Returns true
if input
is false
. Basically inverts the boolean.
ALLOWED TYPES:
Boolean
,LOGICAL
The input of the NOT Block.
{
"type": "NOT",
"input": false
}