Skip to content

Releases: armoha/euddraft

euddraft 0.9.8.5

06 Dec 10:25
Compare
Choose a tag to compare

[0.9.8.5] - 2022.12.06

Bugfix

  • Fixed typo in Trigger(preserved=False) and DoActions(preserved=False) (reported by μ½€)

Improved

  • Print null tile coordinates for 00.0000 warning
  • Optimized f_atan2(y, x) and f_lengthdir(length, angle)

Added

  • Added f_atan2_256(y, x) and f_lengthdir_256(length, angle)

euddraft 0.9.8.4

29 Nov 09:13
Compare
Choose a tag to compare

Changed

  • EUDLoopNewUnit no longer modify CUnit +0xA5 uniquenessIdentifier
  • Can call cunit.remove(); multiple times in UnitGroup.cploop

Bugfix

  • Allow selftype for non-const method call
  • Fixed #34 : calling non-const EUDTypedMethod with parameter type raises EPError: 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

03 Nov 05:15
Compare
Choose a tag to compare

[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

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) calculates a << 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 and f_wsubtract_epd
  • 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

24 Oct 11:57
Compare
Choose a tag to compare

[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

euddraft 0.9.8.1

21 Oct 05:42
Compare
Choose a tag to compare

[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 over EUDDeque 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 Python collections.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 always true
  • Fixed compile error when only one of EUDQueue.append(x) and EUDQueue.popleft() is used (reported by HeartKlass)

euddraft 0.9.8.0 [YANKED]

20 Oct 18:46
Compare
Choose a tag to compare

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 over EUDDeque 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 Python collections.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 always true
  • Fixed compile error when only one of EUDQueue.append(x) and EUDQueue.popleft() is used

euddraft 0.9.7.11

19 Oct 09:12
Compare
Choose a tag to compare

[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 raises AttributeError
  • EUDLoopUnit2: rollback to use 0x0C CSprite to detect unit death when there's no plugin whose name has unlimiter

euddraft 0.9.7.10

18 Oct 09:11
Compare
Choose a tag to compare

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

17 Oct 07:23
Compare
Choose a tag to compare
  • 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()) to preserved=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 Lvalue var into Rvalue
  • Fixed #65 : better error message for if (Action)

euddraft 0.9.7.3

09 Oct 09:11
Compare
Choose a tag to compare

[0.9.7.3] - 2022.10.09

  • Optimize in-place item comparisons and writes for EUDArray and EUDVArray (armoha/eudplib@3a12875)
    • Implemented various EUDVArray operation optimizations.
  • Add missing operator % for ItemProxy (reported by 34464)
  • [epScript] bugfix in helper.py (reported by 34464)
  • Fix bug in ItemProxy with EUDVariable methods (reported by νƒν•˜μ΄)
  • Fix bug in ItemProxy with EUDSwitch 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 and EUDVArray (armoha/eudplib#18)
    • still work-in-progress for EUDVArray[const] -= var and EUDVArray[var] &= value etc.
  • Better error message for EUDLoopPlayer(ptype, force, race)
  • Update eudplib 0.70.0