Entry 556
Bosses as defs: the class machinery and BossData out; a bare ccBoss its own def's steps, Patterns::words by the volume, actAnmTbl a static slice
28mbattle
Documented in Bosses - ccBoss and Skeith.
Files50 in 15 directories
crates/piney-battle/examples/battle_probe/
boss.rscorbenik.rscorbenik_b.rscorbenik_c.rsfidchell.rsgorre.rsinnis.rskyvia.rsmacha.rsmagus.rstarvos.rscrates/piney-battle/src/boss.rscrates/piney-battle/src/boss/class.rscorbenik.rsdefs.rsfidchell.rsgorre.rsinnis.rskyvia.rsmacha.rsmagus.rspart.rsskeith.rstarvos.rscrates/piney-battle/src/boss/corbenik/eye.rsfirst.rssecond.rsseed.rstests.rsthird.rscrates/piney-battle/src/boss/fidchell/tests.rscrates/piney-battle/src/boss/gorre/brother.rsmessage.rstests.rscrates/piney-battle/src/boss/kyvia/core.rsfourth.rsgomora.rstests.rscrates/piney-battle/src/boss/macha/tests.rscrates/piney-battle/src/boss/magus/leaf.rstests.rscrates/piney-battle/src/boss/systems/frame.rsmod.rspatterns.rscrates/piney-battle/src/boss/tarvos/tests.rscrates/piney-game/src/session/tests/survey.rscrates/piney-world/src/combat/boss.rsmod.rsdocs/engine/boss.mdplans/rust-cleanup.mdMentioned inplans/rust-cleanup.md:457
Section 2's "Bosses as defs and systems", its last step: with Corbenik (555) every boss class is its def and its systems, so what dispatched to the classes not yet converted goes.
Gone
Class(the enum a boss carried beside its systems) andBoss.class;boss/class.rswithBossClass(the class'sMain,Affect, pass, next and show),Bareandeach_class!.Boss::build(def, base)is the one way to make a boss.Step::ClassandHook::Mainfrom the runner, and the class's show inBoss::show(each system's draw overccBoss::Draw's body is all of it now).BossBase::base_main, the closure-drivenccBoss::Mainthe classes and the bare base ran through: its last users, Innis's images (554) and Corbenik's roots (555), write the blocks out.PartClassandpart_system!: a part's own is any system kind,Part<T: SystemKind>lends it off its boss's list and puts it back at its place in the def's.BossData,Cx::data,BossEnv::dataand piney-world'sBattleData::bosses(always set; the boss start and the affects checked it): every boss's tables are views of the volume'stables::combat.
Changed
BASE_BOSSis what a bareccBossis: itsMainthe blocks alone (Live[Prologue, TickStop, LockParty, Move, ForwardAndDraw], itsThinkandActionempty), itsAffectccBoss::Affect, no pass and no hand-over.BASE_PARThas no frame of its own (its master runs it). The defs no longer write out the empty pass and hand-over orccBoss'sAffectthey get from it; Corbenik's later forms keep an empty hand-over over the first's.Patterns::wordstakes the volume (&'staticwords), and each class's table helper with it.BossBase.anm_tbl(actAnmTbl) is a static slice of the volume's tables, no longer a copy of owned strings.- piney-game's tests name the boss they look for by its def (
r.look.def == &defs::GORRE), not by its game class.
rg -n 'class::<|split_mut|has\(System::|Class::' crates/piney-battle crates/piney-world/src/combat crates/piney-game/src now finds, of the
bosses, only the defs' own class: BossGameClass::... rows (the game
class a def is); the rest are the towns' town.class::<T>() (the town
item next), the sky maps' and the gimmicks' own Class enums.
Checks
- The pins: 290 recorded
battle_probecalls replayed against the new release probe, none differ. - Against the game: the eleven
test_battle_*_rson their volumes,test_boss_effect_rson all four,test_bosscam_rson Infection, Mutation and Quarantine. - The golden shots, all 21 tests of
s552(worklog 553): 2,255 PNGs, every one byte for byte. - piney-battle's, piney-world's, piney-effect's, piney-data's and piney-event's tests, piney-game's suite (release).
piney-gen gen --check, clippy with all features (too_many_arguments150, nodead_codeallows), fmt,cairns check,tools/docs.py check.
Still unknown
nothing this step opened.