Skip to content

Commit 22bc4fd

Browse files
committed
Quick pass on math functions
* AB: Added Integer math callbacks * AB: Refactored names of float math callbacks to standardize
1 parent f7733eb commit 22bc4fd

20 files changed

Lines changed: 322 additions & 91 deletions

core/assets/abilityBehaviors/RaiseDead.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
"iterationActions": [{
274274
"type": "if",
275275
"condition": {
276-
"type": "floatNe0",
276+
"type": "f!=0",
277277
"value": {
278278
"type": "getAbilityDuration"
279279
}
@@ -406,7 +406,7 @@
406406
"iterationActions": [{
407407
"type": "if",
408408
"condition": {
409-
"type": "floatNe0",
409+
"type": "f!=0",
410410
"value": {
411411
"type": "getAbilityDuration"
412412
}
@@ -695,7 +695,7 @@
695695
"iterationActions": [{
696696
"type": "if",
697697
"condition": {
698-
"type": "floatNe0",
698+
"type": "f!=0",
699699
"value": {
700700
"type": "getAbilityDuration"
701701
}
@@ -856,7 +856,7 @@
856856
"iterationActions": [{
857857
"type": "if",
858858
"condition": {
859-
"type": "floatNe0",
859+
"type": "f!=0",
860860
"value": {
861861
"type": "getAbilityDuration"
862862
}

core/assets/abilityBehaviors/generalPassives.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
}
241241
},
242242
"condition2": {
243-
"type": "floatLt",
243+
"type": "f<",
244244
"value1": {
245245
"type": "randomBoundedFloat",
246246
"bound": {
@@ -257,7 +257,7 @@
257257
"thenActions": [{
258258
"type": "if",
259259
"condition": {
260-
"type": "floatNe0",
260+
"type": "f!=0",
261261
"value": {
262262
"type": "getAbilityDataAsFloat",
263263
"dataField": "B"
@@ -374,7 +374,7 @@
374374
},{
375375
"type": "createEvasionListener",
376376
"conditions": [{
377-
"type": "floatLt",
377+
"type": "f<",
378378
"value1": {
379379
"type": "randomFloat"
380380
},
@@ -439,7 +439,7 @@
439439
"onAddAbility": [{
440440
"type": "createEvasionListener",
441441
"conditions": [{
442-
"type": "floatLt",
442+
"type": "f<",
443443
"value1": {
444444
"type": "randomFloat"
445445
},

core/assets/abilityBehaviors/humanHeroActives.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"valueToStore": {
8282
"type": "randomBoundedFloat",
8383
"bound": {
84-
"type": "*",
84+
"type": "f*",
8585
"value1": {
8686
"type": "pi"
8787
},
@@ -98,7 +98,7 @@
9898
"value": "randDist"
9999
},
100100
"valueToStore": {
101-
"type": "multiplyFloat",
101+
"type": "f*",
102102
"value1": {
103103
"type": "randomFloat"
104104
},
@@ -109,15 +109,15 @@
109109
},{
110110
"type": "createTemporarySpellEffectAtPoint",
111111
"x": {
112-
"type": "+",
112+
"type": "f+",
113113
"value1": {
114114
"type": "getLocationX",
115115
"location": {
116116
"type": "getTargetedLocation"
117117
}
118118
},
119119
"value2": {
120-
"type": "*",
120+
"type": "f*",
121121
"value1": {
122122
"type": "cos",
123123
"angle": {
@@ -138,15 +138,15 @@
138138
}
139139
},
140140
"y": {
141-
"type": "+",
141+
"type": "f+",
142142
"value1": {
143143
"type": "getLocationY",
144144
"location": {
145145
"type": "getTargetedLocation"
146146
}
147147
},
148148
"value2": {
149-
"type": "*",
149+
"type": "f*",
150150
"value1": {
151151
"type": "sin",
152152
"angle": {
@@ -202,13 +202,13 @@
202202
"value": "damageDealt"
203203
},
204204
"valueToStore": {
205-
"type": "minFloat",
205+
"type": "fMin",
206206
"value1": {
207207
"type": "getAbilityDataAsFloat",
208208
"dataField": "A"
209209
},
210210
"value2": {
211-
"type": "/",
211+
"type": "f/",
212212
"value1": {
213213
"type": "getAbilityDataAsFloat",
214214
"dataField": "F"
@@ -234,7 +234,7 @@
234234
"value": "buildingDamageDealt"
235235
},
236236
"valueToStore": {
237-
"type": "multiplyFloat",
237+
"type": "f*",
238238
"value1": {
239239
"type": "getStoredFloatByKey",
240240
"key": {
@@ -367,7 +367,7 @@
367367
"value": "true"
368368
},
369369
"delay": {
370-
"type": "+",
370+
"type": "f+",
371371
"value1": {
372372
"type": "getAbilityDataAsFloat",
373373
"dataField": "D"
@@ -383,13 +383,13 @@
383383
"value": "damageDealt"
384384
},
385385
"valueToStore": {
386-
"type": "minFloat",
386+
"type": "fMin",
387387
"value1": {
388388
"type": "getAbilityDataAsFloat",
389389
"dataField": "C"
390390
},
391391
"value2": {
392-
"type": "/",
392+
"type": "f/",
393393
"value1": {
394394
"type": "getAbilityDataAsFloat",
395395
"dataField": "F"
@@ -415,7 +415,7 @@
415415
"value": "buildingDamageDealt"
416416
},
417417
"valueToStore": {
418-
"type": "multiplyFloat",
418+
"type": "f*",
419419
"value1": {
420420
"type": "getStoredFloatByKey",
421421
"key": {

core/assets/abilityBehaviors/neutralHeroUnitActives.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"value": "maxAbsorb"
1212
},
1313
"valueToStore": {
14-
"type": "divideFloat",
14+
"type": "f/",
1515
"value1": {
1616
"type": "getUnitCurrentMana",
1717
"unit": {
@@ -26,9 +26,9 @@
2626
},{
2727
"type": "if",
2828
"condition": {
29-
"type": "floatGt",
29+
"type": "f>",
3030
"value1": {
31-
"type": "*",
31+
"type": "f*",
3232
"value1": {
3333
"type": "getTotalDamageDealt"
3434
},
@@ -72,9 +72,9 @@
7272
"type": "getListenerUnit"
7373
},
7474
"amount": {
75-
"type": "*",
75+
"type": "f*",
7676
"value1": {
77-
"type": "*",
77+
"type": "f*",
7878
"value1": {
7979
"type": "getTotalDamageDealt"
8080
},
@@ -91,7 +91,7 @@
9191
},{
9292
"type": "subtractTotalDamageDealt",
9393
"amount": {
94-
"type": "*",
94+
"type": "f*",
9595
"value1": {
9696
"type": "getTotalDamageDealt"
9797
},

core/assets/abilityBehaviors/nightElfHeroUnitActives.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
},{
193193
"type": "if",
194194
"condition": {
195-
"type": "floatEq",
195+
"type": "f=",
196196
"value1": {
197197
"type": "getAbilityDuration",
198198
"target": {
@@ -222,17 +222,17 @@
222222
"value": "slowDur"
223223
},
224224
"valueToStore": {
225-
"type": "minFloat",
225+
"type": "fMin",
226226
"value1": {
227227
"type": "getAbilityDuration",
228228
"target": {
229229
"type": "getProjectileHitUnit"
230230
}
231231
},
232232
"value2": {
233-
"type": "max",
233+
"type": "fMax",
234234
"value1": {
235-
"type": "-",
235+
"type": "f-",
236236
"value1": {
237237
"type": "getAbilityDuration",
238238
"target": {
@@ -301,7 +301,7 @@
301301
"value": "atkSpdAmt"
302302
},
303303
"valueToStore": {
304-
"type": "divideFloat",
304+
"type": "f/",
305305
"value1": {
306306
"type": "getStoredFloatByKey",
307307
"key": {
@@ -337,7 +337,7 @@
337337
"value": "moveAmt"
338338
},
339339
"valueToStore": {
340-
"type": "divideFloat",
340+
"type": "f/",
341341
"value1": {
342342
"type": "getStoredFloatByKey",
343343
"key": {

0 commit comments

Comments
 (0)