fertig-classic-games/tools
Brian Fertig a6f6b647da Wolfenstein: Add semi-auto fire modes, ammo types, enemy stun, and editor facing picker
This refactors weapon/enemy combat systems to support per-weapon cooldowns,
fire modes (auto/semi), and data-driven damage rolls via ammo types. Guards
now use the pistol's stats for ranged attacks and can be stunned by non-lethal
hits. The level editor now includes a directional facing picker for newly placed
enemies and displays enemy orientation as arrows instead of dots.

Key changes:
- Logic: Replaced single weaponCooldownMs with per-weapon cooldowns map; added
  prevFireHeld for semi-auto trigger-edge detection; guards now reference real
  weapon definitions via rangedWeapon; projectiles carry ammoType and resolve
  damage at hit time using rollDamage(); non-lethal ranged hits apply stunMs to
  enemies, freezing their AI until it expires.
- Rules: Added ammoTypes array with damageMin/damageMax; weapons now specify
  fireMode and ammoType (projectiles) or damage (melee); enemy definitions
  include stunMs and reference weapon IDs instead of hardcoded projectile stats.
- Editor: Added FACING_DIRS constants and drawFacingPicker() overlay that lets
  users click N/S/E/W neighbor cells to set a just-placed enemy's facing;
  enemies now render as directional arrows showing their spawn orientation;
  pendingFacingEnemy state tracks the in-progress pick across tool switches,
  undo/redo, and level resets.
- View: Added GUARD_FRAME.stunned (frame 9) which takes visual priority over
  all other states when e.stunMs > 0, ensuring the flinch pose displays even if
  the enemy's internal state still reads 'attack' or 'chase'.
- Data: Expanded level-e1m1 to 19x21 grid with repositioned doors/enemies/exit;
  bumped SAVE_VERSION to 2 since player.cooldowns and prevFireHeld are new
  required fields absent from v1 saves.
- Tests: Added coverage for semi-auto trigger-edge behavior, stun application
  and duration, melee non-stun behavior, damage roll range bounds, and guard
  projectile ammo type/cooldown spacing; updated existing tests to use new
  cooldowns/ammoType fields and toggle fireHeld for repeated shots.
2026-08-22 09:39:09 -06:00
..
data Excitebike 2026-07-29 22:05:21 -06:00
lib feat(totalannihilation): add flight animation and factory production dials 2026-08-01 09:41:03 -06:00
bloxorzMap.js feat: overhaul Bloxorz rendering, mechanics, and level design; update Total Annihilation visuals 2026-07-25 14:50:23 -06:00
buildCommonWords.js Major Port 2026-06-28 19:27:29 -06:00
fetchStarControlAssets.js refactor: improve Star Control ship rendering and ship picker UX 2026-07-15 11:45:08 -06:00
genBloxorz.js feat: overhaul Bloxorz rendering, mechanics, and level design; update Total Annihilation visuals 2026-07-25 14:50:23 -06:00
genDotLink.js Major Port 2026-06-28 19:27:29 -06:00
genExcitebikeTracks.js fix(excitebike): rework throttle, heat model, and landing after playtest 2026-07-29 22:34:29 -06:00
genGooTower.js Goo Tower Levels 2026-07-26 15:23:18 -06:00
genJumble.js feat: add Jumble word puzzle game with 58 curated levels 2026-06-30 19:42:57 -06:00
genKatamino.js Major Port 2026-06-28 19:27:29 -06:00
genMiniCrossword.js Major Port 2026-06-28 19:27:29 -06:00
genPeggleLevels.js Peggle Adjustments 2026-07-12 09:14:06 -06:00
genPuddingMonsters.js feat: pudding monsters waves 1-3, mahjong match FX, background art 2026-07-26 01:27:36 -06:00
genRushHour.js feat(rushhour): redesign level bank, procedural art, and tiered curriculum 2026-07-28 22:12:55 -06:00
genSpireClimbCreatures.js Major Port 2026-06-28 19:27:29 -06:00
genSuperKartTracks.js feat: add Super Kart — SNES-style Mode 7 kart racing game 2026-07-17 14:25:18 -06:00
genTACampaign.js TAL: smooth obstacle collision push + in-place building upgrades (upgradesFrom) 2026-08-16 18:59:30 -06:00
genTetrisAttackPuzzles.js feat: add Tetris Attack (Panel de Pon) with endless, stage clear, and puzzle modes 2026-07-20 00:04:26 -06:00
genWolfenstein.js feat(wolfenstein): add enemy vision cone, patrol loop behavior, and weapon sprites 2026-08-21 20:23:02 -06:00
genZuma.js Zuma Level Refactor 2026-07-28 21:33:36 -06:00
readExcitebikeMaps.js excitebike: playtest fixes and Wave 5 polish 2026-07-29 23:06:41 -06:00
verifyAdvanceWars.js feat(advance-wars): add unit progression system with mission-based unlocks 2026-07-19 10:55:18 -06:00
verifyBalatro.js feat: add Balatro — poker roguelike game 2026-07-09 22:43:36 -06:00
verifyBejeweled.js Major Port 2026-06-28 19:27:29 -06:00
verifyBlockFighter.js Major Port 2026-06-28 19:27:29 -06:00
verifyBloxorz.js feat: overhaul Bloxorz rendering, mechanics, and level design; update Total Annihilation visuals 2026-07-25 14:50:23 -06:00
verifyBookwork.js Major Port 2026-06-28 19:27:29 -06:00
verifyCanasta.js Major Port 2026-06-28 19:27:29 -06:00
verifyCivilization.js feat: add barbarian raiders system with warlord ransoms 2026-08-01 18:18:36 -06:00
verifyColoradoDefense.js Further Tweaks to Colorado Defense 2026-07-14 13:19:07 -06:00
verifyCribbage.js Major Port 2026-06-28 19:27:29 -06:00
verifyDotLink.js Major Port 2026-06-28 19:27:29 -06:00
verifyDungeonBoss.js feat(dungeonboss): mid-walk spell casting in adventure windows 2026-07-06 21:55:04 -06:00
verifyExcitebike.js feat(excitebike): add cool-zone speed boost and cooldown feedback 2026-08-01 15:44:17 -06:00
verifyGinRummy.js Major Port 2026-06-28 19:27:29 -06:00
verifyGooTower.js feat(gootower): add sleeping goo mechanic and redesign levels 2026-07-31 23:37:48 -06:00
verifyJewelQuest.js Major Port 2026-06-28 19:27:29 -06:00
verifyJumble.js feat: add Jumble word puzzle game with 58 curated levels 2026-06-30 19:42:57 -06:00
verifyMahjong.js Major Port 2026-06-28 19:27:29 -06:00
verifyMahjongMatch.js Major Port 2026-06-28 19:27:29 -06:00
verifyMasterOfVega.js feat(mastervega): add morale bonus system and espionage restraint diplomacy 2026-08-16 08:12:16 -06:00
verifyMiniMotorways.js feat(minimotorways): dynamic scaling and starvation-safe spawning 2026-07-23 21:55:20 -06:00
verifyPaiGowPoker.js Major Port 2026-06-28 19:27:29 -06:00
verifyPeggle.js feat(peggle): overhaul 7 powers with enhanced mechanics, visuals, and audio 2026-07-12 15:29:55 -06:00
verifyPuddingMonsters.js feat: pudding monsters waves 1-3, mahjong match FX, background art 2026-07-26 01:27:36 -06:00
verifyRisk.js Major Port 2026-06-28 19:27:29 -06:00
verifyRummikub.js Major Port 2026-06-28 19:27:29 -06:00
verifyRushHour.js feat(rushhour): redesign level bank, procedural art, and tiered curriculum 2026-07-28 22:12:55 -06:00
verifySWDBG.js feat(swdbg): overhaul card data from physical set transcription 2026-07-08 22:07:48 -06:00
verifySlots.js Major Port 2026-06-28 19:27:29 -06:00
verifySpireClimb.js Major Port 2026-06-28 19:27:29 -06:00
verifyStarControl.js feat: add Star Control space combat game 2026-07-14 22:45:56 -06:00
verifySuperKart.js feat(superkart): add missed-checkpoint correction for shortcut detection 2026-07-22 13:00:12 -06:00
verifyTempest.js retune tempest difficulty and fix death persistence 2026-07-21 22:52:07 -06:00
verifyTetrisAttack.js Re-theme stage clear to helping friends with multi-line intros 2026-07-22 20:52:05 -06:00
verifyTotalAnnihilation.js TA AI Updates 2026-08-17 21:15:32 -06:00
verifyWolfenstein.js Wolfenstein: Add semi-auto fire modes, ammo types, enemy stun, and editor facing picker 2026-08-22 09:39:09 -06:00
verifyZuma.js Zuma Level Refactor 2026-07-28 21:33:36 -06:00
wolfensteinMap.js feat(wolfenstein): add enemy vision cone, patrol loop behavior, and weapon sprites 2026-08-21 20:23:02 -06:00