tx · 7wP2j5BUYgypJyKj5Jfj2m6vHu2X8fzCScUFfYcwZnES 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.01300000 Waves 2022.12.15 03:33 [2360705] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "7wP2j5BUYgypJyKj5Jfj2m6vHu2X8fzCScUFfYcwZnES", "fee": 1300000, "feeAssetId": null, "timestamp": 1671064404898, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "4ai2tU4qUwbVzKtDLXUMRRTLcMxZ7RpUofLrBB6HsGDq2FwadEJgjTDNSzZ2a32iR12FKwXkPJyxCaNCwiXyKXRF" ], "script": "base64:BgIuCAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICCcABWNoYWluCQCwCQEJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAgFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4ADWluY3ViYXRvckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNQRWt0VnV4MlJoY2hTTjYzRHNEbzRiNG16NFFxektTZUR2AwkAAAICAVQFByRtYXRjaDAFBHRoaXMJAAIBAg1Vbmtub3duIGNoYWluAAticmVlZGVyQWRkcgQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM1BEVnVVNDVIN0VoNWRt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3VycmVudFBhY2sFCWJwSWR4UHJvZAUDbmlsAgE6BQNuaWwBaQEOdXBkYXRlQmFja3BhY2sCC2R1Y2tBc3NldElkB25ld1BhY2sDCQECIT0CCAUBaQZjYWxsZXIFC2Vjb25vbXlBZGRyCQACAQIRcGVybWlzc2lvbiBkZW5pZWQJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCCQERa2V5QmFja3BhY2tCeUR1Y2sBBQtkdWNrQXNzZXRJZAUHbmV3UGFjawUDbmlsBQduZXdQYWNrAFvgcgw=", "height": 2360705, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GULLEXUBbfTbErtqqDXY8KNzgMdavh3myzqQFFKGkLH2 Next: EJUih26gnK7JcrYUpLPafmH4zxkW3wVuFYk7k8rQG4x6 Diff:
Old | New | Differences | |
---|---|---|---|
408 | 408 | ||
409 | 409 | ||
410 | 410 | @Callable(Z) | |
411 | - | func setHealth (aA,B) = if ((Z.caller != this)) | |
412 | - | then throw("permission denied") | |
413 | - | else if (if ((0 > aA)) | |
414 | - | then true | |
415 | - | else (aA > 100)) | |
416 | - | then throw("HP should be within 0..100") | |
417 | - | else [IntegerEntry(D(B), aA)] | |
411 | + | func setHealth (aA,B) = if (if ((0 > aA)) | |
412 | + | then true | |
413 | + | else (aA > 100)) | |
414 | + | then throw("HP should be within 0..100") | |
415 | + | else [IntegerEntry(D(B), aA)] | |
418 | 416 | ||
419 | 417 | ||
420 | 418 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let b = { | |
7 | 7 | let c = a | |
8 | 8 | if (("W" == c)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == c)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let d = { | |
16 | 16 | let c = a | |
17 | 17 | if (("W" == c)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if (("T" == c)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let e = { | |
25 | 25 | let c = a | |
26 | 26 | if (("W" == c)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if (("T" == c)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let f = { | |
34 | 34 | let c = a | |
35 | 35 | if (("W" == c)) | |
36 | 36 | then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D") | |
37 | 37 | else if (("T" == c)) | |
38 | 38 | then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep") | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let g = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let h = 10000 | |
45 | 45 | ||
46 | 46 | let i = "LAND" | |
47 | 47 | ||
48 | 48 | let j = "DUCK" | |
49 | 49 | ||
50 | 50 | let k = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let l = 6 | |
53 | 53 | ||
54 | 54 | let m = 3456000 | |
55 | 55 | ||
56 | 56 | let n = 86400000 | |
57 | 57 | ||
58 | 58 | let o = 300000 | |
59 | 59 | ||
60 | 60 | let p = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
61 | 61 | ||
62 | 62 | func q (r) = ("nftOwner_" + r) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func s (r) = ("duckOwner_" + r) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func t (r) = ("stakedTime_" + r) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func u (v) = ("stakedDuckByOwner_" + v) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func w (x,r,v) = ((((("stakedTimeByTypeAssetIdAndOwner_" + x) + "_") + r) + "_") + v) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func y (z) = ("landOwner_" + z) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func A (B) = ("backPack_" + B) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func C (B) = ("duckLocation_" + B) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func D (B) = ("duckHealth_" + B) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | let E = 0 | |
90 | 90 | ||
91 | 91 | let F = 1 | |
92 | 92 | ||
93 | 93 | let G = 2 | |
94 | 94 | ||
95 | 95 | let H = 3 | |
96 | 96 | ||
97 | 97 | let I = 0 | |
98 | 98 | ||
99 | 99 | let J = 1 | |
100 | 100 | ||
101 | 101 | let K = 2 | |
102 | 102 | ||
103 | 103 | let L = 0 | |
104 | 104 | ||
105 | 105 | let M = 1 | |
106 | 106 | ||
107 | 107 | let N = 2 | |
108 | 108 | ||
109 | 109 | let O = 3 | |
110 | 110 | ||
111 | 111 | func P (Q) = [(size(split(Q, "A")) - 1), (size(split(Q, "B")) - 1), (size(split(Q, "C")) - 1), (size(split(Q, "D")) - 1), (size(split(Q, "E")) - 1), (size(split(Q, "F")) - 1)] | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func R (S) = { | |
115 | 115 | let c = S | |
116 | 116 | if (("S" == c)) | |
117 | 117 | then 25 | |
118 | 118 | else if (("M" == c)) | |
119 | 119 | then 100 | |
120 | 120 | else if (("L" == c)) | |
121 | 121 | then 225 | |
122 | 122 | else if (("XL" == c)) | |
123 | 123 | then 400 | |
124 | 124 | else if (("XXL" == c)) | |
125 | 125 | then 625 | |
126 | 126 | else throw("Unknown land size") | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func T (U,V,W) = { | |
131 | 131 | func X (Y,Z) = (Y :+ (if ((Z == V)) | |
132 | 132 | then toString((parseIntValue(U[Z]) - W)) | |
133 | 133 | else U[Z])) | |
134 | 134 | ||
135 | 135 | let aa = { | |
136 | 136 | let ab = [0, 1, 2, 3, 4, 5] | |
137 | 137 | let ac = size(ab) | |
138 | 138 | let ad = nil | |
139 | 139 | func ae (af,ag) = if ((ag >= ac)) | |
140 | 140 | then af | |
141 | 141 | else X(af, ab[ag]) | |
142 | 142 | ||
143 | 143 | func ah (af,ag) = if ((ag >= ac)) | |
144 | 144 | then af | |
145 | 145 | else throw("List size exceeds 6") | |
146 | 146 | ||
147 | 147 | ah(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6) | |
148 | 148 | } | |
149 | 149 | makeString(aa, "_") | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func ai (aj,ak,al,am) = { | |
154 | 154 | func an (Y,Z) = { | |
155 | 155 | let ao = ((fraction(al, m, n) * ak[Z]) * am) | |
156 | 156 | (Y :+ toString((parseIntValue(aj[Z]) + ao))) | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | let aa = { | |
160 | 160 | let ab = [0, 1, 2, 3, 4, 5] | |
161 | 161 | let ac = size(ab) | |
162 | 162 | let ad = nil | |
163 | 163 | func ae (af,ag) = if ((ag >= ac)) | |
164 | 164 | then af | |
165 | 165 | else an(af, ab[ag]) | |
166 | 166 | ||
167 | 167 | func ah (af,ag) = if ((ag >= ac)) | |
168 | 168 | then af | |
169 | 169 | else throw("List size exceeds 6") | |
170 | 170 | ||
171 | 171 | ah(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6) | |
172 | 172 | } | |
173 | 173 | makeString(aa, "_") | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(Z) | |
178 | 178 | func stakeLand () = { | |
179 | 179 | let ap = value(Z.payments[0]) | |
180 | 180 | let r = value(ap.assetId) | |
181 | 181 | let aq = toString(Z.caller) | |
182 | 182 | if ((ap.amount != 1)) | |
183 | 183 | then throw((("NFT " + i) + " token should be attached as payment")) | |
184 | 184 | else { | |
185 | 185 | let ar = value(assetInfo(r)) | |
186 | 186 | if ((ar.issuer != this)) | |
187 | 187 | then throw("Unknown issuer of token") | |
188 | 188 | else if (!(contains(ar.name, i))) | |
189 | 189 | then throw((("Only NFT " + i) + " tokens are accepted")) | |
190 | 190 | else { | |
191 | 191 | let as = drop(ar.name, 4) | |
192 | 192 | let z = if (contains(as, "XXL")) | |
193 | 193 | then dropRight(as, 3) | |
194 | 194 | else if (contains(as, "XL")) | |
195 | 195 | then dropRight(as, 2) | |
196 | 196 | else dropRight(as, 1) | |
197 | 197 | if (!(isDefined(parseInt(z)))) | |
198 | 198 | then throw(("Cannot parse land number from " + ar.name)) | |
199 | 199 | else { | |
200 | 200 | let at = t(toBase58String(r)) | |
201 | 201 | if (isDefined(getInteger(at))) | |
202 | 202 | then throw((("NFT " + ar.name) + " is already staked")) | |
203 | 203 | else [IntegerEntry(at, lastBlock.timestamp), IntegerEntry(w(i, toBase58String(r), aq), lastBlock.timestamp), StringEntry(q(toBase58String(r)), aq), StringEntry(y(z), aq)] | |
204 | 204 | } | |
205 | 205 | } | |
206 | 206 | } | |
207 | 207 | } | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | 211 | @Callable(Z) | |
212 | 212 | func unstakeLand (au) = if ((size(Z.payments) != 0)) | |
213 | 213 | then throw("unstake doesn't require any payments") | |
214 | 214 | else { | |
215 | 215 | let r = fromBase58String(au) | |
216 | 216 | let aq = toString(Z.caller) | |
217 | 217 | let ar = value(assetInfo(r)) | |
218 | 218 | if ((ar.issuer != this)) | |
219 | 219 | then throw("Unknown issuer of token") | |
220 | 220 | else if (!(contains(ar.name, i))) | |
221 | 221 | then throw((("Only NFT " + i) + " tokens can be unstaked")) | |
222 | 222 | else { | |
223 | 223 | let at = t(au) | |
224 | 224 | if (!(isDefined(at))) | |
225 | 225 | then throw((("NFT " + ar.name) + " is not staked")) | |
226 | 226 | else { | |
227 | 227 | let av = valueOrErrorMessage(getString(q(au)), (("NFT " + ar.name) + " is orphaned")) | |
228 | 228 | if ((av != aq)) | |
229 | 229 | then throw("Staked NFT is not yours") | |
230 | 230 | else [ScriptTransfer(Z.caller, 1, r), DeleteEntry(at), DeleteEntry(w(i, au, aq))] | |
231 | 231 | } | |
232 | 232 | } | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Callable(Z) | |
238 | 238 | func stakeDuck () = { | |
239 | 239 | let ap = value(Z.payments[0]) | |
240 | 240 | let r = value(ap.assetId) | |
241 | 241 | let aq = toString(Z.caller) | |
242 | 242 | if ((ap.amount != 1)) | |
243 | 243 | then throw((("NFT " + j) + " token should be attached as payment")) | |
244 | 244 | else { | |
245 | 245 | let ar = value(assetInfo(r)) | |
246 | 246 | if (if ((ar.issuer != d)) | |
247 | 247 | then (ar.issuer != e) | |
248 | 248 | else false) | |
249 | 249 | then throw((("Unknown issuer of " + j) + " token")) | |
250 | 250 | else if (!(contains(ar.name, j))) | |
251 | 251 | then throw((("Only NFT " + j) + " tokens are accepted")) | |
252 | 252 | else { | |
253 | 253 | let aw = toBase58String(r) | |
254 | 254 | let at = t(aw) | |
255 | 255 | if (isDefined(getInteger(at))) | |
256 | 256 | then throw((("NFT " + ar.name) + " is already staked")) | |
257 | 257 | else if (isDefined(getString(u(aq)))) | |
258 | 258 | then throw(("You already staked one duck: " + ar.name)) | |
259 | 259 | else { | |
260 | 260 | let ax = C(aw) | |
261 | 261 | let ay = getString(ax) | |
262 | 262 | let az = D(aw) | |
263 | 263 | let aA = getInteger(az) | |
264 | 264 | let aB = A(aw) | |
265 | 265 | let aC = getString(aB) | |
266 | 266 | ([IntegerEntry(at, lastBlock.timestamp), IntegerEntry(w(j, toBase58String(r), aq), lastBlock.timestamp), StringEntry(s(aw), aq), StringEntry(u(aq), aw)] ++ (if (isDefined(ay)) | |
267 | 267 | then nil | |
268 | 268 | else ([StringEntry(ax, k)] ++ (if (isDefined(aA)) | |
269 | 269 | then nil | |
270 | 270 | else ([IntegerEntry(az, 100)] ++ (if (isDefined(aC)) | |
271 | 271 | then nil | |
272 | 272 | else [StringEntry(aB, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
273 | 273 | } | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | 280 | @Callable(Z) | |
281 | 281 | func unstakeDuck (aw) = if ((size(Z.payments) != 0)) | |
282 | 282 | then throw("unstake doesn't require any payments") | |
283 | 283 | else { | |
284 | 284 | let r = fromBase58String(aw) | |
285 | 285 | let aq = toString(Z.caller) | |
286 | 286 | let ar = value(assetInfo(r)) | |
287 | 287 | if (if ((ar.issuer != d)) | |
288 | 288 | then (ar.issuer != e) | |
289 | 289 | else false) | |
290 | 290 | then throw((("Unknown issuer of " + j) + " token")) | |
291 | 291 | else if (!(contains(ar.name, j))) | |
292 | 292 | then throw((("Only NFT " + j) + " tokens can be unstaked")) | |
293 | 293 | else { | |
294 | 294 | let at = t(toBase58String(r)) | |
295 | 295 | if (!(isDefined(at))) | |
296 | 296 | then throw((("NFT " + ar.name) + " is not staked")) | |
297 | 297 | else if (!(isDefined(u(aq)))) | |
298 | 298 | then throw((("The duck " + ar.name) + " is not staked")) | |
299 | 299 | else { | |
300 | 300 | let av = valueOrErrorMessage(getString(s(toBase58String(r))), (("NFT " + ar.name) + " is orphaned")) | |
301 | 301 | if ((av != aq)) | |
302 | 302 | then throw("Staked NFT is not yours") | |
303 | 303 | else [ScriptTransfer(Z.caller, 1, r), DeleteEntry(at), DeleteEntry(C(aw)), DeleteEntry(w(j, aw, aq)), DeleteEntry(u(aq))] | |
304 | 304 | } | |
305 | 305 | } | |
306 | 306 | } | |
307 | 307 | ||
308 | 308 | ||
309 | 309 | ||
310 | 310 | @Callable(Z) | |
311 | 311 | func claimRes (W,au) = if ((size(Z.payments) != 0)) | |
312 | 312 | then throw("claimRes doesn't require any payments") | |
313 | 313 | else { | |
314 | 314 | let aD = toString(Z.caller) | |
315 | 315 | let ar = value(assetInfo(fromBase58String(au))) | |
316 | 316 | if (!(contains(ar.name, i))) | |
317 | 317 | then throw((("NFT " + i) + " token should be passed as param")) | |
318 | 318 | else { | |
319 | 319 | let at = t(au) | |
320 | 320 | let aE = getInteger(at) | |
321 | 321 | if (!(isDefined(aE))) | |
322 | 322 | then throw((("NFT " + ar.name) + " is not staked")) | |
323 | 323 | else { | |
324 | 324 | let av = getStringValue(q(au)) | |
325 | 325 | if ((av != aD)) | |
326 | 326 | then throw((i + " is not yours")) | |
327 | 327 | else { | |
328 | 328 | let aF = split(ar.description, "_") | |
329 | 329 | let S = aF[F] | |
330 | 330 | let ak = P(aF[G]) | |
331 | 331 | let aG = getString(u(aD)) | |
332 | 332 | if (!(isDefined(aG))) | |
333 | 333 | then throw("You don't have a duck staked") | |
334 | 334 | else { | |
335 | 335 | let aH = value(aG) | |
336 | 336 | let aI = valueOrElse(getString(C(aH)), k) | |
337 | 337 | let aJ = split(value(aI), "_") | |
338 | 338 | if ((aJ[J] != "L")) | |
339 | 339 | then throw((("Duck location type is " + aJ[J]) + ", but should be L")) | |
340 | 340 | else if ((aJ[K] != au)) | |
341 | 341 | then throw(((("Duck location id is " + aJ[K]) + ", but should be ") + au)) | |
342 | 342 | else { | |
343 | 343 | let al = (lastBlock.timestamp - value(aE)) | |
344 | 344 | if ((0 > al)) | |
345 | 345 | then throw(((("Saved timestamp is in future, saved = " + toString(value(aE))) + ", current = ") + toString(lastBlock.timestamp))) | |
346 | 346 | else { | |
347 | 347 | let aK = R(S) | |
348 | 348 | let aL = (fraction(al, m, n) * aK) | |
349 | 349 | if ((W > aL)) | |
350 | 350 | then throw(((("Not enough resources, available = " + toString(aL)) + ", requested = ") + toString(W))) | |
351 | 351 | else { | |
352 | 352 | let aM = fraction((aL - W), n, (aK * m)) | |
353 | 353 | let aN = (lastBlock.timestamp - aM) | |
354 | 354 | let aB = A(aH) | |
355 | 355 | let aO = split(valueOrElse(getString(aB), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
356 | 356 | let aj = split(aO[M], "_") | |
357 | 357 | let aP = ai(aj, ak, (al - aM), (aK / 25)) | |
358 | 358 | let aQ = makeString([aO[L], aP, aO[N], aO[O]], ":") | |
359 | 359 | $Tuple2([StringEntry(aB, aQ), IntegerEntry(at, aN), IntegerEntry(w(i, au, av), aN)], unit) | |
360 | 360 | } | |
361 | 361 | } | |
362 | 362 | } | |
363 | 363 | } | |
364 | 364 | } | |
365 | 365 | } | |
366 | 366 | } | |
367 | 367 | } | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | ||
371 | 371 | @Callable(Z) | |
372 | 372 | func flight (aR,aS) = if (!(sigVerify_8Kb(aR, aS, g))) | |
373 | 373 | then throw("signature does not match") | |
374 | 374 | else if ((size(Z.payments) != 0)) | |
375 | 375 | then throw("flight doesn't require any payments") | |
376 | 376 | else { | |
377 | 377 | let aT = split(toUtf8String(aR), ";") | |
378 | 378 | let aU = split(split(aT[0], "|")[0], "_") | |
379 | 379 | let aV = parseIntValue(aU[0]) | |
380 | 380 | let aW = parseIntValue(aU[1]) | |
381 | 381 | let aX = split(aT[1], ":") | |
382 | 382 | let aY = aX[0] | |
383 | 383 | let aZ = parseIntValue(aX[1]) | |
384 | 384 | if (if ((aZ > (lastBlock.timestamp + o))) | |
385 | 385 | then true | |
386 | 386 | else ((lastBlock.timestamp - o) > aZ)) | |
387 | 387 | then throw("signature outdated") | |
388 | 388 | else { | |
389 | 389 | let B = valueOrErrorMessage(getString(u(toString(Z.caller))), "You don't have a duck staked") | |
390 | 390 | let az = D(B) | |
391 | 391 | let ba = valueOrElse(getInteger(az), 100) | |
392 | 392 | if ((ba != aV)) | |
393 | 393 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(az), 100))) + " from state does not match one from flight log=") + toString(aV))) | |
394 | 394 | else if ((0 >= aV)) | |
395 | 395 | then throw("You can't fly with zero health") | |
396 | 396 | else { | |
397 | 397 | let ax = C(B) | |
398 | 398 | let aI = valueOrElse(getString(ax), k) | |
399 | 399 | if ((aY == aI)) | |
400 | 400 | then throw("You can't fly to the same location") | |
401 | 401 | else $Tuple2([StringEntry(ax, if ((aW > 0)) | |
402 | 402 | then aY | |
403 | 403 | else aI), IntegerEntry(az, aW)], unit) | |
404 | 404 | } | |
405 | 405 | } | |
406 | 406 | } | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | ||
410 | 410 | @Callable(Z) | |
411 | - | func setHealth (aA,B) = if ((Z.caller != this)) | |
412 | - | then throw("permission denied") | |
413 | - | else if (if ((0 > aA)) | |
414 | - | then true | |
415 | - | else (aA > 100)) | |
416 | - | then throw("HP should be within 0..100") | |
417 | - | else [IntegerEntry(D(B), aA)] | |
411 | + | func setHealth (aA,B) = if (if ((0 > aA)) | |
412 | + | then true | |
413 | + | else (aA > 100)) | |
414 | + | then throw("HP should be within 0..100") | |
415 | + | else [IntegerEntry(D(B), aA)] | |
418 | 416 | ||
419 | 417 | ||
420 | 418 | ||
421 | 419 | @Callable(Z) | |
422 | 420 | func heal (bb,W) = if (if ((0 > bb)) | |
423 | 421 | then true | |
424 | 422 | else (bb >= l)) | |
425 | 423 | then throw(("Unknown material: " + toString(bb))) | |
426 | 424 | else if ((0 >= W)) | |
427 | 425 | then throw(("Amount should be positive! " + toString(W))) | |
428 | 426 | else { | |
429 | 427 | let B = valueOrErrorMessage(getString(u(toString(Z.caller))), "You don't have a duck staked") | |
430 | 428 | let az = D(B) | |
431 | 429 | let bc = valueOrElse(getInteger(az), 100) | |
432 | 430 | if ((bc >= 100)) | |
433 | 431 | then throw("HP should be < 100 to heal") | |
434 | 432 | else { | |
435 | 433 | let aB = A(B) | |
436 | 434 | let aO = split(valueOrElse(getString(aB), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
437 | 435 | let bd = split(aO[N], "_") | |
438 | 436 | let be = if ((size(bd) != l)) | |
439 | 437 | then ["0", "0", "0", "0", "0", "0"] | |
440 | 438 | else bd | |
441 | 439 | let bf = parseIntValue(be[bb]) | |
442 | 440 | let bg = min([(W / h), (100 - bc)]) | |
443 | 441 | let bh = (bg * h) | |
444 | 442 | if ((bh > bf)) | |
445 | 443 | then throw(((((("You need " + toString(bh)) + " of ") + p[bb]) + " to heal, but you backpack contains ") + toString(bf))) | |
446 | 444 | else { | |
447 | 445 | let bi = T(be, bb, bh) | |
448 | 446 | [IntegerEntry(az, (bc + bg)), StringEntry(aB, makeString([aO[L], aO[M], bi, aO[O]], ":"))] | |
449 | 447 | } | |
450 | 448 | } | |
451 | 449 | } | |
452 | 450 | ||
453 | 451 | ||
454 | 452 | ||
455 | 453 | @Callable(Z) | |
456 | 454 | func updateBackpack (B,aQ) = if ((Z.caller != f)) | |
457 | 455 | then throw("permission denied") | |
458 | 456 | else $Tuple2([StringEntry(A(B), aQ)], aQ) | |
459 | 457 | ||
460 | 458 |
github/deemru/w8io/169f3d6 68.32 ms ◑