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
lib
bloxorzMap.js
buildCommonWords.js
fetchStarControlAssets.js
genBloxorz.js
genDotLink.js
genExcitebikeTracks.js
genGooTower.js
genJumble.js
genKatamino.js
genMiniCrossword.js
genPeggleLevels.js
genPuddingMonsters.js
genRushHour.js
genSpireClimbCreatures.js
genSuperKartTracks.js
genTACampaign.js TAL: smooth obstacle collision push + in-place building upgrades (upgradesFrom) 2026-08-16 18:59:30 -06:00
genTetrisAttackPuzzles.js
genWolfenstein.js feat(wolfenstein): add enemy vision cone, patrol loop behavior, and weapon sprites 2026-08-21 20:23:02 -06:00
genZuma.js
readExcitebikeMaps.js
verifyAdvanceWars.js
verifyBalatro.js
verifyBejeweled.js
verifyBlockFighter.js
verifyBloxorz.js
verifyBookwork.js
verifyCanasta.js
verifyCivilization.js
verifyColoradoDefense.js
verifyCribbage.js
verifyDotLink.js
verifyDungeonBoss.js
verifyExcitebike.js
verifyGinRummy.js
verifyGooTower.js
verifyJewelQuest.js
verifyJumble.js
verifyMahjong.js
verifyMahjongMatch.js
verifyMasterOfVega.js feat(mastervega): add morale bonus system and espionage restraint diplomacy 2026-08-16 08:12:16 -06:00
verifyMiniMotorways.js
verifyPaiGowPoker.js
verifyPeggle.js
verifyPuddingMonsters.js
verifyRisk.js
verifyRummikub.js
verifyRushHour.js
verifySWDBG.js
verifySlots.js
verifySpireClimb.js
verifyStarControl.js
verifySuperKart.js
verifyTempest.js
verifyTetrisAttack.js
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
wolfensteinMap.js feat(wolfenstein): add enemy vision cone, patrol loop behavior, and weapon sprites 2026-08-21 20:23:02 -06:00