Last active
August 29, 2015 14:27
-
-
Save selfsame/0ae67fa10abd9da6e719 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 interact [a ad b bd] :default-interaction) | |
| (rule interact [a ^:hp ad b ^:hp bd] :attack-interaction) | |
| (rule interact [a ^:player ad b ^:item bd] :player-item-interaction) | |
| (rule bump-enter [c collision _] | |
| (let [a (->go c) | |
| b (.collider collision)] | |
| (when (and (data a) (data b)) | |
| (interact a (data a) b (data b))))) | |
| (rule hard.life/start [c ns] | |
| (clear-cloned!) | |
| (data! (clone! :player) {:player true :actor true :hp 100}) | |
| (data! (clone! :treasure) {:item true}) | |
| (for [i (range 10) | |
| :let [rat (clone! :rat (rand-vec 10 0 10))]] | |
| (data! rat {:rat true :actor true :hp 20}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment