Entry 421
Magus's fight shows its pictures: the leaves' markers, charges, bursts, blinks and countdowns, the laser's thunder and shocks where its beams meet the ground, and the dropped leaves hidden on the body
Documented in Bosses - Magus.
Linked from Twenty-two play questions were already answered: the triage's list against the work since.
Files13 in 10 directories
magus.rscrates/piney-battle/src/boss/magus/leaf.rscrates/piney-effect/src/magus.rsboss.rscrates/piney-world/src/combat/boss.rscrates/piney-world/src/pose.rscrates/piney-game/src/fx.rsarea.rscrates/piney-gen/src/manifest.rstools/test_battle_magus_rs.pytest_boss_effect_rs.pycrates/piney-game/src/session/tests/magus_fx.rsdocs/engine/boss-magus.mdMentioned inGAPS.md:118
Worklog 274 ported Magus's rules and named its pictures (Out::Magus(Pic)),
but nothing drew them. A player saw the leaves fall and burst with no
marker smoke, no charge, no burst, no countdown and no blink; the laser
rose with no thunder and no shocks on the ground; the body kept drawing
its dropped leaves on itself, so each dropped leaf showed twice. The
shocks' beams were taken to meet the ground (shock_hit true unless a
test said not).
What the game draws
Mutation's boss03.cpp and bosseff.cpp; every site is in docs/engine/boss-magus.md, "The pictures":
- The generators. Four tables, each with its force fields: the
leaves' markers, the grow's charge, a dying leaf's smoke and the
laser's thunder.
ccLeafMark::InitAtOnce(a leaf's first fall,Order(24)) makes two markers that follow the marker's place (+0x29420):g_leafMarkerGenrow 0 with ff 0 and 1, and again with ff 1 and 2 andgSync, both texture 102. It pauses both (+5 bit 0); the landing frees them;PrepareExplode,Order(27)and the death pause them again.Order(29)starts the charge at the leaf's place on the body (g_energyChargeGeneratorrow 1, ff 0 and 3, distSW off), killing the one before;Order(27)and(30)kill it.DeadEffectstartsg_leafDeadGen(ff 0, texture 108) at the leaf.- After
SetupLaserShockeach shock startsg_thunderGenerator(ccBossEffThunderCreate) at its object.
- A burst (act 21):
ccBoss03LeafExplode::Draw(0x004a7100) draws xeffect'sEFF_ex31exp2100 over the leaf andOBJ_ex31exp1scaled by its second status, both oncharLayer. - The shocks (
PreDrawAnm's laser step 2, from frame 100). EachDraw(0x004a7630) runs its beam from the shock's object 2000 down, turned by its leaf's local matrix and Magus's heading.ccHitCheckLM(a, end, 0x20000000)writes the contact into the end. ThereEFF_ex31les2is drawn (scale 6, at the fade). Every sixth contact of shocks 0, 3, 6 and 9 bursts: twoccParticleExplodeandeffSmokeRock. - The needles (
ccBossEffNeedle::Draw0x004814d0): xeffect'sOBJ_ex71body2per needle on the effect layer. - The hiding.
PreDrawAnmgives each dropped leaf'sEXT_ex31leaf*object and itsOBJ_ex31ligh*transparency 0 until the clip's next step, unless in the Epitaph or the grow. Act 8 sets the same hiding as its after-images' callback (0x0049e7c0). - A blink (
OnThinkCountDown) enters an after-image of the leaf's anm atframeNow(ccBossAfterImageEx::Init0x004710b0,Draw0x00471320, the leaf'sENTRYAFTERIMAGE_Tat +0x29660): colour 0x005050ff, transparency 0.5 fading by 1/60, its scale growing from 1 to (1, 4, 2) over 30 draws. - The countdown: the seconds left,
MakeSignedNum(2, n)in the global font (type 1, colour 7, shadowed), whereccCalcTagPosputs the leaf 100 up.
Act 31 (the needles) is never reached in the game. Nothing lowers
m_dmgCount (+0x52700): only the constructor (100, 0x0049e388) and the
needle's own branch (0x004a0ef0) write it, and ccBossEffNeedleCreate has
no other caller. The port draws them all the same, from the same code.
In the port
- piney-battle
magus:Gennames each start by its maker;rows()gives its table, row, force fields, distSW,gSyncand texture.Place(at a point or following a leaf's marker) andHeld(which member keeps it).Pic::Gen(kill, pause) where the leaves kill or pause what they keep.Pic::ShockBurstwith the burst'sccRandF(pi),Pic::Count,Pic::LeafAfterImagewith itsframeNow.Magus::shock_at(the contact, None for a miss) replacesshock_hit;shock_posgives the thunder its places;shock_beamis the beam's end.GenOpmoved tobossfor both bosses.- A needle's hold compared the count after its decrement; the game
tests the count before (
hold-- <= 0), so the needles faded a frame early. Found by the effect harness: the rules harness never reaches act 31.
- piney-effect
magus:start,gen_op,Needles,leaf_explode,laser_shock,shock_burst;magus_syncandmagus_shocksinEffects;nodes::clumpdraws a lone OBJ.boss::Tablesreads the four new tables. - piney-world
combat::boss:magus_shocksfinds the shocks before Magus's frame. It posesANM_ex31atc2one step on (from frame 0 when another clip plays, asSetupLaserShockfollows itsSetAnmand step) at the body's last place, which isPreDrawAnm's own (CalcCameraruns after it). Then the line test on the field's hits.- The objects are found by the anm entry's name: the shocks' are
ExtObj copies of
OBJ_ex31les0-4, the leaves' ofOBJ_ex31leaf. Play::hidden(the entries a task hid after the step) anddropped_objectshide the dropped leaves on the body and, in act 8, on its after-images.AfterImagecarries its fade, blend and growth;AfterImage::leaf.
- piney-game:
fx.rsstarts the generators, shocks and bursts from the shows,magus_showssyncs the needles, bursts and markers, andboss_makemakes the needles. The area'sleaf_countssends the countdown throughFieldUi::send_fontat the frame's end, after the faders, as the global font is sent at the flip. - piney-gen: the effect group's
boss_thunder(_ff),boss_energy_charge(_ff),boss_leaf_marker(_ff)andboss_leaf_dead(_ff). Data version 34.
Checks
tools/test_battle_magus_rs.py(Mutation) now records each start in full, each kill of a kept generator, the markers' pause flags and place, the shocks' bursts with their turn, a blink'sframeNowand the countdown's number. 2 tests and bulk 60 from 9000 agree.tools/test_boss_effect_rs.py'stest_magus_effectsruns the game'sccBossEffNeedleCreate,ccBoss03LeafExplode::InitandccBoss03LaserShock::Initwith theirDraws natively against boss_probe'sneedles,leafexpandlshock, frame by frame: the needles (74 frames), two bursts (124) and shocks 0, 3 and 4 with a contact or none (540 each). The draws, the particles and the rocks agree. Every volume's boss-effect tests still agree.session::tests::magus_fx::magus_shows_its_leaves_needles_and_laser(event 115's fight, 9000 frames, the laser reserved and the damage count run out now and then):- markers on the leaves 4,517 frames;
- dropped leaves hidden 3,465 frames, never shown outside the grow;
OBJ_ex71body2108 frames,OBJ_ex31exp1219;- shocks on the ground 686 frames, drawn 218, thunder 299.
- piney-battle, piney-effect, piney-world, piney-fieldui tests,
piney-game's suite (four threads), clippy, fmt,
piney-gen gen --check.
Shots (magus_shots, /mnt/data/claude/scratch/a421):
magus-01692-act31.png: the dropped leaves on the ground with their markers' smoke, their red blinks and the countdowns.magus-04938-act25.png: the laser's shocks on the ground about Kite.magus-01206-act27.png: the leaves charged on the body in the rise.
EntryFlash2 and EntryFlash3 are still one flash and the grow's loop plays once (worklog 274), the fight's sound and fader, not its pictures. Act 30 and a leaf's 23 are not reached by the harness (worklog 274). The blur (ccBossBlur) is drawn for no boss (worklog 117).