Defeating a boss or completing a challenge awards the player that enemy's attack capability.
The Mega Man pattern: defeat the boss and inherit its weapon — its mace flies to the hero, who takes on the boss's colour and wields it.
Beating a boss grants its weapon: a defeated signal hands a WeaponData into your inventory, where weapon-switching picks it up. Pure data flow.
The boss emits defeated with its signature weapon attached. The reward is decoupled from the fight — the boss doesn't know what happens next.
signal defeated(reward: WeaponData)
func die():
defeated.emit(my_weapon)
queue_free()The awarded weapon is just another WeaponData. Inheritance is adding it to the same array your weapon-switching already walks.
func _on_boss_defeated(reward):
GameState.owned_weapons.append(reward)Track which bosses are beaten so the weapon stays granted across save/load and never re-awards.
var defeated_bosses := {}
defeated_bosses["airman"] = trueIn short: Boss defeated signal → add_item(boss.weapon_resource) in GameState; weapon becomes available in weapon_switching
6 catalogued game(s) use this mechanic, spanning 1987–1994.
▶ Explore Weapon Inheritance interactively — see every game + the Godot system