summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-07-06 10:27:18 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2021-07-06 10:27:18 -0400
commitc77c50df34b598014e29f889523bbf067a0998f0 (patch)
tree2c600814d7286011eccdb0e9fb53b43930832a75 /res
parent77fad1c341787f11ee3b8aeaa5c58fe6ebbdebb6 (diff)
downloadtanetane-c77c50df34b598014e29f889523bbf067a0998f0.tar.gz
tanetane-c77c50df34b598014e29f889523bbf067a0998f0.tar.bz2
tanetane-c77c50df34b598014e29f889523bbf067a0998f0.zip
Added beginning of Hinawa event
#28
Diffstat (limited to 'res')
-rw-r--r--res/maps/hallucination_cliff.tmx25
-rw-r--r--res/scripts/hallucination_cliff.lua84
2 files changed, 108 insertions, 1 deletions
diff --git a/res/maps/hallucination_cliff.tmx b/res/maps/hallucination_cliff.tmx index 817f2ad..0e09ecd 100644 --- a/res/maps/hallucination_cliff.tmx +++ b/res/maps/hallucination_cliff.tmx
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="48" height="48" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="13"> 2<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="48" height="48" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="18">
3 <properties> 3 <properties>
4 <property name="music" value="red_green_yellow_yellow"/> 4 <property name="music" value="red_green_yellow_yellow"/>
5 </properties> 5 </properties>
@@ -159,6 +159,29 @@
159 </properties> 159 </properties>
160 <point/> 160 <point/>
161 </object> 161 </object>
162 <object id="13" name="see_hinawa_first_event" type="trigger" x="560" y="528" width="16" height="16">
163 <properties>
164 <property name="script" value="see_hinawa_first_event"/>
165 </properties>
166 </object>
167 <object id="14" name="first_hinawa_vantage" type="warp" x="568" y="488">
168 <point/>
169 </object>
170 <object id="15" name="hinawa" type="sprite" x="568" y="456">
171 <properties>
172 <property name="animation" value="ghost_hinawa"/>
173 <property name="direction" value="left"/>
174 <property name="floating" type="bool" value="true"/>
175 <property name="movementSpeed" type="int" value="1"/>
176 </properties>
177 <point/>
178 </object>
179 <object id="16" name="hinawa_second_position" type="warp" x="456" y="288">
180 <point/>
181 </object>
182 <object id="17" name="hinawa_offscreen_first" type="warp" x="432" y="456">
183 <point/>
184 </object>
162 </objectgroup> 185 </objectgroup>
163 <layer id="1" name="Upper" width="48" height="48"> 186 <layer id="1" name="Upper" width="48" height="48">
164 <properties> 187 <properties>
diff --git a/res/scripts/hallucination_cliff.lua b/res/scripts/hallucination_cliff.lua index 020a743..d539e62 100644 --- a/res/scripts/hallucination_cliff.lua +++ b/res/scripts/hallucination_cliff.lua
@@ -1,5 +1,35 @@
1hallucination_cliff = {} 1hallucination_cliff = {}
2 2
3function hallucination_cliff.init()
4 gamestate.hinawa_can_appear = false
5 if gamestate.saw_hinawa_first_scene then
6 if gamestate.saw_hinawa_second_scene then
7 -- the event can no longer trigger if the player leaves the map after
8 -- seeing hinawa a second time.
9 else
10 -- as long as nothing else prevents the scene from occuring, a player
11 -- who interrupted the hinawa event by leaving the map before seeing her
12 -- a second time is allowed to resume the event.
13 gamestate.hinawa_can_appear = true
14 MoveSpriteToWarp("hinawa", "hinawa_second_position")
15 end
16 else
17 -- the hinawa event only has a 50% chance of triggering; reloading the map
18 -- rolls this again.
19 if randomChance(1.0/2.0) then
20 gamestate.hinawa_can_appear = true
21 end
22 end
23 -- the hinawa event will not occur if claus ever joined the party.
24 if gamestate.claus_joined then
25 gamestate.hinawa_can_appear = false
26 end
27 -- if hinawa can't appear, remove her from the map.
28 if not gamestate.hinawa_can_appear then
29 DestroyNamedSprite("hinawa")
30 end
31end
32
3function hallucination_cliff.off_bottom() 33function hallucination_cliff.off_bottom()
4 ChangeMap("hallucination_interior", "fromTop") 34 ChangeMap("hallucination_interior", "fromTop")
5end 35end
@@ -136,3 +166,57 @@ function hallucination_cliff.claus_fall_event()
136 -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster")) 166 -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster"))
137 -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney")) 167 -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney"))
138end 168end
169
170function hallucination_cliff.see_hinawa_first_event()
171 -- for safety, check if the claus falling event is happening, since it moves
172 -- the party into this event's trigger.
173 if gamestate.claus_fall_scene then
174 return
175 end
176
177 -- the scene only triggers under certain circumstances (see the init function)
178 if not gamestate.hinawa_can_appear then
179 return
180 end
181
182 -- do not trigger a second time
183 if gamestate.saw_hinawa_first_scene then
184 return
185 end
186
187 gamestate.saw_hinawa_first_scene = true
188
189 StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION)
190 Delay(100)
191
192 ShowExpression("lucas", "surprise")
193 ShowExpression("kuma", "surprise")
194 ShowExpression("duster", "surprise")
195 Delay(1000)
196
197 PanToWarpPoint("first_hinawa_vantage", 2000)
198 Delay(750)
199
200 RemoveExpression("lucas")
201 RemoveExpression("kuma")
202 RemoveExpression("duster")
203 WaitForPan()
204 Delay(2000)
205
206 MakeSpriteNotSolid("hinawa")
207 UnpauseSprite("hinawa")
208 DirectSpriteToLocation("hinawa", "hinawa_offscreen_first", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
209 WaitForSpritePath("hinawa")
210
211 DisableBehaviour("hinawa")
212 PauseSprite("hinawa")
213 MoveSpriteToWarp("hinawa", "hinawa_second_position")
214 Delay(2000)
215 ReturnCamera(1000)
216 Delay(500)
217
218 DisplayMessage("* Lucas... Was that...?", "Kumatora", SpeakerType.WOMAN)
219 WaitForEndOfMessage()
220
221 HideCutsceneBars(CutsceneOptions.DO_NOT_CHANGE_ANIMATION)
222end