SpellEngine
SpellEngine copied to clipboard
[1.21.1] Impact Action with "apply_to_caster" true, cancels all the other impacts that come afterwards.
Version: spell_engine-fabric-1.8.2+1.21.1 A Impact-action with "apply_to_caster" set true, will always cancel all the other impact-actions that come afterwards. Its a Spell with a AREA target-type. "apply_to_caster" was set to true, because I only want the caster to get the effect and not allied players in the area. For example, here the Damage gets applied to targets and the Caster will receive the Resistance effect:
"impacts": [
{
"action": {
"type": "DAMAGE",
"damage": {
"spell_power_coefficient": 0.6,
"knockback": 4.0
}
},
"particles": [
{
"particle_id": "gust",
"shape": "CIRCLE",
"origin": "CENTER",
"count": 1.0,
"min_speed": 0.2,
"max_speed": 0.3
}
]
},
{
"action": {
"type": "STATUS_EFFECT",
"status_effect": {
"effect_id": "resistance",
"duration": 10,
"apply_mode": "SET",
"amplifier": 0,
"refresh_duration": true,
"show_particles": false
},
"apply_to_caster": true
}
}
]
Here only the resistance buff gets applied to the caster:
"impacts": [
{
"action": {
"type": "STATUS_EFFECT",
"status_effect": {
"effect_id": "resistance",
"duration": 10,
"apply_mode": "SET",
"amplifier": 0,
"refresh_duration": true,
"show_particles": false
},
"apply_to_caster": true
}
}
{
"action": {
"type": "DAMAGE",
"damage": {
"spell_power_coefficient": 0.6,
"knockback": 4.0
}
},
"particles": [
{
"particle_id": "gust",
"shape": "CIRCLE",
"origin": "CENTER",
"count": 1.0,
"min_speed": 0.2,
"max_speed": 0.3
}
]
},
]
Investigation result:
-
apply_to_castersetsselectedIntent(temp var) toHELPFUL, hence the rest of the actions are filtered out - a proper fix would require splitting
impactsintotarget_impacts+caster_impacts - additionally
caster_impactsshould not execute anyarea_impacts