Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 141
    • Issues 141
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #635

Closed
Open
Created Nov 30, 2021 by Erallie@Erallie

Bug: castinstead and orElseCast doesn't cancel original skill

Summary

When I use castinstead or orElseCast in a condition, it doesn't cancel the skill the condition is in when the condition is/isn't met, but instead casts both the skill the condition is in as well as the skill that it should cast instead.

Steps to reproduce

The steps to reproduce this with the mob I have is to attack the mob (which is a creeper-based mob) and let it come to you, become primed, and explode. Here are my config files for the mob and its skills:

Mob: https://pastebin.com/EsU8WdHm
Skill with condition: https://pastebin.com/QufLrfuh
Skill dependent on the skill with condition: https://pastebin.com/QDXDxV79
Skill the condition triggers: https://pastebin.com/06zUwTYw
Skill dependent on the triggered condition: https://pastebin.com/hZsa3JF2

Current behavior

I have a skill where it sets the stance to primed, and has a condition where if the stance is primed, it casts a different skill instead. The skill is set to repeat every 2 ticks and also involves playing a sound as well as activating an aura. However, whenever it's primed, it plays the sound every two ticks, as though it's still casting the skill, even though the stance is set to primed primed.

Intended correct behavior

The correct behavior is for the the skill to set the stance to primed, and activate the aura and play the sound once. Because it's then set to primed, that skill shouldn't be activated the next time it triggers (which is two ticks later) but should trigger another skill instead that checks to see whether the creeper-based mob is still in range and still has a line of sight with its target. When either of those conditions are not met, it triggers another skill instead that disables the primed stance as well as removes the aura.

Server log file

https://pastebin.com/1t8YNmnt

Debug log snippet

https://pastebin.com/ZNCcQS8N

Proposed fixes

My proposed fix is to make castinstead cancel the condition it's in when the condition is met, and to make orElseCast cancel the condition it's in when the condition is not met.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking