-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecarlate.ink
146 lines (114 loc) · 3.52 KB
/
ecarlate.ink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
INCLUDE ecarlate/functions.ink
INCLUDE ecarlate/debarquer.ink
INCLUDE ecarlate/opensea.ink
LIST PavillonColors = (pirate), portuguese, british, dutch, (french)
VAR PavillonColor = pirate
LIST Tresors = tulipe, azulejos, rose
LIST Destinations = Batavia, Macau, Labuan
LIST Cargo = Food, Rum
LIST intel_types = location, entry, escape
LIST BataviaKnowledge = batavia_location, batavia_entry, batavia_escape
LIST MacauKnowledge = macau_location, macau_entry, macau_escape
LIST LabuanKnowledge = labuan_location, labuan_entry, labuan_escape
VAR Knowledge = ()
VAR LifePoints = 100
-> intro
== intro ==
Elle a fiere allure la Nageuse Ecarlate sur les eaux de la Mer d'Orient.
+ Elle fend les vagues.
->discalie_pavillon(false)->
-> hub_sea
-> DONE
=== hub_sea ===
Pleine mer # CLASS: location
-(hub_loop)
{~ De là|Et maintenant} vous pouvez
<- destinationChoiceList(Destinations, -> debarquer)
+ ... vous laisser porter par les vents
-> random_encounter -> hub_sea
+ ... rentrer à Kinatuka
-> kinatuka_end -> hub_loop
+ ... changer de pavillon
-> suggest_pavillon -> hub_loop
=== discalie_pavillon(new) ==
Vous <> {new:
- true: hissez
- false: portez
} <> {verbosePavillon(PavillonColor)} #CLASS: didascalie
->->
=== suggest_pavillon ==
<- pavillonChoiceList(PavillonColors, -> hub_sea.hub_loop)
* [Annuler] ->->
->->
=== pavillonChoiceList(list, -> divert)===
~ temp current_pav = LIST_MIN(list)
{ LIST_COUNT(list) > 0 :
<- pavillonChoiceList(list - current_pav, divert)
+ [Hisser {verbosePavillon(current_pav)}]
-> hisse_pavillon(current_pav) -> divert
}
=== destinationChoiceList(list, -> divert)===
~ temp current_dest = LIST_MIN(list)
{ LIST_COUNT(list) > 0 :
<- destinationChoiceList(list - current_dest, divert)
+ {destination_reachable(current_dest)}[... rallier {verboseDestination(current_dest)}]
-> hisse_pavillon_for(current_dest) -> divert(current_dest)
}
=== function destination_reachable(destination)
~ temp tmp_tresor= tresorOf(destination)
{Tresors has tmp_tresor:
~ return false
}
~ return true
=== function verboseDestination(destination)
~ temp tmp_pavillon= pavillonOf(destination)
{destination}<>
{PavillonColors has tmp_pavillon:
<> avec
}
{PavillonColors hasnt tmp_pavillon:
, mais il vous faudrait
}
<> un {verbosePavillon(tmp_pavillon)}
=== hisse_pavillon(pavillon) ===
{PavillonColors hasnt pavillon:
Vous n'avez pas de {verbosePavillon(pavillon)} ->->
}
~ temp isNew = pavillon != PavillonColor
~ PavillonColor = pavillon
->discalie_pavillon(isNew)->
->->
=== hisse_pavillon_for(destination) ===
{PavillonColors hasnt pavillonOf(destination): -> continue}
{destination:
-Batavia: -> hisse_pavillon(dutch) ->
-Macau: -> hisse_pavillon(portuguese) ->
-Labuan: -> hisse_pavillon(british) ->
}
-(continue)
->->
=== sank_end ===
<>
Fin
-> END
=== kinatuka_end ===
{ LIST_COUNT(Tresors) == 0 :
- Hors de question de rentrer au bercail sans un trésor !
->->
}
Kinatuka # CLASS: location
Vous débarquez sur Kinatuka, votre île d'adoption, avec <>
{LIST_COUNT(Tresors):
-1 : un seul
-2 : deux
-3 : tous les
}<> trésor{LIST_COUNT(Tresors) > 1:s} une <>
{LIST_COUNT(Tresors):
-1 : petite
-2 : grande
-3 : somptueuse
} <> fête a été organisée en votre honneur.
+ Repartir en mer
-> hub_sea
+ Rester
-> DONE