In both US releases Link's health counts in quarter hearts, the annotators' reading in a comment that calls the starting $0c "3 hearts". The fourth Piece of Heart resets the count to 0 and gives Link a Heart Container with a parameter of 4, one heart. Link's Awakening DX also takes four pieces, but there the fourth adds a heart to a maximum kept in whole hearts and queues $40 of health in eighths, eight hearts' worth. | code/fileManagement.s L389–391data/ages/treasureCollectionBehaviours.s L251–254data/seasons/treasureCollectionBehaviours.s L219–222code/textbox.s L2018–2029code/textbox.s L308–326 | Code |
In both US releases a Heart Container adds its parameter to Link's maximum health, 4 quarters (one heart) for every Heart Container treasure object the data defines and for the one the fourth Piece of Heart gives. It always brings a heart refill of $40, which is sixteen hearts (computed, in the quarter hearts a comment gives), capped at the maximum. Link's Awakening DX's boss container adds a heart and queues $FF of health instead. | data/ages/treasureCollectionBehaviours.s L246–249data/seasons/treasureCollectionBehaviours.s L214–217data/ages/treasureCollectionBehaviours.s L1–23data/ages/treasureObjectData.s L265–268data/seasons/treasureObjectData.s L230–233data/ages/treasureObjectData.s L8–13code/treasureAndDrops.s L115–123code/treasureAndDrops.s L199–204code/treasureAndDrops.s L319–362 | Code |
In both US releases what a touch does to Link comes from a collision table indexed by the enemy's collision mode. A standard enemy (Octorok's collision mode) uses the plain damage effect, which sets Link's invincibility counter to $22, so he can't be hit for 34 frames, counted one per object update. The low- and high-knockback effects set 25 and 42. Link's Awakening DX sets $50, 80 frames, on every hit. | data/ages/objectCollisionTable.s L14–21data/ages/enemyData.s L20data/seasons/enemyData.s L13data/ages/objectCollisionTable.s L97–98data/seasons/objectCollisionTable.s L68–69code/collisionEffects.s L468–492code/collisionEffects.s L1462–1476code/collisionEffects.s L1427–1432code/bank0.s L6310–6317object_code/common/specialObjects/commonCode.s L108–119code/specialObjects.s L53–56 | Code |
In both US releases the plain damage effect sets Link's knockback counter to 15 (7 and 21 for the low- and high-knockback effects), and the Steadfast Ring halves it. The counter drops by one per object update on the ground, which is a frame if the objects update once a frame (not read). While it runs Link moves at SPEED_140, 1.25 pixels a frame along one axis (computed from the speed table's comment that SPEED_100 is one pixel a frame on one axis, not diagonally), and his top-down normal state skips the d-pad. The angle is taken from the enemy toward a position for Link; that it points away from the enemy is the atlas's reading of objectGetRelativeAngleWithTempVars's header comment, and the position passed for Link wasn't traced. Link's Awakening DX's knockback countdown runs 16 frames. | code/collisionEffects.s L1466–1476code/collisionEffects.s L1434–1444code/collisionEffects.s L330–332code/bank0.s L6761–6766code/specialObjectAnimationsAndDamage.s L575–580object_code/common/specialObjects/link.s L4481–4516constants/common/objectSpeeds.s L7–8object_code/common/specialObjects/link.s L2769–2770object_code/common/specialObjects/link.s L2823–2826object_code/common/specialObjects/link.s L2950–2958 | Code |
In both US releases a killed enemy's byte in itemDropTables picks a chance and a drop set, and two random values decide the drop. The first picks one bit of a 64-bit chance mask (computed, 1 in 16 to always); the second picks one of the set's 32 entries, which Seasons first maps through a Subrosia set when Link is in Subrosia. A drop Link can't use yet, such as bombs or seeds he hasn't found, becomes no drop. An Octorok drops something 24 times in 64; its set holds 16 hearts, 12 single rupees, and 4 five-rupee pieces. | object_code/common/parts/enemyDestroyed.s L28–31code/treasureAndDrops.s L761–811code/treasureAndDrops.s L813–845code/treasureAndDrops.s L894–920include/wram.s L421–423code/treasureAndDrops.s L923–956code/treasureAndDrops.s L1061–1065code/treasureAndDrops.s L1073–1081code/treasureAndDrops.s L1098–1100constants/common/enemies.s L39constants/common/itemDrops.s L4–8 | Code |
In both US releases a hit copies the enemy's damage value to Link as a negative number, and Link's one active ring changes it: Power Rings L1–L3 add 2, 4, and 8 units, Armor Rings L1–L3 take 1, 2, and 3 off, the Blue Ring halves it with an arithmetic shift that rounds toward more damage (3 units become 2), the Green Ring takes three quarters (rounded toward less damage), and the Cursed Ring doubles it. A hit always costs at least one unit, and the Protection Ring makes every hit 8. Health then drops a quarter heart per 2 units, so a unit is an eighth of a heart (computed, from the quarter hearts a comment gives). Link's Awakening DX's health is in eighths by its annotators' comment ($08 = 1 heart), and its Blue Tunic also halves damage. | code/collisionEffects.s L1407–1415include/wram.s L789–791code/specialObjectAnimationsAndDamage.s L462–542code/specialObjectAnimationsAndDamage.s L556–561code/specialObjectAnimationsAndDamage.s L582–599object_code/common/specialObjects/commonCode.s L100–104code/fileManagement.s L390 | Code |