Properly track and handle bosses.

master
sigonasr2 5 years ago
parent 6ddca772de
commit 91603a9361
  1. BIN
      sigIRCv2.jar
  2. 19
      src/sig/modules/RabiRace/Profile.java
  3. 6
      src/sig/modules/RabiRaceModule.java
  4. 1
      src/sig/modules/RabiRibi/MemoryOffset.java

Binary file not shown.

@ -325,13 +325,15 @@ public class Profile {
RabiRaceModule.darknessHasReachedzero=false;
}*/
if (parent.readIntFromMemory(MemoryOffset.DARKNESS)>0 && RabiRaceModule.darknessHasReachedzero) {
RabiRaceModule.syncEvents = InBossBattleSong();
/*if (parent.readIntFromMemory(MemoryOffset.DARKNESS)>0 && RabiRaceModule.darknessHasReachedzero) {
RabiRaceModule.syncEvents=!RabiRaceModule.syncEvents;
RabiRaceModule.darknessHasReachedzero=false;
}
if (parent.readIntFromMemory(MemoryOffset.DARKNESS)==0) {
RabiRaceModule.darknessHasReachedzero=true;
}
}*/
for (int i=0;i<EVENT_COUNT;i++) {
if (NonRestrictedValue(i)) {
int val = parent.readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4);
@ -353,11 +355,24 @@ public class Profile {
events.append(val);
}*/
}
if (RabiRaceModule.syncEvents &&
RabiRaceModule.lastEventString.equalsIgnoreCase(events.toString())) {
eventStruct = events.toString();
} else {
RabiRaceModule.lastEventString = events.toString();
}
syncing = RabiRaceModule.syncEvents;
}
private boolean InBossBattleSong() {
for (int i=0;i<RabiRaceModule.BOSSSONGS.length;i++) {
if (parent.readIntFromMemory(MemoryOffset.MAP_AREA_COLOR)==RabiRaceModule.BOSSSONGS[i]) {
return true;
}
}
return false;
}
private boolean NonRestrictedValue(int i) {
for (int j=0;j<RabiRaceModule.RESTRICTED_EVENTS.length;j++) {
if (i==RabiRaceModule.RESTRICTED_EVENTS[j]-256) {

@ -93,11 +93,13 @@ public class RabiRaceModule extends Module{
public HashMap<Integer,Integer> newmapdata = new HashMap<Integer,Integer>();
public static ScheduledExecutorService scheduler,scheduler2;
public static boolean syncEvents = true;
public static boolean darknessHasReachedzero = true; //darkness needs to go down to 0, then go back up.
//public static boolean darknessHasReachedzero = true; //darkness needs to go down to 0, then go back up.
public static boolean hasDied = false;
public static String lastEventString = "";
int frames=0;
public static final int[] RESTRICTED_EVENTS = new int[] {256,257,260,262,264,265,266,267,268,269,271,272,278,279,284,289,290,295,296,307,315,316,322,323,324,331,333,344,345,371,377,379,385,386,387,399,412,427,428,451,452,464,465,484,516,517,518,519};
public static final int[] BOSSSONGS = new int[] {8,27,33,34,36,37,38,39,42,43,44,47,48,51,52,54,56,59,60,61,63,64};
public SessionListData session_listing = new SessionListData();
@ -609,7 +611,6 @@ public class RabiRaceModule extends Module{
if (mySession!=null && mySession.isCoop()) {
if (mySession!=null && mySession.isCoop()) {
if (OnTitleScreen()) {
if (waitframes--<=0) {
mapdata.clear();
@ -619,7 +620,6 @@ public class RabiRaceModule extends Module{
} else {
waitframes = WAITFRAMEMAX;
}
}
if (newmapdata.size()>0 && readIntFromMemory(MemoryOffset.PAUSED)>0) {
viewingupdatedMapIcons=true;

@ -163,6 +163,7 @@ public enum MemoryOffset {
MESSAGE_TEXTREF(0x16EA4B0,0,0,0,0,0), //This should be 27 as this allows for MESSAGE_TEXT to be our "custom message" handler.
MAP_AREA_COLOR(0x84C888,0,0,0,0,0), //See https://github.com/wcko87/rabiribi-map-editing/blob/master/docs/room_colors.md for colors.
//Also changes based on music
BOSS_FIGHT(0x16E7D9C,0,0,0,0,0), //Should be 1 when in a boss fight.
AUTOSAVE(0xD34A70,0,0,0,0,0), //1 if autosaving is occurring.

Loading…
Cancel
Save