From 81c3d702aa6dc2b6c10d15d8da58b8acc8842d4e Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 3 Mar 2015 10:59:22 -0800 Subject: [PATCH] effects!! --- desktop/resources/inside-castle/magic | 149 ++++++++++++++++++ desktop/resources/inside-castle/magic.png | Bin 0 -> 1077 bytes .../advent/screens/rooms/inside_castle.clj | 25 +++ 3 files changed, 174 insertions(+) create mode 100644 desktop/resources/inside-castle/magic create mode 100644 desktop/resources/inside-castle/magic.png diff --git a/desktop/resources/inside-castle/magic b/desktop/resources/inside-castle/magic new file mode 100644 index 00000000..eba34810 --- /dev/null +++ b/desktop/resources/inside-castle/magic @@ -0,0 +1,149 @@ +Untitled +- Delay - +active: false +- Duration - +lowMin: 3000.0 +lowMax: 3000.0 +- Count - +min: 0 +max: 200 +- Emission - +lowMin: 1.0 +lowMax: 1.0 +highMin: 20.0 +highMax: 20.0 +relative: false +scalingCount: 2 +scaling0: 0.0 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Life - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1000.0 +highMax: 1000.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 1.0 +scaling2: 1.0 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.66 +timeline2: 1.0 +- Life Offset - +active: false +- X Offset - +active: false +- Y Offset - +active: false +- Spawn Shape - +shape: ellipse +edges: true +side: both +- Spawn Width - +lowMin: 0.0 +lowMax: 0.0 +highMin: 20.0 +highMax: 20.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Spawn Height - +lowMin: 0.0 +lowMax: 0.0 +highMin: 30.0 +highMax: 30.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Scale - +lowMin: 0.0 +lowMax: 0.0 +highMin: 15.0 +highMax: 5.0 +relative: false +scalingCount: 4 +scaling0: 0.0 +scaling1: 1.0 +scaling2: 0.877551 +scaling3: 0.0 +timelineCount: 4 +timeline0: 0.0 +timeline1: 0.07534247 +timeline2: 0.6164383 +timeline3: 1.0 +- Velocity - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 10.0 +highMax: 20.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Angle - +active: true +lowMin: 90.0 +lowMax: 90.0 +highMin: 90.0 +highMax: 90.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 1.0 +scaling2: 1.0 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.48630136 +timeline2: 1.0 +- Rotation - +active: false +- Wind - +active: false +- Gravity - +active: false +- Tint - +colorsCount: 6 +colors0: 0.5019608 +colors1: 0.94509804 +colors2: 1.0 +colors3: 0.047058824 +colors4: 0.7137255 +colors5: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Transparency - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 1.0 +relative: false +scalingCount: 4 +scaling0: 0.0 +scaling1: 0.8947368 +scaling2: 0.49122807 +scaling3: 0.0 +timelineCount: 4 +timeline0: 0.0 +timeline1: 0.30136988 +timeline2: 0.84931505 +timeline3: 1.0 +- Options - +attached: false +continuous: true +aligned: true +additive: true +behind: false +premultipliedAlpha: false +- Image Path - +magic.png diff --git a/desktop/resources/inside-castle/magic.png b/desktop/resources/inside-castle/magic.png new file mode 100644 index 0000000000000000000000000000000000000000..6416d5ee2db6b093ec3e840242f36ebb4851e0d6 GIT binary patch literal 1077 zcmaJ=TSyd97@q8A(msfVB?PAt!l2!m*-PsVu9w|eb+Hjy7uqDq*_q=ytaEAR*p8aC z6i7ZqAVx%K4}!f|PZo5ct36am5)@L}OAiqxJ{2JmompM&p>1H!<>&jp|9XboTALgt z6(s~gIHJv54DY+_zjzy7FAVQ<;B7C8Bv8B7g))Kxi3UkaLJ(Di6pTSZ>O1)Y))2(z zDmk7&3H}HxYKlv+F)mBdF`FQ2>MUIl(-46qOv!4HT)zK^1hNz)kNS9;*Tb+|Ztgc= zdw*+O>`#jUiL9#yH5Q8n6o>?1DLtymT0t_W%i^_$juDJql6 zxH2A>W~3-45C~ATn{vCI7~wSgR3unV)vU}baL^PDSx2&_0$Wi?YP~2(;z(ChQ1o?K z)m$qRE*NDAI>oqXJEc63=l>5?ly$U;VsInge+rxNJ{?jqXllKNh#S{cX}i+dumJ_6 z8F5YP$yc$hTSJ=Jt?3{f&Q%Rm@q#F;w(($&#q(@bHIbl-Fvr9BFZ(y zt@jTuy>iUZ#a!9worN8#^5<7t-&{=3w@i2JuRS+1d;Ij1*LytHiL{da*>SsMp$wD{ z?B3cjr~eo$oiDmeL^{7`OM5ELOLNZxy<5OQ_SejrmimUp1N!2Zx8vFE_1>PL#cxj& zMJqQeCzpiMZi=#2K?IOZD|-w&R##ZJT>V^@mI6co`)|l4-P*5xKdPG Zw3GNy>|c8KS(&gOax~J)-3oP{{R7NbWS;;4 literal 0 HcmV?d00001 diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 6a5e1a92..78c8fc33 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -298,6 +298,30 @@ :y 40 :baseline 240 :pull-sword pull-sword-anim) + :hotspots [{:box [0 74 77 109] + :fn (fn [screen entities] + (let [magic (get-in entities [:room :entities :magic])] + (cond (nil? magic) + (assoc-in entities [:room :entities :magic] (assoc (doto (particle-effect "inside-castle/magic") + (particle-effect! :reset) + ) + :x 25 + :y 112 + :baseline 240)) + (particle-effect! magic :is-complete) + (do + (doto magic + (particle-effect! :start)) + entities) + :else + entities)))} + {:box [78 66 90 86] + :fn (fn [screen entities] + (if-let [magic (get-in entities [:room :entities :magic])] + (do + (particle-effect! magic :allow-completion) + entities) + entities))}] :entities {:bird-1 (utils/make-bird screen (as-> [[185 235] [220 225] [210 230] [250 235]] p (concat p (reverse p)))) @@ -307,6 +331,7 @@ :x 22 :y 110 :baseline 95) + :trophy (assoc (animation->texture screen trophy) :x 253 :y 69 :baseline 191 :anim trophy