-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sphere selectors #39
Comments
This can hopefully improve flexibility on powerups that affect spheres in any way (like color replacer should affect two colors and leave wild spheres intact when they hit a wild ball per #65) |
That's good you mentioned color replacers, they may be a bit of a problem because there would need to be various parameters for sphere selectors which exist in one context but not in the other, such as color. That remains to be seen, though. |
Under the hood, sphere destruction should support #121.
{
"conditions": [
{
"type": "color",
"colors": [1]
},
{
"type": "isOffscreen",
"value": false
}
]
} or alternatively: {
"condition": "$expr{[color] == 1 && ![isOffscreen]}"
}
{
"conditions": [
{
"type": "distance",
"max": 75
}
]
} or alternatively: {
"condition": "$expr{[distance] < 75}"
}
{
"conditions": [
{
"type": "distanceX",
"max": 50
}
]
} or alternatively: {
"condition": "$expr{[distanceX] < 50}"
}
{
"conditions": []
} or alternatively: {
"condition": "$expr{true}"
} Problem with Expressions: how do we calculate only necessary variables? |
Another approach: {
"operations": [
{"type": "add", "condition": "$expr{[sphere.color] == 1 && ![sphere.isOffscreen]}"}
],
"scoreEvent": "score_events/color_bomb.json"
}
{
"operations": [
{"type": "add", "condition": "$expr{[sphere.distance] < 100}"}
],
"scoreEvent": "score_events/fireball.json"
}
{
"operations": [
{"type": "add", "condition": "$expr{[sphere.distanceX] < 50}"}
],
"scoreEvent": "score_events/lightning.json"
}
{
"operations": [
{"type": "add", "condition": true}
]
} And hypothetical {
"operations": [
{"type": "add", "condition": "$expr{[sphere.color] == 2 && ![sphere.isOffscreen]}"},
{"type": "pickRandomly", "count": 20}
],
"scoreEventForSphere": "score_events/color_bomb.json"
} The difference between |
Implemented: 45dc56b |
Allow to create, based on some criteria such as position or color, an instance of a class that would contain a list of spheres with which you can do varius stuff, such as change their color or destroy them.
This would be useful for most powerups which mess with spheres. Currently, all that stuff is in Session.lua which isn't the best place to store all these functions.
The text was updated successfully, but these errors were encountered: