tx · AcVVsBoj3WReYh1Y9Sx18LhYGwSeu28Pud4tdCcg5fbA 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm: -0.02500000 Waves 2023.01.04 21:35 [2390579] smart account 3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm > SELF 0.00000000 Waves
{ "type": 13, "id": "AcVVsBoj3WReYh1Y9Sx18LhYGwSeu28Pud4tdCcg5fbA", "fee": 2500000, "feeAssetId": null, "timestamp": 1672857360680, "version": 2, "chainId": 84, "sender": "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm", "senderPublicKey": "EVooykMNV691Venwp1dHUTBd7KWequzUcda57Wd3LQEX", "proofs": [ "2DqdzDhuxyrVz6KHp6RD2KqSZ3bWc2RMoV6WVELwPF8uHUhyQqHV3fv4uUFGS4NL3bhrkqZcYZFFLC2nm4JTgHCs" ], "script": "base64:BgJECAISABIDCgEIEgASAwoBCBIECgIBCBIECgICAhIECgIBCBIECgIBARIECgIICBIECgICAhIECgICAhIDCgEIEgMKAQhHAAVjaGFpbgkAsAkBCQDJAQIJAMoBAggFBHRoaXMFYnl0ZXMAAQABAAt1c2RuQXNzZXRJZAQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAEgtiYpwwT1zlORpA5LdSQvZIxRsfrfr1QpvUjSHSqyqtEDCQAAAgIBVAUHJG1hdGNoMAEg93bq9/eDymXbbhPuAjvPWCmVqcHRjfJL2mzYHWKAyN4JAAIBAg1Vbmtub3duIGNoYWluAA1pbmN1YmF0b3JBZGRyBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEVrdFZ1eDJSaGNoU042M0RzRG80YjRtejRRcXpLU2VEdgMJAAACAgFUBQckbWF0Y2gwBQR0aGlzCQACAQINVW5rbm93biBjaGFpbgALYnJlZWRlckFkZHIEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDAJARFAZXh0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MZXZlbAkAZAIJAQt2YWx1ZU9yRWxzZQIJAJ8IAQkBFmtleUluZnJhTGV2ZWxCeUFzc2V0SWQBBQtsYW5kQXNzZXRJZAAAAAEEBWFzc2V0CQEFdmFsdWUBCQDsBwEJANkEAQULbGFuZEFzc2V0SWQEAWQJALUJAggFBWFzc2V0C2Rlc2NyaXB0aW9uAgFfBARjb3N0CQBrAwUVSW5mcmFVcGdyYWRlQ29zdFNVc2RuCQBoAgkBD251bVBpZWNlc0J5U2l6ZQEJAJEDAgUBZAULcmVjTGFuZFNpemUFCG5ld0xldmVsABkDCQECIT0CCAUDcG10BmFtb3VudAUEY29zdAkAAgEJAKwCAgIbUGF5bWVudCBhdHRhY2hlZCBzaG91bGQgYmUgCQCkAwEFBGNvc3QJAQ11cEluZnJhQ29tbW9uAwcIBQFpBmNhbGxlcgULbGFuZEFzc2V0SWQAVYDrag==", "height": 2390579, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3KmqUY2sH7NFrZfRSkLUsSnwcZakfHBZB9By45uSfspj Next: 3DsgrbRAncKXuvTep9mgjJa5z9TvSmVoeUkZBPKj5fKN Diff:
Old | New | Differences | |
---|---|---|---|
458 | 458 | let presaleBonus = if (valueOrElse(getBoolean(keypresaleArtActivatedByAssetId(landAssetId)), false)) | |
459 | 459 | then 3 | |
460 | 460 | else 0 | |
461 | - | | |
461 | + | (DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) | |
462 | 462 | } | |
463 | 463 | ||
464 | 464 | ||
548 | 548 | let presaleActive = if ((500 >= landNumInt)) | |
549 | 549 | then (lastBlock.timestamp > PresaleArtifactActivationTime) | |
550 | 550 | else false | |
551 | - | [IntegerEntry(timeKey, lastBlock.timestamp | |
551 | + | [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)] | |
552 | 552 | } | |
553 | 553 | } | |
554 | 554 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let chain = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let usdnAssetId = match chain { | |
7 | 7 | case _ => | |
8 | 8 | if (("W" == $match0)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == $match0)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | let incubatorAddr = match chain { | |
16 | 16 | case _ => | |
17 | 17 | if (("W" == $match0)) | |
18 | 18 | then addressFromStringValue("3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv") | |
19 | 19 | else if (("T" == $match0)) | |
20 | 20 | then this | |
21 | 21 | else throw("Unknown chain") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | let breederAddr = match chain { | |
25 | 25 | case _ => | |
26 | 26 | if (("W" == $match0)) | |
27 | 27 | then addressFromStringValue("3PDVuU45H7Eh5dmtNbnRNRStGwULA7NY6Hb") | |
28 | 28 | else if (("T" == $match0)) | |
29 | 29 | then this | |
30 | 30 | else throw("Unknown chain") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | let economyAddr = match chain { | |
34 | 34 | case _ => | |
35 | 35 | if (("W" == $match0)) | |
36 | 36 | then addressFromStringValue("3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D") | |
37 | 37 | else if (("T" == $match0)) | |
38 | 38 | then addressFromStringValue("3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep") | |
39 | 39 | else throw("Unknown chain") | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | let pub = base58'6LfPuKJjLgekmncBhMg2LZyMTNVzZBccXR28ySXm9uXD' | |
43 | 43 | ||
44 | 44 | let HEALCOST = 10000 | |
45 | 45 | ||
46 | 46 | let LANDPREFIX = "LAND" | |
47 | 47 | ||
48 | 48 | let DUCKPREFIX = "DUCK" | |
49 | 49 | ||
50 | 50 | let DEFAULTLOCATION = "Africa_F_Africa" | |
51 | 51 | ||
52 | 52 | let NUMRES = 6 | |
53 | 53 | ||
54 | 54 | let DAILYRESBYPIECE = 3456000 | |
55 | 55 | ||
56 | 56 | let DAYMILLIS = 86400000 | |
57 | 57 | ||
58 | 58 | let FIVEMINUTESMILLIS = 300000 | |
59 | 59 | ||
60 | 60 | let RESOURCEPRICEMIN = 158549 | |
61 | 61 | ||
62 | 62 | let InfraUpgradeCostS = match chain { | |
63 | 63 | case _ => | |
64 | 64 | if (("W" == $match0)) | |
65 | 65 | then 18921595217 | |
66 | 66 | else if (("T" == $match0)) | |
67 | 67 | then 189215952 | |
68 | 68 | else throw("Unknown chain") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let InfraUpgradeCostSUsdn = match chain { | |
72 | 72 | case _ => | |
73 | 73 | if (("W" == $match0)) | |
74 | 74 | then 120000000 | |
75 | 75 | else if (("T" == $match0)) | |
76 | 76 | then 1200000 | |
77 | 77 | else throw("Unknown chain") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | let EXPMATERIALS = match chain { | |
81 | 81 | case _ => | |
82 | 82 | if (("W" == $match0)) | |
83 | 83 | then 157679960139 | |
84 | 84 | else if (("T" == $match0)) | |
85 | 85 | then 1576799601 | |
86 | 86 | else throw("Unknown chain") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let EXPUSDN = match chain { | |
90 | 90 | case _ => | |
91 | 91 | if (("W" == $match0)) | |
92 | 92 | then 1000000000 | |
93 | 93 | else if (("T" == $match0)) | |
94 | 94 | then 10000000 | |
95 | 95 | else throw("Unknown chain") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let PresaleArtifactActivationTime = match chain { | |
99 | 99 | case _ => | |
100 | 100 | if (("W" == $match0)) | |
101 | 101 | then 1673136000000 | |
102 | 102 | else if (("T" == $match0)) | |
103 | 103 | then 1672790400000 | |
104 | 104 | else throw("Unknown chain") | |
105 | 105 | } | |
106 | 106 | ||
107 | 107 | let MULT6 = 1000000 | |
108 | 108 | ||
109 | 109 | let FIVEX = toBigInt(5) | |
110 | 110 | ||
111 | 111 | let TWENTYX = toBigInt(20) | |
112 | 112 | ||
113 | 113 | let TWENTY2X = toBigInt((20 * 20)) | |
114 | 114 | ||
115 | 115 | let TWENTY3X = toBigInt(((20 * 20) * 20)) | |
116 | 116 | ||
117 | 117 | let TWENTY4X = toBigInt((((20 * 20) * 20) * 20)) | |
118 | 118 | ||
119 | 119 | let TWENTY5X = toBigInt(((((20 * 20) * 20) * 20) * 20)) | |
120 | 120 | ||
121 | 121 | let matTypes = ["Fuel", "Metal", "Plank", "Glass", "Plastic", "Protein"] | |
122 | 122 | ||
123 | 123 | let continents = ["Asia", "Europe", "Americas", "Oceania", "Africa"] | |
124 | 124 | ||
125 | 125 | func keyNextFreeLandNum () = "nextLandNum" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyLandToAssetId (landNum) = ("landToAsset_" + landNum) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyNftName (landNum,landSize) = ((LANDPREFIX + landNum) + landSize) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyLandAssetIdToOwner (assetId) = ("nftOwner_" + assetId) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyDuckIdToOwner (assetId) = ("duckOwner_" + assetId) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyStakedTimeByAssetId (assetId) = ("stakedTime_" + assetId) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyInfraLevelByAssetId (assetId) = ("infraLevel_" + assetId) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func keypresaleArtActivatedByAssetId (assetId) = ("presaleArtActivated_" + assetId) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func keyStakedDuckByOwner (ownerAddr) = ("stakedDuckByOwner_" + ownerAddr) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func keyStakedTimeByTypeAssetIdAndOwner (nftType,assetId,ownerAddr) = ((((("stakedTimeByTypeAssetIdAndOwner_" + nftType) + "_") + assetId) + "_") + ownerAddr) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyLandNumToOwner (landNum) = ("landOwner_" + landNum) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyBackpackByDuck (duckAssetId) = ("backPack_" + duckAssetId) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyDuckLocation (duckAssetId) = ("duckLocation_" + duckAssetId) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func keyDuckHealth (duckAssetId) = ("duckHealth_" + duckAssetId) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyResProportions () = "resTypesProportions" | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | let recLandNum = 0 | |
171 | 171 | ||
172 | 172 | let recLandSize = 1 | |
173 | 173 | ||
174 | 174 | let recTerrains = 2 | |
175 | 175 | ||
176 | 176 | let recContinent = 3 | |
177 | 177 | ||
178 | 178 | let locIdxContinent = 0 | |
179 | 179 | ||
180 | 180 | let locIdxType = 1 | |
181 | 181 | ||
182 | 182 | let locIdxId = 2 | |
183 | 183 | ||
184 | 184 | let bpIdxLevel = 0 | |
185 | 185 | ||
186 | 186 | let bpIdxRes = 1 | |
187 | 187 | ||
188 | 188 | let bpIdxMat = 2 | |
189 | 189 | ||
190 | 190 | let bpIdxProd = 3 | |
191 | 191 | ||
192 | 192 | func asString (v) = match v { | |
193 | 193 | case s: String => | |
194 | 194 | s | |
195 | 195 | case _ => | |
196 | 196 | throw("fail to cast into String") | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func getNeededMaterials (total) = { | |
201 | 201 | let props = split(value(getString(keyResProportions())), "_") | |
202 | 202 | if ((size(props) != NUMRES)) | |
203 | 203 | then throw("Wrong proportions data") | |
204 | 204 | else { | |
205 | 205 | let r = [parseIntValue(props[0]), parseIntValue(props[1]), parseIntValue(props[2]), parseIntValue(props[3]), parseIntValue(props[4]), parseIntValue(props[5])] | |
206 | 206 | let sum = (((((r[0] + r[1]) + r[2]) + r[3]) + r[4]) + r[5]) | |
207 | 207 | if ((0 >= sum)) | |
208 | 208 | then throw("No lands staked") | |
209 | 209 | else { | |
210 | 210 | let norm6 = fraction(total, MULT6, sum) | |
211 | 211 | func normalizer (acc,elem) = (acc :+ fraction(elem, norm6, MULT6)) | |
212 | 212 | ||
213 | 213 | let $l = r | |
214 | 214 | let $s = size($l) | |
215 | 215 | let $acc0 = nil | |
216 | 216 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
217 | 217 | then $a | |
218 | 218 | else normalizer($a, $l[$i]) | |
219 | 219 | ||
220 | 220 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
221 | 221 | then $a | |
222 | 222 | else throw("List size exceeds 6") | |
223 | 223 | ||
224 | 224 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
225 | 225 | } | |
226 | 226 | } | |
227 | 227 | } | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func subtractMaterials (shouldUseMat,has,totalNeed) = { | |
231 | 231 | let need = getNeededMaterials(totalNeed) | |
232 | 232 | func subtractor (acc,idx) = { | |
233 | 233 | let result = (parseIntValue(has[idx]) - need[idx]) | |
234 | 234 | if ((0 > result)) | |
235 | 235 | then throw(((((("Not enough material idx=" + toString(idx)) + ", you have ") + has[idx]) + ", but need ") + toString(need[idx]))) | |
236 | 236 | else (acc :+ toString(result)) | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | if (shouldUseMat) | |
240 | 240 | then { | |
241 | 241 | let $l = [0, 1, 2, 3, 4, 5] | |
242 | 242 | let $s = size($l) | |
243 | 243 | let $acc0 = nil | |
244 | 244 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
245 | 245 | then $a | |
246 | 246 | else subtractor($a, $l[$i]) | |
247 | 247 | ||
248 | 248 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
249 | 249 | then $a | |
250 | 250 | else throw("List size exceeds 6") | |
251 | 251 | ||
252 | 252 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
253 | 253 | } | |
254 | 254 | else has | |
255 | 255 | } | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func updateProportions (terrainCounts,landSizeIndex,sign) = { | |
259 | 259 | let props = split(valueOrElse(getString(keyResProportions()), "0_0_0_0_0_0"), "_") | |
260 | 260 | if ((size(props) != NUMRES)) | |
261 | 261 | then throw("Wrong proportions data") | |
262 | 262 | else { | |
263 | 263 | func updater (acc,i) = { | |
264 | 264 | let result = (parseIntValue(props[i]) + ((sign * terrainCounts[i]) * landSizeIndex)) | |
265 | 265 | if ((0 > result)) | |
266 | 266 | then throw(((((((("Panic! Pieces of type=" + toString(i)) + ", sign=") + toString(sign)) + ", terrainCounts[i]=") + toString(terrainCounts[i])) + ", landSizeIndex=") + toString(landSizeIndex))) | |
267 | 267 | else (acc :+ toString(result)) | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | let r = { | |
271 | 271 | let $l = [0, 1, 2, 3, 4, 5] | |
272 | 272 | let $s = size($l) | |
273 | 273 | let $acc0 = nil | |
274 | 274 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
275 | 275 | then $a | |
276 | 276 | else updater($a, $l[$i]) | |
277 | 277 | ||
278 | 278 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
279 | 279 | then $a | |
280 | 280 | else throw("List size exceeds 6") | |
281 | 281 | ||
282 | 282 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
283 | 283 | } | |
284 | 284 | makeString(r, "_") | |
285 | 285 | } | |
286 | 286 | } | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | func countTerrains (terrains) = [(size(split(terrains, "A")) - 1), (size(split(terrains, "B")) - 1), (size(split(terrains, "C")) - 1), (size(split(terrains, "D")) - 1), (size(split(terrains, "E")) - 1), (size(split(terrains, "F")) - 1)] | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func numPiecesBySize (landSize) = match landSize { | |
293 | 293 | case _ => | |
294 | 294 | if (("S" == $match0)) | |
295 | 295 | then 25 | |
296 | 296 | else if (("M" == $match0)) | |
297 | 297 | then 100 | |
298 | 298 | else if (("L" == $match0)) | |
299 | 299 | then 225 | |
300 | 300 | else if (("XL" == $match0)) | |
301 | 301 | then 400 | |
302 | 302 | else if (("XXL" == $match0)) | |
303 | 303 | then 625 | |
304 | 304 | else throw("Unknown land size") | |
305 | 305 | } | |
306 | 306 | ||
307 | 307 | ||
308 | 308 | func subOneInList (aList,idx,amount) = { | |
309 | 309 | func subber (acc,i) = (acc :+ (if ((i == idx)) | |
310 | 310 | then toString((parseIntValue(aList[i]) - amount)) | |
311 | 311 | else aList[i])) | |
312 | 312 | ||
313 | 313 | let r = { | |
314 | 314 | let $l = [0, 1, 2, 3, 4, 5] | |
315 | 315 | let $s = size($l) | |
316 | 316 | let $acc0 = nil | |
317 | 317 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
318 | 318 | then $a | |
319 | 319 | else subber($a, $l[$i]) | |
320 | 320 | ||
321 | 321 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
322 | 322 | then $a | |
323 | 323 | else throw("List size exceeds 6") | |
324 | 324 | ||
325 | 325 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
326 | 326 | } | |
327 | 327 | makeString(r, "_") | |
328 | 328 | } | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | func addRes (currentRes,terrainCounts,deltaTime,landSizeIndex,dailyByPieceWithBonuses) = { | |
332 | 332 | func adder (acc,i) = { | |
333 | 333 | let resOfType = ((fraction(deltaTime, dailyByPieceWithBonuses, DAYMILLIS) * terrainCounts[i]) * landSizeIndex) | |
334 | 334 | (acc :+ toString((parseIntValue(currentRes[i]) + resOfType))) | |
335 | 335 | } | |
336 | 336 | ||
337 | 337 | let r = { | |
338 | 338 | let $l = [0, 1, 2, 3, 4, 5] | |
339 | 339 | let $s = size($l) | |
340 | 340 | let $acc0 = nil | |
341 | 341 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
342 | 342 | then $a | |
343 | 343 | else adder($a, $l[$i]) | |
344 | 344 | ||
345 | 345 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
346 | 346 | then $a | |
347 | 347 | else throw("List size exceeds 6") | |
348 | 348 | ||
349 | 349 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6) | |
350 | 350 | } | |
351 | 351 | makeString(r, "_") | |
352 | 352 | } | |
353 | 353 | ||
354 | 354 | ||
355 | 355 | func abs (x) = if ((x >= toBigInt(0))) | |
356 | 356 | then x | |
357 | 357 | else -(x) | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | let freq = [[1, 4, 9, 10, 15], [5, 8, 13, 14, 15], [6, 9, 14, 15, 16], [4, 7, 8, 13, 18], [1, 6, 7, 15, 19]] | |
361 | 361 | ||
362 | 362 | func genChar (n,freqs) = { | |
363 | 363 | let rem = toInt((n % TWENTYX)) | |
364 | 364 | let letter = if ((freqs[0] > rem)) | |
365 | 365 | then "A" | |
366 | 366 | else if ((freqs[1] > rem)) | |
367 | 367 | then "B" | |
368 | 368 | else if ((freqs[2] > rem)) | |
369 | 369 | then "C" | |
370 | 370 | else if ((freqs[3] > rem)) | |
371 | 371 | then "D" | |
372 | 372 | else if ((freqs[4] > rem)) | |
373 | 373 | then "E" | |
374 | 374 | else "F" | |
375 | 375 | letter | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | func getBackpack (bpKey) = { | |
380 | 380 | let p = split(valueOrElse(getString(bpKey), "0:0_0_0_0_0_0:0_0_0_0_0_0:"), ":") | |
381 | 381 | [toString(valueOrElse(parseInt(p[bpIdxLevel]), 0)), if ((size(split(p[bpIdxRes], "_")) == NUMRES)) | |
382 | 382 | then p[bpIdxRes] | |
383 | 383 | else "0_0_0_0_0_0", if ((size(split(p[bpIdxMat], "_")) == NUMRES)) | |
384 | 384 | then p[bpIdxMat] | |
385 | 385 | else "0_0_0_0_0_0", p[bpIdxProd]] | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | func expeditionCommon (shouldUseMat,caller,txId,message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
390 | 390 | then throw("signature does not match") | |
391 | 391 | else { | |
392 | 392 | let parts = split(toUtf8String(message), ";") | |
393 | 393 | let hp = split(split(parts[0], "|")[0], "_") | |
394 | 394 | let curHP = parseIntValue(hp[0]) | |
395 | 395 | let newHP = parseIntValue(hp[1]) | |
396 | 396 | let locAndTime = split(parts[1], ":") | |
397 | 397 | let targetLocation = split(locAndTime[0], "_") | |
398 | 398 | if ((targetLocation[1] != "E")) | |
399 | 399 | then throw("expedition target location type should be E") | |
400 | 400 | else { | |
401 | 401 | let time = parseIntValue(locAndTime[1]) | |
402 | 402 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
403 | 403 | then true | |
404 | 404 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
405 | 405 | then throw("signature outdated") | |
406 | 406 | else { | |
407 | 407 | let userAddr = toString(caller) | |
408 | 408 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(userAddr)), "You don't have a duck staked") | |
409 | 409 | let keyHealth = keyDuckHealth(duckAssetId) | |
410 | 410 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
411 | 411 | if ((oldFromState != curHP)) | |
412 | 412 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
413 | 413 | else if ((0 >= curHP)) | |
414 | 414 | then throw("You can't fly with zero health") | |
415 | 415 | else if ((0 >= newHP)) | |
416 | 416 | then $Tuple2(((if (!(shouldUseMat)) | |
417 | 417 | then [ScriptTransfer(caller, EXPUSDN, usdnAssetId)] | |
418 | 418 | else nil) :+ IntegerEntry(keyHealth, 0)), "") | |
419 | 419 | else { | |
420 | 420 | let bpKey = keyBackpackByDuck(duckAssetId) | |
421 | 421 | let currentPack = getBackpack(bpKey) | |
422 | 422 | let mList = split(currentPack[bpIdxMat], "_") | |
423 | 423 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, EXPMATERIALS), "_") | |
424 | 424 | let bigNum = abs(toBigInt(txId)) | |
425 | 425 | let freeNum = valueOrElse(getInteger(keyNextFreeLandNum()), 501) | |
426 | 426 | let landNum = toString(freeNum) | |
427 | 427 | let continentIdx = toInt((bigNum % FIVEX)) | |
428 | 428 | let f = freq[continentIdx] | |
429 | 429 | func terrainGenerator (acc,elem) = $Tuple2((((((acc._1 + genChar(acc._2, f)) + genChar((acc._2 / TWENTYX), f)) + genChar((acc._2 / TWENTY2X), f)) + genChar((acc._2 / TWENTY3X), f)) + genChar((acc._2 / TWENTY4X), f)), (acc._2 / TWENTY5X)) | |
430 | 430 | ||
431 | 431 | let t = { | |
432 | 432 | let $l = [1, 2, 3, 4, 5] | |
433 | 433 | let $s = size($l) | |
434 | 434 | let $acc0 = $Tuple2("", (bigNum / FIVEX)) | |
435 | 435 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
436 | 436 | then $a | |
437 | 437 | else terrainGenerator($a, $l[$i]) | |
438 | 438 | ||
439 | 439 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
440 | 440 | then $a | |
441 | 441 | else throw("List size exceeds 5") | |
442 | 442 | ||
443 | 443 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
444 | 444 | } | |
445 | 445 | let continent = continents[continentIdx] | |
446 | 446 | let issue = Issue(keyNftName(landNum, "S"), makeString([landNum, "S", t._1, continent], "_"), 1, 0, false) | |
447 | 447 | let assetId = calculateAssetId(issue) | |
448 | 448 | let id = toBase58String(assetId) | |
449 | 449 | $Tuple2([IntegerEntry(keyNextFreeLandNum(), (freeNum + 1)), issue, StringEntry(keyLandToAssetId(landNum), id), StringEntry(keyLandAssetIdToOwner(id), userAddr), StringEntry(keyLandNumToOwner(landNum), userAddr), IntegerEntry(keyInfraLevelByAssetId(id), 0), ScriptTransfer(caller, 1, assetId), StringEntry(keyDuckLocation(duckAssetId), makeString([continent, "L", id], "_")), IntegerEntry(keyHealth, newHP), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))], id) | |
450 | 450 | } | |
451 | 451 | } | |
452 | 452 | } | |
453 | 453 | } | |
454 | 454 | ||
455 | 455 | ||
456 | 456 | func applyBonuses (landAssetId) = { | |
457 | 457 | let infraLevel = valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) | |
458 | 458 | let presaleBonus = if (valueOrElse(getBoolean(keypresaleArtActivatedByAssetId(landAssetId)), false)) | |
459 | 459 | then 3 | |
460 | 460 | else 0 | |
461 | - | | |
461 | + | (DAILYRESBYPIECE + fraction(DAILYRESBYPIECE, infraLevel, 4)) | |
462 | 462 | } | |
463 | 463 | ||
464 | 464 | ||
465 | 465 | func claimAll (landAssetId,pieces) = { | |
466 | 466 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
467 | 467 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (((LANDPREFIX + " ") + landAssetId) + " is not staked")) | |
468 | 468 | let deltaTime = (lastBlock.timestamp - savedTime) | |
469 | 469 | if ((0 > deltaTime)) | |
470 | 470 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
471 | 471 | else { | |
472 | 472 | let dailyProductionByPiece = applyBonuses(landAssetId) | |
473 | 473 | let availRes = (fraction(deltaTime, dailyProductionByPiece, DAYMILLIS) * pieces) | |
474 | 474 | asString(invoke(this, "claimRes", [availRes, landAssetId], nil)) | |
475 | 475 | } | |
476 | 476 | } | |
477 | 477 | ||
478 | 478 | ||
479 | 479 | func upInfraCommon (shouldUseMat,caller,landAssetId) = { | |
480 | 480 | let addr = toString(caller) | |
481 | 481 | let infraKey = keyInfraLevelByAssetId(landAssetId) | |
482 | 482 | let curLevel = valueOrElse(getInteger(infraKey), 0) | |
483 | 483 | if ((curLevel >= 3)) | |
484 | 484 | then throw("Currently max infrastructure level = 3") | |
485 | 485 | else { | |
486 | 486 | let newLevel = (curLevel + 1) | |
487 | 487 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
488 | 488 | if (!(contains(asset.name, LANDPREFIX))) | |
489 | 489 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
490 | 490 | else { | |
491 | 491 | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
492 | 492 | if ((owner != addr)) | |
493 | 493 | then throw((LANDPREFIX + " is not yours")) | |
494 | 494 | else { | |
495 | 495 | let d = split(asset.description, "_") | |
496 | 496 | let landSize = d[recLandSize] | |
497 | 497 | let pieces = numPiecesBySize(landSize) | |
498 | 498 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
499 | 499 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
500 | 500 | let loc = split(value(curLocation), "_") | |
501 | 501 | if ((loc[locIdxType] != "L")) | |
502 | 502 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
503 | 503 | else if ((loc[locIdxId] != landAssetId)) | |
504 | 504 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
505 | 505 | else { | |
506 | 506 | let bpKey = keyBackpackByDuck(duckAssetId) | |
507 | 507 | let currentPack = getBackpack(bpKey) | |
508 | 508 | let mList = split(currentPack[bpIdxMat], "_") | |
509 | 509 | let newMat = makeString(subtractMaterials(shouldUseMat, mList, fraction(InfraUpgradeCostS, (pieces * newLevel), 25)), "_") | |
510 | 510 | let newRes = claimAll(landAssetId, pieces) | |
511 | 511 | $Tuple2([IntegerEntry(infraKey, newLevel), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, newMat, currentPack[bpIdxProd]], ":"))], newLevel) | |
512 | 512 | } | |
513 | 513 | } | |
514 | 514 | } | |
515 | 515 | } | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | @Callable(i) | |
520 | 520 | func stakeLand () = { | |
521 | 521 | let pmt = value(i.payments[0]) | |
522 | 522 | let assetId = value(pmt.assetId) | |
523 | 523 | let address = toString(i.caller) | |
524 | 524 | if ((pmt.amount != 1)) | |
525 | 525 | then throw((("NFT " + LANDPREFIX) + " token should be attached as payment")) | |
526 | 526 | else { | |
527 | 527 | let asset = value(assetInfo(assetId)) | |
528 | 528 | if ((asset.issuer != this)) | |
529 | 529 | then throw("Unknown issuer of token") | |
530 | 530 | else if (!(contains(asset.name, LANDPREFIX))) | |
531 | 531 | then throw((("Only NFT " + LANDPREFIX) + " tokens are accepted")) | |
532 | 532 | else { | |
533 | 533 | let landNumSize = drop(asset.name, 4) | |
534 | 534 | let landNum = if (contains(landNumSize, "XXL")) | |
535 | 535 | then dropRight(landNumSize, 3) | |
536 | 536 | else if (contains(landNumSize, "XL")) | |
537 | 537 | then dropRight(landNumSize, 2) | |
538 | 538 | else dropRight(landNumSize, 1) | |
539 | 539 | let landNumInt = valueOrErrorMessage(parseInt(landNum), ("Cannot parse land number from " + asset.name)) | |
540 | 540 | let landAssetId = toBase58String(assetId) | |
541 | 541 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
542 | 542 | if (isDefined(getInteger(timeKey))) | |
543 | 543 | then throw((("NFT " + asset.name) + " is already staked")) | |
544 | 544 | else { | |
545 | 545 | let d = split(asset.description, "_") | |
546 | 546 | let terrainCounts = countTerrains(d[recTerrains]) | |
547 | 547 | let props = updateProportions(terrainCounts, (numPiecesBySize(d[recLandSize]) / 25), 1) | |
548 | 548 | let presaleActive = if ((500 >= landNumInt)) | |
549 | 549 | then (lastBlock.timestamp > PresaleArtifactActivationTime) | |
550 | 550 | else false | |
551 | - | [IntegerEntry(timeKey, lastBlock.timestamp | |
551 | + | [IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address), lastBlock.timestamp), StringEntry(keyLandAssetIdToOwner(landAssetId), address), StringEntry(keyLandNumToOwner(landNum), address), StringEntry(keyResProportions(), props)] | |
552 | 552 | } | |
553 | 553 | } | |
554 | 554 | } | |
555 | 555 | } | |
556 | 556 | ||
557 | 557 | ||
558 | 558 | ||
559 | 559 | @Callable(i) | |
560 | 560 | func unstakeLand (landAssetId) = if ((size(i.payments) != 0)) | |
561 | 561 | then throw("unstake doesn't require any payments") | |
562 | 562 | else { | |
563 | 563 | let assetId = fromBase58String(landAssetId) | |
564 | 564 | let address = toString(i.caller) | |
565 | 565 | let asset = value(assetInfo(assetId)) | |
566 | 566 | if ((asset.issuer != this)) | |
567 | 567 | then throw("Unknown issuer of token") | |
568 | 568 | else if (!(contains(asset.name, LANDPREFIX))) | |
569 | 569 | then throw((("Only NFT " + LANDPREFIX) + " tokens can be unstaked")) | |
570 | 570 | else { | |
571 | 571 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
572 | 572 | if (!(isDefined(timeKey))) | |
573 | 573 | then throw((("NFT " + asset.name) + " is not staked")) | |
574 | 574 | else { | |
575 | 575 | let owner = valueOrErrorMessage(getString(keyLandAssetIdToOwner(landAssetId)), (("NFT " + asset.name) + " is orphaned")) | |
576 | 576 | if ((owner != address)) | |
577 | 577 | then throw((("Staked " + LANDPREFIX) + " is not yours")) | |
578 | 578 | else { | |
579 | 579 | let d = split(asset.description, "_") | |
580 | 580 | let terrainCounts = countTerrains(d[recTerrains]) | |
581 | 581 | let pieces = numPiecesBySize(d[recLandSize]) | |
582 | 582 | let props = updateProportions(terrainCounts, (pieces / 25), -1) | |
583 | 583 | let newRes = claimAll(landAssetId, pieces) | |
584 | 584 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(address)), (("You can't unstake " + LANDPREFIX) + " without a duck staked")) | |
585 | 585 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
586 | 586 | let loc = split(value(curLocation), "_") | |
587 | 587 | if ((loc[locIdxType] != "L")) | |
588 | 588 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
589 | 589 | else if ((loc[locIdxId] != landAssetId)) | |
590 | 590 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
591 | 591 | else { | |
592 | 592 | let bpKey = keyBackpackByDuck(duckAssetId) | |
593 | 593 | let currentPack = getBackpack(bpKey) | |
594 | 594 | [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, address)), StringEntry(keyResProportions(), props), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], newRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":"))] | |
595 | 595 | } | |
596 | 596 | } | |
597 | 597 | } | |
598 | 598 | } | |
599 | 599 | } | |
600 | 600 | ||
601 | 601 | ||
602 | 602 | ||
603 | 603 | @Callable(i) | |
604 | 604 | func stakeDuck () = { | |
605 | 605 | let pmt = value(i.payments[0]) | |
606 | 606 | let assetId = value(pmt.assetId) | |
607 | 607 | let address = toString(i.caller) | |
608 | 608 | if ((pmt.amount != 1)) | |
609 | 609 | then throw((("NFT " + DUCKPREFIX) + " token should be attached as payment")) | |
610 | 610 | else { | |
611 | 611 | let asset = value(assetInfo(assetId)) | |
612 | 612 | if (if ((asset.issuer != incubatorAddr)) | |
613 | 613 | then (asset.issuer != breederAddr) | |
614 | 614 | else false) | |
615 | 615 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
616 | 616 | else if (!(contains(asset.name, DUCKPREFIX))) | |
617 | 617 | then throw((("Only NFT " + DUCKPREFIX) + " tokens are accepted")) | |
618 | 618 | else { | |
619 | 619 | let assetIdStr = toBase58String(assetId) | |
620 | 620 | let timeKey = keyStakedTimeByAssetId(assetIdStr) | |
621 | 621 | if (isDefined(getInteger(timeKey))) | |
622 | 622 | then throw((("NFT " + asset.name) + " is already staked")) | |
623 | 623 | else if (isDefined(getString(keyStakedDuckByOwner(address)))) | |
624 | 624 | then throw(("You already staked one duck: " + asset.name)) | |
625 | 625 | else { | |
626 | 626 | let locKey = keyDuckLocation(assetIdStr) | |
627 | 627 | let location = getString(locKey) | |
628 | 628 | let keyHealth = keyDuckHealth(assetIdStr) | |
629 | 629 | let health = getInteger(keyHealth) | |
630 | 630 | let bpKey = keyBackpackByDuck(assetIdStr) | |
631 | 631 | let backpack = getString(bpKey) | |
632 | 632 | ([IntegerEntry(timeKey, lastBlock.timestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, toBase58String(assetId), address), lastBlock.timestamp), StringEntry(keyDuckIdToOwner(assetIdStr), address), StringEntry(keyStakedDuckByOwner(address), assetIdStr)] ++ (if (isDefined(location)) | |
633 | 633 | then nil | |
634 | 634 | else ([StringEntry(locKey, DEFAULTLOCATION)] ++ (if (isDefined(health)) | |
635 | 635 | then nil | |
636 | 636 | else ([IntegerEntry(keyHealth, 100)] ++ (if (isDefined(backpack)) | |
637 | 637 | then nil | |
638 | 638 | else [StringEntry(bpKey, "0:0_0_0_0_0_0:0_0_0_0_0_0:")])))))) | |
639 | 639 | } | |
640 | 640 | } | |
641 | 641 | } | |
642 | 642 | } | |
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | 646 | @Callable(i) | |
647 | 647 | func unstakeDuck (assetIdStr) = if ((size(i.payments) != 0)) | |
648 | 648 | then throw("unstake doesn't require any payments") | |
649 | 649 | else { | |
650 | 650 | let assetId = fromBase58String(assetIdStr) | |
651 | 651 | let address = toString(i.caller) | |
652 | 652 | let asset = value(assetInfo(assetId)) | |
653 | 653 | if (if ((asset.issuer != incubatorAddr)) | |
654 | 654 | then (asset.issuer != breederAddr) | |
655 | 655 | else false) | |
656 | 656 | then throw((("Unknown issuer of " + DUCKPREFIX) + " token")) | |
657 | 657 | else if (!(contains(asset.name, DUCKPREFIX))) | |
658 | 658 | then throw((("Only NFT " + DUCKPREFIX) + " tokens can be unstaked")) | |
659 | 659 | else { | |
660 | 660 | let timeKey = keyStakedTimeByAssetId(toBase58String(assetId)) | |
661 | 661 | if (!(isDefined(timeKey))) | |
662 | 662 | then throw((("NFT " + asset.name) + " is not staked")) | |
663 | 663 | else if (!(isDefined(keyStakedDuckByOwner(address)))) | |
664 | 664 | then throw((("The duck " + asset.name) + " is not staked")) | |
665 | 665 | else { | |
666 | 666 | let owner = valueOrErrorMessage(getString(keyDuckIdToOwner(toBase58String(assetId))), (("NFT " + asset.name) + " is orphaned")) | |
667 | 667 | if ((owner != address)) | |
668 | 668 | then throw("Staked NFT is not yours") | |
669 | 669 | else [ScriptTransfer(i.caller, 1, assetId), DeleteEntry(timeKey), DeleteEntry(keyDuckLocation(assetIdStr)), DeleteEntry(keyDuckIdToOwner(assetIdStr)), DeleteEntry(keyStakedTimeByTypeAssetIdAndOwner(DUCKPREFIX, assetIdStr, address)), DeleteEntry(keyStakedDuckByOwner(address))] | |
670 | 670 | } | |
671 | 671 | } | |
672 | 672 | } | |
673 | 673 | ||
674 | 674 | ||
675 | 675 | ||
676 | 676 | @Callable(i) | |
677 | 677 | func claimRes (amount,landAssetId) = if ((size(i.payments) != 0)) | |
678 | 678 | then throw("claimRes doesn't require any payments") | |
679 | 679 | else { | |
680 | 680 | let addr = toString(i.originCaller) | |
681 | 681 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
682 | 682 | if (!(contains(asset.name, LANDPREFIX))) | |
683 | 683 | then throw((("NFT " + LANDPREFIX) + " token should be passed as param")) | |
684 | 684 | else { | |
685 | 685 | let timeKey = keyStakedTimeByAssetId(landAssetId) | |
686 | 686 | let owner = getStringValue(keyLandAssetIdToOwner(landAssetId)) | |
687 | 687 | if ((owner != addr)) | |
688 | 688 | then throw((LANDPREFIX + " is not yours")) | |
689 | 689 | else { | |
690 | 690 | let d = split(asset.description, "_") | |
691 | 691 | let landSize = d[recLandSize] | |
692 | 692 | let terrainCounts = countTerrains(d[recTerrains]) | |
693 | 693 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(addr)), "You don't have a duck staked") | |
694 | 694 | let curLocation = valueOrElse(getString(keyDuckLocation(duckAssetId)), DEFAULTLOCATION) | |
695 | 695 | let loc = split(value(curLocation), "_") | |
696 | 696 | if ((loc[locIdxType] != "L")) | |
697 | 697 | then throw((("Duck location type is " + loc[locIdxType]) + ", but should be L")) | |
698 | 698 | else if ((loc[locIdxId] != landAssetId)) | |
699 | 699 | then throw(((("Duck location id is " + loc[locIdxId]) + ", but should be ") + landAssetId)) | |
700 | 700 | else { | |
701 | 701 | let savedTime = valueOrErrorMessage(getInteger(timeKey), (("NFT " + asset.name) + " is not staked")) | |
702 | 702 | let deltaTime = (lastBlock.timestamp - savedTime) | |
703 | 703 | if ((0 > deltaTime)) | |
704 | 704 | then throw(((("Saved timestamp is in future, saved = " + toString(savedTime)) + ", current = ") + toString(lastBlock.timestamp))) | |
705 | 705 | else { | |
706 | 706 | let pieces = numPiecesBySize(landSize) | |
707 | 707 | let dailyProductionByPiece = applyBonuses(landAssetId) | |
708 | 708 | let availRes = fraction(deltaTime, (dailyProductionByPiece * pieces), DAYMILLIS) | |
709 | 709 | if ((amount > availRes)) | |
710 | 710 | then throw(((("Not enough resources, available = " + toString(availRes)) + ", requested = ") + toString(amount))) | |
711 | 711 | else { | |
712 | 712 | let newDeltaTime = fraction((availRes - amount), DAYMILLIS, (dailyProductionByPiece * pieces)) | |
713 | 713 | let newTimestamp = (lastBlock.timestamp - newDeltaTime) | |
714 | 714 | let bpKey = keyBackpackByDuck(duckAssetId) | |
715 | 715 | let currentPack = getBackpack(bpKey) | |
716 | 716 | let currentRes = split(currentPack[bpIdxRes], "_") | |
717 | 717 | let bpRes = addRes(currentRes, terrainCounts, (deltaTime - newDeltaTime), (pieces / 25), dailyProductionByPiece) | |
718 | 718 | let newPack = makeString([currentPack[bpIdxLevel], bpRes, currentPack[bpIdxMat], currentPack[bpIdxProd]], ":") | |
719 | 719 | $Tuple2([StringEntry(bpKey, newPack), IntegerEntry(timeKey, newTimestamp), IntegerEntry(keyStakedTimeByTypeAssetIdAndOwner(LANDPREFIX, landAssetId, owner), newTimestamp)], bpRes) | |
720 | 720 | } | |
721 | 721 | } | |
722 | 722 | } | |
723 | 723 | } | |
724 | 724 | } | |
725 | 725 | } | |
726 | 726 | ||
727 | 727 | ||
728 | 728 | ||
729 | 729 | @Callable(i) | |
730 | 730 | func flight (message,sig) = if (!(sigVerify_8Kb(message, sig, pub))) | |
731 | 731 | then throw("signature does not match") | |
732 | 732 | else if ((size(i.payments) != 0)) | |
733 | 733 | then throw("flight doesn't require any payments") | |
734 | 734 | else { | |
735 | 735 | let parts = split(toUtf8String(message), ";") | |
736 | 736 | let hp = split(split(parts[0], "|")[0], "_") | |
737 | 737 | let curHP = parseIntValue(hp[0]) | |
738 | 738 | let newHP = parseIntValue(hp[1]) | |
739 | 739 | let newLocAndTime = split(parts[1], ":") | |
740 | 740 | let newLocation = newLocAndTime[0] | |
741 | 741 | let time = parseIntValue(newLocAndTime[1]) | |
742 | 742 | if (if ((time > (lastBlock.timestamp + FIVEMINUTESMILLIS))) | |
743 | 743 | then true | |
744 | 744 | else ((lastBlock.timestamp - FIVEMINUTESMILLIS) > time)) | |
745 | 745 | then throw("signature outdated") | |
746 | 746 | else { | |
747 | 747 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
748 | 748 | let keyHealth = keyDuckHealth(duckAssetId) | |
749 | 749 | let oldFromState = valueOrElse(getInteger(keyHealth), 100) | |
750 | 750 | if ((oldFromState != curHP)) | |
751 | 751 | then throw(((("oldHealth=" + toString(valueOrElse(getInteger(keyHealth), 100))) + " from state does not match one from flight log=") + toString(curHP))) | |
752 | 752 | else if ((0 >= curHP)) | |
753 | 753 | then throw("You can't fly with zero health") | |
754 | 754 | else { | |
755 | 755 | let locKey = keyDuckLocation(duckAssetId) | |
756 | 756 | let curLocation = valueOrElse(getString(locKey), DEFAULTLOCATION) | |
757 | 757 | if ((newLocation == curLocation)) | |
758 | 758 | then throw("You can't fly to the same location") | |
759 | 759 | else $Tuple2([StringEntry(locKey, if ((newHP > 0)) | |
760 | 760 | then newLocation | |
761 | 761 | else curLocation), IntegerEntry(keyHealth, newHP)], unit) | |
762 | 762 | } | |
763 | 763 | } | |
764 | 764 | } | |
765 | 765 | ||
766 | 766 | ||
767 | 767 | ||
768 | 768 | @Callable(i) | |
769 | 769 | func setHealth (health,duckAssetId) = if (if ((0 > health)) | |
770 | 770 | then true | |
771 | 771 | else (health > 100)) | |
772 | 772 | then throw("HP should be within 0..100") | |
773 | 773 | else [IntegerEntry(keyDuckHealth(duckAssetId), health)] | |
774 | 774 | ||
775 | 775 | ||
776 | 776 | ||
777 | 777 | @Callable(i) | |
778 | 778 | func heal (matType,amount) = if (if ((0 > matType)) | |
779 | 779 | then true | |
780 | 780 | else (matType >= NUMRES)) | |
781 | 781 | then throw(("Unknown material: " + toString(matType))) | |
782 | 782 | else if ((0 >= amount)) | |
783 | 783 | then throw(("Amount should be positive! " + toString(amount))) | |
784 | 784 | else { | |
785 | 785 | let duckAssetId = valueOrErrorMessage(getString(keyStakedDuckByOwner(toString(i.caller))), "You don't have a duck staked") | |
786 | 786 | let keyHealth = keyDuckHealth(duckAssetId) | |
787 | 787 | let oldHealth = valueOrElse(getInteger(keyHealth), 100) | |
788 | 788 | if ((oldHealth >= 100)) | |
789 | 789 | then throw("HP should be < 100 to heal") | |
790 | 790 | else { | |
791 | 791 | let bpKey = keyBackpackByDuck(duckAssetId) | |
792 | 792 | let currentPack = getBackpack(bpKey) | |
793 | 793 | let mList = split(currentPack[bpIdxMat], "_") | |
794 | 794 | let currentAmount = parseIntValue(mList[matType]) | |
795 | 795 | let deltaHealth = min([(amount / HEALCOST), (100 - oldHealth)]) | |
796 | 796 | let spendAmount = (deltaHealth * HEALCOST) | |
797 | 797 | if ((spendAmount > currentAmount)) | |
798 | 798 | then throw(((((("You need " + toString(spendAmount)) + " of ") + matTypes[matType]) + " to heal, but you backpack contains ") + toString(currentAmount))) | |
799 | 799 | else { | |
800 | 800 | let newMat = subOneInList(mList, matType, spendAmount) | |
801 | 801 | [IntegerEntry(keyHealth, (oldHealth + deltaHealth)), StringEntry(bpKey, makeString([currentPack[bpIdxLevel], currentPack[bpIdxRes], newMat, currentPack[bpIdxProd]], ":"))] | |
802 | 802 | } | |
803 | 803 | } | |
804 | 804 | } | |
805 | 805 | ||
806 | 806 | ||
807 | 807 | ||
808 | 808 | @Callable(i) | |
809 | 809 | func updateBackpack (duckAssetId,newPack) = if ((i.caller != economyAddr)) | |
810 | 810 | then throw("permission denied") | |
811 | 811 | else $Tuple2([StringEntry(keyBackpackByDuck(duckAssetId), newPack)], newPack) | |
812 | 812 | ||
813 | 813 | ||
814 | 814 | ||
815 | 815 | @Callable(i) | |
816 | 816 | func expeditionBuy (message,sig) = if ((size(i.payments) != 1)) | |
817 | 817 | then throw("Exactly one payment required") | |
818 | 818 | else { | |
819 | 819 | let pmt = value(i.payments[0]) | |
820 | 820 | if ((pmt.assetId != usdnAssetId)) | |
821 | 821 | then throw("Allowed USDN payment only!") | |
822 | 822 | else if ((pmt.amount != EXPUSDN)) | |
823 | 823 | then throw(("Payment attached should be " + toString(EXPUSDN))) | |
824 | 824 | else expeditionCommon(false, i.caller, i.transactionId, message, sig) | |
825 | 825 | } | |
826 | 826 | ||
827 | 827 | ||
828 | 828 | ||
829 | 829 | @Callable(i) | |
830 | 830 | func expedition (message,sig) = if ((size(i.payments) != 0)) | |
831 | 831 | then throw("expedition doesn't require any payments") | |
832 | 832 | else expeditionCommon(true, i.caller, i.transactionId, message, sig) | |
833 | 833 | ||
834 | 834 | ||
835 | 835 | ||
836 | 836 | @Callable(i) | |
837 | 837 | func upgradeInfra (landAssetId) = if ((size(i.payments) != 0)) | |
838 | 838 | then throw("Infrastructure upgrade doesn't require any payments") | |
839 | 839 | else upInfraCommon(true, i.caller, landAssetId) | |
840 | 840 | ||
841 | 841 | ||
842 | 842 | ||
843 | 843 | @Callable(i) | |
844 | 844 | func upgradeInfraUsdn (landAssetId) = if ((size(i.payments) != 1)) | |
845 | 845 | then throw("Exactly one payment required") | |
846 | 846 | else { | |
847 | 847 | let pmt = value(i.payments[0]) | |
848 | 848 | if ((pmt.assetId != usdnAssetId)) | |
849 | 849 | then throw("Allowed USDN payment only!") | |
850 | 850 | else { | |
851 | 851 | let newLevel = (valueOrElse(getInteger(keyInfraLevelByAssetId(landAssetId)), 0) + 1) | |
852 | 852 | let asset = value(assetInfo(fromBase58String(landAssetId))) | |
853 | 853 | let d = split(asset.description, "_") | |
854 | 854 | let cost = fraction(InfraUpgradeCostSUsdn, (numPiecesBySize(d[recLandSize]) * newLevel), 25) | |
855 | 855 | if ((pmt.amount != cost)) | |
856 | 856 | then throw(("Payment attached should be " + toString(cost))) | |
857 | 857 | else upInfraCommon(false, i.caller, landAssetId) | |
858 | 858 | } | |
859 | 859 | } | |
860 | 860 | ||
861 | 861 |
github/deemru/w8io/026f985 95.65 ms ◑