Weapon energy
A resource spent when special weapons are used, tracked per weapon or in one shared pool.
On this page
Weapon energy charges special-weapon use to a resource, tracked per weapon or in a pool shared by multiple weapons1,2.
- Per weaponMega Man 2 (1988). Each weapon has its own energy, and each shot costs its own amount.1Mega Man 3 (1990). Each weapon spends energy at its own rate, some per shot and some per few shots.3
- Shared poolCastlevania (1986). Hearts pay for every subweapon: 1 a throw, 5 for the watch.2Castlevania II: Simon's Quest (1987). Hearts pay for the subweapons and for the merchants' wares.4Castlevania III: Dracula's Curse (1989). Every subweapon spends hearts, most of them one a throw.5,6Super Castlevania IV (1991). Every subweapon spends hearts, most of them one a use.7Star Control II (1992). One battery pays for both weapons and refills on a per-ship timer.8
Mega Man 2 gives each weapon its own energy meter and takes its cost in the weapon routine; Mega Man 3 also tracks each weapon separately, but moves the cost and use interval into two tables indexed by weapon1,3.
The four Castlevania games charge subweapon use to a shared count of hearts2,4,5,7. In the original, a projectile costs 1 heart and the timer subweapon costs 52. Simon’s Quest also uses the same heart-subtraction routine for merchant purchases4. Dracula’s Curse and Super Castlevania IV read subweapon prices from tables5,7.
Star Control II also shares one pool across a ship’s weapons, and the Earthling Cruiser’s battery regenerates while it is below full8. Its battery holds 188, and it regains 18 units every 98 frames. The Castlevania claims establish the heart costs but do not trace how those hearts are replenished2,4,5,7.
Games
| Game | Year | How | Note |
|---|---|---|---|
| Mega Man 2 | 1988 | Per weapon | each weapon has its own energy, and each shot costs its own amount |
| Mega Man 3 | 1990 | Per weapon | each weapon spends energy at its own rate, some per shot and some per few shots |
| Factorio | 2016 | Per weapon | laser turrets fire from their own electric buffers instead of ammunition |
| Castlevania | 1986 | Shared pool | hearts pay for every subweapon: 1 a throw, 5 for the watch |
| Castlevania II: Simon's Quest | 1987 | Shared pool | hearts pay for the subweapons and for the merchants' wares |
| Castlevania III: Dracula's Curse | 1989 | Shared pool | every subweapon spends hearts, most of them one a throw |
| Super Castlevania IV | 1991 | Shared pool | every subweapon spends hearts, most of them one a use |
| Star Control II | 1992 | Shared pool | one battery pays for both weapons and refills on a per-ship timer |
Every claim about this mechanic, by game (8)
References
- ^ abcEach weapon has its own energy byte, filled to 28 (
$1C) before a Robot Master stage or the first Wily stage but not before the later Wily stages; each weapon's routine takes its own cost, such as 2 per Air Shooter shot, 4 per Crash Bomber, and 1 per 4 Metal Blades counted on a shared counter.Codelsmmega/mm2How we know
73_bosses_defeated_to_continue_stage: 74 LDA z:zcurrent_stage 75 CMP #stage_wily1 76 BCC _game_over_to_continue_stage 77 JSR _home_wily_castle 78 LDA z:zcurrent_stage 79 CMP #stage_wily2 80 BCS _dont_refill_energy_on_wily_stage ⋮ 82_game_over_to_continue_stage: 83 LDX #$0A 84 LDA #$1C ⋮ 86@loop: ⋮
engine/main.asm lines 73–89 at 94f0bf3 · upstream ↗ 94 SEC 95 LDA z:zweapon_energy + $01 96 SBC #$02 97 STA z:zweapon_energy + $01
home/weapons.asm lines 94–97 at 94f0bf3 · upstream ↗ 205@crash_bomber: ⋮ 212 LDA z:zweapon_energy + $07 213 SBC #$04 214 BCC @skip_8 215 STA z:zweapon_energy + $07
home/weapons.asm lines 205–215 at 94f0bf3 · upstream ↗ 240@not_exist_4: 241 LDY #$07 242 JSR _create_weapon 243 track_queue track_metal_blade 244 INC z:zweapon_consume_fraction 245 LDA z:zweapon_consume_fraction 246 CMP #$04 247 BNE @not_max_3 248 LDA #$00 249 STA z:zweapon_consume_fraction 250 DEC z:zweapon_energy + $06
home/weapons.asm lines 240–250 at 94f0bf3 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abcdeIn Castlevania a subweapon throw needs hearts; each of the four subweapons the double and triple shots multiply costs 1 heart and a free slot, the fifth, which starts a 15-count timer instead of a projectile, costs 5, and with 0 hearts nothing is thrown.Code“Castlevania (USA) (Rev 1)”revised
How we know
In the cartridge (“Castlevania (USA) (Rev 1)”): bank 7 $FA26-$FA61, ShootSubweapon in the Castlevania-Labelled-Disassembly: no throw with hearts ($71) at 0; weapon index = CurrentWeapon − 8; index 2 sets a timer $015D = 15; the others with a 1 in the table at $FA62 call $DA44; bank 7 $DA44-$DA5E: find a free object slot (as many as the multiplier allows), then hearts − 1; bank 7 $DA7B-$DA8F, index 2's entry in the $DA5F jump table: hearts − 5, or no use if that goes negative; bank 7 $E801-$E813, MultiplierAcquired: the multiplier counts only for weapons $08, $09, $0B, and $0D (indices 0, 1, 3, 5). We don't reproduce the bytes.
Checked against the evidence by its author, an AI model, 2026-10-21.
Revised after a check by a second AI model, 2026-10-21.
- ^ abMega Man 3 moves weapon costs into two tables indexed by weapon:
weapon_cost, the units taken, andweapon_framerate, how many uses (or frames, for Rush Marine and Rush Jet) each take costs, counted on one shared counter. Needle Cannon costs 1 unit per 4 shots and Gemini Laser 2 per shot. Mega Man 2 writes the costs into the weapons' own routines, as its Air Shooter, Crash Bomber, and Metal Blade code shows.Codeplasticsmoke/megaman3-disassembly-ca65 · lsmmega/mm2revisedHow we know
254decrease_ammo_tick: ldy current_weapon ; Y = current weapon index 255 inc $B5 ; increment usage frame counter 256 lda $B5 ; load current count 257 cmp weapon_framerate,y ; compare to drain rate for this weapon 258 bne decrease_ammo_return ; not at threshold → return 259 lda #$00 ; reset frame counter to 0 260 sta $B5 ; store reset counter 261 lda player_hp,y ; load weapon ammo 262 and #$1F ; mask to ammo value (low 5 bits) 263 sec ; subtract ammo cost 264 sbc weapon_cost,y ; subtract ammo cost 265 bcs ammo_store_clamped ; no underflow → store result ⋮
src/fixed/player_warp.asm lines 254–268 at 58ca1c3 · upstream ↗ 289weapon_cost: .byte $00,$02,$01,$02,$02,$00,$01,$03 290 .byte $01,$01,$01,$01 ⋮ 295weapon_framerate: .byte $00,$01,$04,$01,$01,$00,$02 296 .byte $01,$01,$1E,$02,$1E ; Spark $01, R.Marine $1E, Shadow $02, R.Jet $1E
src/fixed/player_warp.asm lines 289–296 at 58ca1c3 · upstream ↗ 64WPN_BUSTER = $00 ; Mega Buster (arm cannon) 65WPN_GEMINI = $01 ; Gemini Laser 66WPN_NEEDLE = $02 ; Needle Cannon ⋮ 75WPN_RUSH_JET = $0B ; Rush Jet
include/constants.inc lines 64–75 at 58ca1c3 · upstream ↗ 95 LDA z:zweapon_energy + $01 96 SBC #$02 97 STA z:zweapon_energy + $01
home/weapons.asm lines 95–97 at 94f0bf3 · upstream ↗ 212 LDA z:zweapon_energy + $07 213 SBC #$04 214 BCC @skip_8 215 STA z:zweapon_energy + $07
home/weapons.asm lines 212–215 at 94f0bf3 · upstream ↗ 244 INC z:zweapon_consume_fraction 245 LDA z:zweapon_consume_fraction 246 CMP #$04 247 BNE @not_max_3 248 LDA #$00 249 STA z:zweapon_consume_fraction 250 DEC z:zweapon_energy + $06
home/weapons.asm lines 244–250 at 94f0bf3 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Revised after a check by a second AI model, 2026-10-21.
- ^ abcdIn Simon's Quest hearts are both subweapon ammunition and money; the knives' routine and a merchant's deal both call one routine that subtracts a BCD price from the heart count and refuses when there aren't enough, and the knives' routine passes it 1 heart, or 2 for one of them.Code“Castlevania II - Simon's Quest (USA)”revised
How we know
In the cartridge (“Castlevania II - Simon's Quest (USA)”): bank 7 $D856-$D891: the subweapon wrapper ($D856) and the check ($D867), a BCD subtraction from hearts $48/$49 that stores the result only if it doesn't go below 0; bank 7 $D8D6-$D8E4, the knives: cost 2 for subweapon 3, else 1, through $D856; bank 7 $ED90-$ED99, a merchant deal calling the same $D867 with its price. We don't reproduce the bytes.
Checked against the evidence by its author, an AI model, 2026-10-21.
Revised after a check by a second AI model, 2026-10-21.
- ^ abcdDracula's Curse prices its subweapons from one table of eleven entries, nine at 1 heart, one at 5, and one at 0; a use compares the heart count with the price, and a thrown one subtracts it in BCD.Codevinheim3/castlevania3-disasm · “Castlevania III - Dracula's Curse (USA)”
How we know
lda wNumHearts … cmp $bab6, y … lda $bab6, y … jmp $e753
code/playerStateProcessing_b1d.s#L4099-L4111 · upstream ↗ In the cartridge (“Castlevania III - Dracula's Curse (USA)”): bank $1D $BAB6-$BAC1, the prices for subweapons 1 to 11 after a 0 for none. We don't reproduce the bytes.
jsr $8c2f
code/bank1f.s#L1151-L1155 · upstream ↗ lda wNumHearts … and #$0f … sbc $00 … sbc #$06 … sbc #$10 … sta wNumHearts
code/bank00.s#L603-L625 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^Using a subweapon spends hearts, and whipping torches and light fittings turns up more.WebNintendo Life, Castlevania III review · Konami, Castlevania III manualrevised
How we know
sub-weapons which, when used, deplete your stock of hearts. As ever, hearts can be replenished by whipping the various torches and light-fittings
second paragraph · archived copy ↗ may appear when you knockout/blowout a candle or lantern
Gifts from the Poltergeist Masters · archived copy ↗ The quote matches our archived copy.
Revised after a check by a second AI model, 2026-10-22.
- ^ abcdSuper Castlevania IV prices its five subweapons from one table, 1 heart each for the first four and 5 for the fifth; a use with fewer hearts than the price leaves them as they are, and otherwise subtracts the price in BCD.Code“Super Castlevania IV (USA)”
How we know
In the cartridge (“Super Castlevania IV (USA)”): $00:BD43-$BD5B: Y = subweapon $8E × 2; if hearts $13F2 < the word at $9255 + Y, return; else a decimal-mode subtraction; $01:9257-$9260, five words: 1, 1, 1, 1, 5; $00:8000-$8014, the reset code: native mode, then with an 8-bit A lda #$01, pha, plb, so the data bank is $01; $00:81B8-$81C9, the native NMI handler (vector $FFEA = $81B8), which also sets the data bank to $01. We don't reproduce the bytes.
Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^ abcdeA ship's battery pays for both its weapons and refills by itself. Each frame,
ship_preprocesscounts the energy counter down, or, when it is 0 and the battery is below full, addsENERGY_REGENERATION; every successfulDeltaEnergy, a refill or a shot's cost, resets the counter toENERGY_WAIT. A weapon fires only ifDeltaEnergycan take its whole cost. The Earthling Cruiser holds 18 (MAX_ENERGY), regains 1 unit every 9 frames (ENERGY_WAIT8), pays 9 a missile (WEAPON_ENERGY_COST) at most once every 11 frames (WEAPON_WAIT10), and 4 (SPECIAL_ENERGY_COST) for each use of its point-defense laser, taken only when a colliding, uncloaked object is within 100 display units (LASER_RANGE) to fire at. So a full battery holds two missiles and refills from empty in 162 frames, 6.75 seconds at 24 frames a second (computed).CodeThe Ur-Quan Masters (2002 import)How we know
24#define MAX_ENERGY 18 25#define ENERGY_REGENERATION 1 26#define WEAPON_ENERGY_COST 9 27#define SPECIAL_ENERGY_COST 4 28#define ENERGY_WAIT 8 ⋮ 33#define WEAPON_WAIT 10
sc2/src/sc2code/ships/human/human.c lines 23–33 at 2f5b2c3 · upstream ↗ 48 MAX_ENERGY, MAX_ENERGY, ⋮ 59 ENERGY_REGENERATION, 60 WEAPON_ENERGY_COST, 61 SPECIAL_ENERGY_COST, 62 ENERGY_WAIT, ⋮ 65 WEAPON_WAIT,
sc2/src/sc2code/ships/human/human.c lines 48–66 at 2f5b2c3 · upstream ↗ 187 if (ObjectPtr != ShipPtr && CollidingElement (ObjectPtr) && 188 !OBJECT_CLOAKED (ObjectPtr)) ⋮ 190#define LASER_RANGE (UWORD)100 ⋮ 203 if ((UWORD)delta_x <= LASER_RANGE && ⋮ 212 if (!PaidFor) ⋮ 214 if (!DeltaEnergy (ShipPtr, -SPECIAL_ENERGY_COST))
sc2/src/sc2code/ships/human/human.c lines 186–214 at 2f5b2c3 · upstream ↗ 210 if (StarShipPtr->energy_counter) 211 --StarShipPtr->energy_counter; 212 else if (RDPtr->ship_info.energy_level < (BYTE)RDPtr->ship_info.max_energy 213 || (SBYTE)RDPtr->characteristics.energy_regeneration < 0) 214 DeltaEnergy ((ELEMENTPTR)ElementPtr, 215 (SBYTE)RDPtr->characteristics.energy_regeneration);
sc2/src/sc2code/ship.c lines 210–215 at 2f5b2c3 · upstream ↗ 260DeltaEnergy (ELEMENTPTR ElementPtr, SIZE energy_delta) ⋮ 279 if ((BYTE)-energy_delta > ShipInfoPtr->energy_level) ⋮ 281 retval = FALSE; ⋮ 290 StarShipPtr->energy_counter = 291 StarShipPtr->RaceDescPtr->characteristics.energy_wait;
sc2/src/sc2code/status.c lines 260–295 at 2f5b2c3 · upstream ↗ 284 if (StarShipPtr->weapon_counter) 285 --StarShipPtr->weapon_counter; 286 else if ((StarShipPtr->cur_status_flags 287 & WEAPON) && DeltaEnergy ((ELEMENTPTR)ElementPtr, 288 -RDPtr->characteristics.weapon_energy_cost)) ⋮ 321 StarShipPtr->weapon_counter = 322 RDPtr->characteristics.weapon_wait;
sc2/src/sc2code/ship.c lines 284–322 at 2f5b2c3 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Checked by a second AI model, 2026-10-22.
Sources
Code
- lsmmega. 2026. “mm2: Mega Man 2 disassembly (lsmmega/mm2).” Commit 94f0bf3. lsmmega/mm2 @ 94f0bf3 · licence, all uses
- 1987. “Castlevania (USA) (Rev 1).” · licence, all uses
- plasticsmoke. 2026. “Mega Man 3 (U), annotated ca65 disassembly (plasticsmoke).” Commit 58ca1c3. plasticsmoke/megaman3-disassembly-ca65 @ 58ca1c3 · licence, all uses
- 1988. “Castlevania II - Simon's Quest (USA).” · licence, all uses
- vinheim3. 2020. “castlevania3-disasm: a disassembly of Castlevania III: Dracula's Curse.” Commit 3272648. vinheim3/castlevania3-disasm @ 3272648 · licence, all uses
- 1990. “Castlevania III - Dracula's Curse (USA).” · licence, all uses
- 1991. “Super Castlevania IV (USA).” · licence, all uses
- Reiche, Paul, Fred Ford, and The Ur-Quan Masters project. 2002. “The Ur-Quan Masters: Star Control II's 3DO source, the project's initial import.” Commit 2f5b2c3. sc2/uqm @ 2f5b2c3 · licence, all uses