feat: add optecton target handling; add attack targeting types
This adds handling for new Optecton attack concept. Also adds some other targeting types that are potentially useful.
RequiresTarget, // If target doesn't exist, attack will not fire (default)
RemembersTarget, // If target doesn't exist, fallback on the position of last target
AcquiresNewTargets, // If target doesn't exist, try to find a new target, otherwise will not fire
AcquiresNewTargetsAndRemembers, // If target doesn't exist, try to find a new target, otherwise fallback on the position of last target
The already existing default is RequiresTarget
. Optecton uses RemembersTarget
, which essentially means it will continue to dumb fire at the dead target. AcquiresNewTargets
would snap to new targets and not fire after all targets are dead. Where AcquiresNewTargetsAndRemembers
would do the same, but would also dumb fire at the last dead target.
Requires the following dat changes:
- Attack factor set to 10
- Attack behavior set to go to max range
- Adjust damage and/or cost, for balancing sake. This probably needs to be just a slight nudge not anything major.
Requires the following iscript changes:
OptectonGndAttkInit:
playfram 0x00
OptectonGndAttkRpt:
wait 1
nobrkcodestart
wait 1
playsnd 1557 # Architect charge 01
imgol 1820 0 0 # Architect charge overlay
wait 7
imgol 1820 0 0 # Architect charge overlay
wait 7
imgol 1820 0 0 # Architect charge overlay
wait 8
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
call OptectonShoot
playfram 0x260
wait 1
playfram 0x00
wait 1
nobrkcodeend
gotorepeatattk
ignorerest
goto OptectonGndAttkToIdle
OptectonShoot:
playfram 0x220
imgoluselo 1855 0 0 # Optecton muzzle flash
playsndbtwn 2310 2313 # Optecton weapon fire 01, 02, 03, 04
attackwith 1
wait 1
playfram 0x240
wait 1
return
Edited by Veeq7