Created
April 9, 2014 04:21
-
-
Save Blecki/10225817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rule perform spawn when actor.TemplateName == "knight" { | |
Let actor.Properties.Health = 1; | |
} | |
Rule abort die { # Prevent the die activity from being interrupted. | |
If actor.TemplateName == "knight" { | |
Return rule-fail; | |
} | |
Return rule-pass; | |
} | |
Rule perform die when actor.TemplateName == "knight" { | |
Let actor.State = "defeat"; | |
Wait for 4 turns; | |
Despawn actor; | |
} | |
Rule perform knight slash { | |
Let actor.State = "slash"; | |
Wait for 2 turns; | |
Foreach target in [find actors within 1 unit of actor] { | |
If (target != actor) { | |
Consider [take 1 damage] with target; | |
} | |
} | |
Wait for 3 turns; | |
Let actor.State = "idle"; | |
} | |
Rule do knight-slash { | |
Perform [knight slash] with actor; | |
} | |
Rule perform knight-flinch { | |
Let actor.State = "victory"; | |
Wait for 2 turns; | |
Let actor.State = "idle"; | |
} | |
Rule consider take (n) damage when actor.TemplateName == "knight" { #All other consider rules still run! | |
Perform [knight-flinch] with actor; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment