This represents a Potion power-up item. When a player collects a potion, all existing bombs are transformed into a coin or gem matching the potion’s color. For example, yellow potions transform bombs into coins, green potions transform bombs into green gems, and so on.
Spawnable Object data #
{
"key": "p",
"type": <PotionTypes>,
"gridY": <GridY>,
}
Data Fields #
type #
Defines the type (color) of the potion
options: yellow
, green
, red
, blue
gridY #
The GridY position to spawn this object (see Coordinate System)
Example Level JSON #
{
"items": [
{
"type": "chunk",
"data": {
"0": [
{
"key": "p",
"gridY": 50,
"type": "yellow"
}
],
"20": [ {"key": "b", "gridY": 50} ],
"40": [ {"key": "b", "gridY": 50} ],
"60": [ {"key": "b", "gridY": 50} ],
"100": [ {"key": "e"} ]
}
},
{
"type": "chunk",
"data": {
"0": [
{
"key": "p",
"gridY": 50,
"type": "green"
}
],
"20": [ {"key": "b", "gridY": 50} ],
"40": [ {"key": "b", "gridY": 50} ],
"60": [ {"key": "b", "gridY": 50} ],
"100": [ {"key": "e"} ]
}
},
{
"type": "chunk",
"data": {
"0": [
{"key": "p", "gridY": 50, "type": "red"}
],
"20": [ {"key": "b", "gridY": 50} ],
"40": [ {"key": "b", "gridY": 50} ],
"60": [ {"key": "b", "gridY": 50} ],
"100": [ {"key": "e"} ]
}
},
{
"type": "chunk",
"data": {
"0": [
{
"key": "p",
"gridY": 50,
"type": "blue"
}
],
"20": [ {"key": "b", "gridY": 50} ],
"40": [ {"key": "b", "gridY": 50} ],
"60": [ {"key": "b", "gridY": 50} ],
"100": [ {"key": "e"} ]
}
}
]
}