Trick: Break Loop doesn't work on first cast, plus something else
defsil opened this issue ยท 3 comments
Version Information
Forge version: v36.1.0
Psi version: v1.16-94
Further Information
The trick Break Loop does not interrupt the spell if used on the very first loop (loopcast index = 0). Furthermore, attempting to cast two loopcasts in a row caused some... oddities.
Steps to reproduce:
- Import this spell to a loopcast bullet:
{modsRequired:[{modVersion:"1.16-94",modName:"psi"}],spellName:"Bug: Loopcast",uuidMost:-8063457767375614886L,validSpell:1b,spellList:[{data:{params:{_number:2,_target:4},key:"psi:trick_debug"},x:2,y:5},{data:{params:{_target:4},key:"psi:connector"},x:2,y:6},{data:{key:"psi:selector_loopcast_index"},x:3,y:4},{data:{params:{_number2:2,_number3:0,_number1:1},key:"psi:operator_subtract"},x:3,y:5},{data:{key:"psi:constant_number",constantValue:"0"},x:3,y:6},{data:{params:{_number:3},key:"psi:trick_break_loop"},x:4,y:5}],uuidLeast:-6249723120493175373L}
- Cast the spell!
What I expected to happen:
The spell was supposed to display [0] 0.0
once and then finish the execution.
What happened instead:
The spell continued looping indefinitely.
FURTHERMORE
If you change the constant 0
to 1
in the above spell, something else can be seen.
What I expected to happen:
The spell was supposed to display [1] -1.0
, then [1] 0.0
, and then stop the execution.
What happened instead:
During the first casting, this is indeed what happens. However, if the spell is cast again right afterwards, you'll see it actually skips [1] 0.0
altogether, and then continues the execution indefinitely. Increasing the constant further seems to imply that the it's always the second entry that is skipped for some reason.
Attached is the recording of the bug in action.
Loopcast.Bug.mp4
Thanks for your great work! ^w^
Fixed in 33fa090