Skip to content

Commit

Permalink
Fullmoon arsenal changed, steelheart bug fix
Browse files Browse the repository at this point in the history
Added knockback_line to battle patterns
Fixed steelheart damage bug (probably) due to the variable being int64 instead of real, sometimes
A bit of work on Ran & Xin #2 (added a couple new mechs, cleaned things up a bit)
  • Loading branch information
fuzzything44 committed Aug 2, 2024
1 parent 892a7a2 commit 9037b10
Show file tree
Hide file tree
Showing 7 changed files with 303 additions and 49 deletions.
7 changes: 1 addition & 6 deletions RNSReloaded.FullmoonArsenal/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ private bool IsReady(
new Notch(NotchType.Encounter, "enc_wolf_bluepaw1", 0, 0),

new Notch(NotchType.Encounter, "enc_wolf_blackear0", 0, 0),
new Notch(NotchType.Chest, "", 0, 0),
new Notch(NotchType.Encounter, "enc_wolf_blackear1", 0, 0),
new Notch(NotchType.Chest, "", 0, 0),
new Notch(NotchType.Encounter, "enc_wolf_greyeye0", 0, 0),
new Notch(NotchType.Chest, "", 0, 0),
new Notch(NotchType.Boss, "enc_wolf_bluepaw0", 0, Notch.BOSS_FLAG)
}, self, rnsReloaded);
}
Expand All @@ -182,9 +178,8 @@ private bool IsReady(
rnsReloaded.utils.setHallway(new List<Notch> {
new Notch(NotchType.Shop, "", 0, 0),
new Notch(NotchType.Encounter, "enc_wolf_blackear2", 0, 0),
new Notch(NotchType.Shop, "", 0, 0),
new Notch(NotchType.Encounter, "enc_wolf_greyeye0", 0, 0),
new Notch(NotchType.Encounter, "enc_wolf_greyeye1", 0, 0),
new Notch(NotchType.Chest, "", 0, 0),
new Notch(NotchType.Boss, "enc_wolf_bluepaw1", 0, Notch.BOSS_FLAG)
}, self, rnsReloaded);
}
Expand Down
306 changes: 266 additions & 40 deletions RNSReloaded.FullmoonArsenal/RanXin1Fight.cs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions RNSReloaded.Interfaces/IBattlePatterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ public void knockback_circle(
Position? position = null
);

public void knockback_line(
CInstance* self, CInstance* other, int? warningDelay = null, int? warnMsg = null, int? spawnDelay = null, int? kbAmount = null, Position? position = null, bool? horizontal = null, int? targetMask = null
);

public void light_crosswave(
CInstance* self, CInstance* other, int? warningDelay = null, int? spawnDelay = null, int? rotation = null,
Position? position = null
Expand Down
12 changes: 11 additions & 1 deletion RNSReloaded.Steelheart/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,17 @@ private double GetEnemyHP(double id) {
var instance = rnsReloaded.GetGlobalInstance();
var hpList = rnsReloaded.FindValue(instance, "playerHp");
var enemyHps = rnsReloaded.ArrayGetEntry(hpList, 1);
return rnsReloaded.ArrayGetEntry(enemyHps, (int) id)->Real;
var hpValue = rnsReloaded.ArrayGetEntry(enemyHps, (int) id);
switch (hpValue->Type) {
case RValueType.Real:
return hpValue->Real;
case RValueType.Int32:
return hpValue->Int32;
case RValueType.Int64:
return hpValue->Int64;
default:
return 0;
}
} else {
throw new NullReferenceException("Hardcore mod not loaded properly - can't get RnsReloaded reference");
}
Expand Down
2 changes: 1 addition & 1 deletion RNSReloaded.Steelheart/ModConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"ModId": "RNSReloaded.Steelheart",
"ModName": "Steelheart",
"ModAuthor": "fuzzything44",
"ModVersion": "1.1.4",
"ModVersion": "1.1.5",
"ModDescription": "**Limits online play.**\n\nAll fights now go to enrage, and you can't gain invulnerability!",
"ModDll": "RNSReloaded.Steelheart.dll",
"ModIcon": "",
Expand Down
19 changes: 19 additions & 0 deletions RNSReloaded/BattlePatterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,25 @@ public void knockback_circle(
this.execute_pattern(self, other, "bp_knockback_circle", args);
}

public void knockback_line(
CInstance* self, CInstance* other, int? warningDelay = null, int? warnMsg = null, int? spawnDelay = null, int? kbAmount = null, Position? position = null, bool? horizontal = null, int? targetMask = null
) {
RValue[] args = [];
args = this.add_if_not_null(args, "warningDelay", warningDelay);
args = this.add_if_not_null(args, "warnMsg", warnMsg);
args = this.add_if_not_null(args, "spawnDelay", spawnDelay);
args = this.add_if_not_null(args, "trgBinary", targetMask);
args = this.add_if_not_null(args, "kbAmount", kbAmount);
args = this.add_if_not_null(args, "horizontal", horizontal);

if (position != null) {
args = args.Concat([this.utils.CreateString("x")!.Value, new RValue(position.Value.x)]).ToArray();
args = args.Concat([this.utils.CreateString("y")!.Value, new RValue(position.Value.y)]).ToArray();
}

this.execute_pattern(self, other, "bp_knockback_line", args);
}

public void light_crosswave(
CInstance* self, CInstance* other, int? warningDelay = null, int? spawnDelay = null, int? rotation = null,
Position? position = null
Expand Down
2 changes: 1 addition & 1 deletion RNSReloaded/ModConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"ModId": "RNSReloaded",
"ModName": "RNSReloaded",
"ModAuthor": "NotNite",
"ModVersion": "1.1.1",
"ModVersion": "1.1.2",
"ModDescription": "Helper library for Rabbit and Steel. Can be adapted to general GameMaker.",
"ModDll": "RNSReloaded.dll",
"ModIcon": "",
Expand Down

0 comments on commit 9037b10

Please sign in to comment.