11const phases = {
22 'C24C' : 'p2' ,
33 'C3F7' : 'p3' ,
4- 'C2DC' : 'p4' ,
5- 'BB40' : 'p5' , // Ultima Repeater, Ultima Kefka
4+ 'C2DC' : 'p4' , // Kefka Says, Kefka with Chaos and Neo Exdeath
65} ;
76const centerX = 100 ;
87const centerY = 100 ;
@@ -933,6 +932,7 @@ Options.Triggers.push({
933932 initData : ( ) => {
934933 return {
935934 phase : 'p1' ,
935+ middleCount : 0 ,
936936 // Phase 1
937937 actorPositions : { } ,
938938 gravenImageCount : 0 ,
@@ -979,11 +979,24 @@ Options.Triggers.push({
979979 } ,
980980 triggers : [
981981 {
982- id : 'DMU Phase Tracker' ,
982+ id : 'DMU Phase 1-4 Tracker' ,
983983 type : 'StartsUsing' ,
984984 netRegex : { id : Object . keys ( phases ) } ,
985985 run : ( data , matches ) => data . phase = phases [ matches . id ] ?? 'unknown' ,
986986 } ,
987+ {
988+ id : 'DMU Phase 5 Tracker' ,
989+ // Ultimate Kefka
990+ // Track jumps to middle for earlier P5 and Ultima Upsurge
991+ // Rather than using BB40 Ultima Repeater
992+ type : 'Ability' ,
993+ netRegex : { id : 'C3FD' , source : 'Kefka' , capture : false } ,
994+ run : ( data ) => {
995+ data . middleCount = data . middleCount + 1 ;
996+ if ( data . middleCount === 5 )
997+ data . phase = 'p5' ;
998+ } ,
999+ } ,
9871000 {
9881001 id : 'DMU ActorSetPos Tracker' ,
9891002 // P1 Graven Image tethers
@@ -7731,10 +7744,86 @@ Options.Triggers.push({
77317744 } ,
77327745 } ,
77337746 {
7734- id : 'DMU P4/P5 Ultima Upsurge' ,
7747+ id : 'DMU P4 Ultima Upsurge' ,
77357748 type : 'StartsUsing' ,
77367749 netRegex : { id : 'C24A' , source : 'Kefka' , capture : false } ,
7737- response : Responses . bigAoe ( ) ,
7750+ condition : ( data ) => data . phase === 'p4' ,
7751+ durationSeconds : ( data ) => {
7752+ return ( data . isEntropyTrue || data . isEntropyTrue === undefined )
7753+ ? 5
7754+ : 7 ; // Time until Donuts
7755+ } ,
7756+ infoText : ( data , _matches , output ) => {
7757+ const bigAoe = output . bigAoe ( ) ;
7758+ if ( data . isEntropyTrue || data . isEntropyTrue === undefined )
7759+ return bigAoe ; // Player needs to move within 2.6s, TTS would be too long
7760+ const is1stTrue = data . areFirstDebuffsTrue ;
7761+ const is2ndTrue = data . areThirdDebuffsTrue ;
7762+ const isFirstShort = data . isFirstDebuffShort ;
7763+ if ( is1stTrue === undefined || is2ndTrue === undefined || isFirstShort === undefined )
7764+ return bigAoe ;
7765+ const isLongTrue = isFirstShort ? is2ndTrue : is1stTrue ;
7766+ const hasFork = data . longForkedPlayers . includes ( data . me ) ;
7767+ const hasCompressed = data . longCompressedPlayers . includes ( data . me ) ;
7768+ const hasFirstBomb = data . firstLongBombPlayers . includes ( data . me ) ;
7769+ const hasSecondBomb = data . secondLongBombPlayers . includes ( data . me ) ;
7770+ const isBombTrue = hasFirstBomb ? is1stTrue : is2ndTrue ;
7771+ const hasSpread = ( hasFork && isLongTrue ) || ( hasCompressed && ! isLongTrue ) ;
7772+ const hasStack = ( hasFork && ! isLongTrue ) || ( hasCompressed && isLongTrue ) ;
7773+ const hasBomb = hasFirstBomb || hasSecondBomb ;
7774+ // Handle 2 Mechs
7775+ let mechs = output . noDebuff ( ) ; // Has nothing
7776+ if ( hasSpread && hasBomb )
7777+ mechs = output . forkBomb ( {
7778+ mech1 : output . spread ( ) ,
7779+ mech2 : isBombTrue ? output . bomb ( ) : output . fakeBomb ( ) ,
7780+ } ) ;
7781+ else if ( hasStack && hasBomb )
7782+ mechs = output . compressedBomb ( {
7783+ mech1 : output . stack ( ) ,
7784+ mech2 : isBombTrue ? output . bomb ( ) : output . fakeBomb ( ) ,
7785+ } ) ;
7786+ else if ( hasSpread )
7787+ mechs = output . spread ( ) ;
7788+ else if ( hasStack )
7789+ mechs = output . stack ( ) ;
7790+ else if ( hasBomb )
7791+ mechs = output . bombStack ( {
7792+ mech1 : isBombTrue ? output . bomb ( ) : output . fakeBomb ( ) ,
7793+ mech2 : output . stack ( ) ,
7794+ } ) ;
7795+ return output . aoeThenMech ( {
7796+ aoe : bigAoe ,
7797+ mech : mechs ,
7798+ } ) ;
7799+ } ,
7800+ outputStrings : {
7801+ bigAoe : Outputs . bigAoe ,
7802+ you : {
7803+ en : 'YOU' ,
7804+ } ,
7805+ bombStack : {
7806+ en : '${mech1} + ${mech2}' ,
7807+ } ,
7808+ forkBomb : {
7809+ en : '${mech1} + ${mech2}' ,
7810+ } ,
7811+ compressedBomb : {
7812+ en : '${mech1} + ${mech2}' ,
7813+ } ,
7814+ noDebuff : Outputs . stackMarker ,
7815+ stack : Outputs . stackMarker ,
7816+ spread : Outputs . spread ,
7817+ bomb : {
7818+ en : 'Stillness' ,
7819+ } ,
7820+ fakeBomb : {
7821+ en : 'Motion' ,
7822+ } ,
7823+ aoeThenMech : {
7824+ en : '${aoe} => ${mech}' ,
7825+ } ,
7826+ } ,
77387827 } ,
77397828 {
77407829 id : 'DMU P4 Stray Flames and Long Debuffs' ,
@@ -8003,6 +8092,13 @@ Options.Triggers.push({
80038092 suppressSeconds : 99999 ,
80048093 response : Responses . moveAway ( 'alert' ) ,
80058094 } ,
8095+ {
8096+ id : 'DMU P5 Ultima Upsurge' ,
8097+ type : 'StartsUsing' ,
8098+ netRegex : { id : 'C24A' , source : 'Kefka' , capture : false } ,
8099+ condition : ( data ) => data . phase === 'p5' ,
8100+ response : Responses . bigAoe ( ) ,
8101+ } ,
80068102 ] ,
80078103 timelineReplace : [
80088104 {
@@ -8011,6 +8107,8 @@ Options.Triggers.push({
80118107 'Future\'s End/Past\'s End' : 'Future/Past\'s End' ,
80128108 'Spelldriver/Spellscatter/Spellwave' : 'Spelldriver/scatter/wave' ,
80138109 'Longitudinal Implosion/Latitudinal Implosion' : 'Long/Lat Implosion' ,
8110+ 'Fire III/Blizzard III/Thunder III' : 'Fire/Blizzard/Thunder III' ,
8111+ 'Forsaken Ground/Forsaken Bonds' : 'Forsaken Ground/Bonds' ,
80148112 } ,
80158113 } ,
80168114 {
@@ -8358,6 +8456,7 @@ Options.Triggers.push({
83588456 } ,
83598457 {
83608458 'locale' : 'cn' ,
8459+ 'missingTranslations' : true ,
83618460 'replaceSync' : {
83628461 'Black Hole' : '黑洞' ,
83638462 'Chaos' : '卡奥斯' ,
0 commit comments