Releases: armoha/euddraft
Releases Β· armoha/euddraft
euddraft 0.9.8.5
[0.9.8.5] - 2022.12.06
Bugfix
- Fixed typo in
Trigger(preserved=False)
andDoActions(preserved=False)
(reported by μ½€)
Improved
- Print null tile coordinates for 00.0000 warning
- Optimized
f_atan2(y, x)
andf_lengthdir(length, angle)
Added
- Added
f_atan2_256(y, x)
andf_lengthdir_256(length, angle)
euddraft 0.9.8.4
Changed
EUDLoopNewUnit
no longer modify CUnit +0xA5uniquenessIdentifier
- Can call
cunit.remove();
multiple times inUnitGroup.cploop
Bugfix
- Allow
selftype
for non-const method call - Fixed #34 : calling non-const
EUDTypedMethod
with parameter type raisesEPError: Different number of variables(n) from type declarations(n-1)
Improved
- Optimize
f_playerexist(player)
- Optimize read functions for empty case
- Example) Local (desync) unit selection
const localSelect = EPD(0x6284B8); for(var mySelect = localSelect; mySelect < localSelect + 12; mySelect++) { // Much faster and cleaner when mySelect is *not* empty const ptr, epd = cunitepdread_epd(mySelect); if (epd == 0) break; // .. than this, which substitutes mySelect on condition if (MemoryEPD(mySelect, Exactly, 0)) break; const ptr, epd = cunitepdread_epd(mySelect); }
switch
: Omit masked range check if bitmask == 0
euddraft 0.9.8.3
[0.9.8.3] - 2022.11.03
Changed
EPDOffsetMap
rollbacked to accept a tuple of (name, offset, type) pairs- Added and changed types
EPDOffsetMap
takes- Available type: bool, 1, 2, 4, "CUnit", "CSprite", "Position", "PositionX", "PositionY",
Flingy
,TrgPlayer
,TrgUnit
,UnitOrder
,Upgrade
,Tech
- Available type: bool, 1, 2, 4, "CUnit", "CSprite", "Position", "PositionX", "PositionY",
Improved
- Updated eudplib 0.71.7, cx-freeze 6.13.1, pybind11
- Optimize epScript object (EUDStruct) in-place operations and comparisons
- Optimize EPDCUnitMap edit/comparison
f_bitlshift(a, b)
calculatesa << b
on compile time when both are constants
Bugfix
- [epScript] Fixed #73 : Modifying python collections resulted in shadowing var
- Fixed
dwread(constexpr)
to calculate EPD on compile time (reported by Cocoa) - Fixed bug in
EUDDeque.append(value)
when tail warps around - Fixed trailing-whitespace typos in
Image
UnitGroup
:.dying
block checks hp == 0, instead of hp < 0.5- Fixed missing optimization (reported by @Chromowolf)
Added
- Added
matplotlib
library - Added
EUDQueue.clear()
,EUDDeque.clear()
- Added
f_wadd_epd(epd, subp, value)
,f_wsubtract_epd(epd, subp, value)
,f_badd_epd(epd, subp, value)
,f_bsubtract_epd(epd, subp, value)
- Only 0, 1, 2 are allowed in subp for
f_wadd_epd
andf_wsubtract_epd
- Only 0, 1, 2 are allowed in subp for
- Added types
Weapon
,Flingy
,Sprite
,Upgrade
,Tech
,UnitOrder
,Icon
,Portrait
- Added functions
EncodeWeapon
,EncodeFlingy
,EncodeSprite
,EncodeUpgrade
,EncodeTech
,EncodeUnitOrder
,EncodeIcon
,EncodePortrait
- Added
f_(set/add/dilate)loc(loc, x, y, action=true)
euddraft 0.9.8.2
[0.9.8.2] - 2022.10.24
- Updated eudplib 0.71.2
- Fix bug in
pow(a, b)
function (contributed by @Chromowolf ) - [epScript] Fix bug with global variable and
%
operator (reported by @Chromowolf ) - [epScript] Fixed #56 : Assigning constant to another module's variable 'rebinds' variable to constant
- No longer need to workaround with
SetVariables
- No longer need to workaround with
euddraft 0.9.8.1
[0.9.8.1] - 2022.10.21
- Updated eudplib 0.71.1
- Fixed bug breaking preserved no-Wait TRIG triggers due to miscalculating trigger stacking distance
- Fixed compile error when
import numpy
(reported by PyroManiac) - Added
EUDDeque(length)()
EUDDeque
is a double-ended queue with fixed-size buffer. It supports efficient insertions and removals from both ends.
Once a deque is full, when new items are added, a corresponding number of items are discarded from the opposite end..length
: current length.append(x)
: Add x to the right side of the deque..pop()
: Remove and return an element from the right side of the deque..appendleft(x)
: Add x to the left side of the deque..popleft()
: Remove and return an element from the left side of the deque.empty()
: Condition evaluated to True when deque is empty- Also supports
foreach
iteration. Iterating overEUDDeque
goes left to right.// dq3 is deque with length 3 const dq3 = EUDDeque(3)(); const ret = EUDCreateVariables(6); // Nothing happen if you loop empty deque foreach(v : dq3) { ret[0] += v; } // Add 1 and 2 to the right dq3.append(1); // dq3 : (1) dq3.append(2); // dq3 : (1, 2) foreach(v : dq3) { ret[1] += v; } // 3 = 1 + 2 // Add 3 and 4 to the right dq3.append(3); // dq3 : (1, 2, 3) dq3.append(4); // dq3 : (2, 3, 4) foreach(v : dq3) { ret[2] += v; } // 9 = 2 + 3 + 4 // Add 5 to the right dq3.append(5); // dq3 : (3, 4, 5) foreach(v : dq3) { ret[3] += v; } // 12 = 3 + 4 + 5 // Remove and return 3 from the left const three = dq3.popleft(); // dq3 : (4, 5) foreach(v : dq3) { ret[4] += v; } // 9 = 4 + 5 // Add 6 and 7 to the right dq3.append(6); // dq3 : (4, 5, 6) dq3.append(7); // dq3 : (5, 6, 7) foreach(v : dq3) { ret[5] += v; } // 18 = 5 + 6 + 7
EUDDeque
behaves like Pythoncollections.deque(maxlen=length)
.
- [epScript] #86 : Allow trailing comma after function arguments
- [epScript] #87 : Allow binary number representation
0b1 == 1
,0b10 == 2
,0b11 == 3
- Fixed bug
EUDQueue.empty()
was alwaystrue
- Fixed compile error when only one of
EUDQueue.append(x)
andEUDQueue.popleft()
is used (reported by HeartKlass)
euddraft 0.9.8.0 [YANKED]
Use https://github.com/armoha/euddraft/releases/tag/v0.9.8.1 or later!
[0.9.8.0] - 2022.10.21
- Updated eudplib 0.71.0
- Added
EUDDeque(length)()
EUDDeque
is a double-ended queue with fixed-size buffer. It supports efficient insertions and removals from both ends.
Once a deque is full, when new items are added, a corresponding number of items are discarded from the opposite end..length
: current length.append(x)
: Add x to the right side of the deque..pop()
: Remove and return an element from the right side of the deque..appendleft(x)
: Add x to the left side of the deque..popleft()
: Remove and return an element from the left side of the deque.empty()
: Condition evaluated to True when deque is empty- Also supports
foreach
iteration. Iterating overEUDDeque
goes left to right.// dq3 is deque with length 3 const dq3 = EUDDeque(3)(); const ret = EUDCreateVariables(6); // Nothing happen if you loop empty deque foreach(v : dq3) { ret[0] += v; } // Add 1 and 2 to the right dq3.append(1); // dq3 : (1) dq3.append(2); // dq3 : (1, 2) foreach(v : dq3) { ret[1] += v; } // 3 = 1 + 2 // Add 3 and 4 to the right dq3.append(3); // dq3 : (1, 2, 3) dq3.append(4); // dq3 : (2, 3, 4) foreach(v : dq3) { ret[2] += v; } // 9 = 2 + 3 + 4 // Add 5 to the right dq3.append(5); // dq3 : (3, 4, 5) foreach(v : dq3) { ret[3] += v; } // 12 = 3 + 4 + 5 // Remove and return 3 from the left const three = dq3.popleft(); // dq3 : (4, 5) foreach(v : dq3) { ret[4] += v; } // 9 = 4 + 5 // Add 6 and 7 to the right dq3.append(6); // dq3 : (4, 5, 6) dq3.append(7); // dq3 : (5, 6, 7) foreach(v : dq3) { ret[5] += v; } // 18 = 5 + 6 + 7 return List2Assignable(ret);
EUDDeque
behaves like Pythoncollections.deque(maxlen=length)
.
- [epScript] #86 : Allow trailing comma after function arguments
- [epScript] #87 : Allow binary number representation
0b1 == 1
,0b10 == 2
,0b11 == 3
- Fixed bug
EUDQueue.empty()
was alwaystrue
- Fixed compile error when only one of
EUDQueue.append(x)
andEUDQueue.popleft()
is used
euddraft 0.9.7.11
[0.9.7.11] - 2022.10.19
- Updated eudplib 0.70.17
UnitGroup
:unit.dying
block checks currentHP too (Prevent 0-hp zombie unit)getattr(EPDCUnitMap, attrName)
correctly raisesAttributeError
EUDLoopUnit2
: rollback to use0x0C CSprite
to detect unit death when there's no plugin whose name hasunlimiter
euddraft 0.9.7.10
Changelog
[0.9.7.10] - 2022.10.18
- Fixed bug causing unsupported EUD error in
PVariable[var] -= value;
(reported by @westreed ) - Fixed compile error for
PVariable
with<<=
,>>=
,^=
- Fixed bug in
var <<= var;
not storing output to variable
euddraft 0.9.7.9
- Added
numpy
library - Updated to Python 3.10.8
- [epScript] Fixed bugs in in-place item comparisons and writes, and migrate to epScript side (reported by 34464 and others)
- Fixed bugs in comparison operator precedence
- Fixed bug in
>
,<
,&=
- Fixed #82 : wrongly replace
Disabled(PreserveTrigger())
topreserved=True
trigger flag (reported by @Chromowolf ) - Fixed some triggers did not running repeatedly (reported by ehwl)
- Fixed
var << number
compile error (reported by GGrush) - Fixed bug in
EUDNot
- Fixed
*=
,/=
,<<=
,>>=
wrongly convert Lvaluevar
into Rvalue - Fixed #65 : better error message for
if (Action)
euddraft 0.9.7.3
[0.9.7.3] - 2022.10.09
- Optimize in-place item comparisons and writes for
EUDArray
andEUDVArray
(armoha/eudplib@3a12875)- Implemented various
EUDVArray
operation optimizations.
- Implemented various
- Add missing operator
%
forItemProxy
(reported by 34464) - [epScript] bugfix in helper.py (reported by 34464)
- Fix bug in
ItemProxy
withEUDVariable
methods (reported by ννμ΄) - Fix bug in
ItemProxy
withEUDSwitch
statement (reported by 34464, Cocoa)
[0.9.7.0] - 2022.10.08
- Fix error on
EncodeAIScript
(armoha/eudplib#15, contributed by @joshow) - Add documentations for classic triggers (armoha/eudplib#17, contributed by @zuhanit)
- Fix error on
EPDCUnitMap.isBlind()
(reported by wdcqc) - Optimize in-place item comparisons and writes for
EUDArray
andEUDVArray
(armoha/eudplib#18)- still work-in-progress for
EUDVArray[const] -= var
andEUDVArray[var] &= value
etc.
- still work-in-progress for
- Better error message for
EUDLoopPlayer(ptype, force, race)
- Update eudplib 0.70.0