Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class ItemMock {
public ILconstInt id;
public ILconstReal x;
public ILconstReal y;
public ILconstReal life = ILconstReal.create(100);
private ILconstBool visible;

public ItemMock(ILconstInt id, ILconstReal x, ILconstReal y) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import de.peeeq.wurstscript.intermediatelang.IlConstHandle;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

public class UnitMock {
public IlConstHandle owner;
Expand All @@ -13,8 +15,43 @@ public class UnitMock {
public ILconstReal y;
public ILconstReal face;
public boolean removed;
public boolean hidden;
public boolean paused;
public boolean invulnerable;
public boolean pathing = true;
public boolean useFood = true;
public boolean exploded;
public final Set<Integer> selectedPlayers = new HashSet<>();
public boolean suspendedXp;
public boolean sleeping;
public boolean canSleep = true;
public boolean canSleepPerm = true;
public ILconstReal acquireRange = ILconstReal.create(0);
public ILconstReal defaultAcquireRange = ILconstReal.create(0);
public ILconstReal waygateX = ILconstReal.create(0);
public ILconstReal waygateY = ILconstReal.create(0);
public boolean waygateActive;
public ILconstReal moveSpeed = ILconstReal.create(0);
public ILconstReal defaultMoveSpeed = ILconstReal.create(0);
public ILconstReal flyHeight = ILconstReal.create(0);
public ILconstReal defaultFlyHeight = ILconstReal.create(0);
public ILconstReal turnSpeed = ILconstReal.create(0);
public ILconstReal defaultTurnSpeed = ILconstReal.create(0);
public ILconstReal propWindow = ILconstReal.create(0);
public ILconstReal defaultPropWindow = ILconstReal.create(0);
public ILconstInt level = ILconstInt.create(1);
public ILconstInt heroXp = ILconstInt.create(0);
public ILconstInt heroStr = ILconstInt.create(0);
public ILconstInt heroAgi = ILconstInt.create(0);
public ILconstInt heroInt = ILconstInt.create(0);
public ILconstInt skillPoints = ILconstInt.create(0);
public ILconstInt resourceAmount = ILconstInt.create(0);
public final HashMap<String, ILconstReal> states = new HashMap<>();
public final HashMap<Integer, ILconstInt> abilityLevels = new HashMap<>();
public final Set<Integer> permanentAbilities = new HashSet<>();
public final Set<String> unitTypes = new HashSet<>();
public final java.util.ArrayList<IlConstHandle> inventory = new java.util.ArrayList<>();
public IlConstHandle race;
public ILconstInt currentOrder = ILconstInt.create(0);

public UnitMock(IlConstHandle owner, ILconstInt unitid, ILconstReal x, ILconstReal y, ILconstReal face) {
Expand All @@ -28,4 +65,5 @@ public UnitMock(IlConstHandle owner, ILconstInt unitid, ILconstReal x, ILconstRe
states.put("unitstate2", ILconstReal.create(0));
states.put("unitstate3", ILconstReal.create(0));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static IlConstHandle enumHandle(String typeName, int value) {
}

public IlConstHandle ConvertRace(ILconstInt i) {
return new IlConstHandle("race" + i, new LinkedHashSet<>());
return enumHandle("race", i.getVal());
}

public IlConstHandle ConvertAllianceType(ILconstInt i) {
Expand Down Expand Up @@ -96,7 +96,7 @@ public IlConstHandle ConvertLimitOp(ILconstInt i) {
}

public IlConstHandle ConvertUnitType(ILconstInt i) {
return new IlConstHandle("unittype" + i, new LinkedHashSet<>());
return enumHandle("unittype", i.getVal());
}

public IlConstHandle ConvertGameSpeed(ILconstInt i) {
Expand Down
Loading
Loading