Entry 80
The first fights: event 3's goblins, the portals and free play in field 14, Kite and Orca against the game's enemies
Documented in Leaving the town - Kite in a field and its dungeon.
Filescrates/piney-world/src/combatcrates/piney-world/src/foe.rscrates/piney-world/src/field_world.rscrates/piney-world/src/dungeon_area.rscrates/piney-world/src/talk.rscrates/piney-world/src/map/mod.rscrates/piney-battle/src/evparty.rscrates/piney-battle/src/flow.rscrates/piney-data/src/anim.rscrates/piney-game/src/fx.rscrates/piney-game/src/area.rscrates/piney-game/src/area_host.rscrates/piney-game/src/session.rstools/test_battle_event_rs.pytools/test_gamectrl_rs.pytools/test_foe_rs.pytools/anim.pydocs/engine/battle.mddocs/engine/field-walk.md
The parts were ported and checked separately:
A combat agent and its helpers have now put them together in the field. A new game plays events 2 and 3, with event 3's fight, and then free play.
What plays
-
Event 3's tutorial. The portal opens on a goblin held by
hold, andplayer_skill's X hits it until it is down. The skill, target and chat tutorials (menus 80-83) complete, and the event ends withmenu_clear. -
Free play.
- Walk to a portal and a goblin comes out.
inBattleturns on and the battle music plays.- Orca fights.
- X on the targeted enemy is Kite's normal attack.
- The kill gives experience.
-
What is drawn. The enemies with their looks, fog blend and hit flash (foe.rs). Through piney-effect:
- the portals, sparks and hit marks;
- the rising damage numbers and the ATTACK and CRITICAL words;
- the deaths and the arrival.
The HUD's target window shows the goblin's name and HP. The minimap shows the portals.
How it is built
- The frame. piney-world's new combat module keeps piney-battle's
scene in the field and dungeon worlds. It runs the game's frame order:
- ccThSpc;
- the AI bus;
kite::main;- the fellows;
- the entry control;
ccThEffect;ccThSkill;ccThParticle.
- The portal. piney-battle's entry control is the portal's logic. It
spawns the goblins, and piney-effect's
MagicCircle::renderdraws them. So the portal, ported twice, now has one owner for each part. - The battle half of
ccThGameCtrlistalk::Targeting::frame:SetInBattleand the attack button. - The event instructions the fights use are in piney-battle's
evparty.rs:
pc_command, the walks, the puts, and turns and faces;hold/ccThEvHold,player_skillandbattle_ready;removeof types 5 and 6, andenemy_put.
- Animation notes. piney-data's animation reader now reads the
F_Noterecords that attacks land on, checked against the game.
Checked
- New harnesses against the game.
test_battle_event_rs: the event instructions.test_gamectrl_rs: the battle half ofccThGameCtrl.test_foe_rs: the enemies' drawing decisions.
- Earlier suites. The animation notes (
test_anim) and the suites these files touch pass (the earlier battle suites at 1,000 cases each):- the battle suites;
- world, field, dungeon and map;
- the field UI;
- the event characters;
- effects.
- Runtime test.
event_3_plays_its_fightsplays a new game through events 2 and 3's fights in about 4 seconds. This checks the port's own behaviour, not against the game. - Re-run in a clean worktree. All of the above pass, with the workspace's tests, clippy, fmt and the docs check.
- Shots.
- A portal opening.
- A targeted goblin at 50/50.
- Kite's blow: 12 damage, the ATTACK mark, the goblin flashing red at 38/50.
- Orca fighting beside him.
- The goblin down.
- Still being ported: - the dungeon side: entering field 14's dungeon and event 4; - the fight's sounds (
ccSeOn3Dand the enemy and party sound parameters). - Not done: - the AI's chat lines; - spells through piney-effect; - Data Drain's presentation; - game over past its signal; -boss()for the events.