Hat Pogona | Partnered MATURE AUDIENCE Streamer | Reptile Science | Voice Dude | Resume @ http://bio.link/desertp | 32M | Capcom Creator | Time and Space is convoluted in my brain.


nex3
@nex3

I believe Magma Wyrm is the first boss I've examined that has an entirely different set of attacks between Phase 1 and Phase 2. In the first phase, it crawls around on its belly and mostly focuses on swing its sword if the player is nearby and belching lava if they're far away, although it also has a dangerous charge attack during which it drools magma all over the floor.

Magma Wrym phase 1 combo chart


Once it hits 60% health, it begins Phase 2 by rising up onto its hind legs and dripping magma on its sword, making it red-hot. This phase, while still relatively simple (as is common for large bestial enemies), has more complex and sword-focused combos along with similar belching and drooling lava attacks.

Magma Wrym phase 2 combo chart

Because it's in an entirely different stance between these two phases, it makes sense that it would have different attacks. It handles this internally by setting the special effect ID 11321 in its phase-transition animation, and then checking this ID as it decides which attacks to queue up each time it's idle. The code looks more or less like this:

local probabilities = {}
if actor:GetHpRate(TARGET_SELF) <= 0.6 and
        not actor:HasSpecialEffectId(TARGET_SELF, 11321) then
    probabilities[29] = 100
elseif actor:HasSpecialEffectId(TARGET_SELF, 11321) then
    -- Set attack probabilities for Phase 2
else
    -- Set attack probabilities for Phase 1
end

The probabilities table keeps track of the relative probability of the "act" functions with the associated number. Under normal circumstances, several different probabilities are set based on the player's distance and similar factors, but when it's time for a phase change (as it is here when the AI checks whether actor:GetHpRate(TARGET_SELF) <= 0.6) there's only one set to guarantee that the phase transition happens. The probabilities are then adjusted based on which attacks have been used how recently, and a weighted random roll determines which act function runs.

Most act functions look like this:

function king_grounddragon491000_Act29(_, goals, _)
    goals:AddSubGoal(GOAL_COMMON_AttackTunableSpin,
        10, 3005, TARGET_ENE_0, DIST_None, 0, 90)
    GetWellSpace_Odds = 0
    return GetWellSpace_Odds
end

A simple call to queue up an animation with various parameters (which mostly seem to control the conditions under which the attack actually happens). The most important thing here is the number 3005, which indicates the attack animation to run—in this case, the phase transition.

What's particularly interesting about Magma Wyrm, beyond how distinct its phases are, is the fact that they weren't originally supposed to be different phases. There are a number of unused animations in the program that move the wyrm from standing back to crawling:

Magma Wyrm starts in a standing position, slams its sword down, pulls it back, and ends up lying on the floor.
Magma Wyrm animation 1_3005
Magma Wyrm jumps forward, slams down its sword, then settles onto its stomach.
Magma Wyrm animation 1_3007

None of these animations are fully fleshed-out, so it's unlikely that the concept of the wyrm moving back and forth between standing and crawling made it very far into playtesting. But it's an interesting vision into the thought process of design, both in terms of the questions it asks (what if the notion of "phase transition" wasn't strictly monotonic?) and in terms of the conclusions it draws (that's not a good idea). I agree with their conclusion: even if you can swap back and forth, having the buildup from one phase two another provides a fight with rhythm, reward, and depth of challenge while flipping back and forth is just doing exploring design space because it's there.


You must log in to comment.

in reply to @nex3's post:

If it could always switch I think there would be too many attacks to keep track of! I like the decision they made. I really hate the charge attack though, it would always spam it against me and it was hard to dodge