tx · 7e1SZbreNagfWDwEeg2ZiMBozR22ViWHR1Y98os7XZ4 3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp: -0.01400000 Waves 2022.05.19 15:09 [2058531] smart account 3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp > SELF 0.00000000 Waves
{ "type": 13, "id": "7e1SZbreNagfWDwEeg2ZiMBozR22ViWHR1Y98os7XZ4", "fee": 1400000, "feeAssetId": null, "timestamp": 1652962191431, "version": 2, "chainId": 84, "sender": "3MuH9NgpoGaSQufEQLPRikXNS9PXhkhcLzp", "senderPublicKey": "74D2dSZ2CcYprVwEPr2GayHyp7wbLrppDt4SWXZcfT1z", "proofs": [ "64382fNd2ZTYqdupkKzimrTpWtQ2TYmVgP71FtSru4owoJgmZBrpWKQHHs9nnRTvFuTw2A4iJnH36egLsEHu1oxU" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEBEgMKAQEAAAAhAAAAAAlzZXBhcmF0b3ICAAAAAV8AAAAAE2tleUxhc3RCYXR0bGVIZWlnaHQCAAAAEmxhc3RfYmF0dGxlX2hlaWdodAAAAAANa2V5SXRlbXNDb3VudAIAAAALaXRlbXNfY291bnQAAAAADGtleUl0ZW1Pd25lcgIAAAAKaXRlbV9vd25lcgAAAAAPa2V5SXRlbUNhdGVnb3J5AgAAAA1pdGVtX2NhdGVnb3J5AAAAAAtrZXlJdGVtVHlwZQIAAAAJaXRlbV90eXBlAAAAABJrZXlJdGVtRWZmZWN0VHlwZTECAAAAEml0ZW1fZWZmZWN0X3R5cGVfMQAAAAATa2V5SXRlbUVmZmVjdFZhbHVlMQIAAAATaXRlbV9lZmZlY3RfdmFsdWVfMQAAAAASa2V5SXRlbUVmZmVjdFR5cGUyAgAAABJpdGVtX2VmZmVjdF90eXBlXzIAAAAAE2tleUl0ZW1FZmZlY3RWYWx1ZTICAAAAE2l0ZW1fZWZmZWN0X3ZhbHVlXzIAAAAAEmtleUl0ZW1FZmZlY3RUeXBlMwIAAAASaX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QAAAA9pdGVtRWZmZWN0VHlwZTMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAAR3aXRoAAAAAgUAAAATa2V5SXRlbUVmZmVjdFZhbHVlMwUAAAAGaXRlbUlkBQAAABBpdGVtRWZmZWN0VmFsdWUzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAEmtleUl0ZW1FZmZlY3RUeXBlNAUAAAAGaXRlbUlkBQAAAA9pdGVtRWZmZWN0VHlwZTQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAAR3aXRoAAAAAgUAAAATa2V5SXRlbUVmZmVjdFZhbHVlNAUAAAAGaXRlbUlkBQAAABBpdGVtRWZmZWN0VmFsdWU0BQAAAANuaWwAAAABaQEAAAAWdXBkYXRlTGFzdEJhdHRsZUhlaWdodAAAAAEAAAAGY2hhcklkAwkBAAAAAiE9AAAAAgkBAAAADmVjb3N5c3RlbUNoZWNrAAAAAQgFAAAAAWkAAAAGY2FsbGVyBgkBAAAABXRocm93AAAAAAkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAEd2l0aAAAAAIFAAAAE2tleUxhc3RCYXR0bGVIZWlnaHQFAAAABmNoYXJJZAUAAAAGaGVpZ2h0BQAAAANuaWwFAAAABmhlaWdodAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V50zWmZQ==", "height": 2058531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CpkC2rZHyT7bxghCZKwzjxWzGdJ6qKnfuhV9qK1Zq3Lx Next: 3VCV6AQtm5NEA7BUxjEWcyd5W2437knQKFFfT3FEnX8Z Diff:
Old | New | Differences | |
---|---|---|---|
144 | 144 | let itemEffectValue4 = if ((itemEffectSlots > 3)) | |
145 | 145 | then randInt(1, parseIntValue(itemEffectsMaxRanges[itemEffectType4]), txId, 11) | |
146 | 146 | else 0 | |
147 | - | let itemId = | |
147 | + | let itemId = valueOrElse(getInteger(this, keyItemsCount), 1) | |
148 | 148 | [IntegerEntry(with(keyLastBattleHeight, charId), height), IntegerEntry(keyItemsCount, (itemId + 1)), StringEntry(with(keyItemOwner, itemId), callerAddr), IntegerEntry(with(keyItemCategory, itemId), itemCat), IntegerEntry(with(keyItemType, itemId), itemType), IntegerEntry(with(keyItemEffectType1, itemId), itemEffectType1), IntegerEntry(with(keyItemEffectValue1, itemId), itemEffectValue1), IntegerEntry(with(keyItemEffectType2, itemId), itemEffectType2), IntegerEntry(with(keyItemEffectValue2, itemId), itemEffectValue2), IntegerEntry(with(keyItemEffectType3, itemId), itemEffectType3), IntegerEntry(with(keyItemEffectValue3, itemId), itemEffectValue3), IntegerEntry(with(keyItemEffectType4, itemId), itemEffectType4), IntegerEntry(with(keyItemEffectValue4, itemId), itemEffectValue4)] | |
149 | 149 | } | |
150 | 150 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "_" | |
5 | 5 | ||
6 | 6 | let keyLastBattleHeight = "last_battle_height" | |
7 | 7 | ||
8 | 8 | let keyItemsCount = "items_count" | |
9 | 9 | ||
10 | 10 | let keyItemOwner = "item_owner" | |
11 | 11 | ||
12 | 12 | let keyItemCategory = "item_category" | |
13 | 13 | ||
14 | 14 | let keyItemType = "item_type" | |
15 | 15 | ||
16 | 16 | let keyItemEffectType1 = "item_effect_type_1" | |
17 | 17 | ||
18 | 18 | let keyItemEffectValue1 = "item_effect_value_1" | |
19 | 19 | ||
20 | 20 | let keyItemEffectType2 = "item_effect_type_2" | |
21 | 21 | ||
22 | 22 | let keyItemEffectValue2 = "item_effect_value_2" | |
23 | 23 | ||
24 | 24 | let keyItemEffectType3 = "item_effect_type_3" | |
25 | 25 | ||
26 | 26 | let keyItemEffectValue3 = "item_effect_value_3" | |
27 | 27 | ||
28 | 28 | let keyItemEffectType4 = "item_effect_type_4" | |
29 | 29 | ||
30 | 30 | let keyItemEffectValue4 = "item_effect_value_4" | |
31 | 31 | ||
32 | 32 | let govApp = addressFromStringValue("3MyxfwvbueUBynYHfQsutNXZNqNozGiMnsG") | |
33 | 33 | ||
34 | 34 | let keyEcosystemAddresses = "ecosystem_addresses" | |
35 | 35 | ||
36 | 36 | let keyBattleRestPeriod = "battle_rest_period" | |
37 | 37 | ||
38 | 38 | let keyBattleWinChanceHardcap = "battle_win_chance_hardcap" | |
39 | 39 | ||
40 | 40 | let keyBattleWinChanceIncrPerBlock = "battle_win_chance_incr_per_block" | |
41 | 41 | ||
42 | 42 | let keyBattleLootRarityRanges = "battle_loot_rarity_ranges" | |
43 | 43 | ||
44 | 44 | let keyCharsNaturalBattleBonusRanges = "chars_natural_battle_bonus_ranges" | |
45 | 45 | ||
46 | 46 | let keyItemsCategories = "items_categories" | |
47 | 47 | ||
48 | 48 | let keyItemsTypesPerCat = "items_types_per_cat" | |
49 | 49 | ||
50 | 50 | let keyItemsEffects = "items_effects" | |
51 | 51 | ||
52 | 52 | let keyitemsEffectsMaxRanges = "items_effects_max_range" | |
53 | 53 | ||
54 | 54 | let charsApp = addressFromStringValue("3NA3LRSigk6knLZ16uTzcdLNow2EQZtXTaJ") | |
55 | 55 | ||
56 | 56 | let keyOwner = "owner" | |
57 | 57 | ||
58 | 58 | let keyNaturalBattleBonus = "natural_battle_bonus" | |
59 | 59 | ||
60 | 60 | let landsApp = addressFromStringValue("3MxiJLrY6Qa5bSYxxSFHSG5bVV2n59x1MGn") | |
61 | 61 | ||
62 | 62 | func invokeChecks (callerAddr) = if ((isDataStorageUntouched(govApp) != false)) | |
63 | 63 | then throw("Governing app not ready") | |
64 | 64 | else { | |
65 | 65 | let ecosystemAddresses = getStringValue(govApp, keyEcosystemAddresses) | |
66 | 66 | if ((contains(ecosystemAddresses, toString(callerAddr)) != false)) | |
67 | 67 | then throw("Access denied") | |
68 | 68 | else true | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func ecosystemCheck (caller) = if ((contains(getStringValue(govApp, keyEcosystemAddresses), toBase58String(caller.bytes)) != true)) | |
73 | 73 | then throw("Access denied") | |
74 | 74 | else true | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func with (a,b) = { | |
78 | 78 | let c = match b { | |
79 | 79 | case isInt: Int => | |
80 | 80 | toString(isInt) | |
81 | 81 | case isStr: String => | |
82 | 82 | isStr | |
83 | 83 | case _ => | |
84 | 84 | throw("Matching issue in with function") | |
85 | 85 | } | |
86 | 86 | ((c + separator) + a) | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func randInt (min,max,txId,nonce) = { | |
91 | 91 | let hash = value(sha256_16Kb(((value(value(blockInfoByHeight(height)).vrf) + txId) + toBytes(nonce)))) | |
92 | 92 | value(((value(toInt(hash)) % ((max - min) + 1)) + min)) | |
93 | 93 | } | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(i) | |
97 | 97 | func battle (charId) = if ((invokeChecks(i.caller) != true)) | |
98 | 98 | then throw() | |
99 | 99 | else { | |
100 | 100 | let callerAddr = toBase58String(i.caller.bytes) | |
101 | 101 | let txId = i.transactionId | |
102 | 102 | if ((getStringValue(charsApp, with(keyOwner, charId)) != callerAddr)) | |
103 | 103 | then throw("Caller doesn't own this char") | |
104 | 104 | else { | |
105 | 105 | let battleReadyHeight = (getIntegerValue(this, with(keyLastBattleHeight, charId)) + getIntegerValue(govApp, keyBattleRestPeriod)) | |
106 | 106 | if ((battleReadyHeight > height)) | |
107 | 107 | then throw("Still resting") | |
108 | 108 | else { | |
109 | 109 | let winChance = min([((getIntegerValue(govApp, keyBattleWinChanceIncrPerBlock) * (height - battleReadyHeight)) + getIntegerValue(charsApp, with(keyNaturalBattleBonus, charId))), getIntegerValue(govApp, keyBattleWinChanceHardcap)]) | |
110 | 110 | if ((winChance > randInt(0, 10000, txId, 0))) | |
111 | 111 | then [IntegerEntry(with(keyLastBattleHeight, charId), height)] | |
112 | 112 | else { | |
113 | 113 | let itemCat = randInt(1, getIntegerValue(govApp, keyItemsCategories), txId, 1) | |
114 | 114 | let itemCatTypesAmount = parseIntValue(split(getStringValue(govApp, keyItemsTypesPerCat), separator)[(itemCat - 1)]) | |
115 | 115 | let itemType = randInt(1, itemCatTypesAmount, txId, 2) | |
116 | 116 | let itemRarityRanges = split(getStringValue(govApp, keyBattleLootRarityRanges), separator) | |
117 | 117 | let itemRarity = randInt(0, 10000, txId, 3) | |
118 | 118 | let itemEffectSlots = if ((parseIntValue(itemRarityRanges[0]) >= itemRarity)) | |
119 | 119 | then 1 | |
120 | 120 | else if ((parseIntValue(itemRarityRanges[1]) >= itemRarity)) | |
121 | 121 | then 2 | |
122 | 122 | else if ((parseIntValue(itemRarityRanges[2]) >= itemRarity)) | |
123 | 123 | then 3 | |
124 | 124 | else 4 | |
125 | 125 | let itemEffectsAmounts = getIntegerValue(govApp, keyItemsEffects) | |
126 | 126 | let itemEffectsMaxRanges = split(getStringValue(govApp, keyitemsEffectsMaxRanges), separator) | |
127 | 127 | let itemEffectType1 = randInt(1, itemEffectsAmounts, txId, 4) | |
128 | 128 | let itemEffectValue1 = randInt(1, parseIntValue(itemEffectsMaxRanges[itemEffectType1]), txId, 5) | |
129 | 129 | let itemEffectType2 = if ((itemEffectSlots > 1)) | |
130 | 130 | then randInt(1, itemEffectsAmounts, txId, 6) | |
131 | 131 | else 0 | |
132 | 132 | let itemEffectValue2 = if ((itemEffectSlots > 1)) | |
133 | 133 | then randInt(1, parseIntValue(itemEffectsMaxRanges[itemEffectType2]), txId, 7) | |
134 | 134 | else 0 | |
135 | 135 | let itemEffectType3 = if ((itemEffectSlots > 2)) | |
136 | 136 | then randInt(1, itemEffectsAmounts, txId, 8) | |
137 | 137 | else 0 | |
138 | 138 | let itemEffectValue3 = if ((itemEffectSlots > 2)) | |
139 | 139 | then randInt(1, parseIntValue(itemEffectsMaxRanges[itemEffectType3]), txId, 9) | |
140 | 140 | else 0 | |
141 | 141 | let itemEffectType4 = if ((itemEffectSlots > 3)) | |
142 | 142 | then randInt(1, itemEffectsAmounts, txId, 10) | |
143 | 143 | else 0 | |
144 | 144 | let itemEffectValue4 = if ((itemEffectSlots > 3)) | |
145 | 145 | then randInt(1, parseIntValue(itemEffectsMaxRanges[itemEffectType4]), txId, 11) | |
146 | 146 | else 0 | |
147 | - | let itemId = | |
147 | + | let itemId = valueOrElse(getInteger(this, keyItemsCount), 1) | |
148 | 148 | [IntegerEntry(with(keyLastBattleHeight, charId), height), IntegerEntry(keyItemsCount, (itemId + 1)), StringEntry(with(keyItemOwner, itemId), callerAddr), IntegerEntry(with(keyItemCategory, itemId), itemCat), IntegerEntry(with(keyItemType, itemId), itemType), IntegerEntry(with(keyItemEffectType1, itemId), itemEffectType1), IntegerEntry(with(keyItemEffectValue1, itemId), itemEffectValue1), IntegerEntry(with(keyItemEffectType2, itemId), itemEffectType2), IntegerEntry(with(keyItemEffectValue2, itemId), itemEffectValue2), IntegerEntry(with(keyItemEffectType3, itemId), itemEffectType3), IntegerEntry(with(keyItemEffectValue3, itemId), itemEffectValue3), IntegerEntry(with(keyItemEffectType4, itemId), itemEffectType4), IntegerEntry(with(keyItemEffectValue4, itemId), itemEffectValue4)] | |
149 | 149 | } | |
150 | 150 | } | |
151 | 151 | } | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Callable(i) | |
157 | 157 | func updateLastBattleHeight (charId) = if ((ecosystemCheck(i.caller) != true)) | |
158 | 158 | then throw() | |
159 | 159 | else $Tuple2([IntegerEntry(with(keyLastBattleHeight, charId), height)], height) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | @Verifier(tx) | |
163 | 163 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
164 | 164 |
github/deemru/w8io/169f3d6 44.21 ms ◑