]> localhost Git - radev.git/commitdiff
Add initial CAV RA Script
authormisomosi <[email protected]>
Tue, 1 Sep 2026 23:56:30 +0000 (19:56 -0400)
committermisomosi <[email protected]>
Tue, 1 Sep 2026 23:56:30 +0000 (19:56 -0400)
CastlevaniaTheAdventure/CAV.rascript [new file with mode: 0644]

diff --git a/CastlevaniaTheAdventure/CAV.rascript b/CastlevaniaTheAdventure/CAV.rascript
new file mode 100644 (file)
index 0000000..6ebe393
--- /dev/null
@@ -0,0 +1,29 @@
+// Castlevania: The Adventure
+// #ID = 689
+
+
+CandleStart = 0xc580
+CandleSize = 32
+CandleStatusActive = 0x0280
+CandleStatusInactive = 0x0000
+MaxCandleActive = 4
+function StageNumber() { return byte(0xc02b) }
+function Candle(i) { return CandleStart + i * CandleSize }
+function CandleStatus(i) { return word(Candle(i) + 0) }
+function CandleID(i) { return byte(Candle(i) + 28) }
+
+gCandleID = 0
+function gCheckItemCollected(index) {
+    return once(
+    ((prev(CandleStatus(index))-CandleStatus(index))*256+CandleID(index)) == (CandleStatusActive-CandleStatusInactive)*256+gCandleID
+    )
+}
+function gCheckCandleCollected(id) {
+    gCandleID = id
+    return any_of(range(0, 4), gCheckItemCollected)
+}
+function CheckAllCandles() {
+    return all_of(range(0, 4), gCheckCandleCollected)
+}
+achievement(title = "RATools Test", description = "Get the Candle", points = 0,
+    trigger = CheckAllCandles())
\ No newline at end of file