Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ujihisa/cloft
base: 865d296859
...
head fork: ujihisa/cloft
compare: a229d04827
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 29, 2012
@ujihisa harder d0ab006
Commits on Apr 30, 2012
@ujihisa shotgun skill a229d04
Showing with 14 additions and 3 deletions.
  1. +14 −3 src/cloft/core.clj
View
17 src/cloft/core.clj
@@ -265,7 +265,17 @@
(Thread/sleep 100) (.shootArrow (.getEntity evt))
(Thread/sleep 300) (.shootArrow (.getEntity evt))
(Thread/sleep 500) (.shootArrow (.getEntity evt))
- )))))))
+ ))))
+ (when (= 'shotgun (get @jobs (.getDisplayName shooter)))
+ (doseq [_ (range 1 80)]
+ (let [rand1 (fn [] (* 0.8 (- (rand) 0.5)))
+ arrow (.launchProjectile shooter Arrow)]
+ (c/consume-itemstack (.getInventory shooter) Material/ARROW)
+ (.setVelocity arrow (.getVelocity (.getProjectile evt)))
+ (c/add-velocity arrow (rand1) (rand1) (rand1))
+ (future-call #(do
+ (Thread/sleep 10000)
+ (.remove arrow)))))))))
(defn entity-target-event [evt]
(let [entity (.getEntity evt)]
@@ -313,6 +323,7 @@
Material/SAPLING [arrow-skill-tree "TREE"]
Material/WORKBENCH [arrow-skill-ore "ORE"]
Material/BROWN_MUSHROOM ['fly "FLY"]
+ Material/CACTUS ['shotgun "SHOTGUN"]
Material/RAILS ['cart "CART"]
Material/BOOKSHELF ['mobchange "MOBCHANGE"]
Material/SNOW_BLOCK [arrow-skill-ice "ICE"]}]
@@ -657,8 +668,8 @@
(defn player-respawn-event [evt]
(let [player (.getPlayer evt)]
(future-call #(do
- (.setHealth player (/ (.getMaxHealth player) 2))
- (.setFoodLevel player 10)))))
+ (.setHealth player (/ (.getMaxHealth player) 3))
+ (.setFoodLevel player 5)))))
(defn entity-murder-event [evt entity]
(let [killer (.getKiller entity)]

No commit comments for this range

Something went wrong with that request. Please try again.