Skip to content

Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.

Hollow Knight: Mosskin runner

Mason Chen17aecc195e11
diff --git a/games/hollowknight/src/data.bin b/games/hollowknight/src/data.bin
index 07ab3b38..d5144683 100644
Binary files a/games/hollowknight/src/data.bin and b/games/hollowknight/src/data.bin differ
diff --git a/games/hollowknight/src/data.h b/games/hollowknight/src/data.h
index 0713404b..fbdfd7a7 100644
--- a/games/hollowknight/src/data.h
+++ b/games/hollowknight/src/data.h
@@ -269,97 +269,105 @@
#define CLIP_HORNHEAD_IDLE 210
#define CLIP_HORNHEAD_TURN 211
#define CLIP_HORNHEAD_WALK 212
-#define CLIP_LEAPER_ATTACK 213
-#define CLIP_LEAPER_DEATH_AIR 214
-#define CLIP_LEAPER_DEATH_LAND 215
-#define CLIP_LEAPER_IDLE 216
-#define CLIP_LEAPER_LAND 217
-#define CLIP_LEAPER_TURN 218
-#define CLIP_LEAPER_WALK 219
-#define CLIP_GUARD_ANTICIPATE 220
-#define CLIP_GUARD_ATTACK2 221
-#define CLIP_GUARD_DEATH_AIR 222
-#define CLIP_GUARD_DEATH_LAND 223
-#define CLIP_GUARD_DORMANT 224
-#define CLIP_GUARD_IDLE 225
-#define CLIP_GUARD_RUN 226
-#define CLIP_GUARD_STARTLE 227
-#define CLIP_GUARD_STOMP_ANTIC 228
-#define CLIP_GUARD_STOMP_JUMP 229
-#define CLIP_GUARD_STOMP_LAND 230
-#define CLIP_GUARD_STOP_RUN 231
-#define CLIP_GUARD_STOP_WALK 232
-#define CLIP_GUARD_SWIPE 233
-#define CLIP_GUARD_TURN 234
-#define CLIP_GUARD_WAKE 235
-#define CLIP_GUARD_WALK 236
-#define CLIP_FK_ATTACK 237
-#define CLIP_FK_ATTACK_ANTIC 238
-#define CLIP_FK_ATTACK_RECOVER 239
-#define CLIP_FK_BLANK 240
-#define CLIP_FK_BODY 241
-#define CLIP_FK_DEATH_FALL 242
-#define CLIP_FK_DEATH_HEAD_1 243
-#define CLIP_FK_DEATH_HEAD_2 244
-#define CLIP_FK_DEATH_LAND 245
-#define CLIP_FK_DEATH_SPAZ 246
-#define CLIP_FK_IDLE 247
-#define CLIP_FK_JUMP 248
-#define CLIP_FK_JUMP_ANTIC 249
-#define CLIP_FK_JUMP_ATTACK_HIT_1 250
-#define CLIP_FK_JUMP_ATTACK_HIT_2 251
-#define CLIP_FK_JUMP_ATTACK_HIT_3 252
-#define CLIP_FK_JUMP_ATTACK_UP 253
-#define CLIP_FK_LAND 254
-#define CLIP_FK_RAGE 255
-#define CLIP_FK_RUN 256
-#define CLIP_FK_RUN_ANTIC 257
-#define CLIP_FK_STUN_HIT 258
-#define CLIP_FK_STUN_OPEN 259
-#define CLIP_FK_STUN_OPENED 260
-#define CLIP_FK_STUN_RECOVER 261
-#define CLIP_FK_STUN_ROLL 262
-#define CLIP_FK_STUN_ROLL_END 263
-#define CLIP_FK_TURN 264
-#define CLIP_FKHEAD_DEATH_LAND 265
-#define CLIP_FKHEAD_HEAD_HIT 266
-#define CLIP_FKHEAD_HEAD_IDLE 267
-#define CLIP_FKHEAD_HEAD_SPAZ 268
-#define CLIP_GFLY_BURST 269
-#define CLIP_GFLY_CHARGE 270
-#define CLIP_GFLY_CHARGE_ANTIC 271
-#define CLIP_GFLY_CHARGE_RECOVER 272
-#define CLIP_GFLY_DEATH 273
-#define CLIP_GFLY_FALL 274
-#define CLIP_GFLY_FLY 275
-#define CLIP_GFLY_GURGLE_LOOP 276
-#define CLIP_GFLY_GURGLE_ONCE 277
-#define CLIP_GFLY_SLAM_DOWN 278
-#define CLIP_GFLY_SLAM_END 279
-#define CLIP_GFLY_SLAM_UP 280
-#define CLIP_GFLY_SLEEP 281
-#define CLIP_GFLY_STOP 282
-#define CLIP_GFLY_WAKE 283
-#define CLIP_GFLY_WIGGLE 284
-#define CLIP_BGATE_BG_OPENED 285
-#define CLIP_BGATE_BG_CLOSE_1 286
-#define CLIP_BGATE_BG_CLOSE_2 287
-#define CLIP_BGATE_BG_OPEN 288
-#define CLIP_BGATE_BG_CLOSED 289
-#define CLIP_BGATE_BONE_GATE_OPENED 290
-#define CLIP_BGATE_BONE_GATE_CLOSE 291
-#define CLIP_BGATE_BONE_GATE_CLOSED 292
-#define CLIP_BGATE_BONE_GATE_OPEN 293
-#define CLIP_BULLET_IDLE 294
-#define CLIP_BULLET_IMPACT 295
-#define CLIP_BULLET_SHOCKWAVE_SPURT 296
-#define SPRITE_HERO_LIGHT 1191
-#define SPRITE_DIALOGUE_BACKBOARD 1192
-#define SPRITE_PROMPT_SHADOW 1193
-#define SPRITE_CORPSE_NAIL 1194
-#define SPRITE_FK_BARREL 1195
-#define SPRITE_FK_STAFF 1196
-#define SPRITE_DIGIT0 1383
+#define CLIP_MOSSRUNNER_ATTACK_ANTICIPATE 213
+#define CLIP_MOSSRUNNER_ATTACK_COOLDOWN 214
+#define CLIP_MOSSRUNNER_ATTACK_LUNGE 215
+#define CLIP_MOSSRUNNER_DEATH_AIR 216
+#define CLIP_MOSSRUNNER_DEATH_LAND 217
+#define CLIP_MOSSRUNNER_IDLE 218
+#define CLIP_MOSSRUNNER_TURN 219
+#define CLIP_MOSSRUNNER_WALK 220
+#define CLIP_LEAPER_ATTACK 221
+#define CLIP_LEAPER_DEATH_AIR 222
+#define CLIP_LEAPER_DEATH_LAND 223
+#define CLIP_LEAPER_IDLE 224
+#define CLIP_LEAPER_LAND 225
+#define CLIP_LEAPER_TURN 226
+#define CLIP_LEAPER_WALK 227
+#define CLIP_GUARD_ANTICIPATE 228
+#define CLIP_GUARD_ATTACK2 229
+#define CLIP_GUARD_DEATH_AIR 230
+#define CLIP_GUARD_DEATH_LAND 231
+#define CLIP_GUARD_DORMANT 232
+#define CLIP_GUARD_IDLE 233
+#define CLIP_GUARD_RUN 234
+#define CLIP_GUARD_STARTLE 235
+#define CLIP_GUARD_STOMP_ANTIC 236
+#define CLIP_GUARD_STOMP_JUMP 237
+#define CLIP_GUARD_STOMP_LAND 238
+#define CLIP_GUARD_STOP_RUN 239
+#define CLIP_GUARD_STOP_WALK 240
+#define CLIP_GUARD_SWIPE 241
+#define CLIP_GUARD_TURN 242
+#define CLIP_GUARD_WAKE 243
+#define CLIP_GUARD_WALK 244
+#define CLIP_FK_ATTACK 245
+#define CLIP_FK_ATTACK_ANTIC 246
+#define CLIP_FK_ATTACK_RECOVER 247
+#define CLIP_FK_BLANK 248
+#define CLIP_FK_BODY 249
+#define CLIP_FK_DEATH_FALL 250
+#define CLIP_FK_DEATH_HEAD_1 251
+#define CLIP_FK_DEATH_HEAD_2 252
+#define CLIP_FK_DEATH_LAND 253
+#define CLIP_FK_DEATH_SPAZ 254
+#define CLIP_FK_IDLE 255
+#define CLIP_FK_JUMP 256
+#define CLIP_FK_JUMP_ANTIC 257
+#define CLIP_FK_JUMP_ATTACK_HIT_1 258
+#define CLIP_FK_JUMP_ATTACK_HIT_2 259
+#define CLIP_FK_JUMP_ATTACK_HIT_3 260
+#define CLIP_FK_JUMP_ATTACK_UP 261
+#define CLIP_FK_LAND 262
+#define CLIP_FK_RAGE 263
+#define CLIP_FK_RUN 264
+#define CLIP_FK_RUN_ANTIC 265
+#define CLIP_FK_STUN_HIT 266
+#define CLIP_FK_STUN_OPEN 267
+#define CLIP_FK_STUN_OPENED 268
+#define CLIP_FK_STUN_RECOVER 269
+#define CLIP_FK_STUN_ROLL 270
+#define CLIP_FK_STUN_ROLL_END 271
+#define CLIP_FK_TURN 272
+#define CLIP_FKHEAD_DEATH_LAND 273
+#define CLIP_FKHEAD_HEAD_HIT 274
+#define CLIP_FKHEAD_HEAD_IDLE 275
+#define CLIP_FKHEAD_HEAD_SPAZ 276
+#define CLIP_GFLY_BURST 277
+#define CLIP_GFLY_CHARGE 278
+#define CLIP_GFLY_CHARGE_ANTIC 279
+#define CLIP_GFLY_CHARGE_RECOVER 280
+#define CLIP_GFLY_DEATH 281
+#define CLIP_GFLY_FALL 282
+#define CLIP_GFLY_FLY 283
+#define CLIP_GFLY_GURGLE_LOOP 284
+#define CLIP_GFLY_GURGLE_ONCE 285
+#define CLIP_GFLY_SLAM_DOWN 286
+#define CLIP_GFLY_SLAM_END 287
+#define CLIP_GFLY_SLAM_UP 288
+#define CLIP_GFLY_SLEEP 289
+#define CLIP_GFLY_STOP 290
+#define CLIP_GFLY_WAKE 291
+#define CLIP_GFLY_WIGGLE 292
+#define CLIP_BGATE_BG_OPENED 293
+#define CLIP_BGATE_BG_CLOSE_1 294
+#define CLIP_BGATE_BG_CLOSE_2 295
+#define CLIP_BGATE_BG_OPEN 296
+#define CLIP_BGATE_BG_CLOSED 297
+#define CLIP_BGATE_BONE_GATE_OPENED 298
+#define CLIP_BGATE_BONE_GATE_CLOSE 299
+#define CLIP_BGATE_BONE_GATE_CLOSED 300
+#define CLIP_BGATE_BONE_GATE_OPEN 301
+#define CLIP_BULLET_IDLE 302
+#define CLIP_BULLET_IMPACT 303
+#define CLIP_BULLET_SHOCKWAVE_SPURT 304
+#define SPRITE_HERO_LIGHT 1228
+#define SPRITE_DIALOGUE_BACKBOARD 1229
+#define SPRITE_PROMPT_SHADOW 1230
+#define SPRITE_CORPSE_NAIL 1231
+#define SPRITE_FK_BARREL 1232
+#define SPRITE_FK_STAFF 1233
+#define SPRITE_DIGIT0 1420
#define STYLE_DIALOGUE 0
#define STYLE_PROMPT 1
#define TEXT_K 1.333333f
@@ -375,13 +383,14 @@
#define EK_HUSK 9
#define EK_BARGER 10
#define EK_HORNHEAD 11
-#define EK_LEAPER 12
-#define EK_GUARD 13
-#define EK_FK 14
-#define EK_FKHEAD 15
-#define EK_GFLY 16
-#define NUM_KINDS 17
-#define KIND_TABLE {{0}, {EF_CRAWLER, {-1, 150, 149, -1, -1, -1, -1, -1, -1, -1, -1, 152, 153}}, {EF_BUZZER, {155, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 157, 158}}, {EF_SHADE, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, {EF_CLIMBER, {-1, -1, 165, 164, -1, -1, -1, -1, -1, -1, -1, 162, 163}}, {EF_BOUNCER, {-1, -1, -1, 168, -1, -1, -1, -1, -1, -1, -1, 166, 167}}, {EF_SPITTER, {-1, -1, -1, 171, 172, 170, -1, -1, -1, -1, -1, 169, -1}}, {EF_ROLLER, {175, -1, -1, 177, 176, 178, -1, -1, -1, -1, -1, 173, 174}}, {EF_BLOCKER, {185, -1, -1, 181, 186, 179, 180, 187, 188, 184, 183, -1, 182}}, {EF_HUSK, {194, 195, 196, 189, 191, 190, -1, -1, -1, -1, -1, 192, 193}}, {EF_HUSK, {202, 203, 204, 197, 199, 198, -1, -1, -1, -1, -1, 200, 201}}, {EF_HUSK, {210, 211, 212, 205, 207, 206, -1, -1, -1, -1, -1, 208, 209}}, {EF_LEAPER, {216, 218, 219, 213, 217, -1, -1, -1, -1, -1, -1, 214, 215}}, {EF_GUARD, {225, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 222, 223}}, {EF_FK, {247, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 245}}, {EF_FKHEAD, {267, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 265}}, {EF_GFLY, {281, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}}
+#define EK_MOSSRUNNER 12
+#define EK_LEAPER 13
+#define EK_GUARD 14
+#define EK_FK 15
+#define EK_FKHEAD 16
+#define EK_GFLY 17
+#define NUM_KINDS 18
+#define KIND_TABLE {{0}, {EF_CRAWLER, {-1, 150, 149, -1, -1, -1, -1, -1, -1, -1, -1, 152, 153}}, {EF_BUZZER, {155, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 157, 158}}, {EF_SHADE, {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, {EF_CLIMBER, {-1, -1, 165, 164, -1, -1, -1, -1, -1, -1, -1, 162, 163}}, {EF_BOUNCER, {-1, -1, -1, 168, -1, -1, -1, -1, -1, -1, -1, 166, 167}}, {EF_SPITTER, {-1, -1, -1, 171, 172, 170, -1, -1, -1, -1, -1, 169, -1}}, {EF_ROLLER, {175, -1, -1, 177, 176, 178, -1, -1, -1, -1, -1, 173, 174}}, {EF_BLOCKER, {185, -1, -1, 181, 186, 179, 180, 187, 188, 184, 183, -1, 182}}, {EF_HUSK, {194, 195, 196, 189, 191, 190, -1, -1, -1, -1, -1, 192, 193}}, {EF_HUSK, {202, 203, 204, 197, 199, 198, -1, -1, -1, -1, -1, 200, 201}}, {EF_HUSK, {210, 211, 212, 205, 207, 206, -1, -1, -1, -1, -1, 208, 209}}, {EF_HUSK, {218, 219, 220, 213, 215, 214, -1, -1, -1, -1, -1, 216, 217}}, {EF_LEAPER, {224, 226, 227, 221, 225, -1, -1, -1, -1, -1, -1, 222, 223}}, {EF_GUARD, {233, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 230, 231}}, {EF_FK, {255, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 253}}, {EF_FKHEAD, {275, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 273}}, {EF_GFLY, {289, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}}
#define TXT_PROMPT_LISTEN 0
#define TXT_PROMPT_REST 1
#define TXT_PROMPT_INSPECT 2
diff --git a/games/hollowknight/src/enemy.c b/games/hollowknight/src/enemy.c
index 1f436eb2..0c227785 100644
--- a/games/hollowknight/src/enemy.c
+++ b/games/hollowknight/src/enemy.c
@@ -1408,8 +1408,15 @@ static void husk_start(Enemy *e) {
e->st = ZS_READY;
}
+/* (an older Zombie Swipe: no Coward state, Ready deaf to TOOK DAMAGE, Reset playing Idle) */
+static bool husk_old(const Enemy *e) {
+ const Ent *v = enemy_rec(e, ET_VARS);
+ return v && (v->a & 2);
+}
+
static void husk_ready(Enemy *e) {
/* Reset: StartWalker; (Coward: no) Ready */
+ if (husk_old(e)) anim_play(&e->anim, CLIP(e, R_IDLE));
e->st = ZS_READY;
walker_start(e);
}
@@ -1441,10 +1448,11 @@ static void husk_update(Enemy *e) {
switch (e->st) {
case ZS_READY:
walker_update(e);
- if ((e->can_see && e->in_alert) || e->b1) {
+ if ((e->can_see && e->in_alert) || (e->b1 && !husk_old(e))) {
e->b1 = false;
husk_attack(e);
}
+ e->b1 = false;
break;
case ZS_ANTICIPATE:
if (done) {
diff --git a/games/hollowknight/tools/actors.py b/games/hollowknight/tools/actors.py
index 65b6caf5..20523aae 100644
--- a/games/hollowknight/tools/actors.py
+++ b/games/hollowknight/tools/actors.py
@@ -40,6 +40,8 @@ ENEMY_KINDS = [
{"IDLE": "Idle", "TURN": "Turn", "WALK": "Walk", "A1": "Attack Anticipate", "A2": "Attack Lunge", "A3": "Attack Cooldown"}),
("hornhead", "Zombie Swipe", ("sharedassets40.assets", 192), "HUSK",
{"IDLE": "Idle", "TURN": "Turn", "WALK": "Walk", "A1": "Attack Anticipate", "A2": "Attack Lunge", "A3": "Attack Cooldown"}),
+ ("mossrunner", "Zombie Swipe", ("sharedassets128.assets", 192), "HUSK",
+ {"IDLE": "Idle", "TURN": "Turn", "WALK": "Walk", "A1": "Attack Anticipate", "A2": "Attack Lunge", "A3": "Attack Cooldown"}),
("leaper", "Zombie Leap", ("sharedassets57.assets", 82), "LEAPER",
{"IDLE": "Idle", "TURN": "Turn", "WALK": "Walk", "A1": "Attack", "A2": "Land"}),
# (its own code plays its clips by name: CLIP_GUARD_*)
diff --git a/games/hollowknight/tools/ents.py b/games/hollowknight/tools/ents.py
index ecb5c0f5..e1f852c9 100644
--- a/games/hollowknight/tools/ents.py
+++ b/games/hollowknight/tools/ents.py
@@ -430,7 +430,8 @@ def _enemy(o, by_id, persist, name, d=None, strings=None, owners=None):
w = next((c.get("v") for c in o["c"] if c.get("class") == "Walker" and c.get("v")), None)
if w:
wf = (1 if w.get("pauses") else 0) | (2 if w.get("ignoreHoles") else 0) | \
- (4 if w.get("preventTurningToFaceHero") else 0) | (8 if w.get("startInactive") else 0) | \
+ (4 if w.get("preventTurningToFaceHero") or not w.get("alertRange") else 0) | \
+ (8 if w.get("startInactive") else 0) | \
(16 if w.get("ambush") else 0) | (32 if w.get("waitForHeroX") else 0) | (64 if w.get("preventTurn") else 0) | \
(128 if w.get("preventScaleChange") else 0) | (256 if w.get("rightScale", 1) < 0 else 0)
out.append(rec(ENT_BOX, ET_WALKER, box=(w.get("walkSpeedL", 0), w.get("walkSpeedR", 0), w.get("pauseTimeMin", 0),
@@ -449,6 +450,8 @@ def _enemy(o, by_id, persist, name, d=None, strings=None, owners=None):
# (up to eight numbers: p0..p3, then the box's)
vals = [float((var.get(k) or [0, 0])[1] or 0) for k in nums] + [0.0] * (8 - len(nums))
bits = sum(1 << i for i, k in enumerate(bools) if (var.get(k) or [0, False])[1])
+ if fsm.get("name") == "Zombie Swipe" and not _state(fsm, "Coward"):
+ bits |= 2 # (an older Zombie Swipe: Ready deaf to TOOK DAMAGE, Reset plays Idle)
out.append(rec(ENT_BOX, ET_VARS, p=tuple(vals[:4]), box=tuple(vals[4:8]), a=bits))
if fsm.get("name") == "Big Fly Control" and d is not None:
# (Gruz Mother: where her young wait, Fly Spawn; her burster brings them there)