You also have a period after the end the story statement, which is terminating the rule and orphaning the “otherwise” - should be a semicolon to indicate the rule continues.
(NB too your second mistake statement has “attack something”, not “attack [something]” which is I think what you want).
EDIT: oh, one more tip is that you can use the preformatted text option to paste in your code exactly as it looks in the IDE, spacing included - that makes it easier for folks to troubleshoot. It’s the little option in the forum toolbar that looks like this: </>